summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore5
-rw-r--r--README.s60-mkspec99
-rwxr-xr-xbin/winewrapper24
-rwxr-xr-xconfigure64
-rw-r--r--demos/embedded/anomaly/anomaly.pro2
-rw-r--r--demos/embedded/flightinfo/flightinfo.pro2
-rw-r--r--demos/embedded/lightmaps/lightmaps.pro2
-rw-r--r--demos/embedded/weatherinfo/weatherinfo.pro2
-rw-r--r--demos/shared/shared.pri6
-rw-r--r--doc/src/development/qmake-manual.qdoc2
-rw-r--r--examples/network/fortuneclient/fortuneclient.pro2
-rw-r--r--examples/network/fortuneserver/fortuneserver.pro2
-rw-r--r--examples/network/network-chat/network-chat.pro2
-rw-r--r--mkspecs/common/armcc.conf40
-rw-r--r--mkspecs/common/symbian/symbian-makefile.conf36
-rw-r--r--mkspecs/common/symbian/symbian-mmp.conf72
-rw-r--r--mkspecs/common/symbian/symbian.conf125
-rw-r--r--mkspecs/common/unix.conf3
-rw-r--r--mkspecs/features/symbian/application_icon.prf20
-rw-r--r--mkspecs/features/symbian/debug.prf1
-rw-r--r--mkspecs/features/symbian/default_post.prf4
-rw-r--r--mkspecs/features/symbian/moc.prf24
-rw-r--r--mkspecs/features/symbian/platform_paths.prf217
-rw-r--r--mkspecs/features/symbian/release.prf1
-rw-r--r--mkspecs/features/symbian/thread.prf2
-rw-r--r--mkspecs/symbian-abld/qmake.conf2
-rw-r--r--mkspecs/symbian-sbsv2/qmake.conf2
-rw-r--r--mkspecs/symbian/features/do_not_build_as_thumb.prf8
-rw-r--r--mkspecs/symbian/linux-armcc/features/default_post.prf5
-rw-r--r--mkspecs/symbian/linux-armcc/features/qt.prf12
-rw-r--r--mkspecs/symbian/linux-armcc/features/symbian_building.prf195
-rw-r--r--mkspecs/symbian/linux-armcc/platformlibs.conf1
-rw-r--r--mkspecs/symbian/linux-armcc/qmake.conf7
-rw-r--r--mkspecs/symbian/linux-armcc/qplatformdefs.h167
-rw-r--r--projects.pro2
-rw-r--r--qmake/Makefile.unix9
-rw-r--r--qmake/Makefile.win328
-rw-r--r--qmake/Makefile.win32-g++7
-rw-r--r--qmake/Makefile.win32-g++-sh7
-rw-r--r--qmake/generators/makefile.cpp4
-rw-r--r--qmake/generators/makefile.h33
-rw-r--r--qmake/generators/metamakefile.cpp3
-rw-r--r--qmake/generators/symbian/initprojectdeploy_symbian.cpp68
-rw-r--r--qmake/generators/symbian/initprojectdeploy_symbian.h1
-rw-r--r--qmake/generators/symbian/symbian_makefile.h85
-rw-r--r--qmake/generators/symbian/symbiancommon.cpp794
-rw-r--r--qmake/generators/symbian/symbiancommon.h94
-rw-r--r--qmake/generators/symbian/symmake.cpp720
-rw-r--r--qmake/generators/symbian/symmake.h32
-rw-r--r--qmake/generators/symbian/symmake_abld.cpp2
-rw-r--r--qmake/generators/symbian/symmake_sbsv2.cpp2
-rw-r--r--qmake/generators/unix/unixmake.cpp41
-rw-r--r--qmake/generators/unix/unixmake.h2
-rw-r--r--qmake/generators/unix/unixmake2.cpp40
-rw-r--r--qmake/option.cpp1
-rw-r--r--qmake/project.cpp19
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pro1
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp2
-rw-r--r--src/corelib/global/qglobal.cpp5
-rw-r--r--src/corelib/io/io.pri2
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp2
-rw-r--r--src/corelib/io/qprocess_symbian.cpp2
-rw-r--r--src/corelib/kernel/qsystemsemaphore_symbian.cpp2
-rw-r--r--src/gui/dialogs/qerrormessage.cpp2
-rw-r--r--src/gui/kernel/qapplication_s60.cpp2
-rw-r--r--src/gui/kernel/qcursor_s60.cpp2
-rw-r--r--src/gui/painting/qwindowsurface_s60.cpp4
-rw-r--r--src/gui/s60framework/s60framework.pri2
-rw-r--r--src/gui/text/qfont.cpp2
-rw-r--r--src/gui/text/qfont_s60.cpp4
-rw-r--r--src/gui/text/qfontdatabase_s60.cpp4
-rw-r--r--src/gui/widgets/qmenu_symbian.cpp2
-rw-r--r--src/gui/widgets/widgets.pri2
-rw-r--r--src/plugins/graphicssystems/trace/trace.pro1
-rw-r--r--src/plugins/imageformats/tiff/tiff.pro2
-rw-r--r--src/plugins/plugins.pro3
-rw-r--r--src/plugins/s60/s60pluginbase.pri2
-rw-r--r--src/s60installs/s60installs.pro68
-rw-r--r--src/s60main/s60main.pro2
-rw-r--r--src/s60main/s60main.rsg3
-rw-r--r--src/src.pro8
-rw-r--r--src/tools/bootstrap/bootstrap.pri6
-rw-r--r--src/tools/tools.pro2
-rw-r--r--templates/.gitattributes1
-rw-r--r--templates/.gitignore1
-rw-r--r--templates/pkg_template.pkg28
-rw-r--r--templates/wiggly.rscbin0 -> 93 bytes
-rw-r--r--templates/wiggly_reg.rscbin0 -> 103 bytes
-rw-r--r--tools/assistant/tools/assistant/assistant.pro2
-rw-r--r--tools/designer/src/designer/designer.pro6
-rw-r--r--translations/translations.pro1
91 files changed, 2197 insertions, 1113 deletions
diff --git a/.gitignore b/.gitignore
index 548e69e..c232a0d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -206,6 +206,11 @@ plugin_commonU.def
*.sis
*.sisx
*.lst
+*.exe
+*.mif
+*.rsc
+*.sym
+*.lib
# Generated by abldfast.bat from devtools.
.abldsteps.*
diff --git a/README.s60-mkspec b/README.s60-mkspec
new file mode 100644
index 0000000..af500e1
--- /dev/null
+++ b/README.s60-mkspec
@@ -0,0 +1,99 @@
+How to build Qt for Symbian using the Linux makespec.
+
+Prerequisites:
+
+ - Working RVCT 2.2 native Linux compiler. The new publicly
+ available RVCT 4.0 compiler may work, but it hasn't been tested
+ yet.
+
+ - A working GnuPoc environment. See this page for details:
+ http://www.martin.st/symbian/
+ Download the latest version, unpack it and run the 'install_eka2_tools' script as
+ described in the last part under the EKA2 part. The part about the your own gcc
+ are not needed as we use the rvct compiler.
+ Make sure you do the part about Wine setup as well.
+
+ - Anderson Lizardo's patches for GnuPoc. Look for the
+ qt_s60_gnupoc_v10.patch on this page:
+ http://lizardo.wordpress.com/2009/09/24/installing-qt-for-s60-daily-snapshots-on-linux/
+ and carry out the instructions under point 8: Installing Open C.
+
+Compiling:
+
+ 1. First a few environment variables need to be set:
+
+ export RVCT22LIB=<rvct-dir>/lib/armlib
+ export EPOCROOT=<s60-root>
+ export PATH=$PATH:<s60-root>/epoc32/tools:<rvctInstallDir>/bin
+ export PATH=$PATH:<qt-root>/bin
+
+ Replace the s60-root with the installation directory of your SDK,
+ and the qt-root with the root of your Qt repository.
+ These are good candidates for putting in a script somewhere.
+
+ 2. Run configure. It needs a bit more switches than usual, so here's
+ the full line:
+
+ ./configure -developer-build -platform linux-g++ -xplatform \
+ symbian/linux-armcc -little-endian -host-little-endian \
+ -arch symbian
+
+ 3. Compile Qt
+
+ cd src
+ make
+
+ and then wait for a while.
+
+ 4. Package and install Qt
+
+ cd s60installs
+
+ Edit Qt_template.pkg and change the first 0x2xxxxxxx to
+ 0xExxxxxxx. Then execute:
+
+ makesis Qt_template.pkg
+ signsis Qt_template.sis Qt_template.sisx selfsigned.cer selfsigned.key
+
+ Then put Qt_template.sisx on a memory card and install it from
+ the phone file manager.
+
+ Alternatively, you can use the runonphone tool found in the tools
+ directory of Qt. To build, this requires a separately configured
+ Qt installation for Linux, unfortunately. To use it, you also
+ need have App TRK running on the phone. At the time of writing,
+ only bleeding edge Linux kernels are able to autodetect the USB
+ serial port on the phone, but you can force detection by running:
+
+ modprobe usbserial vendor=0xXXXX product=0xXXXX
+
+ The XXXXs should be replaced with the two values listed for your
+ device when executing "lsusb". In most distributions, this will
+ lead to the creation of two devices: /dev/ttyUSB0 and
+ /dev/ttyUSB1. The latter is usually the one that App TRK responds
+ to. Then execute:
+
+ runonphone -p /dev/ttyUSB1 -s Qt_template.sisx dummy.exe
+
+ The dummy.exe argument is irrelevant, since we are not executing
+ anything yet.
+
+ 5. Compile some helloworld application (I leave the details to you
+ ;-)
+
+ qmake
+ make
+
+ 6. Package, install and run application.
+
+ makesis helloworld_template.pkg
+ signsis helloworld_template.sis helloworld_template.sisx \
+ <QTDIR>/src/s60installs/selfsigned.cer \
+ <QTDIR>/src/s60installs/selfsigned.key
+
+ Then either install by memory card, or install and run like this:
+
+ runonphone -p /dev/ttyUSB1 -s helloworld_template.sisx \
+ helloworld.exe
+
+ 7. Enjoy "hello world" on the phone!
diff --git a/bin/winewrapper b/bin/winewrapper
new file mode 100755
index 0000000..94cc38a
--- /dev/null
+++ b/bin/winewrapper
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+if [ "$1" = "" ]; then
+ echo "Must supply parameters"
+ exit 3
+fi
+
+oldIFS="$IFS"
+IFS=:
+for i in $PATH; do
+ if [ -e $i/$1 ]; then
+ executable="$i/$1"
+ break
+ fi
+done
+
+if [ "$executable" = "" ]; then
+ echo "$1 not found in path" 1>&2
+ exit 3
+fi
+
+IFS="$oldIFS"
+shift
+wine "$executable" "$@"
diff --git a/configure b/configure
index cd29e95..d39503f 100755
--- a/configure
+++ b/configure
@@ -643,6 +643,7 @@ CFG_XSYNC=auto
CFG_XINERAMA=runtime
CFG_XFIXES=runtime
CFG_ZLIB=auto
+CFG_S60=auto
CFG_SQLITE=qt
CFG_GIF=auto
CFG_TIFF=auto
@@ -921,7 +922,7 @@ while [ "$#" -gt 0 ]; do
VAL=no
;;
#Qt style yes options
- -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-declarative|-webkit|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config)
+ -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-declarative|-webkit|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60)
VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
VAL=yes
;;
@@ -1483,7 +1484,6 @@ while [ "$#" -gt 0 ]; do
fi
;;
feature-*)
- if [ "$PLATFORM_QWS" = "yes" ]; then
FEATURE=`echo $VAR | sed "s,^[^-]*-\([^-]*\),\1," | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
if [ "$VAL" = "no" ]; then
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
@@ -1492,9 +1492,6 @@ while [ "$#" -gt 0 ]; do
else
UNKNOWN_OPT=yes
fi
- else
- UNKNOWN_OPT=yes
- fi
;;
shared)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
@@ -1641,6 +1638,13 @@ while [ "$#" -gt 0 ]; do
# No longer supported:
#[ "$VAL" = "no" ] && CFG_LIBPNG=no
;;
+ s60)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_S60="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
sqlite)
if [ "$VAL" = "system" ]; then
CFG_SQLITE=system
@@ -3304,6 +3308,7 @@ Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir
[-no-audio-backend] [-audio-backend] [-no-openssl] [-openssl] [-openssl-linked]
[-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-no-javascript-jit] [-javascript-jit]
[-no-script] [-script] [-no-scripttools] [-scripttools] [-no-declarative] [-declarative]
+ [-no-s60] [-s60]
[additional platform specific options (see below)]
@@ -3482,6 +3487,9 @@ EOF
fi
cat << EOF
+ -no-s60 ............ Do not compile in S60 support.
+ + -s60 ............... Compile with support for the S60 UI Framework.
+
-no-mmx ............ Do not compile with use of MMX instructions.
-no-3dnow .......... Do not compile with use of 3DNOW instructions.
-no-sse ............ Do not compile with use of SSE instructions.
@@ -3934,7 +3942,7 @@ if [ "$PLATFORM_QWS" = "yes" ]; then
Platform="Qt for Embedded Linux"
elif [ "$PLATFORM_MAC" = "yes" ]; then
Platform="Qt for Mac OS X"
-else
+elif [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ]; then
PLATFORM_X11=yes
Platform="Qt for Linux/X11"
fi
@@ -4553,6 +4561,14 @@ if [ "$CFG_ZLIB" = "auto" ]; then
fi
fi
+if [ "$CFG_S60" = "auto" ]; then
+ if echo "$XQMAKESPEC" | grep symbian > /dev/null; then
+ CFG_S60=yes
+ else
+ CFG_S60=no
+ fi
+fi
+
# detect how jpeg should be built
if [ "$CFG_JPEG" = "auto" ]; then
if [ "$CFG_SHARED" = "yes" ]; then
@@ -4831,6 +4847,14 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do
fi
;;
sqlite)
+ if [ "$CFG_SQL_sqlite" = "auto" ]; then # the default
+ case "$XPLATFORM" in
+ symbian*)
+ # sqlite on symbian is typically not build in Qt but deployed as a pre-existing sis file.
+ CFG_SQL_sqlite=no
+ ;;
+ esac
+ fi
if [ "$CFG_SQL_sqlite" != "no" ]; then
SQLITE_AUTODETECT_FAILED="no"
if [ "$CFG_SQLITE" = "system" ]; then
@@ -5630,7 +5654,7 @@ if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then
fi
HAVE_STL=no
-if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
+if echo "$XQMAKESPEC" | grep symbian > /dev/null || "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then
HAVE_STL=yes
fi
@@ -5995,9 +6019,9 @@ case "$PLATFORM,$CFG_MAC_COCOA" in
;;
esac
-# disable Qt 3 support on VxWorks
+# disable Qt 3 support on VxWorks and Symbian
case "$XPLATFORM" in
- unsupported/vxworks*)
+ unsupported/vxworks*|symbian*)
CFG_QT3SUPPORT="no"
;;
esac
@@ -6051,6 +6075,13 @@ else
fi
fi
+# Disable OpenGL on Symbian.
+case "$XPLATFORM" in
+ symbian*)
+ CFG_OPENGL="no"
+ ;;
+esac
+
# enable opengl
if [ "$CFG_OPENGL" = "no" ]; then
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
@@ -6225,6 +6256,10 @@ elif [ "$CFG_ZLIB" = "system" ]; then
QT_CONFIG="$QT_CONFIG system-zlib"
fi
+if [ "$CFG_S60" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG s60"
+fi
+
[ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
[ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
[ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
@@ -7000,6 +7035,7 @@ QMakeVar set sql-plugins "$SQL_PLUGINS"
[ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
[ "$CFG_MNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_MNG"
[ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
+[ "$CFG_S60" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_S60"
[ "$CFG_EXCEPTIONS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EXCEPTIONS"
[ "$CFG_IPV6" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6"
[ "$CFG_SXE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SXE"
@@ -7052,6 +7088,15 @@ fi
[ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
+if echo $XPLATFORM | grep symbian >/dev/null
+then
+ # Enable Symbian DLLs and export rules.
+ # We cannot use Linux's default export rules since they export everything.
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_DLL"
+ # Disable non-working features.
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT QT_NO_QFUTURE QT_NO_CRASHHANDLER QT_NO_PRINTER QT_NO_CURSOR QT_NO_SYSTEMTRAYICON"
+fi
+
if [ -n "$QCONFIG_FLAGS" ]; then
for cfg in $QCONFIG_FLAGS; do
cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
@@ -7423,6 +7468,7 @@ if [ "$CFG_WEBKIT" = "yes" ]; then
fi
fi
echo "Declarative module .. $CFG_DECLARATIVE"
+echo "Support for S60 ..... $CFG_S60"
echo "STL support ......... $CFG_STL"
echo "PCH support ......... $CFG_PRECOMPILE"
echo "MMX/3DNOW/SSE/SSE2.. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}"
diff --git a/demos/embedded/anomaly/anomaly.pro b/demos/embedded/anomaly/anomaly.pro
index 165ce89..5b2698c 100644
--- a/demos/embedded/anomaly/anomaly.pro
+++ b/demos/embedded/anomaly/anomaly.pro
@@ -26,7 +26,7 @@ RESOURCES += src/anomaly.qrc
symbian {
TARGET.UID3 = 0xA000CF71
include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
- HEADERS += $$QT_SOURCE_TREE/examples/network/qftp/sym_iap_util.h
+ INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/
LIBS += -lesock -linsock -lconnmon
TARGET.CAPABILITY = NetworkServices
TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
diff --git a/demos/embedded/flightinfo/flightinfo.pro b/demos/embedded/flightinfo/flightinfo.pro
index 8e5535c..2dff7f6 100644
--- a/demos/embedded/flightinfo/flightinfo.pro
+++ b/demos/embedded/flightinfo/flightinfo.pro
@@ -8,7 +8,7 @@ QT += network
symbian {
TARGET.UID3 = 0xA000CF74
include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
- HEADERS += $$QT_SOURCE_TREE/examples/network/qftp/sym_iap_util.h
+ INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/
LIBS += -lesock -lconnmon -linsock
TARGET.CAPABILITY = NetworkServices
}
diff --git a/demos/embedded/lightmaps/lightmaps.pro b/demos/embedded/lightmaps/lightmaps.pro
index c9bfa0a..d982d05 100644
--- a/demos/embedded/lightmaps/lightmaps.pro
+++ b/demos/embedded/lightmaps/lightmaps.pro
@@ -5,7 +5,7 @@ QT += network
symbian {
TARGET.UID3 = 0xA000CF75
include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
- HEADERS += $$QT_SOURCE_TREE/examples/network/qftp/sym_iap_util.h
+ INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/
LIBS += -lesock -lconnmon -linsock
TARGET.CAPABILITY = NetworkServices
TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
diff --git a/demos/embedded/weatherinfo/weatherinfo.pro b/demos/embedded/weatherinfo/weatherinfo.pro
index 57f1684..3fe640b 100644
--- a/demos/embedded/weatherinfo/weatherinfo.pro
+++ b/demos/embedded/weatherinfo/weatherinfo.pro
@@ -7,7 +7,7 @@ QT += network svg
symbian {
TARGET.UID3 = 0xA000CF77
include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
- HEADERS += $$QT_SOURCE_TREE/examples/network/qftp/sym_iap_util.h
+ INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/
LIBS += -lesock -lconnmon -linsock
TARGET.CAPABILITY = NetworkServices
}
diff --git a/demos/shared/shared.pri b/demos/shared/shared.pri
index 1541fa7..fb7b04c 100644
--- a/demos/shared/shared.pri
+++ b/demos/shared/shared.pri
@@ -6,12 +6,12 @@ build_all:!build_pass {
}
contains(CONFIG, debug_and_release_target) {
CONFIG(debug, debug|release) {
- LIBS+=-L$$SHARED_FOLDER/debug
+ QMAKE_LIBDIR += $$SHARED_FOLDER/debug
} else {
- LIBS+=-L$$SHARED_FOLDER/release
+ QMAKE_LIBDIR += $$SHARED_FOLDER/release
}
} else {
- LIBS += -L$$SHARED_FOLDER
+ QMAKE_LIBDIR += $$SHARED_FOLDER
}
hpux-acc*:LIBS += $$SHARED_FOLDER/libdemo_shared.a
diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc
index 6215268..4de944e 100644
--- a/doc/src/development/qmake-manual.qdoc
+++ b/doc/src/development/qmake-manual.qdoc
@@ -2594,7 +2594,7 @@ For example:
\section1 QMAKE_LIBS_THREAD
- \e {This is used on Unix platforms only.}
+ \e {This is used on Unix and Symbian platforms only.}
This variable contains all libraries that need to be linked against
when building a multi-threaded application. The
diff --git a/examples/network/fortuneclient/fortuneclient.pro b/examples/network/fortuneclient/fortuneclient.pro
index c9dc39a..98974b4 100644
--- a/examples/network/fortuneclient/fortuneclient.pro
+++ b/examples/network/fortuneclient/fortuneclient.pro
@@ -11,7 +11,7 @@ INSTALLS += target sources
symbian {
include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
- HEADERS += $$QT_SOURCE_TREE/examples/network/qftp/sym_iap_util.h
+ INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/
LIBS += -lesock
TARGET.CAPABILITY = "NetworkServices ReadUserData WriteUserData"
TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
diff --git a/examples/network/fortuneserver/fortuneserver.pro b/examples/network/fortuneserver/fortuneserver.pro
index 4dbc2e8..f7d127d 100644
--- a/examples/network/fortuneserver/fortuneserver.pro
+++ b/examples/network/fortuneserver/fortuneserver.pro
@@ -12,7 +12,7 @@ INSTALLS += target sources
symbian {
TARGET.UID3 = 0xA000CF71
include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
- HEADERS += $$QT_SOURCE_TREE/examples/network/qftp/sym_iap_util.h
+ INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/
LIBS += -lesock
TARGET.CAPABILITY = "All -TCB"
TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
diff --git a/examples/network/network-chat/network-chat.pro b/examples/network/network-chat/network-chat.pro
index 16c11e3..d9d5e43 100644
--- a/examples/network/network-chat/network-chat.pro
+++ b/examples/network/network-chat/network-chat.pro
@@ -20,7 +20,7 @@ INSTALLS += target sources
symbian {
include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
- HEADERS += $$QT_SOURCE_TREE/examples/network/qftp/sym_iap_util.h
+ INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/
LIBS += -lesock -lconnmon -lcharconv -linsock
TARGET.CAPABILITY = "NetworkServices ReadUserData WriteUserData"
TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
diff --git a/mkspecs/common/armcc.conf b/mkspecs/common/armcc.conf
new file mode 100644
index 0000000..c9a518b
--- /dev/null
+++ b/mkspecs/common/armcc.conf
@@ -0,0 +1,40 @@
+#
+# qmake configuration for armcc
+#
+
+QMAKE_CC = armcc
+QMAKE_CFLAGS +=
+QMAKE_CFLAGS_DEPS += -M
+QMAKE_CFLAGS_WARN_ON +=
+QMAKE_CFLAGS_WARN_OFF += -W
+QMAKE_CFLAGS_RELEASE += -O2
+QMAKE_CFLAGS_DEBUG += -g -O0
+QMAKE_CFLAGS_HIDESYMS += --visibility_inlines_hidden
+
+QMAKE_CXX = armcc
+QMAKE_CXXFLAGS += $$QMAKE_CFLAGS --exceptions --exceptions_unwind
+QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS
+
+QMAKE_LINK = armlink
+QMAKE_LINK_SHLIB = armlink
+QMAKE_LINK_C = armlink
+QMAKE_LINK_C_SHLIB = armlink
+QMAKE_LFLAGS +=
+QMAKE_LFLAGS_RELEASE +=
+QMAKE_LFLAGS_DEBUG +=
+QMAKE_LFLAGS_APP +=
+QMAKE_LFLAGS_SHLIB +=
+QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_THREAD +=
+
+QMAKE_AR = armar --create
+QMAKE_RANLIB =
+
diff --git a/mkspecs/common/symbian/symbian-makefile.conf b/mkspecs/common/symbian/symbian-makefile.conf
new file mode 100644
index 0000000..c8a88dd
--- /dev/null
+++ b/mkspecs/common/symbian/symbian-makefile.conf
@@ -0,0 +1,36 @@
+#
+# qmake configuration for makefile based symbian
+#
+
+MAKEFILE_GENERATOR = SYMBIAN_UNIX
+
+include(symbian.conf)
+
+QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS]
+
+QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src
+QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
+QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src
+QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+
+QMAKE_CFLAGS += --dllimport_runtime --preinclude rvct2_2.h --diag_suppress 186,654,1300 --thumb --fpu softvfp --cpu 5T --enum_is_int -Ono_known_library --fpmode ieee_no_fenv --export_all_vtbl --no_vfe --apcs /inter
+QMAKE_CXXFLAGS += $$QMAKE_CFLAGS --no_parse_templates
+QMAKE_LFLAGS += --diag_suppress 6331,6780 --bpabi --reloc --datacompressor=off --split --rw-base 0x800000 --dll --no_scanlib
+QMAKE_LFLAGS_APP += --entry _E32Startup
+QMAKE_LFLAGS_SHLIB += --entry _E32Dll
+QMAKE_CFLAGS_DEBUG += -g
+QMAKE_CXXFLAGS_DEBUG += -g
+QMAKE_CFLAGS_RELEASE += -O2 -Otime
+QMAKE_CXXFLAGS_RELEASE += -O2 -Otime
+
+DEFINES += __SYMBIAN32__ EKA2 __S60_50__ __S60_3X__ __SERIES60_3X__ __EPOC32__ __MARM__ __EABI__ __ARMCC__ __ARMcc_2__ __ARMCC_2_2__ __MARM_ARMV5__ __MARM_INTERWORK__ __DLL__ _UNICODE __SUPPORT_CPP_EXCEPTIONS__
+
+include(../../common/unix.conf)
+
+QMAKE_PREFIX_SHLIB =
+QMAKE_EXTENSION_SHLIB = dll
+CONFIG *= no_plugin_name_prefix
+QMAKE_EXTENSION_PLUGIN = dll
+QMAKE_PREFIX_STATICLIB =
+QMAKE_EXTENSION_STATICLIB = lib
+QMAKE_SYMBIAN_SHLIB = 1
diff --git a/mkspecs/common/symbian/symbian-mmp.conf b/mkspecs/common/symbian/symbian-mmp.conf
new file mode 100644
index 0000000..2a570d5
--- /dev/null
+++ b/mkspecs/common/symbian/symbian-mmp.conf
@@ -0,0 +1,72 @@
+#
+# qmake configuration for symbian-*
+#
+
+contains(QMAKE_HOST.os, "Windows") {
+ QMAKE_MOC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc.exe
+ QMAKE_UIC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic.exe
+ QMAKE_IDC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc.exe
+} else {
+ QMAKE_MOC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc
+ QMAKE_UIC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic
+ QMAKE_IDC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc
+}
+
+include(symbian.conf)
+
+symbian-abld {
+# Versions of abld prior to Symbian^3 have a bug where you cannot remove something from the command line without replacing it
+# Rather than figure out which version of abld we're using, we'll replace the command with a macro *that should never be used*
+ MMP_RULES_DONT_EXPORT_ALL_CLASS_IMPEDIMENTA = "OPTION_REPLACE ARMCC --export_all_vtbl -D__QT_NOEFFECTMACRO_DONOTUSE"
+} else {
+ MMP_RULES_DONT_EXPORT_ALL_CLASS_IMPEDIMENTA = "OPTION_REPLACE ARMCC --export_all_vtbl // don't use --export_all_vtbl"
+}
+MMP_RULES += PAGED
+MMP_RULES += $$MMP_RULES_DONT_EXPORT_ALL_CLASS_IMPEDIMENTA
+SYMBIAN_PLATFORMS = WINSCW GCCE ARMV5 ARMV6
+
+# Legacy support requires some hardcoded stdapis paths.
+INCLUDEPATH = \
+ $$[QT_INSTALL_PREFIX]/mkspecs/common/symbian/stl-off \
+ $$[QT_INSTALL_PREFIX]/mkspecs/common/symbian \
+ $${EPOCROOT}epoc32/include \
+ $$OS_LAYER_LIBC_SYSTEMINCLUDE \
+ $$INCLUDEPATH
+
+# Supports S60 3.0, 3.1, 3.2 and 5.0 by default
+default_deployment.pkg_prerules = \
+ "; Default HW/platform dependencies" \
+ "[0x101F7961],0,0,0,{\"S60ProductID\"}" \
+ "[0x102032BE],0,0,0,{\"S60ProductID\"}" \
+ "[0x102752AE],0,0,0,{\"S60ProductID\"}" \
+ "[0x1028315F],0,0,0,{\"S60ProductID\"}" \
+ " "
+
+DEPLOYMENT += default_deployment
+
+exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.0.sis )|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.0.sis) {
+ S60_VERSION = 5.0
+} else {
+ exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v3.2.sis )|exists($${EPOCROOT}epoc32/data/z/system/install/series60v3.2.sis) {
+ S60_VERSION = 3.2
+ } else {
+ S60_VERSION = 3.1
+ MMP_RULES -= PAGED
+ }
+}
+
+QMAKE_CXXFLAGS_FAST_VFP.ARMCC = --fpmode fast
+# [TODO] QMAKE_CXXFLAGS_FAST_VFP.GCCE =
+
+symbian {
+ armfpu = $$find(MMP_RULES, "ARMFPU")
+ !isEmpty(armfpu) {
+ vfpv2 = $$find(MMP_RULES, "vfpv2")
+ !isEmpty(vfpv2) {
+ # we will respect fpu setting obtained from configure, but,
+ # if vfpv2 or softvfp+vfpv2 used we want to force RunFast VFP mode
+ QMAKE_CXXFLAGS.ARMCC += $${QMAKE_CXXFLAGS_FAST_VFP.ARMCC}
+ # [TODO] QMAKE_CXXFLAGS.GCCE += $${QMAKE_CXXFLAGS_FAST_VFP.GCCE}
+ }
+ }
+}
diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf
index 6913dc9..cfe3c24 100644
--- a/mkspecs/common/symbian/symbian.conf
+++ b/mkspecs/common/symbian/symbian.conf
@@ -1,9 +1,9 @@
#
-# qmake configuration for symbian-*
+# qmake configuration for all symbian mkspecs
#
TEMPLATE = app
-CONFIG += qt warn_on release incremental
+CONFIG += qt warn_on release incremental link_prl rvct_linker
QT += core gui
QMAKE_INCREMENTAL_STYLE = sublib
@@ -13,7 +13,6 @@ QMAKE_COMPILER_DEFINES += SYMBIAN
QMAKE_EXT_OBJ = .o
QMAKE_EXT_RES = _res.o
-QMAKE_CC = gcc
QMAKE_LEX = flex
QMAKE_LEXFLAGS =
QMAKE_YACC = byacc
@@ -26,7 +25,6 @@ QMAKE_CFLAGS_RELEASE =
QMAKE_CFLAGS_DEBUG =
QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
-QMAKE_CXX = g++
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
QMAKE_CXXFLAGS.CW =
QMAKE_CXXFLAGS.ARMCC = --visibility_inlines_hidden
@@ -46,12 +44,6 @@ QMAKE_CXXFLAGS_EXCEPTIONS_OFF =
QMAKE_INCDIR =
QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
-QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src
-QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
-QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src
-QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
-
-QMAKE_LINK =
QMAKE_LFLAGS =
QMAKE_LFLAGS.ARMCC =
QMAKE_LFLAGS_EXCEPTIONS_ON =
@@ -65,108 +57,45 @@ QMAKE_LINK_OBJECT_MAX =
QMAKE_LINK_OBJECT_SCRIPT=
QMAKE_LIBS = -llibc -llibm -leuser -llibdl
-QMAKE_LIBS_CORE = $$QMAKE_LIBS -llibpthread -lefsrv
+QMAKE_LIBS_CORE = $$QMAKE_LIBS -lefsrv
QMAKE_LIBS_GUI = $$QMAKE_LIBS_CORE -lfbscli -lbitgdi -lhal -lgdi -lws32 -lapgrfx -lcone -leikcore -lmediaclientaudio -leikcoctl -leiksrv -lapparc -lcentralrepository
QMAKE_LIBS_NETWORK =
QMAKE_LIBS_EGL = -llibEGL
QMAKE_LIBS_OPENGL =
QMAKE_LIBS_OPENVG = -llibOpenVG -lgraphicsresource -lfbscli -lbitgdi -lgdi
+QMAKE_LIBS_THREAD = -llibpthread
QMAKE_LIBS_COMPAT =
QMAKE_LIBS_QT_ENTRY = -llibcrt0.lib
QMAKE_LIBS_S60 = -lavkon
-contains(QMAKE_HOST.os, "Windows"):!isEmpty(QMAKE_SH) | unix {
- QMAKE_COPY = cp
- QMAKE_COPY_DIR = cp -r
- QMAKE_MOVE = mv
- QMAKE_DEL_FILE = rm -f
- QMAKE_MKDIR = mkdir
- QMAKE_DEL_DIR = rmdir
- QMAKE_CHK_DIR_EXISTS = test -d
+!isEmpty(QMAKE_SH) {
+ QMAKE_COPY = cp -f
+ QMAKE_COPY_FILE = $(COPY)
+ QMAKE_COPY_DIR = $(COPY) -r
+ QMAKE_MOVE = mv -f
+ QMAKE_DEL_FILE = rm -f
+ QMAKE_DEL_DIR = rmdir
+ QMAKE_CHK_DIR_EXISTS = test -d
+ QMAKE_MKDIR = mkdir -p
} else {
- QMAKE_COPY = copy /y
- QMAKE_COPY_DIR = xcopy /s /q /y /i
- QMAKE_MOVE = move
- QMAKE_DEL_FILE = del
- QMAKE_MKDIR = mkdir
- QMAKE_DEL_DIR = rmdir
- QMAKE_CHK_DIR_EXISTS = if not exist
+ QMAKE_COPY = copy /y
+ QMAKE_COPY_DIR = xcopy /s /q /y /i
+ QMAKE_MOVE = move
+ QMAKE_DEL_FILE = del
+ QMAKE_MKDIR = mkdir
+ QMAKE_DEL_DIR = rmdir
+ QMAKE_CHK_DIR_EXISTS = if not exist
}
-contains(QMAKE_HOST.os, "Windows") {
- QMAKE_MOC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc.exe
- QMAKE_UIC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic.exe
- QMAKE_IDC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc.exe
-} else {
- QMAKE_MOC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc
- QMAKE_UIC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic
- QMAKE_IDC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc
-}
+QMAKE_IDL = midl
+QMAKE_LIB = ar -ru
+QMAKE_RC = windres
+QMAKE_ZIP = zip -r -9
-QMAKE_IDL = midl
-QMAKE_LIB = ar -ru
-QMAKE_RC = windres
-QMAKE_ZIP = zip -r -9
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
-QMAKE_STRIP = strip
-QMAKE_STRIPFLAGS_LIB += --strip-unneeded
+QT_ARCH = symbian
load(qt_config)
load(symbian/platform_paths)
-
-symbian-abld {
-# Versions of abld prior to Symbian^3 have a bug where you cannot remove something from the command line without replacing it
-# Rather than figure out which version of abld we're using, we'll replace the command with a macro *that should never be used*
- MMP_RULES_DONT_EXPORT_ALL_CLASS_IMPEDIMENTA = "OPTION_REPLACE ARMCC --export_all_vtbl -D__QT_NOEFFECTMACRO_DONOTUSE"
-} else {
- MMP_RULES_DONT_EXPORT_ALL_CLASS_IMPEDIMENTA = "OPTION_REPLACE ARMCC --export_all_vtbl // don't use --export_all_vtbl"
-}
-MMP_RULES += PAGED
-MMP_RULES += $$MMP_RULES_DONT_EXPORT_ALL_CLASS_IMPEDIMENTA
-SYMBIAN_PLATFORMS = WINSCW GCCE ARMV5 ARMV6
-
-# Legacy support requires some hardcoded stdapis paths.
-INCLUDEPATH = \
- $$[QT_INSTALL_PREFIX]/mkspecs/common/symbian/stl-off \
- $$[QT_INSTALL_PREFIX]/mkspecs/common/symbian \
- $${EPOCROOT}epoc32/include \
- $$OS_LAYER_LIBC_SYSTEMINCLUDE \
- $$INCLUDEPATH
-
-# Supports S60 3.0, 3.1, 3.2 and 5.0 by default
-default_deployment.pkg_prerules = \
- "; Default HW/platform dependencies" \
- "[0x101F7961],0,0,0,{\"S60ProductID\"}" \
- "[0x102032BE],0,0,0,{\"S60ProductID\"}" \
- "[0x102752AE],0,0,0,{\"S60ProductID\"}" \
- "[0x1028315F],0,0,0,{\"S60ProductID\"}" \
- " "
-
-DEPLOYMENT += default_deployment
-
-exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.0.sis )|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.0.sis) {
- S60_VERSION = 5.0
-} else {
- exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v3.2.sis )|exists($${EPOCROOT}epoc32/data/z/system/install/series60v3.2.sis) {
- S60_VERSION = 3.2
- } else {
- S60_VERSION = 3.1
- MMP_RULES -= PAGED
- }
-}
-
-QMAKE_CXXFLAGS_FAST_VFP.ARMCC = --fpmode fast
-# [TODO] QMAKE_CXXFLAGS_FAST_VFP.GCCE =
-
-symbian {
- armfpu = $$find(MMP_RULES, "ARMFPU")
- !isEmpty(armfpu) {
- vfpv2 = $$find(MMP_RULES, "vfpv2")
- !isEmpty(vfpv2) {
- # we will respect fpu setting obtained from configure, but,
- # if vfpv2 or softvfp+vfpv2 used we want to force RunFast VFP mode
- QMAKE_CXXFLAGS.ARMCC += $${QMAKE_CXXFLAGS_FAST_VFP.ARMCC}
- # [TODO] QMAKE_CXXFLAGS.GCCE += $${QMAKE_CXXFLAGS_FAST_VFP.GCCE}
- }
- }
-} \ No newline at end of file
diff --git a/mkspecs/common/unix.conf b/mkspecs/common/unix.conf
index 4cb171e..c480ba4 100644
--- a/mkspecs/common/unix.conf
+++ b/mkspecs/common/unix.conf
@@ -9,3 +9,6 @@ QMAKE_YACCFLAGS += -d
QMAKE_YACCFLAGS_MANGLE += -p $base -b $base
QMAKE_YACC_HEADER = $base.tab.h
QMAKE_YACC_SOURCE = $base.tab.c
+QMAKE_PREFIX_SHLIB = lib
+QMAKE_PREFIX_STATICLIB = lib
+QMAKE_EXTENSION_STATICLIB = a
diff --git a/mkspecs/features/symbian/application_icon.prf b/mkspecs/features/symbian/application_icon.prf
index b790463..41f1718 100644
--- a/mkspecs/features/symbian/application_icon.prf
+++ b/mkspecs/features/symbian/application_icon.prf
@@ -28,23 +28,33 @@ contains( CONFIG, no_icon ) {
baseTarget = $$replace(baseTarget, " ",_)
# Note: symbian-sbsv2 builds can't utilize extra compiler for mifconv, so ICON handling is done in code
- symbian-abld {
+ !symbian-sbsv2 {
#Makefile: requires paths with backslash
- contains(QMAKE_HOST.os, "Windows"):ICON = $$replace(ICON, /, \\)
+ ICON_backslashed = $$replace( ICON, /, \\)
+
+ symbian-abld {
+ mifIconZDir = ${ZDIR}$$APP_RESOURCE_DIR
+ } else {
+ isEmpty(DESTDIR) {
+ mifIconZDir = .
+ } else {
+ mifIconZDir = $$DESTDIR
+ }
+ }
# Extra compiler rules for mifconv
- mifconv.output = ${ZDIR}$$APP_RESOURCE_DIR/$${baseTarget}.mif
+ mifconv.output = $$mifIconZDir/$${baseTarget}.mif
# Based on: http://www.forum.nokia.com/document/Cpp_Developers_Library
# svg-t icons should always use /c32 depth
mifconv.commands = mifconv ${QMAKE_FILE_OUT} /c32 ${QMAKE_FILE_IN}
- mifconv.input = ICON
+ mifconv.input = ICON_backslashed
mifconv.CONFIG = no_link combine
# target_predeps together with combine seems not to work correctly, lets define it by ourselves
PRE_TARGETDEPS += $$mifconv.output
QMAKE_EXTRA_COMPILERS += mifconv
}
# Rules to use generated MIF file from symbian resources
- RSS_RULES.number_of_icons = $$size(ICON)
+ RSS_RULES.number_of_icons = $$size(ICON_backslashed)
RSS_RULES.icon_file = $$APP_RESOURCE_DIR/$${baseTarget}.mif
}
}
diff --git a/mkspecs/features/symbian/debug.prf b/mkspecs/features/symbian/debug.prf
new file mode 100644
index 0000000..19f5348
--- /dev/null
+++ b/mkspecs/features/symbian/debug.prf
@@ -0,0 +1 @@
+QMAKE_LIBDIR_QT += $${EPOCROOT}epoc32/release/armv5/udeb
diff --git a/mkspecs/features/symbian/default_post.prf b/mkspecs/features/symbian/default_post.prf
index 7c9e8ee..ed90e3c 100644
--- a/mkspecs/features/symbian/default_post.prf
+++ b/mkspecs/features/symbian/default_post.prf
@@ -28,4 +28,6 @@ contains(TEMPLATE, lib): {
contains(TEMPLATE, ".*app"):contains(QT, gui):contains(CONFIG,qt) {
load(application_icon.prf)
-} \ No newline at end of file
+}
+
+isEmpty(TARGET.UID3):TARGET.UID3 = $$generate_uid("$${OUT_PWD}/$${TARGET}")
diff --git a/mkspecs/features/symbian/moc.prf b/mkspecs/features/symbian/moc.prf
index 9c21ed7..29e0d8d 100644
--- a/mkspecs/features/symbian/moc.prf
+++ b/mkspecs/features/symbian/moc.prf
@@ -1,16 +1,18 @@
load(moc)
-RET = $$find(MOC_DIR, "(/|^)\.[^/]+/?$")
-!isEmpty(RET):{
- error("Symbian does not support directories starting with a dot. Please set MOC_DIR to a different value in your profile. MOC_DIR: $$MOC_DIR")
-}
+symbian-abld|symbian-sbsv2 {
+ RET = $$find(MOC_DIR, "(/|^)\.[^/]+/?$")
+ !isEmpty(RET):{
+ error("Symbian does not support directories starting with a dot. Please set MOC_DIR to a different value in your profile. MOC_DIR: $$MOC_DIR")
+ }
-RET = $$find(RCC_DIR, "(/|^)\.[^/]+/?$")
-!isEmpty(RET):{
- error("Symbian does not support directories starting with a dot. Please set RCC_DIR to a different value in your profile. RCC_DIR: $$RCC_DIR")
-}
+ RET = $$find(RCC_DIR, "(/|^)\.[^/]+/?$")
+ !isEmpty(RET):{
+ error("Symbian does not support directories starting with a dot. Please set RCC_DIR to a different value in your profile. RCC_DIR: $$RCC_DIR")
+ }
-RET = $$find(OBJECTS_DIR, "(/|^)\.[^/]+/?$")
-!isEmpty(RET):{
- error("Symbian does not support directories starting with a dot. Please set OBJECTS_DIR to a different value in your profile. OBJECTS_DIR: $$OBJECTS_DIR")
+ RET = $$find(OBJECTS_DIR, "(/|^)\.[^/]+/?$")
+ !isEmpty(RET):{
+ error("Symbian does not support directories starting with a dot. Please set OBJECTS_DIR to a different value in your profile. OBJECTS_DIR: $$OBJECTS_DIR")
+ }
}
diff --git a/mkspecs/features/symbian/platform_paths.prf b/mkspecs/features/symbian/platform_paths.prf
index c723d8c..1bfc116 100644
--- a/mkspecs/features/symbian/platform_paths.prf
+++ b/mkspecs/features/symbian/platform_paths.prf
@@ -50,6 +50,12 @@
#
# ==============================================================================
+symbian-abld|symbian-sbsv2 {
+ epocroot_prefix = /
+} else {
+ epocroot_prefix = $${EPOCROOT}
+}
+
exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# Load platform specific paths
@@ -66,10 +72,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(APP_LAYER_SDK_EXPORT_PATH) {
- return (/epoc32/include/app/$$1)
+ return ($${epocroot_prefix}epoc32/include/app/$$1)
}
defineReplace(APP_LAYER_PUBLIC_EXPORT_PATH) {
- return (/epoc32/include/app/$$1)
+ return ($${epocroot_prefix}epoc32/include/app/$$1)
}
# ---------------------------------------
@@ -77,10 +83,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(APP_LAYER_DOMAIN_EXPORT_PATH) {
- return (/epoc32/include/platform/app/$$1)
+ return ($${epocroot_prefix}epoc32/include/platform/app/$$1)
}
defineReplace(APP_LAYER_PLATFORM_EXPORT_PATH) {
- return (/epoc32/include/platform/app/$$1)
+ return ($${epocroot_prefix}epoc32/include/platform/app/$$1)
}
# ---------------------------------------
@@ -88,10 +94,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(MW_LAYER_SDK_EXPORT_PATH) {
- return (/epoc32/include/mw/$$1)
+ return ($${epocroot_prefix}epoc32/include/mw/$$1)
}
defineReplace(MW_LAYER_PUBLIC_EXPORT_PATH) {
- return (/epoc32/include/mw/$$1)
+ return ($${epocroot_prefix}epoc32/include/mw/$$1)
}
# ---------------------------------------
@@ -99,10 +105,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(MW_LAYER_DOMAIN_EXPORT_PATH) {
- return (/epoc32/include/platform/mw/$$1)
+ return ($${epocroot_prefix}epoc32/include/platform/mw/$$1)
}
defineReplace(MW_LAYER_PLATFORM_EXPORT_PATH) {
- return (/epoc32/include/platform/mw/$$1)
+ return ($${epocroot_prefix}epoc32/include/platform/mw/$$1)
}
# ---------------------------------------
@@ -110,11 +116,11 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(OSEXT_LAYER_SDK_EXPORT_PATH) {
- return (/epoc32/include/$$1)
+ return ($${epocroot_prefix}epoc32/include/$$1)
}
# WARNING: If the following path changes see the exists() function around line 219
defineReplace(OS_LAYER_PUBLIC_EXPORT_PATH) {
- return (/epoc32/include/$$1)
+ return ($${epocroot_prefix}epoc32/include/$$1)
}
# ---------------------------------------
@@ -122,10 +128,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(OSEXT_LAYER_DOMAIN_EXPORT_PATH) {
- return (/epoc32/include/platform/$$1)
+ return ($${epocroot_prefix}epoc32/include/platform/$$1)
}
defineReplace(OS_LAYER_PLATFORM_EXPORT_PATH) {
- return (/epoc32/include/platform/$$1)
+ return ($${epocroot_prefix}epoc32/include/platform/$$1)
}
# ---------------------------------------
@@ -152,18 +158,18 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# the headers come from middleware or os-layer => thus they are first.
APP_LAYER_SYSTEMINCLUDE = \
- /epoc32/include \
- /epoc32/include/mw \
- /epoc32/include/platform/mw \
- /epoc32/include/platform \
- /epoc32/include/app \
- /epoc32/include/platform/app \
- /epoc32/include/platform/loc \
- /epoc32/include/platform/mw/loc \
- /epoc32/include/platform/app/loc \
- /epoc32/include/platform/loc/sc \
- /epoc32/include/platform/mw/loc/sc \
- /epoc32/include/platform/app/loc/sc
+ $${epocroot_prefix}epoc32/include \
+ $${epocroot_prefix}epoc32/include/mw \
+ $${epocroot_prefix}epoc32/include/platform/mw \
+ $${epocroot_prefix}epoc32/include/platform \
+ $${epocroot_prefix}epoc32/include/app \
+ $${epocroot_prefix}epoc32/include/platform/app \
+ $${epocroot_prefix}epoc32/include/platform/loc \
+ $${epocroot_prefix}epoc32/include/platform/mw/loc \
+ $${epocroot_prefix}epoc32/include/platform/app/loc \
+ $${epocroot_prefix}epoc32/include/platform/loc/sc \
+ $${epocroot_prefix}epoc32/include/platform/mw/loc/sc \
+ $${epocroot_prefix}epoc32/include/platform/app/loc/sc
# This define statements defines the include paths, which are intended to be
# used in the pro-files that are part of the middleware-layer. It includes all
@@ -171,14 +177,14 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# middleware-layer components.
MW_LAYER_SYSTEMINCLUDE = \
- /epoc32/include \
- /epoc32/include/mw \
- /epoc32/include/platform/mw \
- /epoc32/include/platform \
- /epoc32/include/platform/loc \
- /epoc32/include/platform/mw/loc \
- /epoc32/include/platform/loc/sc \
- /epoc32/include/platform/mw/loc/sc
+ $${epocroot_prefix}epoc32/include \
+ $${epocroot_prefix}epoc32/include/mw \
+ $${epocroot_prefix}epoc32/include/platform/mw \
+ $${epocroot_prefix}epoc32/include/platform \
+ $${epocroot_prefix}epoc32/include/platform/loc \
+ $${epocroot_prefix}epoc32/include/platform/mw/loc \
+ $${epocroot_prefix}epoc32/include/platform/loc/sc \
+ $${epocroot_prefix}epoc32/include/platform/mw/loc/sc
# This define statements defines the include paths, which are intended to be
# used in the pro-files that are part of the osextensions-layer. It includes all
@@ -186,10 +192,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# os-layer components.
OS_LAYER_SYSTEMINCLUDE = \
- /epoc32/include \
- /epoc32/include/platform \
- /epoc32/include/platform/loc \
- /epoc32/include/platform/loc/sc
+ $${epocroot_prefix}epoc32/include \
+ $${epocroot_prefix}epoc32/include/platform \
+ $${epocroot_prefix}epoc32/include/platform/loc \
+ $${epocroot_prefix}epoc32/include/platform/loc/sc
# This define statements defines the include paths, which are intended to be
# used in the pro-files that are part of the os-layer. This is intended
@@ -198,7 +204,7 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# 2 files already contain the /epoc32/include as system include path.
OS_LAYER_KERNEL_SYSTEMINCLUDE = \
- /epoc32/include/platform
+ $${epocroot_prefix}epoc32/include/platform
# ---------------------------------------
@@ -236,19 +242,19 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(CORE_APP_LAYER_IBY_EXPORT_PATH) {
- return(/epoc32/rom/include/core/app/$$1)
+ return($${epocroot_prefix}epoc32/rom/include/core/app/$$1)
}
defineReplace(CORE_MW_LAYER_IBY_EXPORT_PATH) {
- return(/epoc32/rom/include/core/mw/$$1)
+ return($${epocroot_prefix}epoc32/rom/include/core/mw/$$1)
}
defineReplace(CORE_OSEXT_LAYER_IBY_EXPORT_PATH) {
- return(/epoc32/rom/include/core/os/$$1)
+ return($${epocroot_prefix}epoc32/rom/include/core/os/$$1)
}
defineReplace(CORE_OS_LAYER_IBY_EXPORT_PATH) {
- return(/epoc32/rom/include/core/os/$$1)
+ return($${epocroot_prefix}epoc32/rom/include/core/os/$$1)
}
defineReplace(CORE_ADAPT_LAYER_IBY_EXPORT_PATH) {
- return(/epoc32/rom/include/$$1)
+ return($${epocroot_prefix}epoc32/rom/include/$$1)
}
# You need to define the following in pro-file, if you are using the stllib:
@@ -264,10 +270,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(APP_LAYER_SDK_EXPORT_PATH) {
- return (/epoc32/include/applications/$$1)
+ return ($${epocroot_prefix}epoc32/include/applications/$$1)
}
defineReplace(APP_LAYER_PUBLIC_EXPORT_PATH) {
- return (/epoc32/include/applications/$$1)
+ return ($${epocroot_prefix}epoc32/include/applications/$$1)
}
# ---------------------------------------
@@ -275,10 +281,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(APP_LAYER_DOMAIN_EXPORT_PATH) {
- return (/epoc32/include/domain/applications/$$1)
+ return ($${epocroot_prefix}epoc32/include/domain/applications/$$1)
}
defineReplace(APP_LAYER_PLATFORM_EXPORT_PATH) {
- return (/epoc32/include/domain/applications/$$1)
+ return ($${epocroot_prefix}epoc32/include/domain/applications/$$1)
}
# ---------------------------------------
@@ -286,10 +292,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(MW_LAYER_SDK_EXPORT_PATH) {
- return (/epoc32/include/middleware/$$1)
+ return ($${epocroot_prefix}epoc32/include/middleware/$$1)
}
defineReplace(MW_LAYER_PUBLIC_EXPORT_PATH) {
- return (/epoc32/include/middleware/$$1)
+ return ($${epocroot_prefix}epoc32/include/middleware/$$1)
}
# ---------------------------------------
@@ -297,10 +303,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(MW_LAYER_DOMAIN_EXPORT_PATH) {
- return (/epoc32/include/domain/middleware/$$1)
+ return ($${epocroot_prefix}epoc32/include/domain/middleware/$$1)
}
defineReplace(MW_LAYER_PLATFORM_EXPORT_PATH) {
- return (/epoc32/include/domain/middleware/$$1)
+ return ($${epocroot_prefix}epoc32/include/domain/middleware/$$1)
}
# ---------------------------------------
@@ -308,11 +314,11 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(OSEXT_LAYER_SDK_EXPORT_PATH) {
- return (/epoc32/include/osextensions/$$1)
+ return ($${epocroot_prefix}epoc32/include/osextensions/$$1)
}
# WARNING: If the following path changes see the exists() function around line 430
defineReplace(OS_LAYER_PUBLIC_EXPORT_PATH) {
- return (/epoc32/include/osextensions/$$1)
+ return ($${epocroot_prefix}epoc32/include/osextensions/$$1)
}
# ---------------------------------------
@@ -320,10 +326,10 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(OSEXT_LAYER_DOMAIN_EXPORT_PATH) {
- return (/epoc32/include/domain/osextensions/$$1)
+ return ($${epocroot_prefix}epoc32/include/domain/osextensions/$$1)
}
defineReplace(OS_LAYER_PLATFORM_EXPORT_PATH) {
- return (/epoc32/include/domain/osextensions/$$1)
+ return ($${epocroot_prefix}epoc32/include/domain/osextensions/$$1)
}
# ---------------------------------------
@@ -350,20 +356,20 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# the headers come from middleware or os-layer => thus they are first.
APP_LAYER_SYSTEMINCLUDE = \
- /epoc32/include \
- /epoc32/include/oem \
- /epoc32/include/middleware \
- /epoc32/include/domain/middleware \
- /epoc32/include/osextensions \
- /epoc32/include/domain/osextensions \
- /epoc32/include/applications \
- /epoc32/include/domain/applications \
- /epoc32/include/domain/osextensions/loc \
- /epoc32/include/domain/middleware/loc \
- /epoc32/include/domain/applications/loc \
- /epoc32/include/domain/osextensions/loc/sc \
- /epoc32/include/domain/middleware/loc/sc \
- /epoc32/include/domain/applications/loc/sc
+ $${epocroot_prefix}epoc32/include \
+ $${epocroot_prefix}epoc32/include/oem \
+ $${epocroot_prefix}epoc32/include/middleware \
+ $${epocroot_prefix}epoc32/include/domain/middleware \
+ $${epocroot_prefix}epoc32/include/osextensions \
+ $${epocroot_prefix}epoc32/include/domain/osextensions \
+ $${epocroot_prefix}epoc32/include/applications \
+ $${epocroot_prefix}epoc32/include/domain/applications \
+ $${epocroot_prefix}epoc32/include/domain/osextensions/loc \
+ $${epocroot_prefix}epoc32/include/domain/middleware/loc \
+ $${epocroot_prefix}epoc32/include/domain/applications/loc \
+ $${epocroot_prefix}epoc32/include/domain/osextensions/loc/sc \
+ $${epocroot_prefix}epoc32/include/domain/middleware/loc/sc \
+ $${epocroot_prefix}epoc32/include/domain/applications/loc/sc
# This define statements defines the include paths, which are intended to be
# used in the pro-files that are part of the middleware-layer. It includes all
@@ -371,16 +377,16 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# middleware-layer components.
MW_LAYER_SYSTEMINCLUDE = \
- /epoc32/include \
- /epoc32/include/oem \
- /epoc32/include/middleware \
- /epoc32/include/domain/middleware \
- /epoc32/include/osextensions \
- /epoc32/include/domain/osextensions \
- /epoc32/include/domain/osextensions/loc \
- /epoc32/include/domain/middleware/loc \
- /epoc32/include/domain/osextensions/loc/sc \
- /epoc32/include/domain/middleware/loc/sc
+ $${epocroot_prefix}epoc32/include \
+ $${epocroot_prefix}epoc32/include/oem \
+ $${epocroot_prefix}epoc32/include/middleware \
+ $${epocroot_prefix}epoc32/include/domain/middleware \
+ $${epocroot_prefix}epoc32/include/osextensions \
+ $${epocroot_prefix}epoc32/include/domain/osextensions \
+ $${epocroot_prefix}epoc32/include/domain/osextensions/loc \
+ $${epocroot_prefix}epoc32/include/domain/middleware/loc \
+ $${epocroot_prefix}epoc32/include/domain/osextensions/loc/sc \
+ $${epocroot_prefix}epoc32/include/domain/middleware/loc/sc
# This define statements defines the include paths, which are intended to be
# used in the pro-files that are part of the osextensions-layer. It includes all
@@ -388,12 +394,12 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# os-layer components.
OS_LAYER_SYSTEMINCLUDE = \
- /epoc32/include \
- /epoc32/include/oem \
- /epoc32/include/osextensions \
- /epoc32/include/domain/osextensions \
- /epoc32/include/domain/osextensions/loc \
- /epoc32/include/domain/osextensions/loc/sc
+ $${epocroot_prefix}epoc32/include \
+ $${epocroot_prefix}epoc32/include/oem \
+ $${epocroot_prefix}epoc32/include/osextensions \
+ $${epocroot_prefix}epoc32/include/domain/osextensions \
+ $${epocroot_prefix}epoc32/include/domain/osextensions/loc \
+ $${epocroot_prefix}epoc32/include/domain/osextensions/loc/sc
# This define statements defines the include paths, which are intended to be
# used in the pro-files that are part of the os-layer. This is intended
@@ -402,9 +408,9 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# 2 files already contain the /epoc32/include as system include path.
OS_LAYER_KERNEL_SYSTEMINCLUDE = \
- /epoc32/include/oem \
- /epoc32/include/osextensions \
- /epoc32/include/domain/osextensions
+ $${epocroot_prefix}epoc32/include/oem \
+ $${epocroot_prefix}epoc32/include/osextensions \
+ $${epocroot_prefix}epoc32/include/domain/osextensions
# ---------------------------------------
@@ -414,41 +420,41 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
OS_LAYER_LIBC_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis) \
$$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/sys) \
- /epoc32/include/stdapis \
- /epoc32/include/stdapis/sys
+ $${epocroot_prefix}epoc32/include/stdapis \
+ $${epocroot_prefix}epoc32/include/stdapis/sys
OS_LAYER_GLIB_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/glib-2.0) \
$$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/glib-2.0/glib) \
$$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/glib-2.0/gObject) \
- /epoc32/include/stdapis/glib-2.0 \
- /epoc32/include/stdapis/glib-2.0/glib \
- /epoc32/include/stdapis/glib-2.0/gObject
+ $${epocroot_prefix}epoc32/include/stdapis/glib-2.0 \
+ $${epocroot_prefix}epoc32/include/stdapis/glib-2.0/glib \
+ $${epocroot_prefix}epoc32/include/stdapis/glib-2.0/gObject
OS_LAYER_SSL_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/openssl) \
- /epoc32/include/stdapis/openssl
+ $${epocroot_prefix}epoc32/include/stdapis/openssl
# stlportv5 is preferred over stlport as it has the throwing version of operator new
OS_LAYER_STDCPP_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlportv5) \
- /epoc32/include/stdapis/stlportv5
+ $${epocroot_prefix}epoc32/include/stdapis/stlportv5
exists($${EPOCROOT}epoc32/include/osextensions/stdapis/stlport) \
|exists($${EPOCROOT}epoc32/include/stdapis/stlport) {
!exists($${EPOCROOT}epoc32/include/osextensions/stdapis/stlportv5) \
:!exists($${EPOCROOT}epoc32/include/stdapis/stlportv5) {
OS_LAYER_STDCPP_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlport) \
- /epoc32/include/stdapis/stlport
+ $${epocroot_prefix}epoc32/include/stdapis/stlport
}
}
OS_LAYER_BOOST_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/boost) \
- /epoc32/include/stdapis/boost
+ $${epocroot_prefix}epoc32/include/stdapis/boost
OS_LAYER_DBUS_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/dbus-1.0) \
$$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/dbus-1.0/dbus) \
- /epoc32/include/stdapis/dbus-1.0 \
- /epoc32/include/stdapis/dbus-1.0/dbus
+ $${epocroot_prefix}epoc32/include/stdapis/dbus-1.0 \
+ $${epocroot_prefix}epoc32/include/stdapis/dbus-1.0/dbus
OS_LAYER_LIBUTILITY_SYSTEMINCLUDE = $$OS_LAYER_PLATFORM_EXPORT_PATH(stdapis/utility) \
- /epoc32/include/stdapis/utility
+ $${epocroot_prefix}epoc32/include/stdapis/utility
# ---------------------------------------
# Definitions to export IBY files to different folders where they will be taken
@@ -456,19 +462,19 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
# ---------------------------------------
defineReplace(CORE_APP_LAYER_IBY_EXPORT_PATH) {
- return(/epoc32/rom/include/core/app/$$1)
+ return($${epocroot_prefix}epoc32/rom/include/core/app/$$1)
}
defineReplace(CORE_MW_LAYER_IBY_EXPORT_PATH) {
- return(/epoc32/rom/include/core/mw/$$1)
+ return($${epocroot_prefix}epoc32/rom/include/core/mw/$$1)
}
defineReplace(CORE_OSEXT_LAYER_IBY_EXPORT_PATH) {
- return(/epoc32/rom/include/core/osext/$$1)
+ return($${epocroot_prefix}epoc32/rom/include/core/osext/$$1)
}
defineReplace(CORE_OS_LAYER_IBY_EXPORT_PATH) {
- return(/epoc32/rom/include/core/osext/$$1)
+ return($${epocroot_prefix}epoc32/rom/include/core/osext/$$1)
}
defineReplace(CORE_ADAPT_LAYER_IBY_EXPORT_PATH) {
- return(/epoc32/rom/include/$$1)
+ return($${epocroot_prefix}epoc32/rom/include/$$1)
}
# You need to define the following in pro-file, if you are using the stllib:
@@ -480,5 +486,4 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) {
}
}
-
-
+epocroot_prefix =
diff --git a/mkspecs/features/symbian/release.prf b/mkspecs/features/symbian/release.prf
new file mode 100644
index 0000000..abfa3ac
--- /dev/null
+++ b/mkspecs/features/symbian/release.prf
@@ -0,0 +1 @@
+QMAKE_LIBDIR_QT += $${EPOCROOT}epoc32/release/armv5/urel
diff --git a/mkspecs/features/symbian/thread.prf b/mkspecs/features/symbian/thread.prf
new file mode 100644
index 0000000..885438a
--- /dev/null
+++ b/mkspecs/features/symbian/thread.prf
@@ -0,0 +1,2 @@
+# Symbian behaves like POSIX when it comes to threads.
+include(../unix/thread.prf)
diff --git a/mkspecs/symbian-abld/qmake.conf b/mkspecs/symbian-abld/qmake.conf
index 499bf63..b83876d 100644
--- a/mkspecs/symbian-abld/qmake.conf
+++ b/mkspecs/symbian-abld/qmake.conf
@@ -6,4 +6,4 @@
MAKEFILE_GENERATOR = SYMBIAN_ABLD
-include(../common/symbian/symbian.conf)
+include(../common/symbian/symbian-mmp.conf)
diff --git a/mkspecs/symbian-sbsv2/qmake.conf b/mkspecs/symbian-sbsv2/qmake.conf
index 0a5e878..f6cf58c 100644
--- a/mkspecs/symbian-sbsv2/qmake.conf
+++ b/mkspecs/symbian-sbsv2/qmake.conf
@@ -6,4 +6,4 @@
MAKEFILE_GENERATOR = SYMBIAN_SBSV2
-include(../common/symbian/symbian.conf)
+include(../common/symbian/symbian-mmp.conf)
diff --git a/mkspecs/symbian/features/do_not_build_as_thumb.prf b/mkspecs/symbian/features/do_not_build_as_thumb.prf
new file mode 100644
index 0000000..60d9382
--- /dev/null
+++ b/mkspecs/symbian/features/do_not_build_as_thumb.prf
@@ -0,0 +1,8 @@
+symbian-abld|symbian-sbsv2 {
+ MMP_RULES += ALWAYS_BUILD_AS_ARM
+} else:linux-armcc {
+ QMAKE_CFLAGS -= --thumb
+ QMAKE_CFLAGS += --arm
+ QMAKE_CXXFLAGS -= --thumb
+ QMAKE_CXXFLAGS += --arm
+}
diff --git a/mkspecs/symbian/linux-armcc/features/default_post.prf b/mkspecs/symbian/linux-armcc/features/default_post.prf
new file mode 100644
index 0000000..7aa1f4d
--- /dev/null
+++ b/mkspecs/symbian/linux-armcc/features/default_post.prf
@@ -0,0 +1,5 @@
+load(default_post.prf)
+
+# It is important that this config be executed last,
+# and qmake does them in reverse order.
+CONFIG = symbian_building $$CONFIG
diff --git a/mkspecs/symbian/linux-armcc/features/qt.prf b/mkspecs/symbian/linux-armcc/features/qt.prf
new file mode 100644
index 0000000..f8a074d
--- /dev/null
+++ b/mkspecs/symbian/linux-armcc/features/qt.prf
@@ -0,0 +1,12 @@
+QMAKE_LIBDIR_QT += $${EPOCROOT}epoc32/release/armv5/lib
+QMAKE_LIBDIR_QT *= $$(RVCT22LIB)
+
+INCLUDEPATH = $${EPOCROOT}epoc32/include \
+ $${EPOCROOT}epoc32/include/rvct2_2 \
+ $${EPOCROOT}epoc32/include/variant \
+ $${EPOCROOT}epoc32/include/stdapis \
+ $$INCLUDEPATH
+
+DEFINES *= __PRODUCT_INCLUDE__=$${EPOCROOT}epoc32/include/variant/symbian_os.hrh
+
+load(qt)
diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf
new file mode 100644
index 0000000..b0185d0
--- /dev/null
+++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf
@@ -0,0 +1,195 @@
+QMAKE_CFLAGS += $$QMAKE_CFLAGS.ARMCC
+QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS.ARMCC
+
+symbianObjdir=$$OBJECTS_DIR
+isEmpty(symbianObjdir) {
+ symbianObjdir = .
+}
+symbianDestdir=$$DESTDIR
+isEmpty(symbianDestdir) {
+ symbianDestdir = .
+}
+
+contains(QMAKE_CFLAGS, "--thumb")|contains(QMAKE_CXXFLAGS, "--thumb") {
+ DEFINES += __MARM_THUMB__
+}
+
+for(libraries, LIBS) {
+ libraries = $$replace(libraries, "\.dll$", ".dso")
+ isFullName = $$find(libraries, \.)
+ isEmpty(isFullName) {
+ newLIBS += "$${libraries}.dso"
+ } else {
+ newLIBS += "$${libraries}"
+ }
+}
+LIBS = $$newLIBS
+newLIBS =
+for(libraries, QMAKE_LIBS) {
+ libraries = $$replace(libraries, "\.dll$", ".dso")
+ isFullName = $$find(libraries, \.)
+ isEmpty(isFullName) {
+ newLIBS += "$${libraries}.dso"
+ } else {
+ newLIBS += "$${libraries}"
+ }
+}
+QMAKE_LIBS = $$newLIBS
+
+# This needs to be done after the above LIBS mangling.
+include(../platformlibs.conf)
+
+elf2e32_LIBPATH =
+for(libPath, QMAKE_LIBDIR) {
+ elf2e32_LIBPATH += "--libpath=$$libPath"
+}
+
+isEmpty(VERSION) {
+ VERSION = $$QT_VERSION
+}
+
+# Check for version validity.
+!isEmpty(VERSION):!contains(VERSION, "[0-9]+"):!contains(VERSION, "[0-9]+\.[0-9]+")!contains(VERSION, "[0-9]+(\.[0-9]+){2}") {
+ error("Invalid VERSION for Symbian: $$VERSION")
+}
+
+splitVersion = $$split(VERSION, ".")
+count(splitVersion, 1) {
+ # Default Symbian version if none is specified.
+ hexVersion = "000a0000"
+ decVersion = "10.0"
+} else {
+ count(splitVersion, 3) {
+ hexVersion = $$system("sh -c 'printf %02x $$member(splitVersion, 0)'")
+ hexPart2 = $$system("sh -c 'printf %02x $$member(splitVersion, 1)'")"
+ hexPart2 = $$hexPart2$$system("sh -c 'printf %02x $$member(splitVersion, 2)'")"
+ decVersion = $$system("sh -c 'printf %1d 0x$$hexVersion'").
+ hexVersion = $$hexVersion$$hexPart2
+ decVersion = $$decVersion$$system("sh -c 'printf %d 0x$$hexPart2'")
+ !contains(hexVersion, "[0-9a-f]{8}"):hexVersion = "00$${hexVersion}"
+ } else { # app code may have different numbering...
+ hexVersion = $$VERSION
+ decVersion = $$VERSION
+ }
+}
+#error ("hexVersion: $$hexVersion, decVersion: $$decVersion")
+
+intUid3 = $$lower($$replace(TARGET.UID3, "^0x", ""))
+isEmpty(TARGET.SID):TARGET.SID = $$TARGET.UID3
+isEmpty(TARGET.UID2):TARGET.UID2 = 0x00000000
+
+capability = $$replace(TARGET.CAPABILITY, " ", "+")
+capability = $$join(capability, "+")
+capability = $$replace(capability, "\+-", "-")
+isEmpty(capability): capability = "None"
+capability = "--capability=$$capability"
+
+contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) {
+ !isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK += &&
+ QMAKE_POST_LINK += $$QMAKE_MOVE $$symbianDestdir/$${TARGET}.dll $$symbianDestdir/$${TARGET}.sym
+ # the tee and grep at the end work around the issue that elf2e32 doesn't return non-null on error
+ QMAKE_POST_LINK += && elf2e32 --version=$$decVersion --sid=$$TARGET.SID --uid1=0x10000079 --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --fpu=softvfp --targettype=DLL --elfinput=$${symbianDestdir}/$${TARGET}.sym --output=$${symbianDestdir}/$${TARGET}.dll --dso=$$symbianDestdir/$${TARGET}.dso --defoutput=$$symbianObjdir/$${TARGET}.def --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged $$capability | tee elf2e32.log && test `grep -c 'Error:' elf2e32.log` = 0 && rm elf2e32.log
+ QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.sym
+ QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.dso
+ QMAKE_CLEAN += $${symbianObjdir}/$${TARGET}.def
+
+ QMAKE_LIBS += -ledllstub.lib -ledll.lib\\(uc_dll_.o\\)
+
+ QMAKE_LFLAGS += --symver_soname --soname $${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll
+}
+
+contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@.*") {
+ !isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK += &&
+
+ QMAKE_POST_LINK += $$QMAKE_MOVE $$symbianDestdir/$${TARGET} $$symbianDestdir/$${TARGET}.sym
+ # the tee and grep at the end work around the issue that elf2e32 doesn't return non-null on error
+ QMAKE_POST_LINK += && elf2e32 --version $$decVersion --sid=$$TARGET.SID --uid1=0x1000007a --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --fpu=softvfp --targettype=EXE --elfinput=$${symbianDestdir}/$${TARGET}.sym --output=$${symbianDestdir}/$${TARGET}.exe --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged $$capability | tee elf2e32.log && test `grep -c 'Error:' elf2e32.log` = 0 && rm elf2e32.log
+ QMAKE_POST_LINK += && ln "$${TARGET}.exe" "$$TARGET"
+ QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.sym
+ QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.exe
+ QMAKE_CLEAN += $${symbianDestdir}/$${TARGET}
+
+ QMAKE_LIBS += -leexe.lib\\(uc_exe_.o\\)
+
+ QMAKE_LFLAGS += --symver_soname --soname $${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe
+}
+
+# Symbian resource files
+
+linux-armcc:symbian_resources_INCLUDES = -I$$(RVCT22INC)
+symbian_resources_INCLUDES = $$replace(symbian_resources_INCLUDES, ",", " -I")
+symbian_resources_INCLUDES += $$join(INCLUDEPATH, " -I", "-I")
+symbian_resources_DEFINES = $$join(DEFINES, " -D", "-D")
+symbian_resources_RCC_DIR = $$replace(RCC_DIR, "/$", "")
+symbian_resources_INCLUDES += "-I $$symbian_resources_RCC_DIR"
+
+for(symbian_resource, SYMBIAN_RESOURCES) {
+ symbian_resource = $$basename(symbian_resource)
+ symbian_resource_clean = $$replace(symbian_resource, "\.rss$", ".rsc")
+ QMAKE_DISTCLEAN += $${symbianDestdir}/$${symbian_resource_clean}
+ symbian_resource_clean = $$replace(symbian_resource, "\.rss$", ".rpp")
+ QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${symbian_resource_clean}
+}
+
+symbianresources.input = SYMBIAN_RESOURCES
+symbianresources.output = $$symbian_resources_RCC_DIR/${QMAKE_FILE_BASE}.rsg
+symbianresources.commands = cpp -nostdinc -undef \
+ $$symbian_resources_INCLUDES \
+ $$symbian_resources_DEFINES \
+ ${QMAKE_FILE_NAME} \
+ -o $${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rpp \
+ && rcomp -u -m045,046,047 \
+ -s$${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rpp \
+ -o$${symbianDestdir}/${QMAKE_FILE_BASE}.rsc \
+ -h$${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rsg \
+ -i${QMAKE_FILE_NAME}
+symbianresources.dependency_type = TYPE_C
+symbianresources.CONFIG = no_link target_predeps
+
+QMAKE_EXTRA_COMPILERS += symbianresources
+
+contains(TEMPLATE, "app"):!contains(CONFIG, "no_icon") {
+ baseTarget = $$basename(TARGET)
+ baseTarget = $$replace(baseTarget, -,_)
+ baseTarget = $$replace(baseTarget, :,_)
+ baseTarget = $$replace(baseTarget, \.,_)
+ baseTarget = $$replace(baseTarget, " ",_)
+
+ # Make our own extra compiler target in order to get dependencies for generated
+ # files right. This also avoids the warning about files not found.
+ symbianGenResource.inputFile = $${baseTarget}.rss
+ symbianGenResource.input = symbianGenResource.inputFile
+ # Reuse the command from earlier.
+ symbianGenResource.commands = $$symbianresources.commands
+ symbianGenResource.output = $$symbianresources.output
+ symbianGenResource.CONFIG = no_link target_predeps
+
+ symbianGenRegResource.inputFile = $${baseTarget}_reg.rss
+ symbianGenRegResource.input = symbianGenRegResource.inputFile
+ symbianGenRegResource.commands = $$symbianresources.commands
+ symbianGenRegResource.output = $$symbianresources.output
+ symbianGenRegResource.CONFIG = no_link target_predeps
+ symbianGenRegResource.depends = $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg
+
+ QMAKE_EXTRA_COMPILERS += symbianGenResource symbianGenRegResource
+
+ QMAKE_DISTCLEAN += $${TARGET}.rss
+ QMAKE_DISTCLEAN += $${TARGET}.rsc
+ QMAKE_DISTCLEAN += $${TARGET}_reg.rss
+ QMAKE_DISTCLEAN += $${TARGET}_reg.rsc
+ QMAKE_DISTCLEAN += $${TARGET}.loc
+}
+
+# Generated pkg files
+
+QMAKE_DISTCLEAN += $${TARGET}_template.pkg
+
+# Pre 2.6.23 Linux kernels have a limit on the environment size that can be passed to
+# a forked process. We quite easily overstep this boundary when building big projects
+# on Symbian, and since we depend on running the system() command, this causes the build
+# to fail. Test here that system() can be successfully run. It is important that this
+# check happens as late as possible, otherwise it will not be caught.
+execve_sanity_test = $$system("echo testing")
+!contains(execve_sanity_test, "testing") {
+ error("Running system() failed. Maybe your kernel is too old? (Linux kernels need at least version 2.6.23)")
+}
diff --git a/mkspecs/symbian/linux-armcc/platformlibs.conf b/mkspecs/symbian/linux-armcc/platformlibs.conf
new file mode 100644
index 0000000..ac57790
--- /dev/null
+++ b/mkspecs/symbian/linux-armcc/platformlibs.conf
@@ -0,0 +1 @@
+QMAKE_LIBS += -lusrt2_2.lib -ldfpaeabi.dso -ldfprvct2_2.dso -ldrtaeabi.dso -lscppnwdl.dso -ldrtrvct2_2.dso -lh_t__uf.l\\(switch8.o\\)
diff --git a/mkspecs/symbian/linux-armcc/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf
new file mode 100644
index 0000000..c98c1f0
--- /dev/null
+++ b/mkspecs/symbian/linux-armcc/qmake.conf
@@ -0,0 +1,7 @@
+#
+# qmake configuration for symbian/linux-armcc
+#
+
+include(../../common/symbian/symbian-makefile.conf)
+
+include(../../common/armcc.conf)
diff --git a/mkspecs/symbian/linux-armcc/qplatformdefs.h b/mkspecs/symbian/linux-armcc/qplatformdefs.h
new file mode 100644
index 0000000..a96742a
--- /dev/null
+++ b/mkspecs/symbian/linux-armcc/qplatformdefs.h
@@ -0,0 +1,167 @@
+/****************************************************************************
+**
+** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPLATFORMDEFS_H
+#define QPLATFORMDEFS_H
+
+// Get Qt defines/settings
+
+#include "qglobal.h"
+
+// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs
+
+// 1) need to reset default environment if _BSD_SOURCE is defined
+// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0
+// 3) it seems older glibc need this to include the X/Open stuff
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
+
+#include <unistd.h>
+
+
+// We are hot - unistd.h should have turned on the specific APIs we requested
+
+//#include <features.h>
+#include <pthread.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <grp.h>
+#include <pwd.h>
+//#include <signal.h>
+#include <dlfcn.h>
+#include <sys/select.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/shm.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <netinet/in.h>
+#ifndef QT_NO_IPV6IFNAME
+#include <net/if.h>
+#endif
+#include <arpa/inet.h>
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_STATBUF struct stat64
+#define QT_STATBUF4TSTAT struct stat64
+#define QT_STAT ::stat64
+#define QT_FSTAT ::fstat64
+#define QT_LSTAT ::lstat64
+#define QT_OPEN ::open64
+#define QT_TRUNCATE ::truncate64
+#define QT_FTRUNCATE ::ftruncate64
+#define QT_LSEEK ::lseek64
+#else
+#define QT_STATBUF struct stat
+#define QT_STATBUF4TSTAT struct stat
+#define QT_STAT ::stat
+#define QT_FSTAT ::fstat
+#define QT_LSTAT ::lstat
+#define QT_OPEN ::open
+#define QT_TRUNCATE ::truncate
+#define QT_FTRUNCATE ::ftruncate
+#define QT_LSEEK ::lseek
+#endif
+
+#ifdef QT_LARGEFILE_SUPPORT
+#define QT_FOPEN ::fopen64
+#define QT_FSEEK ::fseeko64
+#define QT_FTELL ::ftello64
+#define QT_FGETPOS ::fgetpos64
+#define QT_FSETPOS ::fsetpos64
+#define QT_FPOS_T fpos64_t
+#define QT_OFF_T off64_t
+#else
+#define QT_FOPEN ::fopen
+#define QT_FSEEK ::fseek
+#define QT_FTELL ::ftell
+#define QT_FGETPOS ::fgetpos
+#define QT_FSETPOS ::fsetpos
+#define QT_MMAP ::mmap
+#define QT_FPOS_T fpos_t
+#define QT_OFF_T long
+#endif
+
+#define QT_STAT_REG S_IFREG
+#define QT_STAT_DIR S_IFDIR
+#define QT_STAT_MASK S_IFMT
+#define QT_STAT_LNK S_IFLNK
+#define QT_SOCKET_CONNECT ::connect
+#define QT_SOCKET_BIND ::bind
+#define QT_FILENO fileno
+#define QT_CLOSE ::close
+#define QT_READ ::read
+#define QT_WRITE ::write
+#define QT_ACCESS ::access
+#define QT_GETCWD ::getcwd
+#define QT_CHDIR ::chdir
+#define QT_MKDIR ::mkdir
+#define QT_RMDIR ::rmdir
+#define QT_OPEN_RDONLY O_RDONLY
+#define QT_OPEN_WRONLY O_WRONLY
+#define QT_OPEN_RDWR O_RDWR
+#define QT_OPEN_CREAT O_CREAT
+#define QT_OPEN_TRUNC O_TRUNC
+#define QT_OPEN_APPEND O_APPEND
+
+#define QT_SIGNAL_RETTYPE void
+#define QT_SIGNAL_ARGS int
+#define QT_SIGNAL_IGNORE SIG_IGN
+
+#if (defined(__GLIBC__) && (__GLIBC__ >= 2)) || defined(Q_OS_SYMBIAN)
+#define QT_SOCKLEN_T socklen_t
+#else
+#define QT_SOCKLEN_T int
+#endif
+
+
+#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
+#define QT_SNPRINTF ::snprintf
+#define QT_VSNPRINTF ::vsnprintf
+#endif
+
+
+#endif // QPLATFORMDEFS_H
diff --git a/projects.pro b/projects.pro
index 19a5ff8..fc7db1d 100644
--- a/projects.pro
+++ b/projects.pro
@@ -48,7 +48,7 @@ for(PROJECT, $$list($$lower($$unique(QT_BUILD_PARTS)))) {
contains(QT_BUILD_PARTS, tools) {
include(translations/translations.pri) # ts targets
} else {
- !wince*:!symbian:SUBDIRS += tools/linguist/lrelease
+ !wince*:SUBDIRS += tools/linguist/lrelease
}
SUBDIRS += translations # qm build step
} else:isEqual(PROJECT, qmake) {
diff --git a/qmake/Makefile.unix b/qmake/Makefile.unix
index fcf43c8..0ff5b38 100644
--- a/qmake/Makefile.unix
+++ b/qmake/Makefile.unix
@@ -10,7 +10,8 @@ OBJS=project.o property.o main.o makefile.o unixmake2.o unixmake.o \
mingw_make.o option.o winmakefile.o projectgenerator.o \
meta.o makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o \
borland_bmake.o msvc_dsp.o msvc_vcproj.o msvc_nmake.o msvc_objectmodel.o \
- symmake.o initprojectdeploy_symbian.o symmake_abld.o symmake_sbsv2.o
+ symmake.o initprojectdeploy_symbian.o symmake_abld.o symmake_sbsv2.o \
+ symbiancommon.o
#qt code
QOBJS=qtextcodec.o qutfcodec.o qstring.o qtextstream.o qiodevice.o qmalloc.o qglobal.o \
@@ -33,6 +34,7 @@ DEPEND_SRC=project.cpp property.cpp meta.cpp main.cpp generators/makefile.cpp ge
generators/win32/msvc_objectmodel.cpp generators/win32/msvc_nmake.cpp generators/win32/borland_bmake.cpp \
generators/symbian/symmake.cpp generators/symbian/initprojectdeploy_symbian.cpp \
generators/symbian/symmake_abld.cpp generators/symbian/symmake_sbsv2.cpp \
+ generaters/symbian/symbiancommon.cpp \
$(SOURCE_PATH)/src/corelib/codecs/qtextcodec.cpp $(SOURCE_PATH)/src/corelib/codecs/qutfcodec.cpp \
$(SOURCE_PATH)/src/corelib/tools/qstring.cpp $(SOURCE_PATH)/src/corelib/io/qfile.cpp \
$(SOURCE_PATH)/src/corelib/io/qtextstream.cpp $(SOURCE_PATH)/src/corelib/io/qiodevice.cpp \
@@ -230,7 +232,7 @@ option.o: option.cpp option.h $(BUILD_PATH)/src/corelib/global/qconfig.cpp
qcryptographichash.o: $(SOURCE_PATH)/src/corelib/tools/qcryptographichash.cpp
$(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/tools/qcryptographichash.cpp
-metamakefile.o: generators/metamakefile.cpp
+metamakefile.o: generators/metamakefile.cpp generators/symbian/symbian_makefile.h
$(CXX) -c -o $@ $(CXXFLAGS) generators/metamakefile.cpp
xmloutput.o: generators/xmloutput.cpp
@@ -278,6 +280,9 @@ symmake_abld.o: generators/symbian/symmake_abld.cpp
symmake_sbsv2.o: generators/symbian/symmake_sbsv2.cpp
$(CXX) -c -o $@ $(CXXFLAGS) generators/symbian/symmake_sbsv2.cpp
+symbiancommon.o: generators/symbian/symbiancommon.cpp
+ $(CXX) -c -o $@ $(CXXFLAGS) generators/symbian/symbiancommon.cpp
+
initprojectdeploy_symbian.o: generators/symbian/initprojectdeploy_symbian.cpp
$(CXX) -c -o $@ $(CXXFLAGS) generators/symbian/initprojectdeploy_symbian.cpp
diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32
index e6bbcd5..9ecce24 100644
--- a/qmake/Makefile.win32
+++ b/qmake/Makefile.win32
@@ -75,7 +75,7 @@ OBJS = project.obj main.obj makefile.obj unixmake.obj unixmake2.obj mingw
makefiledeps.obj metamakefile.obj xmloutput.obj pbuilder_pbx.obj \
borland_bmake.obj msvc_nmake.obj msvc_dsp.obj msvc_vcproj.obj \
msvc_objectmodel.obj symmake.obj initprojectdeploy_symbian.obj \
- symmake_abld.obj symmake_sbsv2.obj
+ symmake_abld.obj symmake_sbsv2.obj symbiancommon.obj
!IFDEF QMAKE_OPENSOURCE_EDITION
CFLAGS = $(CFLAGS) -DQMAKE_OPENSOURCE_EDITION
@@ -197,6 +197,7 @@ clean::
-del symmake.obj
-del symmake_abld.obj
-del symmake_sbsv2.obj
+ -del symbiancommon.obj
-del initprojectdeploy_symbian.obj
-del pbuilder_pbx.obj
-del qxmlstream.obj
@@ -394,6 +395,9 @@ symmake_abld.obj: $(SOURCE_PATH)/qmake/generators/symbian/symmake_abld.cpp
symmake_sbsv2.obj: $(SOURCE_PATH)/qmake/generators/symbian/symmake_sbsv2.cpp
$(CXX) $(CXXFLAGS) generators/symbian/symmake_sbsv2.cpp
+symbiancommon.obj: $(SOURCE_PATH)/qmake/generators/symbian/symbiancommon.cpp
+ $(CXX) $(CXXFLAGS) generators/symbian/symbiancommon.cpp
+
initprojectdeploy_symbian.obj: $(SOURCE_PATH)/qmake/generators/symbian/initprojectdeploy_symbian.cpp
$(CXX) $(CXXFLAGS) generators/symbian/initprojectdeploy_symbian.cpp
@@ -424,7 +428,7 @@ pbuilder_pbx.obj: $(SOURCE_PATH)/qmake/generators/mac/pbuilder_pbx.cpp
makefiledeps.obj: $(SOURCE_PATH)/qmake/generators/makefiledeps.cpp
$(CXX) $(CXXFLAGS) generators/makefiledeps.cpp
-metamakefile.obj: $(SOURCE_PATH)/qmake/generators/metamakefile.cpp
+metamakefile.obj: $(SOURCE_PATH)/qmake/generators/metamakefile.cpp $(SOURCE_PATH)/qmake/generators/symbian/symbiancommon.obj
$(CXX) $(CXXFLAGS) generators/metamakefile.cpp
xmloutput.obj: $(SOURCE_PATH)/qmake/generators/xmloutput.cpp
diff --git a/qmake/Makefile.win32-g++ b/qmake/Makefile.win32-g++
index ade379b..1dacb68 100644
--- a/qmake/Makefile.win32-g++
+++ b/qmake/Makefile.win32-g++
@@ -38,7 +38,7 @@ OBJS = project.o main.o makefile.o unixmake.o unixmake2.o mingw_make.o \
makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o \
borland_bmake.o msvc_nmake.o msvc_dsp.o msvc_vcproj.o \
msvc_objectmodel.o symmake.o initprojectdeploy_symbian.o \
- symmake_abld.o symmake_sbsv2.o
+ symmake_abld.o symmake_sbsv2.o symbiancommon.o
ifdef QMAKE_OPENSOURCE_EDITION
CFLAGS += -DQMAKE_OPENSOURCE_EDITION
@@ -275,6 +275,9 @@ symmake_abld.o: $(SOURCE_PATH)/qmake/generators/symbian/symmake_abld.cpp
symmake_sbsv2.o: $(SOURCE_PATH)/qmake/generators/symbian/symmake_sbsv2.cpp
$(CXX) $(CXXFLAGS) generators/symbian/symmake_sbsv2.cpp
+symbiancommon.o: $(SOURCE_PATH)/qmake/generators/symbian/symbiancommon.cpp
+ $(CXX) $(CXXFLAGS) generators/symbian/symbiancommon.cpp
+
initprojectdeploy_symbian.o: $(SOURCE_PATH)/qmake/generators/symbian/initprojectdeploy_symbian.cpp
$(CXX) $(CXXFLAGS) generators/symbian/initprojectdeploy_symbian.cpp
@@ -302,7 +305,7 @@ pbuilder_pbx.o: $(SOURCE_PATH)/qmake/generators/mac/pbuilder_pbx.cpp
makefiledeps.o: $(SOURCE_PATH)/qmake/generators/makefiledeps.cpp
$(CXX) $(CXXFLAGS) generators/makefiledeps.cpp
-metamakefile.o: $(SOURCE_PATH)/qmake/generators/metamakefile.cpp
+metamakefile.o: $(SOURCE_PATH)/qmake/generators/metamakefile.cpp $(SOURCE_PATH)/qmake/generators/symbian/symbian_makefile.h
$(CXX) $(CXXFLAGS) generators/metamakefile.cpp
xmloutput.o: $(SOURCE_PATH)/qmake/generators/xmloutput.cpp
diff --git a/qmake/Makefile.win32-g++-sh b/qmake/Makefile.win32-g++-sh
index 8d2723c..bce414e 100644
--- a/qmake/Makefile.win32-g++-sh
+++ b/qmake/Makefile.win32-g++-sh
@@ -38,7 +38,7 @@ OBJS = project.o main.o makefile.o unixmake.o unixmake2.o mingw_make.o \
makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o \
borland_bmake.o msvc_nmake.o msvc_dsp.o msvc_vcproj.o \
msvc_objectmodel.o symmake.o initprojectdeploy_symbian.o \
- symmake_abld.o symmake_sbsv2.o
+ symmake_abld.o symmake_sbsv2.o symbiancommon.o
ifdef QMAKE_OPENSOURCE_EDITION
CFLAGS += -DQMAKE_OPENSOURCE_EDITION
@@ -274,6 +274,9 @@ symmake_abld.o: $(SOURCE_PATH)/qmake/generators/symbian/symmake_abld.cpp
symmake_sbsv2.o: $(SOURCE_PATH)/qmake/generators/symbian/symmake_sbsv2.cpp
$(CXX) $(CXXFLAGS) generators/symbian/symmake_sbsv2.cpp
+symbiancommon.o: $(SOURCE_PATH)/qmake/generators/symbian/symbiancommon.cpp
+ $(CXX) $(CXXFLAGS) generators/symbian/symbiancommon.cpp
+
initprojectdeploy_symbian.o: $(SOURCE_PATH)/qmake/generators/symbian/initprojectdeploy_symbian.cpp
$(CXX) $(CXXFLAGS) generators/symbian/initprojectdeploy_symbian.cpp
@@ -301,7 +304,7 @@ pbuilder_pbx.o: $(SOURCE_PATH)/qmake/generators/mac/pbuilder_pbx.cpp
makefiledeps.o: $(SOURCE_PATH)/qmake/generators/makefiledeps.cpp
$(CXX) $(CXXFLAGS) generators/makefiledeps.cpp
-metamakefile.o: $(SOURCE_PATH)/qmake/generators/metamakefile.cpp
+metamakefile.o: $(SOURCE_PATH)/qmake/generators/metamakefile.cpp $(SOURCE_PATH)/qmake/generators/symbian/symbian_makefile.h
$(CXX) $(CXXFLAGS) generators/metamakefile.cpp
xmloutput.o: $(SOURCE_PATH)/qmake/generators/xmloutput.cpp
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index b0a8011..cac23cd 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -1814,7 +1814,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
tmp_clean = tmp_out;
if(tmp_clean.indexOf("${QMAKE_") == -1) {
t << "\n\t" << "-$(DEL_FILE) " << tmp_clean;
- if (isForSymbian())
+ if (Option::shellPath.isEmpty())
t << " " << NO_STDERR; // Eliminate unnecessary warnings
wrote_clean = true;
}
@@ -1844,7 +1844,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
}
}
if(!cleans.isEmpty()) {
- if (isForSymbian())
+ if (Option::shellPath.isEmpty())
t << valGlue(cleans, "\n\t" + del_statement, " " NO_STDERR "\n\t" + del_statement, " " NO_STDERR);
else
t << valGlue(cleans, "\n\t" + del_statement, "\n\t" + del_statement, "");
diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h
index d89c3b1..85510ea 100644
--- a/qmake/generators/makefile.h
+++ b/qmake/generators/makefile.h
@@ -248,6 +248,39 @@ public:
virtual bool mergeBuildProject(MakefileGenerator * /*other*/) { return false; }
virtual bool openOutput(QFile &, const QString &build) const;
virtual bool isWindowsShell() const { return Option::target_mode == Option::TARG_WIN_MODE; }
+
+ /* The next one is to avoid having SymbianCommonGenerator as a virtually
+ inherited class of this class. Instead it is without a base class
+ (avoiding the virtual inheritance problem), and is allowed to use
+ functions defined in here.
+
+ To illustrate:
+ +-------------------+
+ | MakefileGenerator |
+ +-------------------+
+ ^ ^
+ | |
+ | X <-- Avoid this inheritance
+ | |
+ +------------------------+ +------------------------+
+ | UnixMakefileGenerator | | SymbianCommonGenerator |
+ | or | | |
+ | NmakeMakefileGenerator | | |
+ +------------------------+ +------------------------+
+ ^ ^
+ | |
+ | |
+ | |
+ +-----------------------------+
+ | SymbianMakefileTemplate<> |
+ +-----------------------------+
+
+ We want to avoid the famous diamond problem, because if we have that, we need
+ virtual inheritance, which not all compilers like. Therefore, we break the
+ link as illustrated. Instead, we have a pointer to MakefileGenerator inside
+ SymbianCommonGenerator, and allows full access by making it a friend here.
+ */
+ friend class SymbianCommonGenerator;
};
inline void MakefileGenerator::setNoIO(bool o)
diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp
index 4151193..d4d1d43 100644
--- a/qmake/generators/metamakefile.cpp
+++ b/qmake/generators/metamakefile.cpp
@@ -436,6 +436,7 @@ QT_BEGIN_INCLUDE_NAMESPACE
#include "msvc_vcproj.h"
#include "symmake_abld.h"
#include "symmake_sbsv2.h"
+#include "symbian_makefile.h"
QT_END_INCLUDE_NAMESPACE
MakefileGenerator *
@@ -476,6 +477,8 @@ MetaMakefileGenerator::createMakefileGenerator(QMakeProject *proj, bool noIO)
mkfile = new SymbianAbldMakefileGenerator;
} else if(gen == "SYMBIAN_SBSV2") {
mkfile = new SymbianSbsv2MakefileGenerator;
+ } else if(gen == "SYMBIAN_UNIX") {
+ mkfile = new SymbianMakefileTemplate<UnixMakefileGenerator>;
} else {
fprintf(stderr, "Unknown generator specified: %s\n", gen.toLatin1().constData());
}
diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.cpp b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
index 7279a4c..6a7f128 100644
--- a/qmake/generators/symbian/initprojectdeploy_symbian.cpp
+++ b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
@@ -46,12 +46,18 @@
#include <qsettings.h>
#include <qdebug.h>
-#define SYSBIN_DIR "\\sys\\bin"
+#define SYSBIN_DIR "/sys/bin"
#define SUFFIX_DLL "dll"
#define SUFFIX_EXE "exe"
#define SUFFIX_QTPLUGIN "qtplugin"
+static QString fixPathToEpocOS(const QString &src)
+{
+ QString ret = Option::fixPathToTargetOS(src);
+ return ret.replace('/', '\\');
+}
+
static void fixEpocRootStr(QString& path)
{
path.replace("\\", "/");
@@ -175,12 +181,12 @@ static void createPluginStub(const QFileInfo& info,
QStringList& generatedDirs,
QStringList& generatedFiles)
{
- QDir().mkpath(PLUGIN_STUB_DIR);
+ QDir().mkpath(QLatin1String(PLUGIN_STUB_DIR));
if (!generatedDirs.contains(PLUGIN_STUB_DIR))
generatedDirs << PLUGIN_STUB_DIR;
// Plugin stubs must have different name from the actual plugins, because
// the toolchain for creating ROM images cannot handle non-binary .dll files properly.
- QFile stubFile(QDir(PLUGIN_STUB_DIR).filePath(info.completeBaseName() + "." SUFFIX_QTPLUGIN));
+ QFile stubFile(QDir::toNativeSeparators(QLatin1String(PLUGIN_STUB_DIR "/") + info.completeBaseName() + "." SUFFIX_QTPLUGIN));
if (stubFile.open(QIODevice::WriteOnly)) {
if (!generatedFiles.contains(stubFile.fileName()))
generatedFiles << stubFile.fileName();
@@ -194,7 +200,7 @@ static void createPluginStub(const QFileInfo& info,
}
QFileInfo stubInfo(stubFile);
deploymentList.append(CopyItem(Option::fixPathToLocalOS(stubInfo.absoluteFilePath()),
- Option::fixPathToLocalOS(devicePath + "\\" + stubInfo.fileName())));
+ fixPathToEpocOS(devicePath + "/" + stubInfo.fileName())));
}
QString generate_uid(const QString& target)
@@ -239,6 +245,7 @@ void initProjectDeploySymbian(QMakeProject* project,
DeploymentList &deploymentList,
const QString &testPath,
bool deployBinaries,
+ bool epocBuild,
const QString &platform,
const QString &build,
QStringList& generatedDirs,
@@ -281,13 +288,13 @@ void initProjectDeploySymbian(QMakeProject* project,
|| devicePath.at(0) == QLatin1Char('\\')
|| devicePathHasDriveLetter)) {
// create output path
- devicePath = Option::fixPathToLocalOS(QDir::cleanPath(targetPath + QLatin1Char('\\') + devicePath));
+ devicePath = Option::fixPathToLocalOS(QDir::cleanPath(targetPath + QLatin1Char('/') + devicePath));
} else {
if (0 == platform.compare(QLatin1String("winscw"), Qt::CaseInsensitive)) {
if (devicePathHasDriveLetter) {
- devicePath = epocRoot() + "epoc32\\winscw\\" + devicePath.remove(1, 1);
+ devicePath = epocRoot() + "epoc32/winscw/" + devicePath.remove(1, 1);
} else {
- devicePath = epocRoot() + "epoc32\\winscw\\c" + devicePath;
+ devicePath = epocRoot() + "epoc32/winscw/c" + devicePath;
}
} else {
// Drive letter needed if targetpath contains one and it is not already in
@@ -297,7 +304,7 @@ void initProjectDeploySymbian(QMakeProject* project,
}
}
- devicePath.replace(QLatin1String("/"), QLatin1String("\\"));
+ devicePath.replace(QLatin1String("\\"), QLatin1String("/"));
if (!deployBinaries &&
0 == devicePath.right(8).compare(QLatin1String(SYSBIN_DIR), Qt::CaseInsensitive)) {
@@ -321,7 +328,7 @@ void initProjectDeploySymbian(QMakeProject* project,
dirSearch = true;
} else {
if (info.exists() || source.indexOf('*') != -1) {
- nameFilter = source.split('\\').last();
+ nameFilter = source.split(QDir::separator()).last();
searchPath = info.absolutePath();
} else {
// Entry was not found. That is ok if it is a binary, since those do not necessarily yet exist.
@@ -329,13 +336,23 @@ void initProjectDeploySymbian(QMakeProject* project,
if (isBinary(info)) {
if (deployBinaries) {
// Executables and libraries are deployed to \sys\bin
- QFileInfo releasePath(epocRoot() + QDir::toNativeSeparators("epoc32/release/" + platform + "/" + build + "/"));
+ QFileInfo targetPath;
+ if (epocBuild)
+ targetPath.setFile(epocRoot() + "epoc32/release/" + platform + "/" + build + "/");
+ else
+ targetPath.setFile(info.path() + QDir::separator());
if(devicePathHasDriveLetter) {
- deploymentList.append(CopyItem(Option::fixPathToLocalOS(QDir(releasePath.absolutePath()).filePath(info.fileName()), false, true),
- Option::fixPathToLocalOS(devicePath.left(2) + QLatin1String(SYSBIN_DIR "\\") + info.fileName())));
+ deploymentList.append(CopyItem(
+ Option::fixPathToLocalOS(targetPath.absolutePath() + "/" + info.fileName(),
+ false, true),
+ fixPathToEpocOS(devicePath.left(2) + QLatin1String(SYSBIN_DIR "/")
+ + info.fileName())));
} else {
- deploymentList.append(CopyItem(Option::fixPathToLocalOS(QDir(releasePath.absolutePath()).filePath(info.fileName()), false, true),
- Option::fixPathToLocalOS(deploymentDrive + QLatin1String(SYSBIN_DIR "\\") + info.fileName())));
+ deploymentList.append(CopyItem(
+ Option::fixPathToLocalOS(targetPath.absolutePath() + "/" + info.fileName(),
+ false, true),
+ fixPathToEpocOS(deploymentDrive + QLatin1String(SYSBIN_DIR "/")
+ + info.fileName())));
}
}
if (isPlugin(info, devicePath)) {
@@ -346,7 +363,7 @@ void initProjectDeploySymbian(QMakeProject* project,
// Generate deployment even if file doesn't exist, as this may be the case
// when generating .pkg files.
deploymentList.append(CopyItem(Option::fixPathToLocalOS(info.absoluteFilePath()),
- Option::fixPathToLocalOS(devicePath + "\\" + info.fileName())));
+ fixPathToEpocOS(devicePath + "/" + info.fileName())));
continue;
}
}
@@ -368,14 +385,25 @@ void initProjectDeploySymbian(QMakeProject* project,
// This deploys pre-built plugins. Other pre-built binaries will deploy normally,
// as they have SYSBIN_DIR target path.
if (deployBinaries) {
- deploymentList.append(CopyItem(Option::fixPathToLocalOS(absoluteItemPath + "\\" + iterator.fileName()),
- Option::fixPathToLocalOS(deploymentDrive + QLatin1String(SYSBIN_DIR "\\") + iterator.fileName())));
+ if (devicePathHasDriveLetter) {
+ deploymentList.append(CopyItem(
+ Option::fixPathToLocalOS(absoluteItemPath + "/" + iterator.fileName()),
+ fixPathToEpocOS(devicePath.left(2) + QLatin1String(SYSBIN_DIR "/")
+ + iterator.fileName())));
+ } else {
+ deploymentList.append(CopyItem(
+ Option::fixPathToLocalOS(absoluteItemPath + "/" + iterator.fileName()),
+ fixPathToEpocOS(deploymentDrive + QLatin1String(SYSBIN_DIR "/")
+ + iterator.fileName())));
+ }
}
- createPluginStub(info, devicePath + "\\" + absoluteItemPath.right(diffSize), deploymentList, generatedDirs, generatedFiles);
+ createPluginStub(info, devicePath + "/" + absoluteItemPath.right(diffSize), deploymentList, generatedDirs, generatedFiles);
continue;
} else {
- deploymentList.append(CopyItem(Option::fixPathToLocalOS(absoluteItemPath + "\\" + iterator.fileName()),
- Option::fixPathToLocalOS(devicePath + "\\" + absoluteItemPath.right(diffSize) + "\\" + iterator.fileName())));
+ deploymentList.append(CopyItem(
+ Option::fixPathToLocalOS(absoluteItemPath + "/" + iterator.fileName()),
+ fixPathToEpocOS(devicePath + "/" + absoluteItemPath.right(diffSize)
+ + "/" + iterator.fileName())));
}
}
}
diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.h b/qmake/generators/symbian/initprojectdeploy_symbian.h
index e23e6a9..3c515d6 100644
--- a/qmake/generators/symbian/initprojectdeploy_symbian.h
+++ b/qmake/generators/symbian/initprojectdeploy_symbian.h
@@ -69,6 +69,7 @@ extern void initProjectDeploySymbian(QMakeProject* project,
DeploymentList &deploymentList,
const QString &testPath,
bool deployBinaries,
+ bool epocBuild,
const QString &platform,
const QString &build,
QStringList& generatedDirs,
diff --git a/qmake/generators/symbian/symbian_makefile.h b/qmake/generators/symbian/symbian_makefile.h
new file mode 100644
index 0000000..532ab89
--- /dev/null
+++ b/qmake/generators/symbian/symbian_makefile.h
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the qmake application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SYMBIAN_MAKEFILE_H
+#define SYMBIAN_MAKEFILE_H
+
+#include "symbiancommon.h"
+
+// This allows us to reuse the code for both win32 and unix makefile generators.
+template <class T>
+class SymbianMakefileTemplate : public T, public SymbianCommonGenerator
+{
+public:
+ SymbianMakefileTemplate() : SymbianCommonGenerator(this) {}
+
+ void init()
+ {
+ T::init();
+ SymbianCommonGenerator::init();
+ }
+
+ bool writeMakefile(QTextStream &t)
+ {
+ QString numberOfIcons;
+ QString iconFile;
+ QStringList userRssRules;
+ readRssRules(numberOfIcons, iconFile, userRssRules);
+
+ DeploymentList depList;
+ generatePkgFile(iconFile, depList, false);
+
+ // Get the application translations and convert to symbian OS lang code, i.e. decical number
+ QStringList symbianLangCodes = symbianLangCodesFromTsFiles();
+
+ if (targetType == TypeExe) {
+ if (!this->project->values("CONFIG").contains("no_icon", Qt::CaseInsensitive)) {
+ writeRegRssFile(userRssRules);
+ writeRssFile(numberOfIcons, iconFile);
+ writeLocFile(symbianLangCodes);
+ }
+ }
+
+ return T::writeMakefile(t);
+ }
+};
+
+#endif // SYMBIAN_MAKEFILE_H
diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp
new file mode 100644
index 0000000..4c8253f
--- /dev/null
+++ b/qmake/generators/symbian/symbiancommon.cpp
@@ -0,0 +1,794 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the qmake application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "symbiancommon.h"
+#include <qdebug.h>
+
+#define RESOURCE_DIRECTORY_RESOURCE "\\\\resource\\\\apps\\\\"
+
+#define RSS_RULES "RSS_RULES"
+#define RSS_RULES_BASE "RSS_RULES."
+#define RSS_TAG_NBROFICONS "number_of_icons"
+#define RSS_TAG_ICONFILE "icon_file"
+
+#define MANUFACTURER_NOTE_FILE "manufacturer_note.txt"
+#define DEFAULT_MANUFACTURER_NOTE \
+ "The package is not supported for devices from this manufacturer. Please try the selfsigned " \
+ "version of the package instead."
+
+SymbianCommonGenerator::SymbianCommonGenerator(MakefileGenerator *generator)
+ : generator(generator)
+{
+}
+
+void SymbianCommonGenerator::init()
+{
+ QMakeProject *project = generator->project;
+ fixedTarget = generator->escapeFilePath(project->first("TARGET"));
+ fixedTarget = removePathSeparators(fixedTarget);
+ removeSpecialCharacters(fixedTarget);
+
+ // This should not be empty since the mkspecs are supposed to set it if missing.
+ uid3 = project->first("TARGET.UID3").trimmed();
+
+ if ((project->values("TEMPLATE")).contains("app"))
+ targetType = TypeExe;
+ else if ((project->values("TEMPLATE")).contains("lib")) {
+ // Check CONFIG to see if we are to build staticlib or dll
+ if (project->isActiveConfig("staticlib") || project->isActiveConfig("static"))
+ targetType = TypeLib;
+ else if (project->isActiveConfig("plugin"))
+ targetType = TypePlugin;
+ else
+ targetType = TypeDll;
+ } else {
+ targetType = TypeSubdirs;
+ }
+
+ // UID is valid as either hex or decimal, so just convert it to number and back to hex
+ // to get proper string for private dir
+ bool conversionOk = false;
+ uint uidNum = uid3.toUInt(&conversionOk, 0);
+
+ if (!conversionOk) {
+ fprintf(stderr, "Error: Invalid UID \"%s\".\n", uid3.toUtf8().constData());
+ } else {
+ privateDirUid.setNum(uidNum, 16);
+ while (privateDirUid.length() < 8)
+ privateDirUid.insert(0, QLatin1Char('0'));
+ }
+}
+
+bool SymbianCommonGenerator::containsStartWithItem(const QChar &c, const QStringList& src)
+{
+ bool result = false;
+ foreach(QString str, src) {
+ if (str.startsWith(c)) {
+ result = true;
+ break;
+ }
+ }
+ return result;
+}
+
+void SymbianCommonGenerator::removeSpecialCharacters(QString& str)
+{
+ // When modifying this method check also application_icon.prf
+ str.replace(QString("/"), QString("_"));
+ str.replace(QString("\\"), QString("_"));
+ str.replace(QString("-"), QString("_"));
+ str.replace(QString(":"), QString("_"));
+ str.replace(QString("."), QString("_"));
+ str.replace(QString(" "), QString("_"));
+}
+
+void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, DeploymentList &depList, bool epocBuild)
+{
+ QMakeProject *project = generator->project;
+ QString pkgFilename = QString("%1_template.%2").arg(fixedTarget).arg("pkg");
+ if (!Option::output_dir.isEmpty())
+ pkgFilename = Option::output_dir + '/' + pkgFilename;
+
+ QFile pkgFile(pkgFilename);
+ if (!pkgFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
+ PRINT_FILE_CREATE_ERROR(pkgFilename);
+ return;
+ }
+
+ generatedFiles << pkgFile.fileName();
+ QTextStream t(&pkgFile);
+
+ QString installerSisHeader = project->values("DEPLOYMENT.installer_header").join("\n");
+ QString wrapperStreamBuffer;
+ QTextStream tw(&wrapperStreamBuffer);
+
+ QString dateStr = QDateTime::currentDateTime().toString(Qt::ISODate);
+
+ // Header info
+ QString wrapperPkgFilename = QString("%1_installer.%2")
+ .arg(fixedTarget)
+ .arg("pkg");
+ QString headerComment = "; %1 generated by qmake at %2\n"
+ "; This file is generated by qmake and should not be modified by the user\n"
+ ";\n\n";
+ t << headerComment.arg(pkgFilename).arg(dateStr);
+ tw << headerComment.arg(wrapperPkgFilename).arg(dateStr);
+
+ // Construct QStringList from pkg_prerules since we need search it before printed to file
+ QStringList rawPkgPreRules;
+ foreach(QString deploymentItem, project->values("DEPLOYMENT")) {
+ foreach(QString pkgrulesItem, project->values(deploymentItem + ".pkg_prerules")) {
+ QStringList pkgrulesValue = project->values(pkgrulesItem);
+ // If there is no stringlist defined for a rule, use rule name directly
+ // This is convenience for defining single line mmp statements
+ if (pkgrulesValue.isEmpty()) {
+ rawPkgPreRules << pkgrulesItem;
+ } else {
+ foreach(QString pkgrule, pkgrulesValue) {
+ rawPkgPreRules << pkgrule;
+ }
+ }
+ }
+ }
+
+ // Apply some defaults if specific data does not exist in PKG pre-rules
+
+ if (!containsStartWithItem('&', rawPkgPreRules)) {
+ // language, (*** hardcoded to english atm, should be parsed from TRANSLATIONS)
+ QString languageCode = "; Language\n&EN\n\n";
+ t << languageCode;
+ tw << languageCode;
+ } else {
+ // In case user defines langs, he must take care also about SIS header
+ if (!containsStartWithItem('#', rawPkgPreRules))
+ fprintf(stderr, "Warning: If language is defined with DEPLOYMENT pkg_prerules, also the SIS header must be defined\n");
+ }
+
+ // name of application, UID and version
+ QString applicationVersion = project->first("VERSION").isEmpty() ? "1,0,0" : project->first("VERSION").replace('.', ',');
+ QString sisHeader = "; SIS header: name, uid, version\n#{\"%1\"},(%2),%3\n\n";
+ QString visualTarget = generator->escapeFilePath(generator->fileFixify(project->first("TARGET")));
+ visualTarget = removePathSeparators(visualTarget);
+ QString wrapperTarget = visualTarget + " installer";
+
+ if (installerSisHeader.startsWith("0x", Qt::CaseInsensitive)) {
+ tw << sisHeader.arg(wrapperTarget).arg(installerSisHeader).arg(applicationVersion);
+ } else {
+ tw << installerSisHeader << endl;
+ }
+ if (!containsStartWithItem('#', rawPkgPreRules)) {
+ t << sisHeader.arg(visualTarget).arg(uid3).arg(applicationVersion);
+ }
+
+ // Localized vendor name
+ QString vendorName;
+ if (!containsStartWithItem('%', rawPkgPreRules)) {
+ vendorName += "; Localised Vendor name\n%{\"Vendor\"}\n\n";
+ }
+
+ // Unique vendor name
+ if (!containsStartWithItem(':', rawPkgPreRules)) {
+ vendorName += "; Unique Vendor name\n:\"Vendor\"\n\n";
+ }
+
+ t << vendorName;
+ tw << vendorName;
+
+ // PKG pre-rules - these are added before actual file installations i.e. SIS package body
+ if (rawPkgPreRules.size()) {
+ QString comment = "\n; Manual PKG pre-rules from PRO files\n";
+ t << comment;
+ tw << comment;
+
+ foreach(QString item, rawPkgPreRules) {
+ // Only regular pkg file should have package dependencies or pkg header if that is
+ // defined using prerules.
+ if (!item.startsWith("(") && !item.startsWith("#")) {
+ tw << item << endl;
+ }
+ t << item << endl;
+ }
+ t << endl;
+ tw << endl;
+ }
+
+ // Begin Manufacturer block
+ if (!project->values("DEPLOYMENT.manufacturers").isEmpty()) {
+ QString manufacturerStr("IF ");
+ foreach(QString manufacturer, project->values("DEPLOYMENT.manufacturers")) {
+ manufacturerStr.append(QString("(MANUFACTURER)=(%1) OR \n ").arg(manufacturer));
+ }
+ // Remove the final OR
+ manufacturerStr.chop(8);
+ t << manufacturerStr << endl;
+ }
+
+ // Install paths on the phone *** should be dynamic at some point
+ QString installPathBin = "!:\\sys\\bin";
+ QString installPathResource = "!:\\resource\\apps";
+ QString installPathRegResource = "!:\\private\\10003a3f\\import\\apps";
+
+ // Find location of builds
+ QString destDirBin;
+ QString destDirResource;
+ QString destDirRegResource;
+ if (epocBuild) {
+ destDirBin = QString("%1epoc32/release/$(PLATFORM)/$(TARGET)").arg(epocRoot());
+ destDirResource = QString("%1epoc32/data/z/resource/apps").arg(epocRoot());
+ destDirRegResource = QString("%1epoc32/data/z/private/10003a3f/import/apps").arg(epocRoot());
+ } else {
+ destDirBin = project->first("DESTDIR");
+ if (destDirBin.isEmpty())
+ destDirBin = ".";
+ else if (destDirBin.endsWith('/') || destDirBin.endsWith('\\'))
+ destDirBin.chop(1);
+ destDirResource = destDirBin;
+ destDirRegResource = destDirBin;
+ }
+
+ if (targetType == TypeExe) {
+ // deploy .exe file
+ t << "; Executable and default resource files" << endl;
+ QString exeFile = fixedTarget + ".exe";
+ t << QString("\"%1/%2\" - \"%3\\%4\"")
+ .arg(destDirBin)
+ .arg(exeFile)
+ .arg(installPathBin)
+ .arg(exeFile) << endl;
+
+ // deploy rsc & reg_rsc file
+ if (!project->isActiveConfig("no_icon")) {
+ t << QString("\"%1/%2\" - \"%3\\%4\"")
+ .arg(destDirResource)
+ .arg(fixedTarget + ".rsc")
+ .arg(installPathResource)
+ .arg(fixedTarget + ".rsc") << endl;
+
+ t << QString("\"%1/%2\" - \"%3\\%4\"")
+ .arg(destDirRegResource)
+ .arg(fixedTarget + "_reg.rsc")
+ .arg(installPathRegResource)
+ .arg(fixedTarget + "_reg.rsc") << endl;
+
+ if (!iconFile.isEmpty()) {
+ if (epocBuild) {
+ t << QString("\"%1epoc32/data/z%2\" - \"!:%3\"")
+ .arg(epocRoot())
+ .arg(iconFile)
+ .arg(QDir::toNativeSeparators(iconFile)) << endl << endl;
+ } else {
+ QDir mifIconDir(project->first("DESTDIR"));
+ QFileInfo mifIcon(mifIconDir.relativeFilePath(project->first("TARGET")));
+ QString mifIconFileName = mifIcon.fileName();
+ mifIconFileName.replace(QRegExp("[-: .]"), "_");
+ mifIconFileName.append(".mif");
+ t << QString("\"%1/%2\" - \"!:%3\"")
+ .arg(mifIcon.path())
+ .arg(mifIconFileName)
+ .arg(QDir::toNativeSeparators(iconFile)) << endl << endl;
+ }
+ }
+ }
+ }
+
+ // deploy any additional DEPLOYMENT files
+ QString remoteTestPath;
+ remoteTestPath = QString("!:\\private\\%1").arg(privateDirUid);
+
+ initProjectDeploySymbian(project, depList, remoteTestPath, true, epocBuild, "$(PLATFORM)", "$(TARGET)", generatedDirs, generatedFiles);
+ if (depList.size())
+ t << "; DEPLOYMENT" << endl;
+ for (int i = 0; i < depList.size(); ++i) {
+ t << QString("\"%1\" - \"%2\"")
+ .arg(depList.at(i).from)
+ .arg(depList.at(i).to) << endl;
+ }
+ t << endl;
+
+ // PKG post-rules - these are added after actual file installations i.e. SIS package body
+ t << "; Manual PKG post-rules from PRO files" << endl;
+ foreach(QString deploymentItem, project->values("DEPLOYMENT")) {
+ foreach(QString pkgrulesItem, project->values(deploymentItem + ".pkg_postrules")) {
+ QStringList pkgrulesValue = project->values(pkgrulesItem);
+ // If there is no stringlist defined for a rule, use rule name directly
+ // This is convenience for defining single line statements
+ if (pkgrulesValue.isEmpty()) {
+ t << pkgrulesItem << endl;
+ } else {
+ foreach(QString pkgrule, pkgrulesValue) {
+ t << pkgrule << endl;
+ }
+ }
+ t << endl;
+ }
+ }
+
+ // Close Manufacturer block
+ if (!project->values("DEPLOYMENT.manufacturers").isEmpty()) {
+ QString manufacturerFailNoteFile;
+ if (project->values("DEPLOYMENT.manufacturers.fail_note").isEmpty()) {
+ manufacturerFailNoteFile = QString("%1_" MANUFACTURER_NOTE_FILE).arg(uid3);
+ QFile ft(manufacturerFailNoteFile);
+ if (ft.open(QIODevice::WriteOnly)) {
+ generatedFiles << ft.fileName();
+ QTextStream t2(&ft);
+
+ t2 << QString(DEFAULT_MANUFACTURER_NOTE) << endl;
+ } else {
+ PRINT_FILE_CREATE_ERROR(manufacturerFailNoteFile)
+ }
+ } else {
+ manufacturerFailNoteFile = project->values("DEPLOYMENT.manufacturers.fail_note").join("");
+ }
+
+ t << "ELSEIF NOT(0) ; MANUFACTURER" << endl
+ << "\"" << generator->fileInfo(manufacturerFailNoteFile).absoluteFilePath() << "\""
+ << " - \"\", FILETEXT, TEXTEXIT" << endl
+ << "ENDIF ; MANUFACTURER" << endl;
+ }
+
+ // Write wrapper pkg
+ if (!installerSisHeader.isEmpty()) {
+ QFile wrapperPkgFile(wrapperPkgFilename);
+ if (!wrapperPkgFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
+ PRINT_FILE_CREATE_ERROR(wrapperPkgFilename);
+ return;
+ }
+
+ generatedFiles << wrapperPkgFile.fileName();
+ QTextStream twf(&wrapperPkgFile);
+
+ twf << wrapperStreamBuffer << endl;
+
+ // Wrapped files deployment
+ QString currentPath = qmake_getpwd();
+ QString sisName = QString("%1.sis").arg(fixedTarget);
+ twf << "\"" << currentPath << "/" << sisName << "\" - \"c:\\adm\\" << sisName << "\"" << endl;
+
+ QString bootStrapPath = QLibraryInfo::location(QLibraryInfo::PrefixPath);
+ bootStrapPath.append("/bootstrap.sis");
+ QFileInfo fi(generator->fileInfo(bootStrapPath));
+ twf << "@\"" << fi.absoluteFilePath() << "\",(0x2002CCCD)" << endl;
+ }
+}
+
+QString SymbianCommonGenerator::removePathSeparators(QString &file)
+{
+ QString ret = file;
+ while (ret.indexOf(QDir::separator()) > 0) {
+ ret.remove(0, ret.indexOf(QDir::separator()) + 1);
+ }
+
+ return ret;
+}
+
+void SymbianCommonGenerator::writeRegRssFile(QStringList &userItems)
+{
+ QString filename(fixedTarget);
+ filename.append("_reg.rss");
+ if (!Option::output_dir.isEmpty())
+ filename = Option::output_dir + '/' + filename;
+ QFile ft(filename);
+ if (ft.open(QIODevice::WriteOnly)) {
+ generatedFiles << ft.fileName();
+ QTextStream t(&ft);
+ t << "// ============================================================================" << endl;
+ t << "// * Generated by qmake (" << qmake_version() << ") (Qt " QT_VERSION_STR ") on: ";
+ t << QDateTime::currentDateTime().toString(Qt::ISODate) << endl;
+ t << "// * This file is generated by qmake and should not be modified by the" << endl;
+ t << "// * user." << endl;
+ t << "// ============================================================================" << endl;
+ t << endl;
+ t << "#include <" << fixedTarget << ".rsg>" << endl;
+ t << "#include <appinfo.rh>" << endl;
+ t << endl;
+ t << "UID2 KUidAppRegistrationResourceFile" << endl;
+ t << "UID3 " << uid3 << endl << endl;
+ t << "RESOURCE APP_REGISTRATION_INFO" << endl;
+ t << "\t{" << endl;
+ t << "\tapp_file=\"" << fixedTarget << "\";" << endl;
+ t << "\tlocalisable_resource_file=\"" RESOURCE_DIRECTORY_RESOURCE << fixedTarget << "\";" << endl;
+ t << endl;
+
+ foreach(QString item, userItems)
+ t << "\t" << item << endl;
+ t << "\t}" << endl;
+ } else {
+ PRINT_FILE_CREATE_ERROR(filename)
+ }
+}
+
+void SymbianCommonGenerator::writeRssFile(QString &numberOfIcons, QString &iconFile)
+{
+ QString filename(fixedTarget);
+ if (!Option::output_dir.isEmpty())
+ filename = Option::output_dir + '/' + filename;
+ filename.append(".rss");
+ QFile ft(filename);
+ if (ft.open(QIODevice::WriteOnly)) {
+ generatedFiles << ft.fileName();
+ QTextStream t(&ft);
+ t << "// ============================================================================" << endl;
+ t << "// * Generated by qmake (" << qmake_version() << ") (Qt " QT_VERSION_STR ") on: ";
+ t << QDateTime::currentDateTime().toString(Qt::ISODate) << endl;
+ t << "// * This file is generated by qmake and should not be modified by the" << endl;
+ t << "// * user." << endl;
+ t << "// ============================================================================" << endl;
+ t << endl;
+ t << "#include <appinfo.rh>" << endl;
+ t << "#include \"" << fixedTarget << ".loc\"" << endl;
+ t << endl;
+ t << "RESOURCE LOCALISABLE_APP_INFO r_localisable_app_info" << endl;
+ t << "\t{" << endl;
+ t << "\tshort_caption = STRING_r_short_caption;" << endl;
+ t << "\tcaption_and_icon =" << endl;
+ t << "\tCAPTION_AND_ICON_INFO" << endl;
+ t << "\t\t{" << endl;
+ t << "\t\tcaption = STRING_r_caption;" << endl;
+
+ QString rssIconFile = iconFile;
+ rssIconFile = rssIconFile.replace("/", "\\\\");
+
+ if (numberOfIcons.isEmpty() || rssIconFile.isEmpty()) {
+ // There can be maximum one item in this tag, validated when parsed
+ t << "\t\tnumber_of_icons = 0;" << endl;
+ t << "\t\ticon_file = \"\";" << endl;
+ } else {
+ // There can be maximum one item in this tag, validated when parsed
+ t << "\t\tnumber_of_icons = " << numberOfIcons << ";" << endl;
+ t << "\t\ticon_file = \"" << rssIconFile << "\";" << endl;
+ }
+ t << "\t\t};" << endl;
+ t << "\t}" << endl;
+ t << endl;
+ } else {
+ PRINT_FILE_CREATE_ERROR(filename);
+ }
+}
+
+void SymbianCommonGenerator::writeLocFile(QStringList &symbianLangCodes)
+{
+ QString filename(fixedTarget);
+ if (!Option::output_dir.isEmpty())
+ filename = Option::output_dir + '/' + filename;
+ filename.append(".loc");
+ QFile ft(filename);
+ if (ft.open(QIODevice::WriteOnly)) {
+ generatedFiles << ft.fileName();
+ QTextStream t(&ft);
+ t << "// ============================================================================" << endl;
+ t << "// * Generated by qmake (" << qmake_version() << ") (Qt " QT_VERSION_STR ") on: ";
+ t << QDateTime::currentDateTime().toString(Qt::ISODate) << endl;
+ t << "// * This file is generated by qmake and should not be modified by the" << endl;
+ t << "// * user." << endl;
+ t << "// ============================================================================" << endl;
+ t << endl;
+ t << "#ifdef LANGUAGE_SC" << endl;
+ t << "#define STRING_r_short_caption \"" << fixedTarget << "\"" << endl;
+ t << "#define STRING_r_caption \"" << fixedTarget << "\"" << endl;
+ foreach(QString lang, symbianLangCodes) {
+ t << "#elif defined LANGUAGE_" << lang << endl;
+ t << "#define STRING_r_short_caption \"" << fixedTarget << "\"" << endl;
+ t << "#define STRING_r_caption \"" << fixedTarget << "\"" << endl;
+ }
+ t << "#else" << endl;
+ t << "#define STRING_r_short_caption \"" << fixedTarget << "\"" << endl;
+ t << "#define STRING_r_caption \"" << fixedTarget << "\"" << endl;
+ t << "#endif" << endl;
+ } else {
+ PRINT_FILE_CREATE_ERROR(filename);
+ }
+}
+
+void SymbianCommonGenerator::readRssRules(QString &numberOfIcons, QString &iconFile, QStringList &userRssRules)
+{
+ QMakeProject *project = generator->project;
+ for (QMap<QString, QStringList>::iterator it = project->variables().begin(); it != project->variables().end(); ++it) {
+ if (it.key().startsWith(RSS_RULES_BASE)) {
+ QString newKey = it.key().mid(sizeof(RSS_RULES_BASE) - 1);
+ if (newKey.isEmpty()) {
+ fprintf(stderr, "Warning: Empty RSS_RULES_BASE key encountered\n");
+ continue;
+ }
+ QStringList newValues;
+ QStringList values = it.value();
+ foreach(QString item, values) {
+ // If there is no stringlist defined for a rule, use rule name directly
+ // This is convenience for defining single line statements
+ if (project->values(item).isEmpty()) {
+ newValues << item;
+ } else {
+ foreach(QString itemRow, project->values(item)) {
+ newValues << itemRow;
+ }
+ }
+ }
+ // Verify thet there is exactly one value in RSS_TAG_NBROFICONS
+ if (newKey == RSS_TAG_NBROFICONS) {
+ if (newValues.count() == 1) {
+ numberOfIcons = newValues[0];
+ } else {
+ fprintf(stderr, "Warning: There must be exactly one value in '%s%s'\n",
+ RSS_RULES_BASE, RSS_TAG_NBROFICONS);
+ continue;
+ }
+ // Verify thet there is exactly one value in RSS_TAG_ICONFILE
+ } else if (newKey == RSS_TAG_ICONFILE) {
+ if (newValues.count() == 1) {
+ iconFile = newValues[0];
+ } else {
+ fprintf(stderr, "Warning: There must be exactly one value in '%s%s'\n",
+ RSS_RULES_BASE, RSS_TAG_ICONFILE);
+ continue;
+ }
+ } else {
+ fprintf(stderr, "Warning: Unsupported key:'%s%s'\n",
+ RSS_RULES_BASE, newKey.toLatin1().constData());
+ continue;
+ }
+ }
+ }
+
+ foreach(QString item, project->values(RSS_RULES)) {
+ // If there is no stringlist defined for a rule, use rule name directly
+ // This is convenience for defining single line mmp statements
+ if (project->values(item).isEmpty()) {
+ userRssRules << item;
+ } else {
+ userRssRules << project->values(item);
+ }
+ }
+
+ // Validate that either both RSS_TAG_NBROFICONS and RSS_TAG_ICONFILE keys exist
+ // or neither of them exist
+ if (!((numberOfIcons.isEmpty() && iconFile.isEmpty()) ||
+ (!numberOfIcons.isEmpty() && !iconFile.isEmpty()))) {
+ numberOfIcons.clear();
+ iconFile.clear();
+ fprintf(stderr, "Warning: Both or neither of '%s%s' and '%s%s' keys must exist.\n",
+ RSS_RULES_BASE, RSS_TAG_NBROFICONS, RSS_RULES_BASE, RSS_TAG_ICONFILE);
+ }
+
+ // Validate that RSS_TAG_NBROFICONS contains only numbers
+ if (!numberOfIcons.isEmpty()) {
+ bool ok;
+ numberOfIcons = numberOfIcons.simplified();
+ numberOfIcons.toInt(&ok);
+ if (!ok) {
+ numberOfIcons.clear();
+ iconFile.clear();
+ fprintf(stderr, "Warning: '%s%s' must be integer in decimal format.\n",
+ RSS_RULES_BASE, RSS_TAG_NBROFICONS);
+ }
+ }
+}
+
+QStringList SymbianCommonGenerator::symbianLangCodesFromTsFiles()
+{
+ QStringList tsfiles;
+ QStringList symbianLangCodes;
+ tsfiles << generator->project->values("TRANSLATIONS");
+
+ fillQt2S60LangMapTable();
+
+ foreach(QString file, tsfiles) {
+ int extIndex = file.lastIndexOf(".");
+ int langIndex = file.lastIndexOf("_", (extIndex - file.length()));
+ langIndex += 1;
+ QString qtlang = file.mid(langIndex, extIndex - langIndex);
+ QString s60lang = qt2S60LangMapTable.value(qtlang, QString("SC"));
+
+ if (!symbianLangCodes.contains(s60lang) && s60lang != "SC")
+ symbianLangCodes += s60lang;
+ }
+
+ return symbianLangCodes;
+}
+
+void SymbianCommonGenerator::fillQt2S60LangMapTable()
+{
+ qt2S60LangMapTable.reserve(170); // 165 items at time of writing.
+ qt2S60LangMapTable.insert("ab", "SC"); //Abkhazian //
+ qt2S60LangMapTable.insert("om", "SC"); //Afan //
+ qt2S60LangMapTable.insert("aa", "SC"); //Afar //
+ qt2S60LangMapTable.insert("af", "34"); //Afrikaans //Afrikaans
+ qt2S60LangMapTable.insert("sq", "35"); //Albanian //Albanian
+ qt2S60LangMapTable.insert("am", "36"); //Amharic //Amharic
+ qt2S60LangMapTable.insert("ar", "37"); //Arabic //Arabic
+ qt2S60LangMapTable.insert("hy", "38"); //Armenian //Armenian
+ qt2S60LangMapTable.insert("as", "SC"); //Assamese //
+ qt2S60LangMapTable.insert("ay", "SC"); //Aymara //
+ qt2S60LangMapTable.insert("az", "SC"); //Azerbaijani //
+ qt2S60LangMapTable.insert("ba", "SC"); //Bashkir //
+ qt2S60LangMapTable.insert("eu", "SC"); //Basque //
+ qt2S60LangMapTable.insert("bn", "41"); //Bengali //Bengali
+ qt2S60LangMapTable.insert("dz", "SC"); //Bhutani //
+ qt2S60LangMapTable.insert("bh", "SC"); //Bihari //
+ qt2S60LangMapTable.insert("bi", "SC"); //Bislama //
+ qt2S60LangMapTable.insert("br", "SC"); //Breton //
+ qt2S60LangMapTable.insert("bg", "42"); //Bulgarian //Bulgarian
+ qt2S60LangMapTable.insert("my", "43"); //Burmese //Burmese
+ qt2S60LangMapTable.insert("be", "40"); //Byelorussian //Belarussian
+ qt2S60LangMapTable.insert("km", "SC"); //Cambodian //
+ qt2S60LangMapTable.insert("ca", "44"); //Catalan //Catalan
+ qt2S60LangMapTable.insert("zh", "SC"); //Chinese //
+ qt2S60LangMapTable.insert("co", "SC"); //Corsican //
+ qt2S60LangMapTable.insert("hr", "45"); //Croatian //Croatian
+ qt2S60LangMapTable.insert("cs", "25"); //Czech //Czech
+ qt2S60LangMapTable.insert("da", "07"); //Danish //Danish
+ qt2S60LangMapTable.insert("nl", "18"); //Dutch //Dutch
+ qt2S60LangMapTable.insert("en", "01"); //English //English(UK)
+ qt2S60LangMapTable.insert("eo", "SC"); //Esperanto //
+ qt2S60LangMapTable.insert("et", "49"); //Estonian //Estonian
+ qt2S60LangMapTable.insert("fo", "SC"); //Faroese //
+ qt2S60LangMapTable.insert("fj", "SC"); //Fiji //
+ qt2S60LangMapTable.insert("fi", "09"); //Finnish //Finnish
+ qt2S60LangMapTable.insert("fr", "02"); //French //French
+ qt2S60LangMapTable.insert("fy", "SC"); //Frisian //
+ qt2S60LangMapTable.insert("gd", "52"); //Gaelic //Gaelic
+ qt2S60LangMapTable.insert("gl", "SC"); //Galician //
+ qt2S60LangMapTable.insert("ka", "53"); //Georgian //Georgian
+ qt2S60LangMapTable.insert("de", "03"); //German //German
+ qt2S60LangMapTable.insert("el", "54"); //Greek //Greek
+ qt2S60LangMapTable.insert("kl", "SC"); //Greenlandic //
+ qt2S60LangMapTable.insert("gn", "SC"); //Guarani //
+ qt2S60LangMapTable.insert("gu", "56"); //Gujarati //Gujarati
+ qt2S60LangMapTable.insert("ha", "SC"); //Hausa //
+ qt2S60LangMapTable.insert("he", "57"); //Hebrew //Hebrew
+ qt2S60LangMapTable.insert("hi", "58"); //Hindi //Hindi
+ qt2S60LangMapTable.insert("hu", "17"); //Hungarian //Hungarian
+ qt2S60LangMapTable.insert("is", "15"); //Icelandic //Icelandic
+ qt2S60LangMapTable.insert("id", "59"); //Indonesian //Indonesian
+ qt2S60LangMapTable.insert("ia", "SC"); //Interlingua //
+ qt2S60LangMapTable.insert("ie", "SC"); //Interlingue //
+ qt2S60LangMapTable.insert("iu", "SC"); //Inuktitut //
+ qt2S60LangMapTable.insert("ik", "SC"); //Inupiak //
+ qt2S60LangMapTable.insert("ga", "60"); //Irish //Irish
+ qt2S60LangMapTable.insert("it", "05"); //Italian //Italian
+ qt2S60LangMapTable.insert("ja", "32"); //Japanese //Japanese
+ qt2S60LangMapTable.insert("jv", "SC"); //Javanese //
+ qt2S60LangMapTable.insert("kn", "62"); //Kannada //Kannada
+ qt2S60LangMapTable.insert("ks", "SC"); //Kashmiri //
+ qt2S60LangMapTable.insert("kk", "63"); //Kazakh //Kazakh
+ qt2S60LangMapTable.insert("rw", "SC"); //Kinyarwanda //
+ qt2S60LangMapTable.insert("ky", "SC"); //Kirghiz //
+ qt2S60LangMapTable.insert("ko", "65"); //Korean //Korean
+ qt2S60LangMapTable.insert("ku", "SC"); //Kurdish //
+ qt2S60LangMapTable.insert("rn", "SC"); //Kurundi //
+ qt2S60LangMapTable.insert("lo", "66"); //Laothian //Laothian
+ qt2S60LangMapTable.insert("la", "SC"); //Latin //
+ qt2S60LangMapTable.insert("lv", "67"); //Latvian //Latvian
+ qt2S60LangMapTable.insert("ln", "SC"); //Lingala //
+ qt2S60LangMapTable.insert("lt", "68"); //Lithuanian //Lithuanian
+ qt2S60LangMapTable.insert("mk", "69"); //Macedonian //Macedonian
+ qt2S60LangMapTable.insert("mg", "SC"); //Malagasy //
+ qt2S60LangMapTable.insert("ms", "70"); //Malay //Malay
+ qt2S60LangMapTable.insert("ml", "71"); //Malayalam //Malayalam
+ qt2S60LangMapTable.insert("mt", "SC"); //Maltese //
+ qt2S60LangMapTable.insert("mi", "SC"); //Maori //
+ qt2S60LangMapTable.insert("mr", "72"); //Marathi //Marathi
+ qt2S60LangMapTable.insert("mo", "73"); //Moldavian //Moldovian
+ qt2S60LangMapTable.insert("mn", "74"); //Mongolian //Mongolian
+ qt2S60LangMapTable.insert("na", "SC"); //Nauru //
+ qt2S60LangMapTable.insert("ne", "SC"); //Nepali //
+ qt2S60LangMapTable.insert("nb", "08"); //Norwegian //Norwegian
+ qt2S60LangMapTable.insert("oc", "SC"); //Occitan //
+ qt2S60LangMapTable.insert("or", "SC"); //Oriya //
+ qt2S60LangMapTable.insert("ps", "SC"); //Pashto //
+ qt2S60LangMapTable.insert("fa", "SC"); //Persian //
+ qt2S60LangMapTable.insert("pl", "27"); //Polish //Polish
+ qt2S60LangMapTable.insert("pt", "13"); //Portuguese //Portuguese
+ qt2S60LangMapTable.insert("pa", "77"); //Punjabi //Punjabi
+ qt2S60LangMapTable.insert("qu", "SC"); //Quechua //
+ qt2S60LangMapTable.insert("rm", "SC"); //RhaetoRomance //
+ qt2S60LangMapTable.insert("ro", "78"); //Romanian //Romanian
+ qt2S60LangMapTable.insert("ru", "16"); //Russian //Russian
+ qt2S60LangMapTable.insert("sm", "SC"); //Samoan //
+ qt2S60LangMapTable.insert("sg", "SC"); //Sangho //
+ qt2S60LangMapTable.insert("sa", "SC"); //Sanskrit //
+ qt2S60LangMapTable.insert("sr", "79"); //Serbian //Serbian
+ qt2S60LangMapTable.insert("sh", "SC"); //SerboCroatian //
+ qt2S60LangMapTable.insert("st", "SC"); //Sesotho //
+ qt2S60LangMapTable.insert("tn", "SC"); //Setswana //
+ qt2S60LangMapTable.insert("sn", "SC"); //Shona //
+ qt2S60LangMapTable.insert("sd", "SC"); //Sindhi //
+ qt2S60LangMapTable.insert("si", "80"); //Singhalese //Sinhalese
+ qt2S60LangMapTable.insert("ss", "SC"); //Siswati //
+ qt2S60LangMapTable.insert("sk", "26"); //Slovak //Slovak
+ qt2S60LangMapTable.insert("sl", "28"); //Slovenian //Slovenian
+ qt2S60LangMapTable.insert("so", "81"); //Somali //Somali
+ qt2S60LangMapTable.insert("es", "04"); //Spanish //Spanish
+ qt2S60LangMapTable.insert("su", "SC"); //Sundanese //
+ qt2S60LangMapTable.insert("sw", "84"); //Swahili //Swahili
+ qt2S60LangMapTable.insert("sv", "06"); //Swedish //Swedish
+ qt2S60LangMapTable.insert("tl", "39"); //Tagalog //Tagalog
+ qt2S60LangMapTable.insert("tg", "SC"); //Tajik //
+ qt2S60LangMapTable.insert("ta", "87"); //Tamil //Tamil
+ qt2S60LangMapTable.insert("tt", "SC"); //Tatar //
+ qt2S60LangMapTable.insert("te", "88"); //Telugu //Telugu
+ qt2S60LangMapTable.insert("th", "33"); //Thai //Thai
+ qt2S60LangMapTable.insert("bo", "89"); //Tibetan //Tibetan
+ qt2S60LangMapTable.insert("ti", "90"); //Tigrinya //Tigrinya
+ qt2S60LangMapTable.insert("to", "SC"); //Tonga //
+ qt2S60LangMapTable.insert("ts", "SC"); //Tsonga //
+ qt2S60LangMapTable.insert("tr", "14"); //Turkish //Turkish
+ qt2S60LangMapTable.insert("tk", "92"); //Turkmen //Turkmen
+ qt2S60LangMapTable.insert("tw", "SC"); //Twi //
+ qt2S60LangMapTable.insert("ug", "SC"); //Uigur //
+ qt2S60LangMapTable.insert("uk", "93"); //Ukrainian //Ukrainian
+ qt2S60LangMapTable.insert("ur", "94"); //Urdu //Urdu
+ qt2S60LangMapTable.insert("uz", "SC"); //Uzbek //
+ qt2S60LangMapTable.insert("vi", "96"); //Vietnamese //Vietnamese
+ qt2S60LangMapTable.insert("vo", "SC"); //Volapuk //
+ qt2S60LangMapTable.insert("cy", "97"); //Welsh //Welsh
+ qt2S60LangMapTable.insert("wo", "SC"); //Wolof //
+ qt2S60LangMapTable.insert("xh", "SC"); //Xhosa //
+ qt2S60LangMapTable.insert("yi", "SC"); //Yiddish //
+ qt2S60LangMapTable.insert("yo", "SC"); //Yoruba //
+ qt2S60LangMapTable.insert("za", "SC"); //Zhuang //
+ qt2S60LangMapTable.insert("zu", "98"); //Zulu //Zulu
+ qt2S60LangMapTable.insert("nn", "75"); //Nynorsk //NorwegianNynorsk
+ qt2S60LangMapTable.insert("bs", "SC"); //Bosnian //
+ qt2S60LangMapTable.insert("dv", "SC"); //Divehi //
+ qt2S60LangMapTable.insert("gv", "SC"); //Manx //
+ qt2S60LangMapTable.insert("kw", "SC"); //Cornish //
+ qt2S60LangMapTable.insert("ak", "SC"); //Akan //
+ qt2S60LangMapTable.insert("kok", "SC"); //Konkani //
+ qt2S60LangMapTable.insert("gaa", "SC"); //Ga //
+ qt2S60LangMapTable.insert("ig", "SC"); //Igbo //
+ qt2S60LangMapTable.insert("kam", "SC"); //Kamba //
+ qt2S60LangMapTable.insert("syr", "SC"); //Syriac //
+ qt2S60LangMapTable.insert("byn", "SC"); //Blin //
+ qt2S60LangMapTable.insert("gez", "SC"); //Geez //
+ qt2S60LangMapTable.insert("kfo", "SC"); //Koro //
+ qt2S60LangMapTable.insert("sid", "SC"); //Sidamo //
+ qt2S60LangMapTable.insert("cch", "SC"); //Atsam //
+ qt2S60LangMapTable.insert("tig", "SC"); //Tigre //
+ qt2S60LangMapTable.insert("kaj", "SC"); //Jju //
+ qt2S60LangMapTable.insert("fur", "SC"); //Friulian //
+ qt2S60LangMapTable.insert("ve", "SC"); //Venda //
+ qt2S60LangMapTable.insert("ee", "SC"); //Ewe //
+ qt2S60LangMapTable.insert("wa", "SC"); //Walamo //
+ qt2S60LangMapTable.insert("haw", "SC"); //Hawaiian //
+ qt2S60LangMapTable.insert("kcg", "SC"); //Tyap //
+ qt2S60LangMapTable.insert("ny", "SC"); //Chewa //
+}
+
diff --git a/qmake/generators/symbian/symbiancommon.h b/qmake/generators/symbian/symbiancommon.h
new file mode 100644
index 0000000..32f9483
--- /dev/null
+++ b/qmake/generators/symbian/symbiancommon.h
@@ -0,0 +1,94 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the qmake application of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SYMBIANCOMMON_H
+#define SYMBIANCOMMON_H
+
+#include <project.h>
+#include <makefile.h>
+#include "initprojectdeploy_symbian.h"
+
+#define PRINT_FILE_CREATE_ERROR(filename) fprintf(stderr, "Error: Could not create '%s'\n", qPrintable(filename));
+
+class SymbianCommonGenerator
+{
+public:
+ enum TargetType {
+ TypeExe,
+ TypeDll,
+ TypeLib,
+ TypePlugin,
+ TypeSubdirs
+ };
+
+ SymbianCommonGenerator(MakefileGenerator *generator);
+
+ virtual void init();
+
+protected:
+
+ QString removePathSeparators(QString &file);
+ void removeSpecialCharacters(QString& str);
+ void generatePkgFile(const QString &iconFile, DeploymentList &depList, bool epocBuild);
+ bool containsStartWithItem(const QChar &c, const QStringList& src);
+
+ void writeRegRssFile(QStringList &useritems);
+ void writeRssFile(QString &numberOfIcons, QString &iconfile);
+ void writeLocFile(QStringList &symbianLangCodes);
+ void readRssRules(QString &numberOfIcons, QString &iconFile, QStringList &userRssRules);
+
+ QStringList symbianLangCodesFromTsFiles();
+ void fillQt2S60LangMapTable();
+
+protected:
+ MakefileGenerator *generator;
+
+ QStringList generatedFiles;
+ QStringList generatedDirs;
+ QString fixedTarget;
+ QString privateDirUid;
+ QString uid3;
+ TargetType targetType;
+
+ QHash<QString, QString> qt2S60LangMapTable;
+};
+
+#endif // SYMBIANCOMMON_H
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index 5ebc8a2..503e443 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -56,7 +56,6 @@
#endif
#define RESOURCE_DIRECTORY_MMP "/resource/apps"
-#define RESOURCE_DIRECTORY_RESOURCE "\\\\resource\\\\apps\\\\"
#define REGISTRATION_RESOURCE_DIRECTORY_HW "/private/10003a3f/import/apps"
#define PLUGIN_COMMON_DEF_FILE_FOR_MMP "./plugin_common.def"
#define PLUGIN_COMMON_DEF_FILE_ACTUAL "plugin_commonu.def"
@@ -69,11 +68,6 @@
#define BLD_INF_TAG_EXTENSIONS "prj_extensions"
#define BLD_INF_TAG_EXPORTS "prj_exports"
-#define RSS_RULES "RSS_RULES"
-#define RSS_RULES_BASE "RSS_RULES."
-#define RSS_TAG_NBROFICONS "number_of_icons"
-#define RSS_TAG_ICONFILE "icon_file"
-
#define MMP_TARGET "TARGET"
#define MMP_TARGETTYPE "TARGETTYPE"
#define MMP_SECUREID "SECUREID"
@@ -102,13 +96,6 @@
#define FAIL_SIS_NOPKG_TARGET "fail_sis_nopkg"
#define FAIL_SIS_NOCACHE_TARGET "fail_sis_nocache"
-#define PRINT_FILE_CREATE_ERROR(filename) fprintf(stderr, "Error: Could not create '%s'\n", qPrintable(filename));
-
-#define MANUFACTURER_NOTE_FILE "manufacturer_note.txt"
-#define DEFAULT_MANUFACTURER_NOTE \
- "The package is not supported for devices from this manufacturer. Please try the selfsigned " \
- "version of the package instead."
-
QString SymbianMakefileGenerator::fixPathForMmp(const QString& origPath, const QDir& parentDir)
{
static QString epocRootStr;
@@ -171,7 +158,7 @@ QString SymbianMakefileGenerator::canonizePath(const QString& origPath)
return resultPath;
}
-SymbianMakefileGenerator::SymbianMakefileGenerator() : MakefileGenerator() { }
+SymbianMakefileGenerator::SymbianMakefileGenerator() : MakefileGenerator(), SymbianCommonGenerator(this) { }
SymbianMakefileGenerator::~SymbianMakefileGenerator() { }
void SymbianMakefileGenerator::writeHeader(QTextStream &t)
@@ -231,7 +218,7 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
}
if (generatePkg) {
- generatePkgFile(iconFile, depList);
+ generatePkgFile(iconFile, depList, true);
}
writeBldInfContent(t, generatePkg, iconFile, depList);
@@ -291,264 +278,6 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
return true;
}
-void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile, DeploymentList &depList)
-{
- QString pkgFilename = QString("%1_template.%2")
- .arg(fixedTarget)
- .arg("pkg");
- QFile pkgFile(pkgFilename);
- if (!pkgFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
- PRINT_FILE_CREATE_ERROR(pkgFilename);
- return;
- }
-
- generatedFiles << pkgFile.fileName();
- QTextStream t(&pkgFile);
-
- QString installerSisHeader = project->values("DEPLOYMENT.installer_header").join("\n");
- if (installerSisHeader.isEmpty())
- installerSisHeader = "0xA000D7CE"; // Use default self-signable UID if not defined
-
- QString wrapperStreamBuffer;
- QTextStream tw(&wrapperStreamBuffer);
-
- QString dateStr = QDateTime::currentDateTime().toString(Qt::ISODate);
-
- // Header info
- QString wrapperPkgFilename = QString("%1_installer.%2")
- .arg(fixedTarget)
- .arg("pkg");
- QString headerComment = "; %1 generated by qmake at %2\n"
- "; This file is generated by qmake and should not be modified by the user\n"
- ";\n\n";
- t << headerComment.arg(pkgFilename).arg(dateStr);
- tw << headerComment.arg(wrapperPkgFilename).arg(dateStr);
-
- // Construct QStringList from pkg_prerules since we need search it before printed to file
- QStringList rawPkgPreRules;
- foreach(QString deploymentItem, project->values("DEPLOYMENT")) {
- foreach(QString pkgrulesItem, project->values(deploymentItem + ".pkg_prerules")) {
- QStringList pkgrulesValue = project->values(pkgrulesItem);
- // If there is no stringlist defined for a rule, use rule name directly
- // This is convenience for defining single line mmp statements
- if (pkgrulesValue.isEmpty()) {
- rawPkgPreRules << pkgrulesItem;
- } else {
- foreach(QString pkgrule, pkgrulesValue) {
- rawPkgPreRules << pkgrule;
- }
- }
- }
- }
-
- // Apply some defaults if specific data does not exist in PKG pre-rules
-
- if (!containsStartWithItem('&', rawPkgPreRules)) {
- // language, (*** hardcoded to english atm, should be parsed from TRANSLATIONS)
- QString languageCode = "; Language\n&EN\n\n";
- t << languageCode;
- tw << languageCode;
- } else {
- // In case user defines langs, he must take care also about SIS header
- if (!containsStartWithItem('#', rawPkgPreRules))
- fprintf(stderr, "Warning: If language is defined with DEPLOYMENT pkg_prerules, also the SIS header must be defined\n");
- }
-
- // name of application, UID and version
- QString applicationVersion = project->first("VERSION").isEmpty() ? "1,0,0" : project->first("VERSION").replace('.', ',');
- QString sisHeader = "; SIS header: name, uid, version\n#{\"%1\"},(%2),%3\n\n";
- QString visualTarget = escapeFilePath(fileFixify(project->first("TARGET")));
- visualTarget = removePathSeparators(visualTarget);
- QString wrapperTarget = visualTarget + " installer";
-
- if (installerSisHeader.startsWith("0x", Qt::CaseInsensitive)) {
- tw << sisHeader.arg(wrapperTarget).arg(installerSisHeader).arg(applicationVersion);
- } else {
- tw << installerSisHeader << endl;
- }
-
- if (!containsStartWithItem('#', rawPkgPreRules)) {
- t << sisHeader.arg(visualTarget).arg(uid3).arg(applicationVersion);
- }
-
- // Localized vendor name
- QString vendorName;
- if (!containsStartWithItem('%', rawPkgPreRules)) {
- vendorName += "; Localised Vendor name\n%{\"Vendor\"}\n\n";
- }
-
- // Unique vendor name
- if (!containsStartWithItem(':', rawPkgPreRules)) {
- vendorName += "; Unique Vendor name\n:\"Vendor\"\n\n";
- }
-
- t << vendorName;
- tw << vendorName;
-
- // PKG pre-rules - these are added before actual file installations i.e. SIS package body
- if (rawPkgPreRules.size()) {
- QString comment = "\n; Manual PKG pre-rules from PRO files\n";
- t << comment;
- tw << comment;
-
- foreach(QString item, rawPkgPreRules) {
- // Only regular pkg file should have package dependencies or pkg header if that is
- // defined using prerules.
- if (!item.startsWith("(") && !item.startsWith("#")) {
- tw << item << endl;
- }
- t << item << endl;
- }
- t << endl;
- tw << endl;
- }
-
- // Begin Manufacturer block
- if (!project->values("DEPLOYMENT.manufacturers").isEmpty()) {
- QString manufacturerStr("IF ");
- foreach(QString manufacturer, project->values("DEPLOYMENT.manufacturers")) {
- manufacturerStr.append(QString("(MANUFACTURER)=(%1) OR \n ").arg(manufacturer));
- }
- // Remove the final OR
- manufacturerStr.chop(8);
- t << manufacturerStr << endl;
- }
-
- // Install paths on the phone *** should be dynamic at some point
- QString installPathBin = "!:\\sys\\bin";
- QString installPathResource = "!:\\resource\\apps";
- QString installPathRegResource = "!:\\private\\10003a3f\\import\\apps";
-
- // Find location of builds
- QString epocReleasePath = QString("%1epoc32/release/$(PLATFORM)/$(TARGET)")
- .arg(epocRoot());
-
- if (targetType == TypeExe) {
- // deploy .exe file
- t << "; Executable and default resource files" << endl;
- QString exeFile = fixedTarget + ".exe";
- t << QString("\"%1/%2\" - \"%3\\%4\"")
- .arg(epocReleasePath)
- .arg(exeFile)
- .arg(installPathBin)
- .arg(exeFile) << endl;
-
- // deploy rsc & reg_rsc file
- if (!project->isActiveConfig("no_icon")) {
- t << QString("\"%1epoc32/data/z/resource/apps/%2\" - \"%3\\%4\"")
- .arg(epocRoot())
- .arg(fixedTarget + ".rsc")
- .arg(installPathResource)
- .arg(fixedTarget + ".rsc") << endl;
-
- t << QString("\"%1epoc32/data/z/private/10003a3f/import/apps/%2\" - \"%3\\%4\"")
- .arg(epocRoot())
- .arg(fixedTarget + "_reg.rsc")
- .arg(installPathRegResource)
- .arg(fixedTarget + "_reg.rsc") << endl;
-
- if (!iconFile.isEmpty()) {
- t << QString("\"%1epoc32/data/z%2\" - \"!:%3\"")
- .arg(epocRoot())
- .arg(iconFile)
- .arg(QDir::toNativeSeparators(iconFile)) << endl << endl;
- }
- }
- }
-
- // deploy any additional DEPLOYMENT files
- QString remoteTestPath;
- remoteTestPath = QString("!:\\private\\%1").arg(privateDirUid);
-
- initProjectDeploySymbian(project, depList, remoteTestPath, true, "$(PLATFORM)", "$(TARGET)", generatedDirs, generatedFiles);
- if (depList.size())
- t << "; DEPLOYMENT" << endl;
- for (int i = 0; i < depList.size(); ++i) {
- t << QString("\"%1\" - \"%2\"")
- .arg(QString(depList.at(i).from).replace('\\','/'))
- .arg(QString(depList.at(i).to).replace('/','\\')) << endl;
- }
- t << endl;
-
- // PKG post-rules - these are added after actual file installations i.e. SIS package body
- t << "; Manual PKG post-rules from PRO files" << endl;
- foreach(QString deploymentItem, project->values("DEPLOYMENT")) {
- foreach(QString pkgrulesItem, project->values(deploymentItem + ".pkg_postrules")) {
- QStringList pkgrulesValue = project->values(pkgrulesItem);
- // If there is no stringlist defined for a rule, use rule name directly
- // This is convenience for defining single line statements
- if (pkgrulesValue.isEmpty()) {
- t << pkgrulesItem << endl;
- } else {
- foreach(QString pkgrule, pkgrulesValue) {
- t << pkgrule << endl;
- }
- }
- t << endl;
- }
- }
-
- // Close Manufacturer block
- if (!project->values("DEPLOYMENT.manufacturers").isEmpty()) {
- QString manufacturerFailNoteFile;
- if (project->values("DEPLOYMENT.manufacturers.fail_note").isEmpty()) {
- manufacturerFailNoteFile = QString("%1_" MANUFACTURER_NOTE_FILE).arg(uid3);
- QFile ft(manufacturerFailNoteFile);
- if (ft.open(QIODevice::WriteOnly)) {
- generatedFiles << ft.fileName();
- QTextStream t2(&ft);
-
- t2 << QString(DEFAULT_MANUFACTURER_NOTE) << endl;
- } else {
- PRINT_FILE_CREATE_ERROR(manufacturerFailNoteFile)
- }
- } else {
- manufacturerFailNoteFile = project->values("DEPLOYMENT.manufacturers.fail_note").join("");
- }
-
- t << "ELSEIF NOT(0) ; MANUFACTURER" << endl
- << "\"" << fileInfo(manufacturerFailNoteFile).absoluteFilePath() << "\""
- << " - \"\", FILETEXT, TEXTEXIT" << endl
- << "ENDIF ; MANUFACTURER" << endl;
- }
-
- // Write wrapper pkg
- if (!installerSisHeader.isEmpty()) {
- QFile wrapperPkgFile(wrapperPkgFilename);
- if (!wrapperPkgFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
- PRINT_FILE_CREATE_ERROR(wrapperPkgFilename);
- return;
- }
-
- generatedFiles << wrapperPkgFile.fileName();
- QTextStream twf(&wrapperPkgFile);
-
- twf << wrapperStreamBuffer << endl;
-
- // Wrapped files deployment
- QString currentPath = qmake_getpwd();
- QString sisName = QString("%1.sis").arg(fixedTarget);
- twf << "\"" << currentPath << "/" << sisName << "\" - \"c:\\adm\\" << sisName << "\"" << endl;
-
- QString bootStrapPath = QLibraryInfo::location(QLibraryInfo::PrefixPath);
- bootStrapPath.append("/smartinstaller.sis");
- QFileInfo fi(fileInfo(bootStrapPath));
- twf << "@\"" << fi.absoluteFilePath() << "\",(0x2002CCCD)" << endl;
- }
-}
-
-bool SymbianMakefileGenerator::containsStartWithItem(const QChar &c, const QStringList& src)
-{
- bool result = false;
- foreach(QString str, src) {
- if (str.startsWith(c)) {
- result = true;
- break;
- }
- }
- return result;
-}
-
void SymbianMakefileGenerator::writeCustomDefFile()
{
if (targetType == TypePlugin && !project->isActiveConfig("stdbinary")) {
@@ -586,9 +315,7 @@ void SymbianMakefileGenerator::writeCustomDefFile()
void SymbianMakefileGenerator::init()
{
MakefileGenerator::init();
- fixedTarget = escapeFilePath(fileFixify(project->first("TARGET")));
- fixedTarget = removePathSeparators(fixedTarget);
- removeSpecialCharacters(fixedTarget);
+ SymbianCommonGenerator::init();
if (0 != project->values("QMAKE_PLATFORM").size())
platform = varGlue("QMAKE_PLATFORM", "", " ", "");
@@ -605,27 +332,6 @@ void SymbianMakefileGenerator::init()
// .mmp
initMmpVariables();
- // Check TARGET.UID3 presence
- if (0 != project->values("TARGET.UID3").size()) {
- uid3 = project->first("TARGET.UID3");
- } else {
- uid3 = generateUID3();
- }
-
- if ((project->values("TEMPLATE")).contains("app"))
- targetType = TypeExe;
- else if ((project->values("TEMPLATE")).contains("lib")) {
- // Check CONFIG to see if we are to build staticlib or dll
- if (project->isActiveConfig("staticlib") || project->isActiveConfig("static"))
- targetType = TypeLib;
- else if (project->isActiveConfig("plugin"))
- targetType = TypePlugin;
- else
- targetType = TypeDll;
- } else {
- targetType = TypeSubdirs;
- }
-
if (0 != project->values("TARGET.UID2").size()) {
uid2 = project->first("TARGET.UID2");
} else if (project->isActiveConfig("stdbinary")) {
@@ -645,20 +351,6 @@ void SymbianMakefileGenerator::init()
}
uid2 = uid2.trimmed();
- uid3 = uid3.trimmed();
-
- // UID is valid as either hex or decimal, so just convert it to number and back to hex
- // to get proper string for private dir
- bool conversionOk = false;
- uint uidNum = uid3.toUInt(&conversionOk, 0);
-
- if (!conversionOk) {
- fprintf(stderr, "Error: Invalid UID \"%s\".\n", uid3.toUtf8().constData());
- } else {
- privateDirUid.setNum(uidNum, 16);
- while (privateDirUid.length() < 8)
- privateDirUid.insert(0, QLatin1Char('0'));
- }
}
QString SymbianMakefileGenerator::getTargetExtension()
@@ -1437,391 +1129,6 @@ void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploy
}
}
-void SymbianMakefileGenerator::writeRegRssFile(QStringList &userItems)
-{
- QString filename(fixedTarget);
- filename.append("_reg.rss");
- QFile ft(filename);
- if (ft.open(QIODevice::WriteOnly)) {
- generatedFiles << ft.fileName();
- QTextStream t(&ft);
- t << "// ============================================================================" << endl;
- t << "// * Generated by qmake (" << qmake_version() << ") (Qt " QT_VERSION_STR ") on: ";
- t << QDateTime::currentDateTime().toString(Qt::ISODate) << endl;
- t << "// * This file is generated by qmake and should not be modified by the" << endl;
- t << "// * user." << endl;
- t << "// ============================================================================" << endl;
- t << endl;
- t << "#include <" << fixedTarget << ".rsg>" << endl;
- t << "#include <appinfo.rh>" << endl;
- t << endl;
- t << "UID2 KUidAppRegistrationResourceFile" << endl;
- t << "UID3 " << uid3 << endl << endl;
- t << "RESOURCE APP_REGISTRATION_INFO" << endl;
- t << "\t{" << endl;
- t << "\tapp_file=\"" << fixedTarget << "\";" << endl;
- t << "\tlocalisable_resource_file=\"" RESOURCE_DIRECTORY_RESOURCE << fixedTarget << "\";" << endl;
- t << endl;
-
- foreach(QString item, userItems)
- t << "\t" << item << endl;
- t << "\t}" << endl;
- } else {
- PRINT_FILE_CREATE_ERROR(filename)
- }
-}
-
-void SymbianMakefileGenerator::writeRssFile(QString &numberOfIcons, QString &iconFile)
-{
- QString filename(fixedTarget);
- filename.append(".rss");
- QFile ft(filename);
- if (ft.open(QIODevice::WriteOnly)) {
- generatedFiles << ft.fileName();
- QTextStream t(&ft);
- t << "// ============================================================================" << endl;
- t << "// * Generated by qmake (" << qmake_version() << ") (Qt " QT_VERSION_STR ") on: ";
- t << QDateTime::currentDateTime().toString(Qt::ISODate) << endl;
- t << "// * This file is generated by qmake and should not be modified by the" << endl;
- t << "// * user." << endl;
- t << "// ============================================================================" << endl;
- t << endl;
- t << "#include <appinfo.rh>" << endl;
- t << "#include \"" << fixedTarget << ".loc\"" << endl;
- t << endl;
- t << "RESOURCE LOCALISABLE_APP_INFO r_localisable_app_info" << endl;
- t << "\t{" << endl;
- t << "\tshort_caption = STRING_r_short_caption;" << endl;
- t << "\tcaption_and_icon =" << endl;
- t << "\tCAPTION_AND_ICON_INFO" << endl;
- t << "\t\t{" << endl;
- t << "\t\tcaption = STRING_r_caption;" << endl;
-
- QString rssIconFile = iconFile;
- rssIconFile = rssIconFile.replace("/", "\\\\");
-
- if (numberOfIcons.isEmpty() || rssIconFile.isEmpty()) {
- // There can be maximum one item in this tag, validated when parsed
- t << "\t\tnumber_of_icons = 0;" << endl;
- t << "\t\ticon_file = \"\";" << endl;
- } else {
- // There can be maximum one item in this tag, validated when parsed
- t << "\t\tnumber_of_icons = " << numberOfIcons << ";" << endl;
- t << "\t\ticon_file = \"" << rssIconFile << "\";" << endl;
- }
- t << "\t\t};" << endl;
- t << "\t}" << endl;
- t << endl;
- } else {
- PRINT_FILE_CREATE_ERROR(filename);
- }
-}
-
-void SymbianMakefileGenerator::writeLocFile(QStringList &symbianLangCodes)
-{
- QString filename(fixedTarget);
- filename.append(".loc");
- QFile ft(filename);
- if (ft.open(QIODevice::WriteOnly)) {
- generatedFiles << ft.fileName();
- QTextStream t(&ft);
- t << "// ============================================================================" << endl;
- t << "// * Generated by qmake (" << qmake_version() << ") (Qt " QT_VERSION_STR ") on: ";
- t << QDateTime::currentDateTime().toString(Qt::ISODate) << endl;
- t << "// * This file is generated by qmake and should not be modified by the" << endl;
- t << "// * user." << endl;
- t << "// ============================================================================" << endl;
- t << endl;
- t << "#ifdef LANGUAGE_SC" << endl;
- t << "#define STRING_r_short_caption \"" << fixedTarget << "\"" << endl;
- t << "#define STRING_r_caption \"" << fixedTarget << "\"" << endl;
- foreach(QString lang, symbianLangCodes) {
- t << "#elif defined LANGUAGE_" << lang << endl;
- t << "#define STRING_r_short_caption \"" << fixedTarget << "\"" << endl;
- t << "#define STRING_r_caption \"" << fixedTarget << "\"" << endl;
- }
- t << "#else" << endl;
- t << "#define STRING_r_short_caption \"" << fixedTarget << "\"" << endl;
- t << "#define STRING_r_caption \"" << fixedTarget << "\"" << endl;
- t << "#endif" << endl;
- } else {
- PRINT_FILE_CREATE_ERROR(filename);
- }
-}
-
-void SymbianMakefileGenerator::readRssRules(QString &numberOfIcons, QString &iconFile, QStringList &userRssRules)
-{
- for (QMap<QString, QStringList>::iterator it = project->variables().begin(); it != project->variables().end(); ++it) {
- if (it.key().startsWith(RSS_RULES_BASE)) {
- QString newKey = it.key().mid(sizeof(RSS_RULES_BASE) - 1);
- if (newKey.isEmpty()) {
- fprintf(stderr, "Warning: Empty RSS_RULES_BASE key encountered\n");
- continue;
- }
- QStringList newValues;
- QStringList values = it.value();
- foreach(QString item, values) {
- // If there is no stringlist defined for a rule, use rule name directly
- // This is convenience for defining single line statements
- if (project->values(item).isEmpty()) {
- newValues << item;
- } else {
- foreach(QString itemRow, project->values(item)) {
- newValues << itemRow;
- }
- }
- }
- // Verify thet there is exactly one value in RSS_TAG_NBROFICONS
- if (newKey == RSS_TAG_NBROFICONS) {
- if (newValues.count() == 1) {
- numberOfIcons = newValues[0];
- } else {
- fprintf(stderr, "Warning: There must be exactly one value in '%s%s'\n",
- RSS_RULES_BASE, RSS_TAG_NBROFICONS);
- continue;
- }
- // Verify thet there is exactly one value in RSS_TAG_ICONFILE
- } else if (newKey == RSS_TAG_ICONFILE) {
- if (newValues.count() == 1) {
- iconFile = newValues[0];
- } else {
- fprintf(stderr, "Warning: There must be exactly one value in '%s%s'\n",
- RSS_RULES_BASE, RSS_TAG_ICONFILE);
- continue;
- }
- } else {
- fprintf(stderr, "Warning: Unsupported key:'%s%s'\n",
- RSS_RULES_BASE, newKey.toLatin1().constData());
- continue;
- }
- }
- }
-
- foreach(QString item, project->values(RSS_RULES)) {
- // If there is no stringlist defined for a rule, use rule name directly
- // This is convenience for defining single line mmp statements
- if (project->values(item).isEmpty()) {
- userRssRules << item;
- } else {
- userRssRules << project->values(item);
- }
- }
-
- // Validate that either both RSS_TAG_NBROFICONS and RSS_TAG_ICONFILE keys exist
- // or neither of them exist
- if (!((numberOfIcons.isEmpty() && iconFile.isEmpty()) ||
- (!numberOfIcons.isEmpty() && !iconFile.isEmpty()))) {
- numberOfIcons.clear();
- iconFile.clear();
- fprintf(stderr, "Warning: Both or neither of '%s%s' and '%s%s' keys must exist.\n",
- RSS_RULES_BASE, RSS_TAG_NBROFICONS, RSS_RULES_BASE, RSS_TAG_ICONFILE);
- }
-
- // Validate that RSS_TAG_NBROFICONS contains only numbers
- if (!numberOfIcons.isEmpty()) {
- bool ok;
- numberOfIcons = numberOfIcons.simplified();
- numberOfIcons.toInt(&ok);
- if (!ok) {
- numberOfIcons.clear();
- iconFile.clear();
- fprintf(stderr, "Warning: '%s%s' must be integer in decimal format.\n",
- RSS_RULES_BASE, RSS_TAG_NBROFICONS);
- }
- }
-}
-
-QStringList SymbianMakefileGenerator::symbianLangCodesFromTsFiles()
-{
- QStringList tsfiles;
- QStringList symbianLangCodes;
- tsfiles << project->values("TRANSLATIONS");
-
- fillQt2S60LangMapTable();
-
- foreach(QString file, tsfiles) {
- int extIndex = file.lastIndexOf(".");
- int langIndex = file.lastIndexOf("_", (extIndex - file.length()));
- langIndex += 1;
- QString qtlang = file.mid(langIndex, extIndex - langIndex);
- QString s60lang = qt2S60LangMapTable.value(qtlang, QString("SC"));
-
- if (!symbianLangCodes.contains(s60lang) && s60lang != "SC")
- symbianLangCodes += s60lang;
- }
-
- return symbianLangCodes;
-}
-
-void SymbianMakefileGenerator::fillQt2S60LangMapTable()
-{
- qt2S60LangMapTable.reserve(170); // 165 items at time of writing.
- qt2S60LangMapTable.insert("ab", "SC"); //Abkhazian //
- qt2S60LangMapTable.insert("om", "SC"); //Afan //
- qt2S60LangMapTable.insert("aa", "SC"); //Afar //
- qt2S60LangMapTable.insert("af", "34"); //Afrikaans //Afrikaans
- qt2S60LangMapTable.insert("sq", "35"); //Albanian //Albanian
- qt2S60LangMapTable.insert("am", "36"); //Amharic //Amharic
- qt2S60LangMapTable.insert("ar", "37"); //Arabic //Arabic
- qt2S60LangMapTable.insert("hy", "38"); //Armenian //Armenian
- qt2S60LangMapTable.insert("as", "SC"); //Assamese //
- qt2S60LangMapTable.insert("ay", "SC"); //Aymara //
- qt2S60LangMapTable.insert("az", "SC"); //Azerbaijani //
- qt2S60LangMapTable.insert("ba", "SC"); //Bashkir //
- qt2S60LangMapTable.insert("eu", "SC"); //Basque //
- qt2S60LangMapTable.insert("bn", "41"); //Bengali //Bengali
- qt2S60LangMapTable.insert("dz", "SC"); //Bhutani //
- qt2S60LangMapTable.insert("bh", "SC"); //Bihari //
- qt2S60LangMapTable.insert("bi", "SC"); //Bislama //
- qt2S60LangMapTable.insert("br", "SC"); //Breton //
- qt2S60LangMapTable.insert("bg", "42"); //Bulgarian //Bulgarian
- qt2S60LangMapTable.insert("my", "43"); //Burmese //Burmese
- qt2S60LangMapTable.insert("be", "40"); //Byelorussian //Belarussian
- qt2S60LangMapTable.insert("km", "SC"); //Cambodian //
- qt2S60LangMapTable.insert("ca", "44"); //Catalan //Catalan
- qt2S60LangMapTable.insert("zh", "SC"); //Chinese //
- qt2S60LangMapTable.insert("co", "SC"); //Corsican //
- qt2S60LangMapTable.insert("hr", "45"); //Croatian //Croatian
- qt2S60LangMapTable.insert("cs", "25"); //Czech //Czech
- qt2S60LangMapTable.insert("da", "07"); //Danish //Danish
- qt2S60LangMapTable.insert("nl", "18"); //Dutch //Dutch
- qt2S60LangMapTable.insert("en", "01"); //English //English(UK)
- qt2S60LangMapTable.insert("eo", "SC"); //Esperanto //
- qt2S60LangMapTable.insert("et", "49"); //Estonian //Estonian
- qt2S60LangMapTable.insert("fo", "SC"); //Faroese //
- qt2S60LangMapTable.insert("fj", "SC"); //Fiji //
- qt2S60LangMapTable.insert("fi", "09"); //Finnish //Finnish
- qt2S60LangMapTable.insert("fr", "02"); //French //French
- qt2S60LangMapTable.insert("fy", "SC"); //Frisian //
- qt2S60LangMapTable.insert("gd", "52"); //Gaelic //Gaelic
- qt2S60LangMapTable.insert("gl", "SC"); //Galician //
- qt2S60LangMapTable.insert("ka", "53"); //Georgian //Georgian
- qt2S60LangMapTable.insert("de", "03"); //German //German
- qt2S60LangMapTable.insert("el", "54"); //Greek //Greek
- qt2S60LangMapTable.insert("kl", "SC"); //Greenlandic //
- qt2S60LangMapTable.insert("gn", "SC"); //Guarani //
- qt2S60LangMapTable.insert("gu", "56"); //Gujarati //Gujarati
- qt2S60LangMapTable.insert("ha", "SC"); //Hausa //
- qt2S60LangMapTable.insert("he", "57"); //Hebrew //Hebrew
- qt2S60LangMapTable.insert("hi", "58"); //Hindi //Hindi
- qt2S60LangMapTable.insert("hu", "17"); //Hungarian //Hungarian
- qt2S60LangMapTable.insert("is", "15"); //Icelandic //Icelandic
- qt2S60LangMapTable.insert("id", "59"); //Indonesian //Indonesian
- qt2S60LangMapTable.insert("ia", "SC"); //Interlingua //
- qt2S60LangMapTable.insert("ie", "SC"); //Interlingue //
- qt2S60LangMapTable.insert("iu", "SC"); //Inuktitut //
- qt2S60LangMapTable.insert("ik", "SC"); //Inupiak //
- qt2S60LangMapTable.insert("ga", "60"); //Irish //Irish
- qt2S60LangMapTable.insert("it", "05"); //Italian //Italian
- qt2S60LangMapTable.insert("ja", "32"); //Japanese //Japanese
- qt2S60LangMapTable.insert("jv", "SC"); //Javanese //
- qt2S60LangMapTable.insert("kn", "62"); //Kannada //Kannada
- qt2S60LangMapTable.insert("ks", "SC"); //Kashmiri //
- qt2S60LangMapTable.insert("kk", "63"); //Kazakh //Kazakh
- qt2S60LangMapTable.insert("rw", "SC"); //Kinyarwanda //
- qt2S60LangMapTable.insert("ky", "SC"); //Kirghiz //
- qt2S60LangMapTable.insert("ko", "65"); //Korean //Korean
- qt2S60LangMapTable.insert("ku", "SC"); //Kurdish //
- qt2S60LangMapTable.insert("rn", "SC"); //Kurundi //
- qt2S60LangMapTable.insert("lo", "66"); //Laothian //Laothian
- qt2S60LangMapTable.insert("la", "SC"); //Latin //
- qt2S60LangMapTable.insert("lv", "67"); //Latvian //Latvian
- qt2S60LangMapTable.insert("ln", "SC"); //Lingala //
- qt2S60LangMapTable.insert("lt", "68"); //Lithuanian //Lithuanian
- qt2S60LangMapTable.insert("mk", "69"); //Macedonian //Macedonian
- qt2S60LangMapTable.insert("mg", "SC"); //Malagasy //
- qt2S60LangMapTable.insert("ms", "70"); //Malay //Malay
- qt2S60LangMapTable.insert("ml", "71"); //Malayalam //Malayalam
- qt2S60LangMapTable.insert("mt", "SC"); //Maltese //
- qt2S60LangMapTable.insert("mi", "SC"); //Maori //
- qt2S60LangMapTable.insert("mr", "72"); //Marathi //Marathi
- qt2S60LangMapTable.insert("mo", "73"); //Moldavian //Moldovian
- qt2S60LangMapTable.insert("mn", "74"); //Mongolian //Mongolian
- qt2S60LangMapTable.insert("na", "SC"); //Nauru //
- qt2S60LangMapTable.insert("ne", "SC"); //Nepali //
- qt2S60LangMapTable.insert("nb", "08"); //Norwegian //Norwegian
- qt2S60LangMapTable.insert("oc", "SC"); //Occitan //
- qt2S60LangMapTable.insert("or", "SC"); //Oriya //
- qt2S60LangMapTable.insert("ps", "SC"); //Pashto //
- qt2S60LangMapTable.insert("fa", "SC"); //Persian //
- qt2S60LangMapTable.insert("pl", "27"); //Polish //Polish
- qt2S60LangMapTable.insert("pt", "13"); //Portuguese //Portuguese
- qt2S60LangMapTable.insert("pa", "77"); //Punjabi //Punjabi
- qt2S60LangMapTable.insert("qu", "SC"); //Quechua //
- qt2S60LangMapTable.insert("rm", "SC"); //RhaetoRomance //
- qt2S60LangMapTable.insert("ro", "78"); //Romanian //Romanian
- qt2S60LangMapTable.insert("ru", "16"); //Russian //Russian
- qt2S60LangMapTable.insert("sm", "SC"); //Samoan //
- qt2S60LangMapTable.insert("sg", "SC"); //Sangho //
- qt2S60LangMapTable.insert("sa", "SC"); //Sanskrit //
- qt2S60LangMapTable.insert("sr", "79"); //Serbian //Serbian
- qt2S60LangMapTable.insert("sh", "SC"); //SerboCroatian //
- qt2S60LangMapTable.insert("st", "SC"); //Sesotho //
- qt2S60LangMapTable.insert("tn", "SC"); //Setswana //
- qt2S60LangMapTable.insert("sn", "SC"); //Shona //
- qt2S60LangMapTable.insert("sd", "SC"); //Sindhi //
- qt2S60LangMapTable.insert("si", "80"); //Singhalese //Sinhalese
- qt2S60LangMapTable.insert("ss", "SC"); //Siswati //
- qt2S60LangMapTable.insert("sk", "26"); //Slovak //Slovak
- qt2S60LangMapTable.insert("sl", "28"); //Slovenian //Slovenian
- qt2S60LangMapTable.insert("so", "81"); //Somali //Somali
- qt2S60LangMapTable.insert("es", "04"); //Spanish //Spanish
- qt2S60LangMapTable.insert("su", "SC"); //Sundanese //
- qt2S60LangMapTable.insert("sw", "84"); //Swahili //Swahili
- qt2S60LangMapTable.insert("sv", "06"); //Swedish //Swedish
- qt2S60LangMapTable.insert("tl", "39"); //Tagalog //Tagalog
- qt2S60LangMapTable.insert("tg", "SC"); //Tajik //
- qt2S60LangMapTable.insert("ta", "87"); //Tamil //Tamil
- qt2S60LangMapTable.insert("tt", "SC"); //Tatar //
- qt2S60LangMapTable.insert("te", "88"); //Telugu //Telugu
- qt2S60LangMapTable.insert("th", "33"); //Thai //Thai
- qt2S60LangMapTable.insert("bo", "89"); //Tibetan //Tibetan
- qt2S60LangMapTable.insert("ti", "90"); //Tigrinya //Tigrinya
- qt2S60LangMapTable.insert("to", "SC"); //Tonga //
- qt2S60LangMapTable.insert("ts", "SC"); //Tsonga //
- qt2S60LangMapTable.insert("tr", "14"); //Turkish //Turkish
- qt2S60LangMapTable.insert("tk", "92"); //Turkmen //Turkmen
- qt2S60LangMapTable.insert("tw", "SC"); //Twi //
- qt2S60LangMapTable.insert("ug", "SC"); //Uigur //
- qt2S60LangMapTable.insert("uk", "93"); //Ukrainian //Ukrainian
- qt2S60LangMapTable.insert("ur", "94"); //Urdu //Urdu
- qt2S60LangMapTable.insert("uz", "SC"); //Uzbek //
- qt2S60LangMapTable.insert("vi", "96"); //Vietnamese //Vietnamese
- qt2S60LangMapTable.insert("vo", "SC"); //Volapuk //
- qt2S60LangMapTable.insert("cy", "97"); //Welsh //Welsh
- qt2S60LangMapTable.insert("wo", "SC"); //Wolof //
- qt2S60LangMapTable.insert("xh", "SC"); //Xhosa //
- qt2S60LangMapTable.insert("yi", "SC"); //Yiddish //
- qt2S60LangMapTable.insert("yo", "SC"); //Yoruba //
- qt2S60LangMapTable.insert("za", "SC"); //Zhuang //
- qt2S60LangMapTable.insert("zu", "98"); //Zulu //Zulu
- qt2S60LangMapTable.insert("nn", "75"); //Nynorsk //NorwegianNynorsk
- qt2S60LangMapTable.insert("bs", "SC"); //Bosnian //
- qt2S60LangMapTable.insert("dv", "SC"); //Divehi //
- qt2S60LangMapTable.insert("gv", "SC"); //Manx //
- qt2S60LangMapTable.insert("kw", "SC"); //Cornish //
- qt2S60LangMapTable.insert("ak", "SC"); //Akan //
- qt2S60LangMapTable.insert("kok", "SC"); //Konkani //
- qt2S60LangMapTable.insert("gaa", "SC"); //Ga //
- qt2S60LangMapTable.insert("ig", "SC"); //Igbo //
- qt2S60LangMapTable.insert("kam", "SC"); //Kamba //
- qt2S60LangMapTable.insert("syr", "SC"); //Syriac //
- qt2S60LangMapTable.insert("byn", "SC"); //Blin //
- qt2S60LangMapTable.insert("gez", "SC"); //Geez //
- qt2S60LangMapTable.insert("kfo", "SC"); //Koro //
- qt2S60LangMapTable.insert("sid", "SC"); //Sidamo //
- qt2S60LangMapTable.insert("cch", "SC"); //Atsam //
- qt2S60LangMapTable.insert("tig", "SC"); //Tigre //
- qt2S60LangMapTable.insert("kaj", "SC"); //Jju //
- qt2S60LangMapTable.insert("fur", "SC"); //Friulian //
- qt2S60LangMapTable.insert("ve", "SC"); //Venda //
- qt2S60LangMapTable.insert("ee", "SC"); //Ewe //
- qt2S60LangMapTable.insert("wa", "SC"); //Walamo //
- qt2S60LangMapTable.insert("haw", "SC"); //Hawaiian //
- qt2S60LangMapTable.insert("kcg", "SC"); //Tyap //
- qt2S60LangMapTable.insert("ny", "SC"); //Chewa //
-}
-
void SymbianMakefileGenerator::appendIfnotExist(QStringList &list, QString value)
{
if (!list.contains(value))
@@ -1834,16 +1141,6 @@ void SymbianMakefileGenerator::appendIfnotExist(QStringList &list, QStringList v
appendIfnotExist(list, item);
}
-QString SymbianMakefileGenerator::removePathSeparators(QString &file)
-{
- QString ret = file;
- while (ret.indexOf(QDir::separator()) > 0) {
- ret.remove(0, ret.indexOf(QDir::separator()) + 1);
- }
-
- return ret;
-}
-
QString SymbianMakefileGenerator::removeTrailingPathSeparators(QString &file)
{
@@ -1875,17 +1172,6 @@ void SymbianMakefileGenerator::generateCleanCommands(QTextStream& t,
}
}
-void SymbianMakefileGenerator::removeSpecialCharacters(QString& str)
-{
- // When modifying this method check also application_icon.prf
- str.replace(QString("/"), QString("_"));
- str.replace(QString("\\"), QString("_"));
- str.replace(QString("-"), QString("_"));
- str.replace(QString(":"), QString("_"));
- str.replace(QString("."), QString("_"));
- str.replace(QString(" "), QString("_"));
-}
-
void SymbianMakefileGenerator::writeSisTargets(QTextStream &t)
{
t << "-include " MAKE_CACHE_NAME << endl;
diff --git a/qmake/generators/symbian/symmake.h b/qmake/generators/symbian/symmake.h
index 77d61da..7ff1ce9 100644
--- a/qmake/generators/symbian/symmake.h
+++ b/qmake/generators/symbian/symmake.h
@@ -43,6 +43,7 @@
#define SYMMAKEFILE_H
#include "initprojectdeploy_symbian.h"
+#include "symbiancommon.h"
#include <makefile.h>
QT_BEGIN_NAMESPACE
@@ -53,22 +54,11 @@ QT_BEGIN_NAMESPACE
#define QT_EXTRA_INCLUDE_DIR "tmp"
#define MAKE_CACHE_NAME ".make.cache"
-class SymbianMakefileGenerator : public MakefileGenerator
+class SymbianMakefileGenerator : public MakefileGenerator, public SymbianCommonGenerator
{
protected:
- enum TargetType {
- TypeExe,
- TypeDll,
- TypeLib,
- TypePlugin,
- TypeSubdirs
- };
-
QString platform;
QString uid2;
- QString uid3;
- QString privateDirUid;
- TargetType targetType;
QMap<QString, QStringList> sources;
QMap<QString, QStringList> systeminclude;
QMap<QString, QStringList> library;
@@ -76,19 +66,10 @@ protected:
QMap<QString, QStringList> makmakeCommands;
QStringList overriddenMmpKeywords;
- QStringList generatedFiles;
- QStringList generatedDirs;
- QHash<QString, QString> qt2S60LangMapTable;
-
- QString fixedTarget;
-
- void removeSpecialCharacters(QString& str);
QString fixPathForMmp(const QString& origPath, const QDir& parentDir);
QString canonizePath(const QString& origPath);
virtual bool writeMakefile(QTextStream &t);
- void generatePkgFile(const QString &iconFile, DeploymentList &depList);
- bool containsStartWithItem(const QChar &c, const QStringList& src);
virtual void init();
@@ -127,18 +108,9 @@ protected:
void writeCustomDefFile();
- void writeRegRssFile(QStringList &useritems);
- void writeRssFile(QString &numberOfIcons, QString &iconfile);
- void writeLocFile(QStringList &symbianLangCodes);
- void readRssRules(QString &numberOfIcons, QString &iconFile, QStringList &userRssRules);
-
- QStringList symbianLangCodesFromTsFiles();
- void fillQt2S60LangMapTable();
-
void appendIfnotExist(QStringList &list, QString value);
void appendIfnotExist(QStringList &list, QStringList values);
- QString removePathSeparators(QString &file);
QString removeTrailingPathSeparators(QString &file);
void generateCleanCommands(QTextStream& t,
const QStringList& toClean,
diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp
index 26dd3fd..00c05b7 100644
--- a/qmake/generators/symbian/symmake_abld.cpp
+++ b/qmake/generators/symbian/symmake_abld.cpp
@@ -424,7 +424,7 @@ bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t)
QString remoteTestPath = epocRoot() + QLatin1String("epoc32\\winscw\\c\\private\\") + privateDirUid; // default 4 OpenC; 4 all Symbian too
DeploymentList depList;
- initProjectDeploySymbian(project, depList, remoteTestPath, false, QLatin1String("winscw"), QLatin1String("udeb"), generatedDirs, generatedFiles);
+ initProjectDeploySymbian(project, depList, remoteTestPath, false, true, QLatin1String("winscw"), QLatin1String("udeb"), generatedDirs, generatedFiles);
if (depList.size())
t << "\t-echo Deploying changed files..." << endl;
diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp
index e081b19..7ab46e2 100644
--- a/qmake/generators/symbian/symmake_sbsv2.cpp
+++ b/qmake/generators/symbian/symmake_sbsv2.cpp
@@ -365,7 +365,7 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t
// Write winscw deployment rules
QString remoteTestPath = epocRoot() + QLatin1String("epoc32/winscw/c/private/") + privateDirUid;
DeploymentList depList;
- initProjectDeploySymbian(project, depList, remoteTestPath, false, QLatin1String("winscw"), QLatin1String("udeb"), generatedDirs, generatedFiles);
+ initProjectDeploySymbian(project, depList, remoteTestPath, false, true, QLatin1String("winscw"), QLatin1String("udeb"), generatedDirs, generatedFiles);
t << "#if defined(WINSCW)" << endl;
for (int i = 0; i < depList.size(); ++i) {
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index f51c046..3f92993 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -65,6 +65,10 @@ UnixMakefileGenerator::init()
}
}
+ if (project->isEmpty("QMAKE_PREFIX_SHLIB"))
+ // Prevent crash when using the empty variable.
+ project->values("QMAKE_PREFIX_SHLIB").append("");
+
if(!project->isEmpty("QMAKE_FAILED_REQUIREMENTS")) /* no point */
return;
@@ -451,7 +455,9 @@ UnixMakefileGenerator::findLibraries()
if(!libdirs.contains(f))
libdirs.append(f);
} else if(opt.startsWith("-l")) {
- if (project->isActiveConfig("rvct_linker")) {
+ if (!project->isEmpty("QMAKE_SYMBIAN_SHLIB")) {
+ (*it) = opt.mid(2);
+ } else if (project->isActiveConfig("rvct_linker")) {
(*it) = "lib" + opt.mid(2) + ".so";
} else {
stub = opt.mid(2);
@@ -491,26 +497,29 @@ UnixMakefileGenerator::findLibraries()
QStringList extens;
if(!extn.isNull())
extens << extn;
+ else if (!project->isEmpty("QMAKE_SYMBIAN_SHLIB"))
+ // In Symbian you link to the stub .lib file, but run with the .dll file.
+ extens << "lib";
else
extens << project->values("QMAKE_EXTENSION_SHLIB").first() << "a";
for(QStringList::Iterator extit = extens.begin(); extit != extens.end(); ++extit) {
if(dir.isNull()) {
- QString lib_stub;
for(QList<QMakeLocalFileName>::Iterator dep_it = libdirs.begin(); dep_it != libdirs.end(); ++dep_it) {
- if(exists((*dep_it).local() + Option::dir_sep + "lib" + stub +
- "." + (*extit))) {
- lib_stub = stub;
+ QString pathToLib = ((*dep_it).local() + Option::dir_sep
+ + project->values("QMAKE_PREFIX_SHLIB").first()
+ + stub + "." + (*extit));
+ if(exists(pathToLib)) {
+ if (!project->isEmpty("QMAKE_SYMBIAN_SHLIB"))
+ (*it) = pathToLib;
+ else
+ (*it) = "-l" + stub;
+ found = true;
break;
}
}
- if(!lib_stub.isNull()) {
- (*it) = "-l" + lib_stub;
- found = true;
- break;
- }
} else {
- if(exists("lib" + stub + "." + (*extit))) {
- (*it) = "lib" + stub + "." + (*extit);
+ if(exists(project->values("QMAKE_PREFIX_SHLIB").first() + stub + "." + (*extit))) {
+ (*it) = project->values("QMAKE_PREFIX_SHLIB").first() + stub + "." + (*extit);
found = true;
break;
}
@@ -518,8 +527,8 @@ UnixMakefileGenerator::findLibraries()
}
if(!found && project->isActiveConfig("compile_libtool")) {
for(int dep_i = 0; dep_i < libdirs.size(); ++dep_i) {
- if(exists(libdirs[dep_i].local() + Option::dir_sep + "lib" + stub + Option::libtool_ext)) {
- (*it) = libdirs[dep_i].real() + Option::dir_sep + "lib" + stub + Option::libtool_ext;
+ if(exists(libdirs[dep_i].local() + Option::dir_sep + project->values("QMAKE_PREFIX_SHLIB").first() + stub + Option::libtool_ext)) {
+ (*it) = libdirs[dep_i].real() + Option::dir_sep + project->values("QMAKE_PREFIX_SHLIB").first() + stub + Option::libtool_ext;
found = true;
break;
}
@@ -559,7 +568,7 @@ UnixMakefileGenerator::processPrlFiles()
for(int dep_i = 0; dep_i < libdirs.size(); ++dep_i) {
const QMakeLocalFileName &lfn = libdirs[dep_i];
if(!project->isActiveConfig("compile_libtool")) { //give them the .libs..
- QString la = lfn.local() + Option::dir_sep + "lib" + lib + Option::libtool_ext;
+ QString la = lfn.local() + Option::dir_sep + project->values("QMAKE_PREFIX_SHLIB").first() + lib + Option::libtool_ext;
if(exists(la) && QFile::exists(lfn.local() + Option::dir_sep + ".libs")) {
QString dot_libs = lfn.real() + Option::dir_sep + ".libs";
l.append("-L" + dot_libs);
@@ -567,7 +576,7 @@ UnixMakefileGenerator::processPrlFiles()
}
}
- QString prl = lfn.local() + Option::dir_sep + "lib" + lib;
+ QString prl = lfn.local() + Option::dir_sep + project->values("QMAKE_PREFIX_SHLIB").first() + lib;
if(!project->isEmpty("QMAKE_" + lib.toUpper() + "_SUFFIX"))
prl += project->first("QMAKE_" + lib.toUpper() + "_SUFFIX");
if(processPrlFile(prl)) {
diff --git a/qmake/generators/unix/unixmake.h b/qmake/generators/unix/unixmake.h
index 77bdd01..0ea3350 100644
--- a/qmake/generators/unix/unixmake.h
+++ b/qmake/generators/unix/unixmake.h
@@ -49,7 +49,6 @@ QT_BEGIN_NAMESPACE
class UnixMakefileGenerator : public MakefileGenerator
{
bool init_flag, include_deps;
- bool writeMakefile(QTextStream &);
QString libtoolFileName(bool fixify=true);
void writeLibtoolFile(); // for libtool
QString pkgConfigPrefix() const;
@@ -75,6 +74,7 @@ protected:
virtual void init();
void writeMakeParts(QTextStream &);
+ bool writeMakefile(QTextStream &);
private:
void init2();
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index 025882e..6516786 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -233,6 +233,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
if(!project->isEmpty("QMAKE_BUNDLE")) {
t << "TARGETD = " << escapeFilePath(var("TARGET_x.y")) << endl;
t << "TARGET0 = " << escapeFilePath(var("TARGET_")) << endl;
+ } else if(!project->isEmpty("QMAKE_SYMBIAN_SHLIB")) {
+ t << "TARGETD = " << escapeFilePath(var("TARGET")) << endl;
} else if(project->isEmpty("QMAKE_HPUX_SHLIB")) {
t << "TARGETD = " << escapeFilePath(var("TARGET_x.y.z")) << endl;
t << "TARGET0 = " << escapeFilePath(var("TARGET_")) << endl;
@@ -332,7 +334,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
t << "SUBLIBS = ";
QStringList &l = project->values("SUBLIBS");
for(QStringList::Iterator it = l.begin(); it != l.end(); ++it)
- t << libdir << "lib" << (*it) << ".a ";
+ t << libdir << project->first("QMAKE_PREFIX_STATICLIB") << (*it) << "."
+ << project->first("QMAKE_EXTENSION_STATICLIB") << " ";
t << endl << endl;
}
if(project->isActiveConfig("depend_prl") && !project->isEmpty("QMAKE_PRL_INTERNAL_FILES")) {
@@ -545,6 +548,17 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
if(!project->isEmpty("QMAKE_POST_LINK"))
t << "\n\t" << var("QMAKE_POST_LINK");
t << endl << endl;
+ } else if(!project->isEmpty("QMAKE_SYMBIAN_SHLIB")) {
+ t << "\n\t"
+ << "-$(DEL_FILE) $(TARGET)" << "\n\t"
+ << var("QMAKE_LINK_SHLIB_CMD");
+ if(!destdir.isEmpty())
+ t << "\n\t"
+ << "-$(DEL_FILE) " << destdir << "$(TARGET)\n\t"
+ << "-$(MOVE) $(TARGET) " << destdir;
+ if(!project->isEmpty("QMAKE_POST_LINK"))
+ t << "\n\t" << var("QMAKE_POST_LINK");
+ t << endl << endl;
} else if(project->isEmpty("QMAKE_HPUX_SHLIB")) {
t << "\n\t"
<< "-$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2)" << "\n\t"
@@ -860,7 +874,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
libdir = project->first("SUBLIBS_DIR");
QStringList &l = project->values("SUBLIBS");
for(it = l.begin(); it != l.end(); ++it)
- t << libdir << "lib" << (*it) << ".a" << ":\n\t"
+ t << libdir << project->first("QMAKE_PREFIX_STATICLIB") << (*it) << "."
+ << project->first("QMAKE_EXTENSION_STATICLIB") << ":\n\t"
<< var(QString("MAKELIB") + (*it)) << endl << endl;
}
@@ -875,9 +890,10 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
t << "\t-$(LIBTOOL) --mode=clean $(DEL_FILE) " << "$(TARGET)" << endl;
} else if(!project->isActiveConfig("staticlib") && project->values("QMAKE_APP_FLAG").isEmpty() &&
!project->isActiveConfig("plugin")) {
- t << "\t-$(DEL_FILE) " << destdir << "$(TARGET)" << " " << endl
- << "\t-$(DEL_FILE) " << destdir << "$(TARGET0) " << destdir << "$(TARGET1) "
- << destdir << "$(TARGET2) $(TARGETA)" << endl;
+ t << "\t-$(DEL_FILE) " << destdir << "$(TARGET)" << " " << endl;
+ if (project->values("QMAKE_SYMBIAN_SHLIB").isEmpty())
+ t << "\t-$(DEL_FILE) " << destdir << "$(TARGET0) " << destdir << "$(TARGET1) "
+ << destdir << "$(TARGET2) $(TARGETA)" << endl;
} else {
t << "\t-$(DEL_FILE) " << "$(TARGET)" << " " << endl;
}
@@ -992,12 +1008,13 @@ void UnixMakefileGenerator::init2()
if (!project->values("QMAKE_CYGWIN_EXE").isEmpty())
project->values("TARGET_EXT").append(".exe");
} else if (project->isActiveConfig("staticlib")) {
- project->values("TARGET").first().prepend("lib");
- project->values("TARGET").first() += ".a";
+ project->values("TARGET").first().prepend(project->first("QMAKE_PREFIX_STATICLIB"));
+ project->values("TARGET").first() += "." + project->first("QMAKE_EXTENSION_STATICLIB");
if(project->values("QMAKE_AR_CMD").isEmpty())
project->values("QMAKE_AR_CMD").append("$(AR) $(TARGET) $(OBJECTS)");
} else {
- project->values("TARGETA").append(project->first("DESTDIR") + "lib" + project->first("TARGET") + ".a");
+ project->values("TARGETA").append(project->first("DESTDIR") + project->first("QMAKE_PREFIX_STATICLIB")
+ + project->first("TARGET") + "." + project->first("QMAKE_EXTENSION_STATICLIB"));
if(project->isActiveConfig("compile_libtool"))
project->values("TARGET_la") = QStringList(project->first("DESTDIR") + "lib" + project->first("TARGET") + Option::libtool_ext);
@@ -1045,7 +1062,8 @@ void UnixMakefileGenerator::init2()
project->first("VER_MAJ"));
project->values("TARGET") = project->values("TARGET_x");
} else if (!project->isEmpty("QMAKE_AIX_SHLIB")) {
- project->values("TARGET_").append("lib" + project->first("TARGET") + ".a");
+ project->values("TARGET_").append(project->first("QMAKE_PREFIX_STATICLIB") + project->first("TARGET")
+ + "." + project->first("QMAKE_EXTENSION_STATICLIB"));
if(project->isActiveConfig("lib_version_first")) {
project->values("TARGET_x").append("lib" + project->first("TARGET") + "." +
project->first("VER_MAJ") + "." +
@@ -1074,6 +1092,10 @@ void UnixMakefileGenerator::init2()
project->first("VER_PAT"));
}
project->values("TARGET") = project->values("TARGET_x.y.z");
+ } else if (!project->isEmpty("QMAKE_SYMBIAN_SHLIB")) {
+ project->values("TARGET_").append(project->first("TARGET") + "." +
+ project->first("QMAKE_EXTENSION_SHLIB"));
+ project->values("TARGET") = project->values("TARGET_");
} else {
project->values("TARGET_").append("lib" + project->first("TARGET") + "." +
project->first("QMAKE_EXTENSION_SHLIB"));
diff --git a/qmake/option.cpp b/qmake/option.cpp
index 5e06721..ec3fea2 100644
--- a/qmake/option.cpp
+++ b/qmake/option.cpp
@@ -409,6 +409,7 @@ Option::init(int argc, char **argv)
Option::shellPath = detectShellPath();
#else
Option::dirlist_sep = ":";
+ Option::shellPath = QStringList("sh");
#endif
Option::sysenv_mod = "QMAKE_ENV_";
Option::field_sep = ' ';
diff --git a/qmake/project.cpp b/qmake/project.cpp
index 4ce8ba4..b232865 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -513,6 +513,7 @@ enum isForSymbian_enum {
isForSymbian_FALSE = 0,
isForSymbian_ABLD = 1,
isForSymbian_SBSV2 = 2,
+ isForSymbian_MAKEFILE = 3,
};
static isForSymbian_enum isForSymbian_value = isForSymbian_NOT_SET;
@@ -525,11 +526,16 @@ static void init_symbian(const QMap<QString, QStringList>& vars)
if (isForSymbian_value != isForSymbian_NOT_SET)
return;
- QString spec = QFileInfo(Option::mkfile::qmakespec).fileName();
- if (spec.startsWith("symbian-abld", Qt::CaseInsensitive)) {
+ QString spec = QDir::fromNativeSeparators(QFileInfo(Option::mkfile::qmakespec).canonicalFilePath());
+ int pos = spec.lastIndexOf('/');
+ pos = spec.lastIndexOf('/', pos - 1);
+ spec = spec.mid(pos + 1);
+ if (spec.endsWith("symbian-abld", Qt::CaseInsensitive)) {
isForSymbian_value = isForSymbian_ABLD;
- } else if (spec.startsWith("symbian-sbsv2", Qt::CaseInsensitive)) {
+ } else if (spec.endsWith("symbian-sbsv2", Qt::CaseInsensitive)) {
isForSymbian_value = isForSymbian_SBSV2;
+ } else if (spec.startsWith("symbian/", Qt::CaseInsensitive)) {
+ isForSymbian_value = isForSymbian_MAKEFILE;
} else {
QStringList generatorList = vars["MAKEFILE_GENERATOR"];
@@ -546,8 +552,9 @@ static void init_symbian(const QMap<QString, QStringList>& vars)
}
}
- // Force recursive on Symbian, as non-recursive is not really a viable option there
- if (isForSymbian_value != isForSymbian_FALSE)
+ // Force recursive on Symbian native build system, as non-recursive is not really
+ // a viable option there
+ if (isForSymbian_value != isForSymbian_FALSE && isForSymbian_value != isForSymbian_MAKEFILE)
Option::recursive = true;
}
@@ -558,7 +565,7 @@ bool isForSymbian()
if (isForSymbian_value == isForSymbian_NOT_SET)
init_symbian(QMap<QString, QStringList>());
- return (isForSymbian_value != isForSymbian_FALSE);
+ return (isForSymbian_value != isForSymbian_NOT_SET && isForSymbian_value != isForSymbian_FALSE);
}
bool isForSymbianSbsv2()
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro
index c9b622a..c7e5655 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pro
+++ b/src/3rdparty/webkit/WebCore/WebCore.pro
@@ -27,6 +27,7 @@ symbian: {
# RO text (code) section in qtwebkit.dll exceeds allocated space for gcce udeb target.
# Move RW-section base address to start from 0xE00000 instead of the toolchain default 0x400000.
QMAKE_LFLAGS.ARMCC += --rw-base 0xE00000
+ CONFIG += do_not_build_as_thumb
}
include($$PWD/../WebKit.pri)
diff --git a/src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp b/src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp
index cf69723..fd604a0 100644
--- a/src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp
+++ b/src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp
@@ -53,7 +53,7 @@
#include "runtime_root.h"
#include "QWebPageClient.h"
#include <QKeyEvent>
-#include <QPixmap.h>
+#include <QPixmap>
#include <QRegion>
#include <QVector>
#include <QWidget>
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index c8f836a..dfa2c17 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -58,6 +58,11 @@
#include <stdarg.h>
#include <string.h>
+#ifndef QT_NO_EXCEPTIONS
+# include <string>
+# include <exception>
+#endif
+
#if !defined(Q_OS_WINCE)
# include <errno.h>
# if defined(Q_CC_MSVC)
diff --git a/src/corelib/io/io.pri b/src/corelib/io/io.pri
index 2ed0e46..ef448b1 100644
--- a/src/corelib/io/io.pri
+++ b/src/corelib/io/io.pri
@@ -74,7 +74,7 @@ win32 {
SOURCES += io/qsettings_mac.cpp io/qfilesystemwatcher_fsevents.cpp
}
- linux-*:{
+ linux-*:!symbian {
SOURCES += \
io/qfilesystemwatcher_inotify.cpp \
io/qfilesystemwatcher_dnotify.cpp
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp
index 9179485..606941e 100644
--- a/src/corelib/io/qfsfileengine_unix.cpp
+++ b/src/corelib/io/qfsfileengine_unix.cpp
@@ -55,7 +55,7 @@
#include <stdlib.h>
#include <limits.h>
#if defined(Q_OS_SYMBIAN)
-# include <syslimits.h>
+# include <sys/syslimits.h>
# include <f32file.h>
# include <pathinfo.h>
# include "private/qcore_symbian_p.h"
diff --git a/src/corelib/io/qprocess_symbian.cpp b/src/corelib/io/qprocess_symbian.cpp
index 75cde51..972b0e0 100644
--- a/src/corelib/io/qprocess_symbian.cpp
+++ b/src/corelib/io/qprocess_symbian.cpp
@@ -66,7 +66,7 @@
#include "qstring.h"
#include "qprocess.h"
#include "qprocess_p.h"
-#include "qeventdispatcher_symbian_p.h"
+#include "private/qeventdispatcher_symbian_p.h"
#include <private/qthread_p.h>
#include <qmutex.h>
diff --git a/src/corelib/kernel/qsystemsemaphore_symbian.cpp b/src/corelib/kernel/qsystemsemaphore_symbian.cpp
index c252dd5..8cef611 100644
--- a/src/corelib/kernel/qsystemsemaphore_symbian.cpp
+++ b/src/corelib/kernel/qsystemsemaphore_symbian.cpp
@@ -44,7 +44,7 @@
#include "qcoreapplication.h"
#include <qdebug.h>
-#include <qcore_symbian_p.h>
+#include "qcore_symbian_p.h"
#include <e32cmn.h>
QT_BEGIN_NAMESPACE
diff --git a/src/gui/dialogs/qerrormessage.cpp b/src/gui/dialogs/qerrormessage.cpp
index 0bca811..7be7481 100644
--- a/src/gui/dialogs/qerrormessage.cpp
+++ b/src/gui/dialogs/qerrormessage.cpp
@@ -70,10 +70,10 @@ extern bool qt_wince_is_high_dpi(); //defined in qguifunctions_wince.cpp
#if defined(QT_SOFTKEYS_ENABLED)
#include <qaction.h>
+#endif
#ifdef Q_WS_S60
#include "private/qt_s60_p.h"
#endif
-#endif
QT_BEGIN_NAMESPACE
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 3e2e6f6..cc12a65 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -1225,11 +1225,13 @@ void qt_init(QApplicationPrivate * /* priv */, int)
}
#endif
+#ifdef QT_KEYPAD_NAVIGATION
if (touch) {
QApplicationPrivate::navigationMode = Qt::NavigationModeNone;
} else {
QApplicationPrivate::navigationMode = Qt::NavigationModeKeypadDirectional;
}
+#endif
#ifndef QT_NO_CURSOR
//Check if window server pointer cursors are supported or not
diff --git a/src/gui/kernel/qcursor_s60.cpp b/src/gui/kernel/qcursor_s60.cpp
index 54a9176..68e079e 100644
--- a/src/gui/kernel/qcursor_s60.cpp
+++ b/src/gui/kernel/qcursor_s60.cpp
@@ -44,7 +44,7 @@
#include <private/qapplication_p.h>
#include <coecntrl.h>
#include <qcursor.h>
-#include <qt_s60_p.h>
+#include <private/qt_s60_p.h>
#include <qbitmap.h>
#include <w32std.h>
#include <qapplication.h>
diff --git a/src/gui/painting/qwindowsurface_s60.cpp b/src/gui/painting/qwindowsurface_s60.cpp
index 028ec48..949b338 100644
--- a/src/gui/painting/qwindowsurface_s60.cpp
+++ b/src/gui/painting/qwindowsurface_s60.cpp
@@ -44,8 +44,8 @@
#include <QtGui/qpaintdevice.h>
#include <private/qwidget_p.h>
#include "qwindowsurface_s60_p.h"
-#include "qpixmap_s60_p.h"
-#include "qt_s60_p.h"
+#include <private/qpixmap_s60_p.h>
+#include <private/qt_s60_p.h>
#include "private/qdrawhelper_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/gui/s60framework/s60framework.pri b/src/gui/s60framework/s60framework.pri
index 5884b68..df2feec 100644
--- a/src/gui/s60framework/s60framework.pri
+++ b/src/gui/s60framework/s60framework.pri
@@ -9,6 +9,8 @@ minimalAppResource31 = \
"END"
MMP_RULES += minimalAppResource31
+SYMBIAN_RESOURCES += s60framework/s60main.rss
+
SOURCES += s60framework/qs60mainapplication.cpp \
s60framework/qs60mainappui.cpp \
s60framework/qs60maindocument.cpp
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index dd9e69e..9b85c04 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -73,7 +73,7 @@
#endif
#endif
#ifdef Q_OS_SYMBIAN
-#include "qt_s60_p.h"
+#include <private/qt_s60_p.h>
#endif
#include <QMutexLocker>
diff --git a/src/gui/text/qfont_s60.cpp b/src/gui/text/qfont_s60.cpp
index 52c77d6..ccd17a2 100644
--- a/src/gui/text/qfont_s60.cpp
+++ b/src/gui/text/qfont_s60.cpp
@@ -40,8 +40,8 @@
****************************************************************************/
#include "qfont.h"
-#include "qt_s60_p.h"
-#include "qpixmap_s60_p.h"
+#include <private/qt_s60_p.h>
+#include <private/qpixmap_s60_p.h>
#include "qmutex.h"
QT_BEGIN_NAMESPACE
diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp
index 87a73df..621f666 100644
--- a/src/gui/text/qfontdatabase_s60.cpp
+++ b/src/gui/text/qfontdatabase_s60.cpp
@@ -45,8 +45,8 @@
#include "qfontengine_s60_p.h"
#include "qabstractfileengine.h"
#include "qdesktopservices.h"
-#include "qpixmap_s60_p.h"
-#include "qt_s60_p.h"
+#include <private/qpixmap_s60_p.h>
+#include <private/qt_s60_p.h>
#include "qendian.h"
#include <private/qcore_symbian_p.h>
#if defined(QT_NO_FREETYPE)
diff --git a/src/gui/widgets/qmenu_symbian.cpp b/src/gui/widgets/qmenu_symbian.cpp
index eae97a6..c064791 100644
--- a/src/gui/widgets/qmenu_symbian.cpp
+++ b/src/gui/widgets/qmenu_symbian.cpp
@@ -48,7 +48,7 @@
#include <private/qapplication_p.h>
#include <private/qmenu_p.h>
#include <private/qmenubar_p.h>
-#include <qt_s60_p.h>
+#include <private/qt_s60_p.h>
#include <QtCore/qlibrary.h>
#ifdef Q_WS_S60
diff --git a/src/gui/widgets/widgets.pri b/src/gui/widgets/widgets.pri
index 6883dd8..937b8d6 100644
--- a/src/gui/widgets/widgets.pri
+++ b/src/gui/widgets/widgets.pri
@@ -164,6 +164,6 @@ wince*: {
!static: QMAKE_WRITE_DEFAULT_RC = 1
}
-symbian*: {
+symbian: {
SOURCES += widgets/qmenu_symbian.cpp
}
diff --git a/src/plugins/graphicssystems/trace/trace.pro b/src/plugins/graphicssystems/trace/trace.pro
index d548a6c..07472e2 100644
--- a/src/plugins/graphicssystems/trace/trace.pro
+++ b/src/plugins/graphicssystems/trace/trace.pro
@@ -4,6 +4,7 @@ include(../../qpluginbase.pri)
QT += network
QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/graphicssystems
+symbian:TARGET.UID3 = 0x2002130E
SOURCES = main.cpp qgraphicssystem_trace.cpp
diff --git a/src/plugins/imageformats/tiff/tiff.pro b/src/plugins/imageformats/tiff/tiff.pro
index 312f99c..2334b50 100644
--- a/src/plugins/imageformats/tiff/tiff.pro
+++ b/src/plugins/imageformats/tiff/tiff.pro
@@ -56,7 +56,7 @@ contains(QT_CONFIG, system-tiff) {
wince*: {
SOURCES += ../../../corelib/kernel/qfunctions_wince.cpp
}
- symbian*: {
+ symbian: {
SOURCES += ../../../3rdparty/libtiff/port/lfind.c
}
}
diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro
index 004b816..dc83176 100644
--- a/src/plugins/plugins.pro
+++ b/src/plugins/plugins.pro
@@ -1,6 +1,6 @@
TEMPLATE = subdirs
-SUBDIRS *= accessible imageformats sqldrivers iconengines script
+SUBDIRS *= imageformats sqldrivers iconengines script
unix:!symbian {
contains(QT_CONFIG,iconv)|contains(QT_CONFIG,gnu-libiconv):SUBDIRS *= codecs
} else {
@@ -9,6 +9,7 @@ unix:!symbian {
!embedded:SUBDIRS *= graphicssystems
embedded:SUBDIRS *= gfxdrivers decorations mousedrivers kbddrivers
!win32:!embedded:!mac:!symbian:SUBDIRS *= inputmethods
+!symbian:SUBDIRS += accessible
symbian:SUBDIRS += s60
contains(QT_CONFIG, phonon): SUBDIRS *= phonon
contains(QT_CONFIG, multimedia): SUBDIRS *= audio
diff --git a/src/plugins/s60/s60pluginbase.pri b/src/plugins/s60/s60pluginbase.pri
index c1aa4ef..1a6f4a2 100644
--- a/src/plugins/s60/s60pluginbase.pri
+++ b/src/plugins/s60/s60pluginbase.pri
@@ -4,6 +4,8 @@ include(../qpluginbase.pri)
CONFIG -= plugin
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/s60
+
MMP_RULES += NOEXPORTLIBRARY
defBlock = \
diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro
index 5318693..c5d5830 100644
--- a/src/s60installs/s60installs.pro
+++ b/src/s60installs/s60installs.pro
@@ -11,26 +11,40 @@ symbian: {
TARGET.UID3 = 0x2001E61C
VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION}
- qtresources.sources = $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/s60main.rsc
+ symbian-abld|symbian-sbsv2 {
+ qtresources.sources = $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/s60main.rsc
+ } else {
+ qtresources.sources = $$QMAKE_LIBDIR_QT/s60main.rsc
+ }
qtresources.path = c:$$APP_RESOURCE_DIR
qtlibraries.sources = \
- QtCore.dll \
- QtXml.dll \
- QtGui.dll \
- QtNetwork.dll \
- QtTest.dll \
- QtSql.dll
+ $$QMAKE_LIBDIR_QT/QtCore.dll \
+ $$QMAKE_LIBDIR_QT/QtXml.dll \
+ $$QMAKE_LIBDIR_QT/QtGui.dll \
+ $$QMAKE_LIBDIR_QT/QtNetwork.dll \
+ $$QMAKE_LIBDIR_QT/QtTest.dll \
+ $$QMAKE_LIBDIR_QT/QtSql.dll
+
+ symbian-abld|symbian-sbsv2 {
+ defineReplace(pluginLocations) {
+ return ($${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET))
+ }
+ } else {
+ defineReplace(pluginLocations) {
+ return ($$QT_BUILD_TREE/plugins/s60/$$1)
+ }
+ }
qts60plugindeployment = \
"IF package(0x1028315F)" \
- " \"$${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)/qts60plugin_5_0.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0.dll\"" \
+ " \"$$pluginLocations(5_0)/qts60plugin_5_0.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0.dll\"" \
"ELSEIF package(0x102752AE)" \
- " \"$${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)/qts60plugin_3_2.dll\" - \"c:\\sys\\bin\\qts60plugin_3_2.dll\"" \
+ " \"$$pluginLocations(3_2)/qts60plugin_3_2.dll\" - \"c:\\sys\\bin\\qts60plugin_3_2.dll\"" \
"ELSEIF package(0x102032BE)" \
- " \"$${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)/qts60plugin_3_1.dll\" - \"c:\\sys\\bin\\qts60plugin_3_1.dll\"" \
+ " \"$$pluginLocations(3_1)/qts60plugin_3_1.dll\" - \"c:\\sys\\bin\\qts60plugin_3_1.dll\"" \
"ELSE" \
- " \"$${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)/qts60plugin_5_0.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0.dll\"" \
+ " \"$$pluginLocations(5_0)/qts60plugin_5_0.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0.dll\"" \
"ENDIF"
qtlibraries.pkg_postrules += qts60plugindeployment
@@ -61,18 +75,18 @@ symbian: {
}
qtlibraries.pkg_prerules += "(0x2002af5f), 0, 5, 0, {\"sqlite3\"}"
- !contains(QT_CONFIG, no-jpeg): imageformats_plugins.sources += qjpeg.dll
- !contains(QT_CONFIG, no-gif): imageformats_plugins.sources += qgif.dll
- !contains(QT_CONFIG, no-mng): imageformats_plugins.sources += qmng.dll
- !contains(QT_CONFIG, no-tiff): imageformats_plugins.sources += qtiff.dll
- !contains(QT_CONFIG, no-ico): imageformats_plugins.sources += qico.dll
+ !contains(QT_CONFIG, no-jpeg): imageformats_plugins.sources += $$QT_BUILD_TREE/plugins/imageformats/qjpeg.dll
+ !contains(QT_CONFIG, no-gif): imageformats_plugins.sources += $$QT_BUILD_TREE/plugins/imageformats/qgif.dll
+ !contains(QT_CONFIG, no-mng): imageformats_plugins.sources += $$QT_BUILD_TREE/plugins/imageformats/qmng.dll
+ !contains(QT_CONFIG, no-tiff): imageformats_plugins.sources += $$QT_BUILD_TREE/plugins/imageformats/qtiff.dll
+ !contains(QT_CONFIG, no-ico): imageformats_plugins.sources += $$QT_BUILD_TREE/plugins/imageformats/qico.dll
imageformats_plugins.path = c:$$QT_PLUGINS_BASE_DIR/imageformats
- codecs_plugins.sources = qcncodecs.dll qjpcodecs.dll qtwcodecs.dll qkrcodecs.dll
+ codecs_plugins.sources = $$QT_BUILD_TREE/plugins/codecs/qcncodecs.dll $$QT_BUILD_TREE/plugins/codecs/qjpcodecs.dll $$QT_BUILD_TREE/plugins/codecs/qtwcodecs.dll $$QT_BUILD_TREE/plugins/codecs/qkrcodecs.dll
codecs_plugins.path = c:$$QT_PLUGINS_BASE_DIR/codecs
contains(QT_CONFIG, phonon-backend) {
- phonon_backend_plugins.sources += phonon_mmf.dll
+ phonon_backend_plugins.sources += $$QMAKE_LIBDIR_QT/phonon_mmf.dll
phonon_backend_plugins.path = c:$$QT_PLUGINS_BASE_DIR/phonon_backend
DEPLOYMENT += phonon_backend_plugins
@@ -85,33 +99,33 @@ symbian: {
DEPLOYMENT += qtresources qtlibraries qtbackup imageformats_plugins codecs_plugins graphicssystems_plugins
contains(QT_CONFIG, svg): {
- qtlibraries.sources += QtSvg.dll
- imageformats_plugins.sources += qsvg.dll
- iconengines_plugins.sources = qsvgicon.dll
+ qtlibraries.sources += $$QMAKE_LIBDIR_QT/QtSvg.dll
+ imageformats_plugins.sources += $$QT_BUILD_TREE/plugins/imageformats/qsvg.dll
+ iconengines_plugins.sources = $$QT_BUILD_TREE/plugins/iconengines/qsvgicon.dll
iconengines_plugins.path = c:$$QT_PLUGINS_BASE_DIR/iconengines
DEPLOYMENT += iconengines_plugins
}
contains(QT_CONFIG, phonon): {
- qtlibraries.sources += phonon.dll
+ qtlibraries.sources += $$QMAKE_LIBDIR_QT/phonon.dll
}
contains(QT_CONFIG, script): {
- qtlibraries.sources += QtScript.dll
+ qtlibraries.sources += $$QMAKE_LIBDIR_QT/QtScript.dll
}
contains(QT_CONFIG, xmlpatterns): {
- qtlibraries.sources += QtXmlPatterns.dll
+ qtlibraries.sources += $$QMAKE_LIBDIR_QT/QtXmlPatterns.dll
}
contains(QT_CONFIG, declarative): {
- qtlibraries.sources += QtDeclarative.dll
+ qtlibraries.sources += $$QMAKE_LIBDIR_QT/QtDeclarative.dll
}
graphicssystems_plugins.path = c:$$QT_PLUGINS_BASE_DIR/graphicssystems
contains(QT_CONFIG, openvg) {
- qtlibraries.sources += QtOpenVG.dll
- graphicssystems_plugins.sources += qvggraphicssystem.dll
+ qtlibraries.sources += $$QMAKE_LIBDIR_QT/QtOpenVG.dll
+ graphicssystems_plugins.sources += $$QT_BUILD_TREE/plugins/graphicssystems/qvggraphicssystem.dll
}
contains(QT_CONFIG, multimedia) {
diff --git a/src/s60main/s60main.pro b/src/s60main/s60main.pro
index 25fb188..1ba105d 100644
--- a/src/s60main/s60main.pro
+++ b/src/s60main/s60main.pro
@@ -17,7 +17,7 @@ symbian {
qts60main_mcrt0.cpp
# s60main needs to be built in ARM mode for GCCE to work.
- MMP_RULES+="ALWAYS_BUILD_AS_ARM"
+ CONFIG += do_not_build_as_thumb
# staticlib should not have any lib depencies in s60
# This seems not to work, some hard coded libs are still added as dependency
diff --git a/src/s60main/s60main.rsg b/src/s60main/s60main.rsg
new file mode 100644
index 0000000..8cdf3ba
--- /dev/null
+++ b/src/s60main/s60main.rsg
@@ -0,0 +1,3 @@
+#define R_DEFAULT_DOCUMENT_NAME 0x55567002
+#define R_QT_WRAPPERAPP_MENUBAR 0x55567004
+#define R_QT_WRAPPERAPP_MENU 0x55567005
diff --git a/src/src.pro b/src/src.pro
index f2070ae..2ce5642 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -7,6 +7,9 @@ wince*:{
SRC_SUBDIRS += src_corelib src_xml src_gui src_sql src_network src_testlib
} else:symbian {
SRC_SUBDIRS += src_s60main src_corelib src_xml src_gui src_network src_sql src_testlib src_s60installs
+ !symbian-abld:!symbian-sbsv2 {
+ include(tools/tools.pro)
+ }
} else {
SRC_SUBDIRS += src_corelib src_xml src_network src_gui src_sql src_testlib
!vxworks:contains(QT_CONFIG, qt3support): SRC_SUBDIRS += src_qt3support
@@ -80,7 +83,7 @@ src_declarative.subdir = $$QT_SOURCE_TREE/src/declarative
src_declarative.target = sub-declarative
#CONFIG += ordered
-!wince*:!symbian:!ordered {
+!wince*:!ordered {
src_corelib.depends = src_tools_moc src_tools_rcc
src_gui.depends = src_corelib src_tools_uic
embedded: src_gui.depends += src_network
@@ -118,7 +121,7 @@ src_declarative.target = sub-declarative
contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2): src_plugins.depends += src_opengl
}
-!symbian {
+
# This creates a sub-src rule
sub_src_target.CONFIG = recursive
sub_src_target.recurse = $$TOOLS_SUBDIRS $$SRC_SUBDIRS
@@ -165,6 +168,5 @@ for(subname, SRC_SUBDIRS) {
debug.depends = $$EXTRA_DEBUG_TARGETS
release.depends = $$EXTRA_RELEASE_TARGETS
QMAKE_EXTRA_TARGETS += debug release
-}
SUBDIRS += $$SRC_SUBDIRS
diff --git a/src/tools/bootstrap/bootstrap.pri b/src/tools/bootstrap/bootstrap.pri
index b3ee948..c29d59d 100644
--- a/src/tools/bootstrap/bootstrap.pri
+++ b/src/tools/bootstrap/bootstrap.pri
@@ -42,12 +42,12 @@ hpux-acc*|hpuxi-acc* {
} else {
contains(CONFIG, debug_and_release_target) {
CONFIG(debug, debug|release) {
- LIBS+=-L$$QT_BUILD_TREE/src/tools/bootstrap/debug
+ QMAKE_LIBDIR += $$QT_BUILD_TREE/src/tools/bootstrap/debug
} else {
- LIBS+=-L$$QT_BUILD_TREE/src/tools/bootstrap/release
+ QMAKE_LIBDIR += $$QT_BUILD_TREE/src/tools/bootstrap/release
}
} else {
- LIBS += -L$$QT_BUILD_TREE/src/tools/bootstrap
+ QMAKE_LIBDIR += $$QT_BUILD_TREE/src/tools/bootstrap
}
LIBS += -lbootstrap
}
diff --git a/src/tools/tools.pro b/src/tools/tools.pro
index 25527e3..cd7cd9b 100644
--- a/src/tools/tools.pro
+++ b/src/tools/tools.pro
@@ -20,7 +20,7 @@ src_tools_uic3.target = sub-uic3
src_tools_idc.subdir = $$QT_SOURCE_TREE/src/tools/idc
src_tools_idc.target = sub-idc
-!wince*:!symbian:!ordered {
+!wince*:!ordered {
# Set dependencies for each subdir
src_tools_moc.depends = src_tools_bootstrap
src_tools_rcc.depends = src_tools_bootstrap
diff --git a/templates/.gitattributes b/templates/.gitattributes
new file mode 100644
index 0000000..6540c78
--- /dev/null
+++ b/templates/.gitattributes
@@ -0,0 +1 @@
+pkg_template.pkg -crlf
diff --git a/templates/.gitignore b/templates/.gitignore
new file mode 100644
index 0000000..1bb0965
--- /dev/null
+++ b/templates/.gitignore
@@ -0,0 +1 @@
+!*.pkg
diff --git a/templates/pkg_template.pkg b/templates/pkg_template.pkg
new file mode 100644
index 0000000..955ab49
--- /dev/null
+++ b/templates/pkg_template.pkg
@@ -0,0 +1,28 @@
+; Language
+&EN
+
+; SIS header: name, uid, version
+#{"MyApp"},(0xE001e45e),1,0,0
+
+; Localised Vendor name
+%{"Vendor"}
+
+; Unique Vendor name
+:"Vendor"
+
+; Manual PKG pre-rules from PRO files
+; Default HW/platform dependencies
+[0x101F7961],0,0,0,{"S60ProductID"}
+[0x102032BE],0,0,0,{"S60ProductID"}
+[0x102752AE],0,0,0,{"S60ProductID"}
+[0x1028315F],0,0,0,{"S60ProductID"}
+
+; Executable and default resource files
+"wiggly.exe" - "!:\sys\bin\wiggly.exe"
+"QtCore.dll" - "!:\sys\bin\QtCore.dll"
+"QtGui.dll" - "!:\sys\bin\QtGui.dll"
+; Currently you need to get this from a Windows build, but there are some
+; precompiled ones in this directory for testing.
+"../src/gui/.rcc/debug-shared/s60main.rsc" - "!:\resource\apps\s60main.rsc"
+"wiggly.rsc" - "!:\resource\apps\wiggly.rsc"
+"wiggly_reg.rsc" - "!:\private\10003a3f\import\apps\wiggly_reg.rsc"
diff --git a/templates/wiggly.rsc b/templates/wiggly.rsc
new file mode 100644
index 0000000..cb487c3
--- /dev/null
+++ b/templates/wiggly.rsc
Binary files differ
diff --git a/templates/wiggly_reg.rsc b/templates/wiggly_reg.rsc
new file mode 100644
index 0000000..6f52a2c
--- /dev/null
+++ b/templates/wiggly_reg.rsc
Binary files differ
diff --git a/tools/assistant/tools/assistant/assistant.pro b/tools/assistant/tools/assistant/assistant.pro
index edaf076..d57aa99 100644
--- a/tools/assistant/tools/assistant/assistant.pro
+++ b/tools/assistant/tools/assistant/assistant.pro
@@ -15,7 +15,7 @@ DEPENDPATH += ../shared
# ## Work around a qmake issue when statically linking to
# ## not-yet-installed plugins
-LIBS += -L$$QT_BUILD_TREE/plugins/sqldrivers
+QMAKE_LIBDIR += $$QT_BUILD_TREE/plugins/sqldrivers
HEADERS += aboutdialog.h \
bookmarkdialog.h \
bookmarkfiltermodel.h \
diff --git a/tools/designer/src/designer/designer.pro b/tools/designer/src/designer/designer.pro
index 2050c72..8590c7b 100644
--- a/tools/designer/src/designer/designer.pro
+++ b/tools/designer/src/designer/designer.pro
@@ -14,10 +14,8 @@ INCLUDEPATH += \
../lib/uilib \
extra
-LIBS += -L../../lib \
- -L../../../../lib \
- -lQtDesignerComponents \
- -lQtDesigner
+QMAKE_LIBDIR += ../../lib ../../../../lib
+LIBS += -lQtDesignerComponents -lQtDesigner
RESOURCES += designer.qrc
diff --git a/translations/translations.pro b/translations/translations.pro
index f1b9c99..6f40b49 100644
--- a/translations/translations.pro
+++ b/translations/translations.pro
@@ -11,6 +11,7 @@ contains(TEMPLATE_PREFIX, vc):vcproj = 1
TEMPLATE = app
TARGET = qm_phony_target
CONFIG -= qt separate_debug_info
+CONFIG += no_icon
QT =
LIBS =