configure_symbian
branchRCL_3
changeset 7 3f74d0d4af4c
parent 4 3b1da2848fc7
--- a/configure_symbian	Mon Mar 15 12:43:09 2010 +0200
+++ b/configure_symbian	Thu Apr 08 14:19:33 2010 +0300
@@ -1,7 +1,7 @@
 #!/bin/sh
 #############################################################################
 ##
-## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
 ## All rights reserved.
 ## Contact: Nokia Corporation (qt-info@nokia.com)
 ##
@@ -167,6 +167,7 @@
 PLATFORM_X11=no
 PLATFORM_MAC=no
 PLATFORM_QWS=no
+PLATFORM_SYMBIAN=no
 
 if [ -f "$relpath"/src/gui/kernel/qapplication_mac.mm ] && [ -d /System/Library/Frameworks/Carbon.framework ]; then
     # Qt/Mac
@@ -668,7 +669,8 @@
 CFG_LIBFREETYPE=no
 CFG_SQL_AVAILABLE=
 QT_DEFAULT_BUILD_PARTS="libs tools examples demos docs translations"
-CFG_BUILD_PARTS=""
+#QTP change for lRelease app. Need for Symbian
+CFG_BUILD_PARTS="translations"
 CFG_NOBUILD_PARTS=""
 CFG_RELEASE_QMAKE=no
 CFG_PHONON=yes
@@ -726,6 +728,7 @@
 CFG_S60=yes
 CFG_RTTI=yes
 CFG_NATIVE_GESTURES=yes
+CFG_DEFFILES=yes
 #end symbian flags
 
 CFG_PRECOMPILE=auto
@@ -783,9 +786,11 @@
 CFG_SILENT=no
 CFG_GRAPHICS_SYSTEM=default
 CFG_ALSA=auto
+#flags for qmake running
+CFG_NOPROCESS=no
 
 # initalize variables used for installation
-QT_INSTALL_PREFIX= "$outpath"
+QT_INSTALL_PREFIX="$outpath"
 QT_INSTALL_DOCS=
 QT_INSTALL_HEADERS=
 QT_INSTALL_LIBS=
@@ -1003,6 +1008,10 @@
             VAL=$1
         fi
 	;;
+     -usedeffiles)
+        VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
+        VAL=yes
+        ;;
     -hostprefix)
         VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
         # this option may or may not be followed by an argument
@@ -1229,6 +1238,10 @@
         fi
         ;;
 #QTP: QTPPROD-7
+    usedeffiles)
+        CFG_DEFFILES="$VAL"
+        ;;
+    
     style-s60)
         if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
             QT_SYMBIAN_STYLE_FLAGS="$VAL"
@@ -1485,6 +1498,7 @@
         ;;
     developer-build|commercial|opensource|nokia-developer)
         # These switches have been dealt with already
+        CFG_DEFFILES=no
         ;;
     static)
         if [ "$VAL" = "yes" ]; then
@@ -2116,6 +2130,13 @@
             UNKNOWN_OPT=yes
         fi
         ;;
+    dont-process)
+        CFG_NOPROCESS=yes
+        ;;
+    process)
+        CFG_NOPROCESS=no
+        ;;
+
     *)
         UNKNOWN_OPT=yes
         ;;
@@ -2127,6 +2148,11 @@
     fi
 done
 
+#QTP Symbian release on the Linux platform
+if [ "$XPLATFORM"="symbian-sbsv2" ]; then
+   PLATFORM_SYMBIAN=yes
+fi
+
 if [ "$CFG_QCONFIG" != "full" ] && [ "$CFG_QT3SUPPORT" = "yes" ]; then
     echo "Warning: '-qconfig $CFG_QCONFIG' will disable the qt3support library."
     CFG_QT3SUPPORT="no"
@@ -2875,6 +2901,11 @@
     fi
 fi
 
+#QTP configuration for the Symbian compilation on Linux platform 
+if [ "$CFG_S60" = "yes" ]; then
+   QMakeVar add styles "s60"
+fi
+
 #-------------------------------------------------------------------------------
 # tests that don't need qmake (must be run before displaying help)
 #-------------------------------------------------------------------------------
@@ -3871,6 +3902,14 @@
 EOF
 fi
 
+if [ "$XPLATFORM"="symbian-sbsv2" ]; then
+    -no-s60..............Do not compile in S60 support.
+    -s60.................Compile with support for the S60 UI Framework
+    -no-usedeffiles......Disable the usage of DEF files.
+    -usedeffiles.........Enable the usage of DEF files.
+    cat << EOF
+EOF
+fi
 
 if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
     if [ "$CFG_GLIB" = "no" ]; then
@@ -4301,14 +4340,14 @@
 
     mv -f "$QMAKE_QCONFIG_H" "$QCONFIG_H"
     for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
-        if [ '!' -f "$conf" ]; then
-            ln -s "$QCONFIG_H" "$conf"
-        fi
+       [ -e "$conf" ] && rm -rf "$conf"
+       cp -a "$QCONFIG_H" "$conf"
     done
 
     #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
-    rm -f mkspecs/default
-    ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
+    rm -rf mkspecs/default
+    cp -a `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
+
     # fix makefiles
     for mkfile in GNUmakefile Makefile; do
         EXTRA_LFLAGS=
@@ -4847,6 +4886,14 @@
 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
 QMAKE_CONFIG="$QMAKE_CONFIG minimal-config small-config medium-config large-config full-config"
 
+if [ "$PLATFORM_SYMBIAN" = "yes" ]; then
+   if [ "$CFG_DEFFILES" = "yes" ]; then
+      QMakeVar add CONFIG def_files
+   else
+      QMakeVar add CONFIG def_files_disabled
+   fi
+fi
+
 # auto-detect NIS support
 if [ "$CFG_NIS" != "no" ]; then
     if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/nis "NIS" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
@@ -6889,9 +6936,7 @@
     mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
     chmod -w "$outpath/src/corelib/global/qconfig.h"
     for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
-        if [ '!' -f "$conf" ]; then
-            ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
-        fi
+        cp -f "$outpath/src/corelib/global/qconfig.h" "$conf"
     done
 fi
 
@@ -7374,24 +7419,25 @@
 # build makefiles based on the configuration
 #-------------------------------------------------------------------------------
 
+#: QTPRO for Symbian compilation it is necessary to replace qmake with standard qmake handling
 echo "Finding project files. Please wait..."
-#: QTPRO for Symbian compilation it is necessary to replace qmake with standard qmake handling
-if [ "$XPLATFORM" != "symbian-sbsv2" ]; then
-  "$outpath/bin/qmake" -prl -r "${relpath}/projects.pro"
-fi
-
-if [ -f "${relpath}/projects.pro" ]; then
-    echo "parsing projects.pro file and generate make files"
-    mkfile="${outpath}/Makefile"
-    [ -f "$mkfile" ] && chmod +w "$mkfile"
-    QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/projects.pro"
-fi
-
-# .projects      -> projects to process
-# .projects.1    -> qt and moc
-# .projects.2    -> subdirs and libs
-# .projects.3    -> the rest
-rm -f .projects .projects.1 .projects.2 .projects.3
+if [ "$CFG_NOPROCESS" != "yes" ]; then
+    if [ "$XPLATFORM" != "symbian-sbsv2" ]; then
+    "$outpath/bin/qmake" -prl -r "${relpath}/projects.pro"
+    fi
+
+    if [ -f "${relpath}/projects.pro" ]; then
+        echo "parsing projects.pro file and generate make files"
+        mkfile="${outpath}/Makefile"
+        [ -f "$mkfile" ] && chmod +w "$mkfile"
+        QTDIR="$outpath" "$outpath/bin/qmake" -spec "$XQMAKESPEC" "${relpath}/projects.pro"
+    fi
+fi
+    # .projects      -> projects to process
+    # .projects.1    -> qt and moc
+    # .projects.2    -> subdirs and libs
+    # .projects.3    -> the rest
+    rm -f .projects .projects.1 .projects.2 .projects.3
 
 QMAKE_PROJECTS=`find "$relpath/." -name '*.pro' -print | sed 's-/\./-/-'`
 if [ -z "$AWK" ]; then
@@ -7514,7 +7560,7 @@
     case "$part" in
     tools) PART_ROOTS="$PART_ROOTS tools" ;;
     libs) PART_ROOTS="$PART_ROOTS src" ;;
-    translations) PART_ROOTS="$PART_ROOTS tools/linguist/lrelease translations" ;;
+    translations) PART_ROOTS="$PART_ROOTS tools/linguist/lrelease" ;;
     examples) PART_ROOTS="$PART_ROOTS examples demos" ;;
     *) ;;
     esac
@@ -7539,13 +7585,17 @@
 
         case $a in
         *winmain/winmain.pro) continue ;;
-        *s60main/s60main.pro)  if [ "$XPLATFORM" != "symbian-sbsv2" ]; then 
+        *s60main/s60main.pro)  if [ "$PLATFORM_SYMBIAN" != "yes" -o  "$CFG_NOPROCESS" = "yes" ]; then 
             continue
            fi;;
         *examples/activeqt/*) continue ;;
         */qmake/qmake.pro) continue ;;
         *tools*|*tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*linguist/lrelease*) SPEC=$QMAKESPEC ;;
-        *) SPEC=$XQMAKESPEC ;;
+        *) if [ "$CFG_NOPROCESS" = "yes" ]; then
+           continue
+           else
+           SPEC=$XQMAKESPEC
+           fi;;
         esac
         dir=`dirname "$a" | sed -e "s;$sepath;.;g"`
         test -d "$dir" || mkdir -p "$dir"