From 5486f14afb34608d16f62a575499712b20073162 Mon Sep 17 00:00:00 2001 From: Simon Hausmann <simon.hausmann@nokia.com> Date: Sun, 7 Jun 2009 10:56:24 +0200 Subject: Make it possible to cross-compile for non-x11-non-qws platforms. Don't set PLATFORM_X11 unless we do have X11 libs in our xqmakespec. --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 485c71c..a3c8cba 100755 --- a/configure +++ b/configure @@ -3851,7 +3851,7 @@ if [ "$PLATFORM_QWS" = "yes" ]; then Platform="Qt for Embedded Linux" elif [ "$PLATFORM_MAC" = "yes" ]; then Platform="Qt/Mac" -else +elif [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ]; then PLATFORM_X11=yes Platform="Qt/X11" fi -- cgit v0.12 From 0efd55694cc8fb080c67056ad132933f8329616e Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 26 Jun 2009 14:20:38 +0200 Subject: Skeleton for a native symbian makespec. The goal is to make this one work completely without abld or sbs. --- mkspecs/common/armcc.conf | 37 +++++++ mkspecs/symbian/linux-armcc/qmake.conf | 13 +++ mkspecs/symbian/linux-armcc/qplatformdefs.h | 166 ++++++++++++++++++++++++++++ 3 files changed, 216 insertions(+) create mode 100644 mkspecs/common/armcc.conf create mode 100644 mkspecs/symbian/linux-armcc/qmake.conf create mode 100644 mkspecs/symbian/linux-armcc/qplatformdefs.h diff --git a/mkspecs/common/armcc.conf b/mkspecs/common/armcc.conf new file mode 100644 index 0000000..3ef9e6e --- /dev/null +++ b/mkspecs/common/armcc.conf @@ -0,0 +1,37 @@ +# +# 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 +QMAKE_CFLAGS_HIDESYMS += --visibility_inlines_hidden + +QMAKE_CXX = armcc +QMAKE_CXXFLAGS += $$QMAKE_CFLAGS +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 += -Wl,-O1 +QMAKE_LFLAGS_DEBUG += +QMAKE_LFLAGS_APP += +QMAKE_LFLAGS_SHLIB += -shared +QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB +QMAKE_LFLAGS_THREAD += + diff --git a/mkspecs/symbian/linux-armcc/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf new file mode 100644 index 0000000..f9d3e6a --- /dev/null +++ b/mkspecs/symbian/linux-armcc/qmake.conf @@ -0,0 +1,13 @@ +# +# qmake configuration for linux-g++ +# + +MAKEFILE_GENERATOR = UNIX +TEMPLATE = app +CONFIG += qt warn_on release incremental link_prl +QT += core gui +QMAKE_INCREMENTAL_STYLE = sublib + +include(../../common/armcc.conf) +include(../../common/linux.conf) +load(qt_config) diff --git a/mkspecs/symbian/linux-armcc/qplatformdefs.h b/mkspecs/symbian/linux-armcc/qplatformdefs.h new file mode 100644 index 0000000..ebcd295 --- /dev/null +++ b/mkspecs/symbian/linux-armcc/qplatformdefs.h @@ -0,0 +1,166 @@ +/**************************************************************************** +** +** 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_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 -- cgit v0.12 From 1ca27669332b5e19284297b0bbc57700f59fed33 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 26 Jun 2009 14:22:04 +0200 Subject: Modify visibility test to support armcc as well. --- config.tests/unix/fvisibility.test | 19 ++++++++++++------- configure | 6 +++++- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/config.tests/unix/fvisibility.test b/config.tests/unix/fvisibility.test index b2bcc07..2b26381 100755 --- a/config.tests/unix/fvisibility.test +++ b/config.tests/unix/fvisibility.test @@ -2,22 +2,27 @@ FVISIBILITY_SUPPORT=no COMPILER=$1 -VERBOSE=$2 +HIDESYMS=$2 +VERBOSE=$3 RunCompileTest() { cat >>fvisibility.c << EOF +#if defined(__ARMCC__) || defined(__CC_ARM) +__declspec(dllexport) void blah(void); +#elif defined(__GNUC__) +# if __GNUC__ < 4 +# error "GCC3 with backported visibility patch is known to miscompile Qt" +# endif __attribute__((visibility("default"))) void blah(); -#if !defined(__GNUC__) -# error "Visiblility support requires GCC" -#elif __GNUC__ < 4 -# error "GCC3 with backported visibility patch is known to miscompile Qt" +#else +# error "Visibility support requires GCC or RVCT" #endif EOF if [ "$VERBOSE" = "yes" ] ; then - "$COMPILER" -c -fvisibility=hidden fvisibility.c && FVISIBILITY_SUPPORT=yes + "$COMPILER" -c $HIDESYMS fvisibility.c && FVISIBILITY_SUPPORT=yes else - "$COMPILER" -c -fvisibility=hidden fvisibility.c >/dev/null 2>&1 && FVISIBILITY_SUPPORT=yes + "$COMPILER" -c $HIDESYMS fvisibility.c >/dev/null 2>&1 && FVISIBILITY_SUPPORT=yes fi rm -f fvisibility.c fvisibility.o } diff --git a/configure b/configure index a3c8cba..d197ad3 100755 --- a/configure +++ b/configure @@ -2893,6 +2893,10 @@ QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | TEST_COMPILER="$CC" [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER +QMAKE_CONF_HIDESYMS=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CFLAGS_HIDESYMS" | sed "s,.* *= *\(.*\)$,\1," | tail -1` +TEST_HIDESYMS=$QMAKE_CONF_HIDESYMS +[ -z "$TEST_HIDESYMS" ] && TEST_HIDESYMS="-fvisibility=hidden" + # auto-detect precompiled header support if [ "$CFG_PRECOMPILE" = "auto" ]; then if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then @@ -2957,7 +2961,7 @@ fi # auto-detect -fvisibility support if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then - if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then + if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$TEST_HIDESYMS" "$OPT_VERBOSE"; then CFG_REDUCE_EXPORTS=no else CFG_REDUCE_EXPORTS=yes -- cgit v0.12 From 1e3d8b49761037267263dbe29c97a5d0b68e33e5 Mon Sep 17 00:00:00 2001 From: Simon Hausmann <simon.hausmann@nokia.com> Date: Mon, 8 Jun 2009 23:39:02 +0200 Subject: Hack to allow -no-feature-foo on non-qws --- configure | 4 ---- 1 file changed, 4 deletions(-) diff --git a/configure b/configure index d197ad3..51a0ef5 100755 --- a/configure +++ b/configure @@ -1470,7 +1470,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" @@ -1479,9 +1478,6 @@ while [ "$#" -gt 0 ]; do else UNKNOWN_OPT=yes fi - else - UNKNOWN_OPT=yes - fi ;; shared) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then -- cgit v0.12 From b738f0d36ed7101962bc387ca1cb34db052faf60 Mon Sep 17 00:00:00 2001 From: Simon Hausmann <simon.hausmann@nokia.com> Date: Mon, 8 Jun 2009 23:40:04 +0200 Subject: Fix compilation. Include qcore_symbian_p.h locally, not from the include search path. --- src/corelib/kernel/qsystemsemaphore_symbian.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/kernel/qsystemsemaphore_symbian.cpp b/src/corelib/kernel/qsystemsemaphore_symbian.cpp index ad4b4f4..2fb202e 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 -- cgit v0.12 From 7bbb5a34ee39d60d4c72df5ed8bd3ac13b5dc554 Mon Sep 17 00:00:00 2001 From: Simon Hausmann <simon.hausmann@nokia.com> Date: Tue, 9 Jun 2009 22:59:14 +0200 Subject: Various header file inclusion fixes for rvct on linux using a case-sensitive file system. --- src/gui/kernel/qapplication_s60.cpp | 2 +- src/gui/kernel/qcursor_s60.cpp | 2 +- src/gui/kernel/qdnd_s60.cpp | 2 +- src/gui/kernel/qsound_s60.cpp | 2 +- src/gui/painting/qwindowsurface_s60.cpp | 2 +- src/gui/text/qfont.cpp | 2 +- src/gui/text/qfont_s60.cpp | 4 ++-- src/gui/text/qfontdatabase_s60.cpp | 6 +++--- src/gui/text/qfontengine_s60_p.h | 2 +- src/gui/widgets/qmenu_symbian.cpp | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 689429e..0d75578 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -63,7 +63,7 @@ #include "private/qsoftkeymanager_p.h" #include "apgwgnam.h" // For CApaWindowGroupName -#include <MdaAudioTonePlayer.h> // For CMdaAudioToneUtility +#include <mdaaudiotoneplayer.h> // For CMdaAudioToneUtility #if defined(Q_WS_S60) # if !defined(QT_NO_IM) diff --git a/src/gui/kernel/qcursor_s60.cpp b/src/gui/kernel/qcursor_s60.cpp index 7f5c32a..3559586 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/kernel/qdnd_s60.cpp b/src/gui/kernel/qdnd_s60.cpp index a8d3ac5..d6c8047 100644 --- a/src/gui/kernel/qdnd_s60.cpp +++ b/src/gui/kernel/qdnd_s60.cpp @@ -52,7 +52,7 @@ #include "qdnd_p.h" #include "qt_s60_p.h" -#include <COECNTRL.H> +#include <coecntrl.h> // pointer cursor #include <w32std.h> #include <gdi.h> diff --git a/src/gui/kernel/qsound_s60.cpp b/src/gui/kernel/qsound_s60.cpp index 352580e..ee5227a 100644 --- a/src/gui/kernel/qsound_s60.cpp +++ b/src/gui/kernel/qsound_s60.cpp @@ -51,7 +51,7 @@ #include <private/qcore_symbian_p.h> #include <e32std.h> -#include <MdaAudioSamplePlayer.h> +#include <mdaaudiosampleplayer.h> QT_BEGIN_NAMESPACE diff --git a/src/gui/painting/qwindowsurface_s60.cpp b/src/gui/painting/qwindowsurface_s60.cpp index dc4e43b..5244fea 100644 --- a/src/gui/painting/qwindowsurface_s60.cpp +++ b/src/gui/painting/qwindowsurface_s60.cpp @@ -45,7 +45,7 @@ #include <private/qwidget_p.h> #include "qwindowsurface_s60_p.h" #include "qpixmap_s60_p.h" -#include "qt_s60_p.h" +#include <private/qt_s60_p.h> #include "private/qdrawhelper_p.h" QT_BEGIN_NAMESPACE diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp index 1285935..7b630da 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 277d88f..3439028 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 1a6bb11..84c631c 100644 --- a/src/gui/text/qfontdatabase_s60.cpp +++ b/src/gui/text/qfontdatabase_s60.cpp @@ -45,12 +45,12 @@ #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) -#include <OPENFONT.H> +#include <openfont.h> #endif QT_BEGIN_NAMESPACE diff --git a/src/gui/text/qfontengine_s60_p.h b/src/gui/text/qfontengine_s60_p.h index 44f8122..746f929 100644 --- a/src/gui/text/qfontengine_s60_p.h +++ b/src/gui/text/qfontengine_s60_p.h @@ -56,7 +56,7 @@ #include "qconfig.h" #include "qfontengine_p.h" #include "qsize.h" -#include <OPENFONT.H> +#include <openfont.h> class CFbsBitmap; class CFbsBitmapDevice; diff --git a/src/gui/widgets/qmenu_symbian.cpp b/src/gui/widgets/qmenu_symbian.cpp index 94c4177..654e987 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 -- cgit v0.12 From e3764a552e34c9ac1b853f193e09b02d2631ede4 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 26 Jun 2009 15:43:29 +0200 Subject: Enabled Symbian scope when compiling with linux-armcc. Based on a patch by Simon Hausmann. --- qmake/project.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qmake/project.cpp b/qmake/project.cpp index e49441b..f5c905d 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -512,6 +512,7 @@ enum isForSymbian_enum { isForSymbian_FALSE = 0, isForSymbian_ABLD = 1, isForSymbian_SBSV2 = 2, + isForSymbian_MAKEFILE = 3, }; static isForSymbian_enum isForSymbian_value = isForSymbian_NOT_SET; @@ -529,6 +530,8 @@ static void init_symbian(const QMap<QString, QStringList>& vars) isForSymbian_value = isForSymbian_ABLD; } else if (spec.startsWith("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"]; @@ -557,7 +560,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() -- cgit v0.12 From 6331515b413c4ebca7443c343a6e8da4bde71873 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 26 Jun 2009 15:45:23 +0200 Subject: Removed leftover gcc arguments. --- mkspecs/common/armcc.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/common/armcc.conf b/mkspecs/common/armcc.conf index 3ef9e6e..d6ea5d4 100644 --- a/mkspecs/common/armcc.conf +++ b/mkspecs/common/armcc.conf @@ -28,7 +28,7 @@ QMAKE_LINK_SHLIB = armlink QMAKE_LINK_C = armlink QMAKE_LINK_C_SHLIB = armlink QMAKE_LFLAGS += -QMAKE_LFLAGS_RELEASE += -Wl,-O1 +QMAKE_LFLAGS_RELEASE += QMAKE_LFLAGS_DEBUG += QMAKE_LFLAGS_APP += QMAKE_LFLAGS_SHLIB += -shared -- cgit v0.12 From 8b8bbf397114db7eac0873ba622505d2d75c9dfa Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 26 Jun 2009 15:46:48 +0200 Subject: Removed the linux configuration from the armcc mkspec. It contains too much stuff we don't need. --- mkspecs/symbian/linux-armcc/qmake.conf | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/mkspecs/symbian/linux-armcc/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf index f9d3e6a..e4c2801 100644 --- a/mkspecs/symbian/linux-armcc/qmake.conf +++ b/mkspecs/symbian/linux-armcc/qmake.conf @@ -9,5 +9,24 @@ QT += core gui QMAKE_INCREMENTAL_STYLE = sublib include(../../common/armcc.conf) -include(../../common/linux.conf) load(qt_config) + +QMAKE_MOC = $$[QT_INSTALL_BINS]/moc +QMAKE_UIC = $$[QT_INSTALL_BINS]/uic + +QMAKE_AR = ar cqs +QMAKE_RANLIB = + +QMAKE_TAR = tar -cf +QMAKE_GZIP = gzip -9f + +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 + +include(../../common/unix.conf) -- cgit v0.12 From a9c7246c6bfddbc69acceb81134a7856e2855dcd Mon Sep 17 00:00:00 2001 From: Simon Hausmann <simon.hausmann@nokia.com> Date: Sun, 7 Jun 2009 15:09:51 +0200 Subject: Fix symbian builds on Linux. Avoid the use of cmd.exe syntax through the use of Option::shellPath instead of isForSymbian() in qmake. --- qmake/generators/makefile.cpp | 4 ++-- qmake/option.cpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 388e64f..2bf9e7b 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -1795,7 +1795,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 << " 2> NUL"; // Eliminate unnecessary warnings wrote_clean = true; } @@ -1825,7 +1825,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) } } if(!cleans.isEmpty()) - if (isForSymbian()) + if (Option::shellPath.isEmpty()) t << valGlue(cleans, "\n\t" + del_statement, " 2> NUL\n\t" + del_statement, " 2> NUL"); else t << valGlue(cleans, "\n\t" + del_statement, "\n\t" + del_statement, ""); diff --git a/qmake/option.cpp b/qmake/option.cpp index c503b08..646086f 100644 --- a/qmake/option.cpp +++ b/qmake/option.cpp @@ -389,6 +389,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 = ' '; -- cgit v0.12 From e4a0fb4d51a359a626856d3febe0822953c81bc7 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 3 Jul 2009 15:13:46 +0200 Subject: Made qmake support mkspecs under the symbian directory. --- qmake/project.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/qmake/project.cpp b/qmake/project.cpp index f5c905d..035362d 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -525,10 +525,13 @@ 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; -- cgit v0.12 From ae167cdd9d9075ccadfacd26ec66aa191f513692 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 3 Jul 2009 15:15:53 +0200 Subject: Added various defines and includes to make Qt for S60 compile. --- mkspecs/common/armcc.conf | 2 +- mkspecs/symbian/linux-armcc/qmake.conf | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mkspecs/common/armcc.conf b/mkspecs/common/armcc.conf index d6ea5d4..e4e863c 100644 --- a/mkspecs/common/armcc.conf +++ b/mkspecs/common/armcc.conf @@ -3,7 +3,7 @@ # QMAKE_CC = armcc -QMAKE_CFLAGS += +QMAKE_CFLAGS += --preinclude rvct2_2.h --diag_suppress 654 QMAKE_CFLAGS_DEPS += -M QMAKE_CFLAGS_WARN_ON += QMAKE_CFLAGS_WARN_OFF += -W diff --git a/mkspecs/symbian/linux-armcc/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf index e4c2801..701390f 100644 --- a/mkspecs/symbian/linux-armcc/qmake.conf +++ b/mkspecs/symbian/linux-armcc/qmake.conf @@ -1,5 +1,5 @@ # -# qmake configuration for linux-g++ +# qmake configuration for symbian/linux-armcc # MAKEFILE_GENERATOR = UNIX @@ -29,4 +29,8 @@ QMAKE_DEL_DIR = rmdir QMAKE_CHK_DIR_EXISTS = test -d QMAKE_MKDIR = mkdir -p +DEFINES += __SYMBIAN32__ EKA2 __S60_50__ __S60_3X__ __SERIES60_3X__ __EPOC32__ __MARM__ __EABI__ __ARMCC__ __ARMcc_2__ __ARMCC_2_2__ __MARM_ARMV5__ __DLL__ _UNICODE + +INCLUDEPATH += $$[QT_INSTALL_PREFIX]/mkspecs/common/symbian/stl-off + include(../../common/unix.conf) -- cgit v0.12 From 4e0b1c85138d2d8c1df6bdb7a0bace403f6dc817 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 3 Jul 2009 15:16:48 +0200 Subject: Switched to unoptimized builds when doing debug mode. --- mkspecs/common/armcc.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/common/armcc.conf b/mkspecs/common/armcc.conf index e4e863c..cd587cc 100644 --- a/mkspecs/common/armcc.conf +++ b/mkspecs/common/armcc.conf @@ -8,7 +8,7 @@ QMAKE_CFLAGS_DEPS += -M QMAKE_CFLAGS_WARN_ON += QMAKE_CFLAGS_WARN_OFF += -W QMAKE_CFLAGS_RELEASE += -O2 -QMAKE_CFLAGS_DEBUG += -g +QMAKE_CFLAGS_DEBUG += -g -O0 QMAKE_CFLAGS_HIDESYMS += --visibility_inlines_hidden QMAKE_CXX = armcc -- cgit v0.12 From e1b8613d02de73ab9547291a653fe8a67af891d4 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 3 Jul 2009 15:17:35 +0200 Subject: Enabled exceptions for S60 builds. This should probably be reverted later, and added to configure. Right now, I'm mostly interested in making it compile. --- mkspecs/common/armcc.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/common/armcc.conf b/mkspecs/common/armcc.conf index cd587cc..f051f5c 100644 --- a/mkspecs/common/armcc.conf +++ b/mkspecs/common/armcc.conf @@ -12,7 +12,7 @@ QMAKE_CFLAGS_DEBUG += -g -O0 QMAKE_CFLAGS_HIDESYMS += --visibility_inlines_hidden QMAKE_CXX = armcc -QMAKE_CXXFLAGS += $$QMAKE_CFLAGS +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 -- cgit v0.12 From 4810fceb88f9a39195b4cfe97315756f8a166fb0 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 3 Jul 2009 15:19:05 +0200 Subject: Disabled moc directory check for all other mkspecs than abld and sbs. --- mkspecs/features/symbian/moc.prf | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) 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") + } } -- cgit v0.12 From 2c55bc4a770fccc155bc97c9c55f9bc9871df246 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 3 Jul 2009 15:19:59 +0200 Subject: Enabled static lib creation using armar. s60main now links! --- mkspecs/common/armcc.conf | 3 +++ mkspecs/symbian/linux-armcc/qmake.conf | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mkspecs/common/armcc.conf b/mkspecs/common/armcc.conf index f051f5c..fa2a935 100644 --- a/mkspecs/common/armcc.conf +++ b/mkspecs/common/armcc.conf @@ -35,3 +35,6 @@ QMAKE_LFLAGS_SHLIB += -shared QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB QMAKE_LFLAGS_THREAD += +QMAKE_AR = armar --create +QMAKE_RANLIB = + diff --git a/mkspecs/symbian/linux-armcc/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf index 701390f..2d43b4a 100644 --- a/mkspecs/symbian/linux-armcc/qmake.conf +++ b/mkspecs/symbian/linux-armcc/qmake.conf @@ -14,9 +14,6 @@ load(qt_config) QMAKE_MOC = $$[QT_INSTALL_BINS]/moc QMAKE_UIC = $$[QT_INSTALL_BINS]/uic -QMAKE_AR = ar cqs -QMAKE_RANLIB = - QMAKE_TAR = tar -cf QMAKE_GZIP = gzip -9f -- cgit v0.12 From 309b616b3346832f272140faa9246e256dd03692 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 3 Jul 2009 15:35:20 +0200 Subject: Added a precompiled version of S60 resource file. The new build system doesn't support Symbian resource files, so it must be precompiled. New applications shouldn't need any though. I forgot this in the last commit. --- src/s60main/s60main.rsg | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 src/s60main/s60main.rsg 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 -- cgit v0.12 From 428169e3965738b1bf57288d9101e615e5fd7862 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 10 Jul 2009 10:36:53 +0200 Subject: Disabled some modules for S60. --- configure | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure b/configure index 51a0ef5..a9c4d0a 100755 --- a/configure +++ b/configure @@ -6924,6 +6924,10 @@ 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 + 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 -- cgit v0.12 From 6fd434ec97427921532a4d5addc02bc4ef20ec4b Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 10 Jul 2009 10:37:29 +0200 Subject: Fixed incorrect compiler parameter. --- mkspecs/common/armcc.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/common/armcc.conf b/mkspecs/common/armcc.conf index fa2a935..9ca4126 100644 --- a/mkspecs/common/armcc.conf +++ b/mkspecs/common/armcc.conf @@ -31,7 +31,7 @@ QMAKE_LFLAGS += QMAKE_LFLAGS_RELEASE += QMAKE_LFLAGS_DEBUG += QMAKE_LFLAGS_APP += -QMAKE_LFLAGS_SHLIB += -shared +QMAKE_LFLAGS_SHLIB += --shared QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB QMAKE_LFLAGS_THREAD += -- cgit v0.12 From e897f44c17994f2d79a5456dc53a29b7c5fcf554 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 10 Jul 2009 10:37:54 +0200 Subject: Fixed incorrect header includes. --- src/corelib/io/qfsfileengine_unix.cpp | 2 +- src/corelib/io/qprocess_symbian.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp index b0cddaa..20b05b4 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 1f5117f..b069f95 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> -- cgit v0.12 From 2b41ee8a959b5c7fcbd6c275e4dac639cd09c25b Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 10 Jul 2009 10:39:13 +0200 Subject: Temporarily fixed the architecture for S60. This should ideally be detected by configure, but we hack it for now. This patch should be reverted. --- mkspecs/symbian/linux-armcc/qmake.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mkspecs/symbian/linux-armcc/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf index 2d43b4a..6b97de9 100644 --- a/mkspecs/symbian/linux-armcc/qmake.conf +++ b/mkspecs/symbian/linux-armcc/qmake.conf @@ -26,6 +26,8 @@ QMAKE_DEL_DIR = rmdir QMAKE_CHK_DIR_EXISTS = test -d QMAKE_MKDIR = mkdir -p +QT_ARCH = arm + DEFINES += __SYMBIAN32__ EKA2 __S60_50__ __S60_3X__ __SERIES60_3X__ __EPOC32__ __MARM__ __EABI__ __ARMCC__ __ARMcc_2__ __ARMCC_2_2__ __MARM_ARMV5__ __DLL__ _UNICODE INCLUDEPATH += $$[QT_INSTALL_PREFIX]/mkspecs/common/symbian/stl-off -- cgit v0.12 From 76e8f7e7e1680196f5766d67d68cf2b09ea73e7e Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Mon, 10 Aug 2009 09:55:27 +0200 Subject: Suppressed some warnings from RVCT. This pattern is used all over Qt. --- mkspecs/common/armcc.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/common/armcc.conf b/mkspecs/common/armcc.conf index 9ca4126..166d662 100644 --- a/mkspecs/common/armcc.conf +++ b/mkspecs/common/armcc.conf @@ -3,7 +3,7 @@ # QMAKE_CC = armcc -QMAKE_CFLAGS += --preinclude rvct2_2.h --diag_suppress 654 +QMAKE_CFLAGS += --preinclude rvct2_2.h --diag_suppress 186,654,1300 QMAKE_CFLAGS_DEPS += -M QMAKE_CFLAGS_WARN_ON += QMAKE_CFLAGS_WARN_OFF += -W -- cgit v0.12 From f0f011280f4b2e7f5a92e52ed3080dcc750d5208 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 14 Aug 2009 11:39:17 +0200 Subject: Enable RVCT type linker options. --- mkspecs/symbian/linux-armcc/qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/symbian/linux-armcc/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf index 6b97de9..08fbe08 100644 --- a/mkspecs/symbian/linux-armcc/qmake.conf +++ b/mkspecs/symbian/linux-armcc/qmake.conf @@ -4,7 +4,7 @@ MAKEFILE_GENERATOR = UNIX TEMPLATE = app -CONFIG += qt warn_on release incremental link_prl +CONFIG += qt warn_on release incremental link_prl rvct_linker QT += core gui QMAKE_INCREMENTAL_STYLE = sublib -- cgit v0.12 From 1ddd1b7f27ee668d256f78e88f180eeb4fc565ba Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 14 Aug 2009 11:40:05 +0200 Subject: Add extra linker options to RVCT. These are needed to set correct entry point, as well as deal with the delicate symbol handling on Symbian. The symbols will be resolved properly later on by the elftran tool. --- mkspecs/symbian/linux-armcc/qmake.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mkspecs/symbian/linux-armcc/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf index 08fbe08..10b6d73 100644 --- a/mkspecs/symbian/linux-armcc/qmake.conf +++ b/mkspecs/symbian/linux-armcc/qmake.conf @@ -26,6 +26,8 @@ QMAKE_DEL_DIR = rmdir QMAKE_CHK_DIR_EXISTS = test -d QMAKE_MKDIR = mkdir -p +QMAKE_LFLAGS_SHLIB += --entry _E32Dll --partial --diag_suppress 6331,6780 + QT_ARCH = arm DEFINES += __SYMBIAN32__ EKA2 __S60_50__ __S60_3X__ __SERIES60_3X__ __EPOC32__ __MARM__ __EABI__ __ARMCC__ __ARMcc_2__ __ARMCC_2_2__ __MARM_ARMV5__ __DLL__ _UNICODE -- cgit v0.12 From 9275ed3e448878cbcec9d91e9cc73625d7523de3 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 4 Sep 2009 10:35:07 +0200 Subject: Switch to correct architecture for Symbian. --- mkspecs/symbian/linux-armcc/qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/symbian/linux-armcc/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf index 10b6d73..b208d8b 100644 --- a/mkspecs/symbian/linux-armcc/qmake.conf +++ b/mkspecs/symbian/linux-armcc/qmake.conf @@ -28,7 +28,7 @@ QMAKE_MKDIR = mkdir -p QMAKE_LFLAGS_SHLIB += --entry _E32Dll --partial --diag_suppress 6331,6780 -QT_ARCH = arm +QT_ARCH = symbian DEFINES += __SYMBIAN32__ EKA2 __S60_50__ __S60_3X__ __SERIES60_3X__ __EPOC32__ __MARM__ __EABI__ __ARMCC__ __ARMcc_2__ __ARMCC_2_2__ __MARM_ARMV5__ __DLL__ _UNICODE -- cgit v0.12 From fed9be3a06e9b14afe46cb9c68984cac99d80c61 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 14 Aug 2009 11:49:35 +0200 Subject: Added libraries for S60 to the linux mkspec. --- mkspecs/symbian/linux-armcc/qmake.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mkspecs/symbian/linux-armcc/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf index b208d8b..5d9a3ac 100644 --- a/mkspecs/symbian/linux-armcc/qmake.conf +++ b/mkspecs/symbian/linux-armcc/qmake.conf @@ -34,4 +34,7 @@ DEFINES += __SYMBIAN32__ EKA2 __S60_50__ __S60_3X__ __SERIES60_3X__ INCLUDEPATH += $$[QT_INSTALL_PREFIX]/mkspecs/common/symbian/stl-off +# ### FIXME Move these to proper locations. +QMAKE_LIBS = -llibc -llibm -leuser -llibdl -llibpthread -lefsrv + include(../../common/unix.conf) -- cgit v0.12 From bf0bbed5e1e0c450074d4cbbf40840e986018ccb Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 4 Sep 2009 14:33:36 +0200 Subject: Added default libraries for Symbian. --- mkspecs/symbian/linux-armcc/qmake.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mkspecs/symbian/linux-armcc/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf index 5d9a3ac..78bdacf 100644 --- a/mkspecs/symbian/linux-armcc/qmake.conf +++ b/mkspecs/symbian/linux-armcc/qmake.conf @@ -35,6 +35,7 @@ DEFINES += __SYMBIAN32__ EKA2 __S60_50__ __S60_3X__ __SERIES60_3X__ INCLUDEPATH += $$[QT_INSTALL_PREFIX]/mkspecs/common/symbian/stl-off # ### FIXME Move these to proper locations. -QMAKE_LIBS = -llibc -llibm -leuser -llibdl -llibpthread -lefsrv +QMAKE_LIBS = -llibc -llibm -leuser -llibdl -llibpthread -lefsrv -llibstdcpp -llibc.lib\\(VtblExports.o\\) -llibm.lib\\(VtblExports.o\\) -leuser.lib\\(VtblExports.o\\) -llibdl.lib\\(VtblExports.o\\) -llibpthread.lib\\(VtblExports.o\\) -lefsrv.lib\\(VtblExports.o\\) -llibstdcpp.lib\\(VtblExports.o\\) +QMAKE_LIBS += -ledllstub -ledll.lib\\(uc_dll_.o\\) -lusrt2_2 -ldfpaeabi -ldfprvct2_2.lib -ldrtaeabi -ldrtaeabi.lib\\(VtblExports.o\\) -lscppnwdl -ldrtrvct2_2 include(../../common/unix.conf) -- cgit v0.12 From b731981cc19195b54f8d5c4ebdf6a9f75b13f790 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 4 Sep 2009 14:00:35 +0200 Subject: Fixed some compiler flags and defines for the Symbian platform. --- mkspecs/common/armcc.conf | 4 ++-- mkspecs/symbian/linux-armcc/qmake.conf | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/mkspecs/common/armcc.conf b/mkspecs/common/armcc.conf index 166d662..c9a518b 100644 --- a/mkspecs/common/armcc.conf +++ b/mkspecs/common/armcc.conf @@ -3,7 +3,7 @@ # QMAKE_CC = armcc -QMAKE_CFLAGS += --preinclude rvct2_2.h --diag_suppress 186,654,1300 +QMAKE_CFLAGS += QMAKE_CFLAGS_DEPS += -M QMAKE_CFLAGS_WARN_ON += QMAKE_CFLAGS_WARN_OFF += -W @@ -31,7 +31,7 @@ QMAKE_LFLAGS += QMAKE_LFLAGS_RELEASE += QMAKE_LFLAGS_DEBUG += QMAKE_LFLAGS_APP += -QMAKE_LFLAGS_SHLIB += --shared +QMAKE_LFLAGS_SHLIB += QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB QMAKE_LFLAGS_THREAD += diff --git a/mkspecs/symbian/linux-armcc/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf index 78bdacf..2a926dd 100644 --- a/mkspecs/symbian/linux-armcc/qmake.conf +++ b/mkspecs/symbian/linux-armcc/qmake.conf @@ -26,11 +26,13 @@ QMAKE_DEL_DIR = rmdir QMAKE_CHK_DIR_EXISTS = test -d QMAKE_MKDIR = mkdir -p -QMAKE_LFLAGS_SHLIB += --entry _E32Dll --partial --diag_suppress 6331,6780 +QMAKE_CFLAGS += --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 --dllimport_runtime --gnu +QMAKE_CXXFLAGS += $$QMAKE_CFLAGS --no_parse_templates +QMAKE_LFLAGS_SHLIB += --entry _E32Dll --diag_suppress 6331,6780 --shl --reloc --split --rw-base 0x400000 --noscanlib QT_ARCH = symbian -DEFINES += __SYMBIAN32__ EKA2 __S60_50__ __S60_3X__ __SERIES60_3X__ __EPOC32__ __MARM__ __EABI__ __ARMCC__ __ARMcc_2__ __ARMCC_2_2__ __MARM_ARMV5__ __DLL__ _UNICODE +DEFINES += __SYMBIAN32__ EKA2 __S60_50__ __S60_3X__ __SERIES60_3X__ __EPOC32__ __MARM__ __EABI__ __ARMCC__ __ARMcc_2__ __ARMCC_2_2__ __MARM_ARMV5__ __MARM_THUMB__ __MARM_INTERWORK__ __DLL__ _UNICODE __SUPPORT_CPP_EXCEPTIONS__ INCLUDEPATH += $$[QT_INSTALL_PREFIX]/mkspecs/common/symbian/stl-off -- cgit v0.12 From 8782f3387bcd1dff3d44ae17ab0547ce08478fb1 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 14 Aug 2009 11:43:25 +0200 Subject: Created tools for generating ordinal maps on Symbian. - winewrapper - This is a simple tool for launching a wine process by looking at files in the path, since wine itself does not look in the path. Needed for the Windows-only Symbian tools. - makeordinalmap - This one takes a list of files containing symbols to be exported, and creates a stub file library out of them. This is required by the Symbian post linker. This is a very slow linking step, and is likely to be rewritten using threads and less process spawning later on. - default_post.prf - In here we define the extra compiler rules that generate the symbol files, as well as the makeordinalmap command that uses those files. --- bin/makeordinalmap | 65 ++++++++++++++++++++++ bin/winewrapper | 24 ++++++++ .../symbian/linux-armcc/features/default_post.prf | 14 +++++ 3 files changed, 103 insertions(+) create mode 100755 bin/makeordinalmap create mode 100755 bin/winewrapper create mode 100644 mkspecs/symbian/linux-armcc/features/default_post.prf diff --git a/bin/makeordinalmap b/bin/makeordinalmap new file mode 100755 index 0000000..940a9e4 --- /dev/null +++ b/bin/makeordinalmap @@ -0,0 +1,65 @@ +#!/usr/bin/perl -w + +my $objects_dir = $ARGV[0]; +my $target = $ARGV[1]; +my $dllFile = $ARGV[2]; + +shift @ARGV; +shift @ARGV; +shift @ARGV; + +sub uniqueify { + # String must be sorted beforehand. + my $c; + my $last = $_[0]; + for ($c = 1; $c < scalar(@_); $c++) { + if ($_[$c] eq $last) { + splice(@_, $c, 1); + $c--; + } else { + $last = $_[$c]; + } + } + + return @_; +} + +my @exports; + +foreach (@ARGV) { + my $file; + open($file, "< $_") or die("Could not open $_"); + while (<$file>) { + push (@exports, $_); + } + close($file); +} + +@exports = sort(@exports); + +@exports = uniqueify(@exports); + +open(HANDLE, "> test.txt"); +print (HANDLE join("", @exports)); +close(HANDLE); + +my @ordinalfiles; + +for (my $c = 0; $c < scalar(@exports); $c++) { + my $symbol = $exports[$c]; + my $genstubs; + open ($genstubs, "| winewrapper genstubs.exe") or die ("Could not execute genstubs"); + print ($genstubs "$objects_dir/ordinal-$c.o $symbol #<DLL>$dllFile#<\\DLL>$c\n"); + push (@ordinalfiles, "$objects_dir/ordinal-$c.o"); + close ($genstubs); +} + +my $via; +open ($via, "> $objects_dir/input.via") or die("Could not open $objects_dir/input.via"); +print ($via join("\n", @ordinalfiles)); +close($via); + +my $result = system("armar --create $target --via $objects_dir/input.via"); +die("Could not execute armar") if ($result); + +exit 0 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/mkspecs/symbian/linux-armcc/features/default_post.prf b/mkspecs/symbian/linux-armcc/features/default_post.prf new file mode 100644 index 0000000..1d8f565 --- /dev/null +++ b/mkspecs/symbian/linux-armcc/features/default_post.prf @@ -0,0 +1,14 @@ +exports.commands = winewrapper getexports.exe ${QMAKE_FILE_NAME} > ${OBJECTS_DIR}${QMAKE_FILE_BASE}.exports +exports.output = $$OBJECTS_DIR/${QMAKE_FILE_BASE}.exports +exports.input = OBJECTS +exports.variable_out = ORDINALMAP +exports.CONFIG = no_link + +ordinalmap.input = ORDINALMAP +ordinalmap.output = $$OBJECTS_DIR/$${TARGET}.lib +ordinalmap.commands = makeordinalmap $$OBJECTS_DIR $$OBJECTS_DIR/$${TARGET}.lib $${TARGET}.dll ${QMAKE_FILE_NAME} +ordinalmap.variable_out = PRE_TARGETDEPS +ordinalmap.CONFIG = combine + +QMAKE_EXTRA_COMPILERS += ordinalmap +QMAKE_EXTRA_COMPILERS += exports -- cgit v0.12 From ec7009af05cc91797ac90292add5e4dd5cea2973 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 4 Sep 2009 10:48:38 +0200 Subject: Changed the generation of def files and ordinal maps. Instead of just creating a list, we now create a complete def file using makedeffile and then create the ordinal map from that. In addition we make an exp file, in the same way that Symbian does. --- bin/makedeffile | 48 ++++++++++++++++++++++ bin/makeexpfile | 39 ++++++++++++++++++ bin/makeordinalmap | 41 +++--------------- .../symbian/linux-armcc/features/default_post.prf | 20 +++++++-- 4 files changed, 109 insertions(+), 39 deletions(-) create mode 100755 bin/makedeffile create mode 100755 bin/makeexpfile diff --git a/bin/makedeffile b/bin/makedeffile new file mode 100755 index 0000000..e1534c4 --- /dev/null +++ b/bin/makedeffile @@ -0,0 +1,48 @@ +#!/usr/bin/perl -w + +my $deffile = $ARGV[0]; + +shift @ARGV; + +sub uniqueify { + # String must be sorted beforehand. + my $c; + my $last = $_[0]; + for ($c = 1; $c < scalar(@_); $c++) { + if ($_[$c] eq $last) { + splice(@_, $c, 1); + $c--; + } else { + $last = $_[$c]; + } + } + + return @_; +} + +my @exports; + +foreach (@ARGV) { + my $file; + open($file, "< $_") or die("Could not open $_"); + while (<$file>) { + s/[\r\n]//g; + push (@exports, $_); + } + close($file); +} + +@exports = sort(@exports); + +@exports = uniqueify(@exports); + +open(HANDLE, "> $deffile"); +print (HANDLE "EXPORTS\n; NEW:\n"); +for (my $c = 0; $c < scalar(@exports); $c++) { + if ($exports[$c] =~ /[ ]*([^ ]+)(.*)/) { + print (HANDLE "\t$1 \@ " . ($c + 1) . " NONAME$2\n"); + } +} +print(HANDLE "\n"); +close(HANDLE); + diff --git a/bin/makeexpfile b/bin/makeexpfile new file mode 100755 index 0000000..521791d --- /dev/null +++ b/bin/makeexpfile @@ -0,0 +1,39 @@ +#!/usr/bin/perl -w + +my $deffile = $ARGV[0]; +my $target = $ARGV[1]; + +my @exports; +open (HANDLE, "< $deffile") or die ("Could not open $deffile"); +while (<HANDLE>) { + while (/(_Z[^ ]+)/xg) { + push (@exports, $1); + } +} +close(HANDLE); + +open(HANDLE, "> $target.s") or die("Could not open $target.s"); +print (HANDLE "\tEXPORT __DLL_Export_Table__\n\n"); +print (HANDLE "\tEXPORT |DLL##ExportTable|\n\n"); +print (HANDLE "\tEXPORT |DLL##ExportTableSize|\n\n"); +print (HANDLE "\tAREA ExportTable, CODE\n"); +print (HANDLE "__DLL_Export_Table__\n"); +print (HANDLE "\tBX lr\n"); +print (HANDLE "|DLL##ExportTableSize|\n"); +print (HANDLE "\tDCD " . scalar(@exports) . "\n"); +print (HANDLE "|DLL##ExportTable|\n"); +print (HANDLE "\tPRESERVE8\n\n"); +for (my $c = 0; $c < scalar(@exports); $c++) { + print (HANDLE "\tIMPORT $exports[$c]\n"); + print (HANDLE "\tDCD $exports[$c] ; \@ ". ($c + 1) . "\n"); +} +print (HANDLE "\n"); +print (HANDLE "\tAREA |.directive|, READONLY, NOALLOC\n"); +print (HANDLE "\tDCB \"#<SYMEDIT>#\\n\"\n"); +print (HANDLE "\tDCB \"EXPORT DLL##ExportTable\\n\"\n"); +print (HANDLE "\tDCB \"EXPORT DLL##ExportTableSize\\n\"\n"); +print (HANDLE "\tEND\n"); +close(HANDLE); + +my $result = system("armasm --apcs /inter -o $target $target.s"); +die("Could not execute armar") if ($result); diff --git a/bin/makeordinalmap b/bin/makeordinalmap index 940a9e4..4642772 100755 --- a/bin/makeordinalmap +++ b/bin/makeordinalmap @@ -1,46 +1,17 @@ #!/usr/bin/perl -w my $objects_dir = $ARGV[0]; -my $target = $ARGV[1]; +my $deffile = $ARGV[1]; my $dllFile = $ARGV[2]; - -shift @ARGV; -shift @ARGV; -shift @ARGV; - -sub uniqueify { - # String must be sorted beforehand. - my $c; - my $last = $_[0]; - for ($c = 1; $c < scalar(@_); $c++) { - if ($_[$c] eq $last) { - splice(@_, $c, 1); - $c--; - } else { - $last = $_[$c]; - } - } - - return @_; -} +my $target = $ARGV[3]; my @exports; - -foreach (@ARGV) { - my $file; - open($file, "< $_") or die("Could not open $_"); - while (<$file>) { - push (@exports, $_); +open (HANDLE, "< $deffile") or die ("Could not open $deffile"); +while (<HANDLE>) { + while (/(_Z[^ ]+)/xg) { + push (@exports, $1); } - close($file); } - -@exports = sort(@exports); - -@exports = uniqueify(@exports); - -open(HANDLE, "> test.txt"); -print (HANDLE join("", @exports)); close(HANDLE); my @ordinalfiles; diff --git a/mkspecs/symbian/linux-armcc/features/default_post.prf b/mkspecs/symbian/linux-armcc/features/default_post.prf index 1d8f565..d575737 100644 --- a/mkspecs/symbian/linux-armcc/features/default_post.prf +++ b/mkspecs/symbian/linux-armcc/features/default_post.prf @@ -4,11 +4,23 @@ exports.input = OBJECTS exports.variable_out = ORDINALMAP exports.CONFIG = no_link -ordinalmap.input = ORDINALMAP +deffile.input = ORDINALMAP +deffile.output = $$OBJECTS_DIR/$${TARGET}.def +deffile.commands = makedeffile $$OBJECTS_DIR/$${TARGET}.def ${QMAKE_FILE_NAME} +deffile.variable_out = DEFFILE +deffile.CONFIG = no_link combine + +expfile.input = DEFFILE +expfile.output = $$OBJECTS_DIR/$${TARGET}.exp +expfile.commands = makeexpfile ${QMAKE_FILE_NAME} $$OBJECTS_DIR/$${TARGET}.exp +expfile.variable_out = PRE_TARGETDEPS + +ordinalmap.input = DEFFILE ordinalmap.output = $$OBJECTS_DIR/$${TARGET}.lib -ordinalmap.commands = makeordinalmap $$OBJECTS_DIR $$OBJECTS_DIR/$${TARGET}.lib $${TARGET}.dll ${QMAKE_FILE_NAME} +ordinalmap.commands = makeordinalmap $$OBJECTS_DIR ${QMAKE_FILE_NAME} $${TARGET}.dll $$OBJECTS_DIR/$${TARGET}.lib ordinalmap.variable_out = PRE_TARGETDEPS -ordinalmap.CONFIG = combine -QMAKE_EXTRA_COMPILERS += ordinalmap QMAKE_EXTRA_COMPILERS += exports +QMAKE_EXTRA_COMPILERS += deffile +QMAKE_EXTRA_COMPILERS += expfile +QMAKE_EXTRA_COMPILERS += ordinalmap -- cgit v0.12 From 07516d977c63dec1a36832982b04986ec3c979dc Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 4 Sep 2009 14:31:03 +0200 Subject: Fixed the expfile not being included in the link step. --- mkspecs/symbian/linux-armcc/features/default_post.prf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mkspecs/symbian/linux-armcc/features/default_post.prf b/mkspecs/symbian/linux-armcc/features/default_post.prf index d575737..e7f658b 100644 --- a/mkspecs/symbian/linux-armcc/features/default_post.prf +++ b/mkspecs/symbian/linux-armcc/features/default_post.prf @@ -13,7 +13,8 @@ deffile.CONFIG = no_link combine expfile.input = DEFFILE expfile.output = $$OBJECTS_DIR/$${TARGET}.exp expfile.commands = makeexpfile ${QMAKE_FILE_NAME} $$OBJECTS_DIR/$${TARGET}.exp -expfile.variable_out = PRE_TARGETDEPS +expfile.variable_out = QMAKE_LIBS +expfile.CONFIG = target_predeps ordinalmap.input = DEFFILE ordinalmap.output = $$OBJECTS_DIR/$${TARGET}.lib -- cgit v0.12 From 3c8f2ad71e0afe9ded1f2f695709f98fa1ef644b Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 16 Oct 2009 13:30:14 +0200 Subject: Modified makeordinalmap to also generate VtblExports.o file. This is required for exported data. --- bin/makeordinalmap | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/bin/makeordinalmap b/bin/makeordinalmap index 4642772..f81e1ee 100755 --- a/bin/makeordinalmap +++ b/bin/makeordinalmap @@ -6,31 +6,53 @@ my $dllFile = $ARGV[2]; my $target = $ARGV[3]; my @exports; +my @isData; open (HANDLE, "< $deffile") or die ("Could not open $deffile"); while (<HANDLE>) { - while (/(_Z[^ ]+)/xg) { + if (/([a-z0-9_]+)[ ]+\@/ixg) { push (@exports, $1); + if (/\bDATA\b/x) { + push (@isData, 1); + } else { + push (@isData, 0); + } } } close(HANDLE); my @ordinalfiles; +my $vtblExports; +open($vtblExports, "> $objects_dir/VtblExports.s") or die("Could not open $objects_dir/VtblExports.s"); +print($vtblExports "\tAREA |.directive|, NOALLOC, READONLY, ALIGN=2\n"); +print($vtblExports "\tDCB \"#\<SYMEDIT\>#\\n\"\n"); -for (my $c = 0; $c < scalar(@exports); $c++) { - my $symbol = $exports[$c]; +for (my $c = 1; $c < scalar(@exports) + 1; $c++) { + my $symbol = $exports[$c - 1]; my $genstubs; - open ($genstubs, "| winewrapper genstubs.exe") or die ("Could not execute genstubs"); - print ($genstubs "$objects_dir/ordinal-$c.o $symbol #<DLL>$dllFile#<\\DLL>$c\n"); - push (@ordinalfiles, "$objects_dir/ordinal-$c.o"); - close ($genstubs); + my $dllFileWithId = $dllFile; + $dllFileWithId =~ s/^(.*)(\.dll)$/$1\{00010000\}\[e001b2dc\]$2/x; + if ($isData[$c - 1]) { + printf ($vtblExports "\tDCB \"IMPORT #<DLL>$dllFileWithId#<\\\\DLL>%x AS $symbol \\n\"\n", $c); + } else { + open ($genstubs, "| winewrapper genstubs.exe") or die ("Could not execute genstubs"); + printf ($genstubs "$objects_dir/ordinal-$c.o $symbol #<DLL>$dllFileWithId#<\\DLL>%x\n", $c); + push (@ordinalfiles, "$objects_dir/ordinal-$c.o"); + close ($genstubs); + } } +print($vtblExports "\tEND\n"); +close($vtblExports); +my $result = system("armasm --apcs /inter -o $objects_dir/VtblExports.o $objects_dir/VtblExports.s"); +die("Could not execute armar") if ($result); + my $via; open ($via, "> $objects_dir/input.via") or die("Could not open $objects_dir/input.via"); print ($via join("\n", @ordinalfiles)); +print ($via "\n$objects_dir/VtblExports.o\n"); close($via); -my $result = system("armar --create $target --via $objects_dir/input.via"); +$result = system("armar --create $target --via $objects_dir/input.via"); die("Could not execute armar") if ($result); exit 0 -- cgit v0.12 From 31d299b666e2043a450eac7f76b318d664d9efa0 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 16 Oct 2009 13:45:22 +0200 Subject: Added support for both lib and app templates. --- .../symbian/linux-armcc/features/default_post.prf | 81 ++++++++++++++-------- mkspecs/symbian/linux-armcc/qmake.conf | 8 ++- 2 files changed, 59 insertions(+), 30 deletions(-) diff --git a/mkspecs/symbian/linux-armcc/features/default_post.prf b/mkspecs/symbian/linux-armcc/features/default_post.prf index e7f658b..5645637 100644 --- a/mkspecs/symbian/linux-armcc/features/default_post.prf +++ b/mkspecs/symbian/linux-armcc/features/default_post.prf @@ -1,27 +1,54 @@ -exports.commands = winewrapper getexports.exe ${QMAKE_FILE_NAME} > ${OBJECTS_DIR}${QMAKE_FILE_BASE}.exports -exports.output = $$OBJECTS_DIR/${QMAKE_FILE_BASE}.exports -exports.input = OBJECTS -exports.variable_out = ORDINALMAP -exports.CONFIG = no_link - -deffile.input = ORDINALMAP -deffile.output = $$OBJECTS_DIR/$${TARGET}.def -deffile.commands = makedeffile $$OBJECTS_DIR/$${TARGET}.def ${QMAKE_FILE_NAME} -deffile.variable_out = DEFFILE -deffile.CONFIG = no_link combine - -expfile.input = DEFFILE -expfile.output = $$OBJECTS_DIR/$${TARGET}.exp -expfile.commands = makeexpfile ${QMAKE_FILE_NAME} $$OBJECTS_DIR/$${TARGET}.exp -expfile.variable_out = QMAKE_LIBS -expfile.CONFIG = target_predeps - -ordinalmap.input = DEFFILE -ordinalmap.output = $$OBJECTS_DIR/$${TARGET}.lib -ordinalmap.commands = makeordinalmap $$OBJECTS_DIR ${QMAKE_FILE_NAME} $${TARGET}.dll $$OBJECTS_DIR/$${TARGET}.lib -ordinalmap.variable_out = PRE_TARGETDEPS - -QMAKE_EXTRA_COMPILERS += exports -QMAKE_EXTRA_COMPILERS += deffile -QMAKE_EXTRA_COMPILERS += expfile -QMAKE_EXTRA_COMPILERS += ordinalmap +isEmpty(DESTDIR) { + DESTDIR = . +} + +contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { + exports.commands = winewrapper getexports.exe ${QMAKE_FILE_NAME} > ${OBJECTS_DIR}${QMAKE_FILE_BASE}.exports + exports.output = $$OBJECTS_DIR/${QMAKE_FILE_BASE}.exports + exports.input = OBJECTS + exports.variable_out = ORDINALMAP + exports.CONFIG = no_link + + deffile.input = ORDINALMAP + deffile.output = $$OBJECTS_DIR/$${TARGET}.def + deffile.commands = makedeffile $$OBJECTS_DIR/$${TARGET}.def ${QMAKE_FILE_NAME} + deffile.variable_out = DEFFILE + deffile.CONFIG = no_link combine + + expfile.input = DEFFILE + expfile.output = $$OBJECTS_DIR/$${TARGET}.exp + expfile.commands = makeexpfile ${QMAKE_FILE_NAME} $$OBJECTS_DIR/$${TARGET}.exp + expfile.variable_out = QMAKE_LIBS + expfile.CONFIG = target_predeps + + ordinalmap.input = DEFFILE + ordinalmap.output = $$DESTDIR/$${TARGET}.lib + ordinalmap.commands = makeordinalmap $$OBJECTS_DIR ${QMAKE_FILE_NAME} $${TARGET}.dll $$DESTDIR/$${TARGET}.lib + ordinalmap.variable_out = PRE_TARGETDEPS + + elftran.target = $${DESTDIR}/lib$${TARGET}.tran + elftran.commands = winewrapper elftran.exe -version 4.1536 -sid 0xe001b2dc -allow -nocall -heap 0x00020000 0x00800000 -stack 0x00014000 -unpaged -uid1 0x10000079 -uid2 0x1000008d -uid3 0xe001b2dc -fpu softvfp -capability All-Tcb $${DESTDIR}/lib$${TARGET}.dll $${DESTDIR}/lib$${TARGET}.tran + elftran.depends = $${DESTDIR}/lib$${TARGET}.dll + QMAKE_POST_LINK += winewrapper elftran.exe -version 4.1536 -sid 0xe001b2dc -allow -nocall -heap 0x00020000 0x00800000 -stack 0x00014000 -unpaged -uid1 0x10000079 -uid2 0x1000008d -uid3 0xe001b2dc -fpu softvfp -capability All-Tcb $${DESTDIR}/lib$${TARGET}.dll $${DESTDIR}/lib$${TARGET}.tran + QMAKE_CLEAN += $${DESTDIR}/lib$${TARGET}.tran + + QMAKE_EXTRA_COMPILERS += exports + QMAKE_EXTRA_COMPILERS += deffile + QMAKE_EXTRA_COMPILERS += expfile + QMAKE_EXTRA_COMPILERS += ordinalmap + QMAKE_EXTRA_TARGETS += elftran + + QMAKE_LIBS += -ledllstub -ledll.lib\\(uc_dll_.o\\) +} + +contains(TEMPLATE, app) { + elftran.target = $${DESTDIR}/$${TARGET}.tran + elftran.commands = winewrapper elftran.exe -version 10.0 -sid 0xe4d10fc9 -nocall -heap 0x00020000 0x00800000 -stack 0x00014000 -unpaged -uid1 0x1000007a -uid2 0x1000008d -uid3 0xe4d10fc9 -fpu softvfp -capability None $${DESTDIR}/$${TARGET} $${DESTDIR}/$${TARGET}.tran + elftran.depends = $${DESTDIR}/$${TARGET} + QMAKE_POST_LINK += winewrapper elftran.exe -version 10.0 -sid 0xe4d10fc9 -nocall -heap 0x00020000 0x00800000 -stack 0x00014000 -unpaged -uid1 0x1000007a -uid2 0x1000008d -uid3 0xe4d10fc9 -fpu softvfp -capability None $${DESTDIR}/$${TARGET} $${DESTDIR}/$${TARGET}.tran + QMAKE_CLEAN += $${DESTDIR}/$${TARGET}.tran + + QMAKE_EXTRA_TARGETS += elftran + + QMAKE_LIBS += -leexe.lib\\(uc_exe_.o\\) +} diff --git a/mkspecs/symbian/linux-armcc/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf index 2a926dd..577c4e2 100644 --- a/mkspecs/symbian/linux-armcc/qmake.conf +++ b/mkspecs/symbian/linux-armcc/qmake.conf @@ -28,7 +28,9 @@ QMAKE_MKDIR = mkdir -p QMAKE_CFLAGS += --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 --dllimport_runtime --gnu QMAKE_CXXFLAGS += $$QMAKE_CFLAGS --no_parse_templates -QMAKE_LFLAGS_SHLIB += --entry _E32Dll --diag_suppress 6331,6780 --shl --reloc --split --rw-base 0x400000 --noscanlib +QMAKE_LFLAGS += --diag_suppress 6331,6780 --shl --reloc --split --rw-base 0x400000 --noscanlib +QMAKE_LFLAGS_APP += --entry _E32Startup +QMAKE_LFLAGS_SHLIB += --entry _E32Dll QT_ARCH = symbian @@ -37,7 +39,7 @@ DEFINES += __SYMBIAN32__ EKA2 __S60_50__ __S60_3X__ __SERIES60_3X__ INCLUDEPATH += $$[QT_INSTALL_PREFIX]/mkspecs/common/symbian/stl-off # ### FIXME Move these to proper locations. -QMAKE_LIBS = -llibc -llibm -leuser -llibdl -llibpthread -lefsrv -llibstdcpp -llibc.lib\\(VtblExports.o\\) -llibm.lib\\(VtblExports.o\\) -leuser.lib\\(VtblExports.o\\) -llibdl.lib\\(VtblExports.o\\) -llibpthread.lib\\(VtblExports.o\\) -lefsrv.lib\\(VtblExports.o\\) -llibstdcpp.lib\\(VtblExports.o\\) -QMAKE_LIBS += -ledllstub -ledll.lib\\(uc_dll_.o\\) -lusrt2_2 -ldfpaeabi -ldfprvct2_2.lib -ldrtaeabi -ldrtaeabi.lib\\(VtblExports.o\\) -lscppnwdl -ldrtrvct2_2 +QMAKE_LIBS += -llibc -llibm -leuser -llibdl -llibpthread -lefsrv -llibstdcpp -llibc.lib\\(VtblExports.o\\) -llibm.lib\\(VtblExports.o\\) -leuser.lib\\(VtblExports.o\\) -llibdl.lib\\(VtblExports.o\\) -llibpthread.lib\\(VtblExports.o\\) -lefsrv.lib\\(VtblExports.o\\) -llibstdcpp.lib\\(VtblExports.o\\) +QMAKE_LIBS += -lusrt2_2 -ldfpaeabi -ldfprvct2_2.lib -ldrtaeabi -ldrtaeabi.lib\\(VtblExports.o\\) -lscppnwdl -ldrtrvct2_2 include(../../common/unix.conf) -- cgit v0.12 From 733c7232f2c9656c26bfe668c2e95f9c93cceb4b Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 23 Oct 2009 13:34:14 +0200 Subject: Added std headers to fix Symbian build error. --- src/corelib/global/qglobal.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 7d47944..907be24 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) -- cgit v0.12 From 6475ca960a3d04eb591338801073db4d2a38b715 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 23 Oct 2009 16:29:32 +0200 Subject: Switched to using just QMAKE_POST_LINK for elftran. --- mkspecs/symbian/linux-armcc/features/default_post.prf | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/mkspecs/symbian/linux-armcc/features/default_post.prf b/mkspecs/symbian/linux-armcc/features/default_post.prf index 5645637..c2b2c10 100644 --- a/mkspecs/symbian/linux-armcc/features/default_post.prf +++ b/mkspecs/symbian/linux-armcc/features/default_post.prf @@ -26,29 +26,22 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { ordinalmap.commands = makeordinalmap $$OBJECTS_DIR ${QMAKE_FILE_NAME} $${TARGET}.dll $$DESTDIR/$${TARGET}.lib ordinalmap.variable_out = PRE_TARGETDEPS - elftran.target = $${DESTDIR}/lib$${TARGET}.tran - elftran.commands = winewrapper elftran.exe -version 4.1536 -sid 0xe001b2dc -allow -nocall -heap 0x00020000 0x00800000 -stack 0x00014000 -unpaged -uid1 0x10000079 -uid2 0x1000008d -uid3 0xe001b2dc -fpu softvfp -capability All-Tcb $${DESTDIR}/lib$${TARGET}.dll $${DESTDIR}/lib$${TARGET}.tran - elftran.depends = $${DESTDIR}/lib$${TARGET}.dll - QMAKE_POST_LINK += winewrapper elftran.exe -version 4.1536 -sid 0xe001b2dc -allow -nocall -heap 0x00020000 0x00800000 -stack 0x00014000 -unpaged -uid1 0x10000079 -uid2 0x1000008d -uid3 0xe001b2dc -fpu softvfp -capability All-Tcb $${DESTDIR}/lib$${TARGET}.dll $${DESTDIR}/lib$${TARGET}.tran - QMAKE_CLEAN += $${DESTDIR}/lib$${TARGET}.tran + !isEmpty($$QMAKE_POST_LINK):QMAKE_POST_LINK += && + QMAKE_POST_LINK += $$QMAKE_MOVE $$DESTDIR/$${TARGET}.dll $$DESTDIR/$${TARGET}.sym + QMAKE_POST_LINK += && winewrapper elftran.exe -version 4.1536 -sid 0xe001b2dc -allow -nocall -heap 0x00020000 0x00800000 -stack 0x00014000 -unpaged -uid1 0x10000079 -uid2 0x1000008d -uid3 0xe001b2dc -fpu softvfp -capability None $${DESTDIR}/$${TARGET}.sym $${DESTDIR}/$${TARGET}.dll + QMAKE_DISTCLEAN += $${DESTDIR}/$${TARGET}.sym QMAKE_EXTRA_COMPILERS += exports QMAKE_EXTRA_COMPILERS += deffile QMAKE_EXTRA_COMPILERS += expfile QMAKE_EXTRA_COMPILERS += ordinalmap - QMAKE_EXTRA_TARGETS += elftran QMAKE_LIBS += -ledllstub -ledll.lib\\(uc_dll_.o\\) } contains(TEMPLATE, app) { - elftran.target = $${DESTDIR}/$${TARGET}.tran - elftran.commands = winewrapper elftran.exe -version 10.0 -sid 0xe4d10fc9 -nocall -heap 0x00020000 0x00800000 -stack 0x00014000 -unpaged -uid1 0x1000007a -uid2 0x1000008d -uid3 0xe4d10fc9 -fpu softvfp -capability None $${DESTDIR}/$${TARGET} $${DESTDIR}/$${TARGET}.tran - elftran.depends = $${DESTDIR}/$${TARGET} QMAKE_POST_LINK += winewrapper elftran.exe -version 10.0 -sid 0xe4d10fc9 -nocall -heap 0x00020000 0x00800000 -stack 0x00014000 -unpaged -uid1 0x1000007a -uid2 0x1000008d -uid3 0xe4d10fc9 -fpu softvfp -capability None $${DESTDIR}/$${TARGET} $${DESTDIR}/$${TARGET}.tran - QMAKE_CLEAN += $${DESTDIR}/$${TARGET}.tran - - QMAKE_EXTRA_TARGETS += elftran + QMAKE_DISTCLEAN += $${DESTDIR}/$${TARGET}.tran QMAKE_LIBS += -leexe.lib\\(uc_exe_.o\\) } -- cgit v0.12 From 267fe3cf638add295da001ff71116f1a00f96866 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 4 Sep 2009 14:23:11 +0200 Subject: Added QMAKE_PREFIX_SHLIB and QMAKE_SYMBIAN_SHLIB support. The first enables you to use a prefix in front of the library. It is by default enabled for all platforms which previously used "lib", and on Symbian it is set to the empty string. The second variable enables Symbian style linking, where you link to a stub .lib file, but the actual runtime library is .dll. --- mkspecs/common/unix.conf | 1 + qmake/generators/unix/unixmake.cpp | 45 ++++++++++++++++++++++++-------------- 2 files changed, 30 insertions(+), 16 deletions(-) diff --git a/mkspecs/common/unix.conf b/mkspecs/common/unix.conf index 4cb171e..75e3b9f 100644 --- a/mkspecs/common/unix.conf +++ b/mkspecs/common/unix.conf @@ -9,3 +9,4 @@ 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 diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index faa6415..62eee19 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,13 @@ 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")) { + if (opt.indexOf(".lib") == -1) { + (*it) = opt.mid(2) + ".lib"; + } else { + (*it) = opt.mid(2); + } + } else if (project->isActiveConfig("rvct_linker")) { (*it) = "lib" + opt.mid(2) + ".so"; } else { stub = opt.mid(2); @@ -491,26 +501,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 +531,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; } @@ -560,7 +573,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); @@ -568,7 +581,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)) { -- cgit v0.12 From 1a4a8bce2c9cfa7e5455462be33253e56e143f4a Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 4 Sep 2009 14:30:02 +0200 Subject: Made Symbian use QMAKE_SYMBIAN_SHLIB and QMAKE_PREFIX_SHLIB variables --- mkspecs/symbian/linux-armcc/qmake.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mkspecs/symbian/linux-armcc/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf index 577c4e2..80b1b22 100644 --- a/mkspecs/symbian/linux-armcc/qmake.conf +++ b/mkspecs/symbian/linux-armcc/qmake.conf @@ -32,6 +32,9 @@ QMAKE_LFLAGS += --diag_suppress 6331,6780 --shl --reloc --split --rw-base QMAKE_LFLAGS_APP += --entry _E32Startup QMAKE_LFLAGS_SHLIB += --entry _E32Dll +QMAKE_EXTENSION_SHLIB += dll +QMAKE_SYMBIAN_SHLIB = 1 + QT_ARCH = symbian DEFINES += __SYMBIAN32__ EKA2 __S60_50__ __S60_3X__ __SERIES60_3X__ __EPOC32__ __MARM__ __EABI__ __ARMCC__ __ARMcc_2__ __ARMCC_2_2__ __MARM_ARMV5__ __MARM_THUMB__ __MARM_INTERWORK__ __DLL__ _UNICODE __SUPPORT_CPP_EXCEPTIONS__ @@ -43,3 +46,5 @@ QMAKE_LIBS += -llibc -llibm -leuser -llibdl -llibpthread -lefsrv -llib QMAKE_LIBS += -lusrt2_2 -ldfpaeabi -ldfprvct2_2.lib -ldrtaeabi -ldrtaeabi.lib\\(VtblExports.o\\) -lscppnwdl -ldrtrvct2_2 include(../../common/unix.conf) + +QMAKE_PREFIX_SHLIB = -- cgit v0.12 From 284e37fe68dcf33be5b590b213fe473dc178cd13 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 23 Oct 2009 15:36:55 +0200 Subject: Switched Symbian away from the Linux lib$(TARGET).4.6.0 naming scheme --- qmake/generators/unix/unixmake2.cpp | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 2500861..6a23708 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; @@ -545,6 +547,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" @@ -875,9 +888,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; } @@ -1074,6 +1088,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")); -- cgit v0.12 From de1e5ce30bfe21a054d56fbe947721e3467b6107 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Mon, 10 Aug 2009 09:45:23 +0200 Subject: Made OBJECTS variable work with QMAKE_EXTRA_COMPILERS input variable. This required two fixes. First, make sure that all compilers needing OBJECTS come after all compilers producing SOURCES. Second, delay population of the variable_out variables that depend on OBJECTS until that variable has been initialized. --- qmake/generators/makefile.cpp | 201 +++++++++++++++++++++++------------------- qmake/generators/makefile.h | 2 + 2 files changed, 113 insertions(+), 90 deletions(-) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 2bf9e7b..98b6871 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -423,6 +423,105 @@ MakefileGenerator::initCompiler(const MakefileGenerator::Compiler &comp) } } +QStringList::Iterator +MakefileGenerator::mergeCompilerOutputs(QStringList::Iterator start, QStringList::Iterator end, + QString stopAt) +{ + QStringList::Iterator it; + for(it = start; it != end; ++it) { + QString tmp_out = project->values((*it) + ".output").first(); + if(tmp_out.isEmpty()) + continue; + if(project->values((*it) + ".CONFIG").indexOf("combine") != -1) { + QStringList &compilerInputs = project->values((*it) + ".input"); + // Don't generate compiler output if it doesn't have input. + if (compilerInputs.isEmpty() || project->values(compilerInputs.first()).isEmpty()) + continue; + if (!stopAt.isEmpty() && compilerInputs.contains(stopAt)) + break; + if(tmp_out.indexOf("$") == -1) { + if(!verifyExtraCompiler((*it), QString())) //verify + continue; + QString out = fileFixify(tmp_out, Option::output_dir, Option::output_dir); + bool pre_dep = (project->values((*it) + ".CONFIG").indexOf("target_predeps") != -1); + if(project->variables().contains((*it) + ".variable_out")) { + const QStringList &var_out = project->variables().value((*it) + ".variable_out"); + for(int i = 0; i < var_out.size(); ++i) { + QString v = var_out.at(i); + if(v == QLatin1String("SOURCES")) + v = "GENERATED_SOURCES"; + else if(v == QLatin1String("OBJECTS")) + pre_dep = false; + QStringList &list = project->values(v); + if(!list.contains(out)) + list.append(out); + } + } else if(project->values((*it) + ".CONFIG").indexOf("no_link") == -1) { + QStringList &list = project->values("OBJECTS"); + pre_dep = false; + if(!list.contains(out)) + list.append(out); + } else { + QStringList &list = project->values("UNUSED_SOURCES"); + if(!list.contains(out)) + list.append(out); + } + if(pre_dep) { + QStringList &list = project->variables()["PRE_TARGETDEPS"]; + if(!list.contains(out)) + list.append(out); + } + } + } else { + QStringList &tmp = project->values((*it) + ".input"); + if (!stopAt.isEmpty() && tmp.contains(stopAt)) + break; + for(QStringList::Iterator it2 = tmp.begin(); it2 != tmp.end(); ++it2) { + const QStringList inputs = project->values((*it2)); + for(QStringList::ConstIterator input = inputs.constBegin(); input != inputs.constEnd(); ++input) { + if((*input).isEmpty()) + continue; + QString in = Option::fixPathToTargetOS((*input), false); + if(!verifyExtraCompiler((*it), in)) //verify + continue; + QString out = replaceExtraCompilerVariables(tmp_out, (*input), QString()); + out = fileFixify(out, Option::output_dir, Option::output_dir); + bool pre_dep = (project->values((*it) + ".CONFIG").indexOf("target_predeps") != -1); + if(project->variables().contains((*it) + ".variable_out")) { + const QStringList &var_out = project->variables().value((*it) + ".variable_out"); + for(int i = 0; i < var_out.size(); ++i) { + QString v = var_out.at(i); + if(v == QLatin1String("SOURCES")) + v = "GENERATED_SOURCES"; + else if(v == QLatin1String("OBJECTS")) + pre_dep = false; + QStringList &list = project->values(v); + if(!list.contains(out)) + list.append(out); + } + } else if(project->values((*it) + ".CONFIG").indexOf("no_link") == -1) { + pre_dep = false; + QStringList &list = project->values("OBJECTS"); + if(!list.contains(out)) + list.append(out); + } else { + QStringList &list = project->values("UNUSED_SOURCES"); + if(!list.contains(out)) + list.append(out); + } + if(pre_dep) { + QStringList &list = project->variables()["PRE_TARGETDEPS"]; + if(!list.contains(out)) + list.append(out); + } + } + } + } + } + + return it; +} + void MakefileGenerator::init() { @@ -440,8 +539,11 @@ MakefileGenerator::init() continue_compiler_chain: if(jump_count > quc.size()) //just to avoid an infinite loop here break; - if(project->variables().contains(quc.at(comp_out) + ".variable_out")) { - const QStringList &outputs = project->variables().value(quc.at(comp_out) + ".variable_out"); + QStringList outputs = project->variables().value(quc.at(comp_out) + ".variable_out"); + if (outputs.isEmpty() && project->values(quc.at(comp_out) + ".CONFIG").indexOf("no_link") == -1) { + outputs << QString("OBJECTS"); + } + if(!outputs.isEmpty()) { for(int out = 0; out < outputs.size(); ++out) { for(int comp_in = 0; comp_in < quc.size(); ++comp_in) { if(comp_in == comp_out) @@ -449,7 +551,8 @@ MakefileGenerator::init() if(project->variables().contains(quc.at(comp_in) + ".input")) { const QStringList &inputs = project->variables().value(quc.at(comp_in) + ".input"); for(int in = 0; in < inputs.size(); ++in) { - if(inputs.at(in) == outputs.at(out) && comp_out > comp_in) { + if(comp_out > comp_in && (inputs.at(in) == outputs.at(out) + || inputs.at(in) == "OBJECTS" && outputs.at(out).endsWith("SOURCES"))) { ++jump_count; //move comp_out to comp_in and continue the compiler chain quc.move(comp_out, comp_in); @@ -615,93 +718,9 @@ MakefileGenerator::init() initCompiler(compilers.at(x)); //merge actual compiler outputs into their variable_out. This is done last so that - //files are already properly fixified. - for(QStringList::Iterator it = quc.begin(); it != quc.end(); ++it) { - QString tmp_out = project->values((*it) + ".output").first(); - if(tmp_out.isEmpty()) - continue; - if(project->values((*it) + ".CONFIG").indexOf("combine") != -1) { - QStringList &compilerInputs = project->values((*it) + ".input"); - // Don't generate compiler output if it doesn't have input. - if (compilerInputs.isEmpty() || project->values(compilerInputs.first()).isEmpty()) - continue; - if(tmp_out.indexOf("$") == -1) { - if(!verifyExtraCompiler((*it), QString())) //verify - continue; - QString out = fileFixify(tmp_out, Option::output_dir, Option::output_dir); - bool pre_dep = (project->values((*it) + ".CONFIG").indexOf("target_predeps") != -1); - if(project->variables().contains((*it) + ".variable_out")) { - const QStringList &var_out = project->variables().value((*it) + ".variable_out"); - for(int i = 0; i < var_out.size(); ++i) { - QString v = var_out.at(i); - if(v == QLatin1String("SOURCES")) - v = "GENERATED_SOURCES"; - else if(v == QLatin1String("OBJECTS")) - pre_dep = false; - QStringList &list = project->values(v); - if(!list.contains(out)) - list.append(out); - } - } else if(project->values((*it) + ".CONFIG").indexOf("no_link") == -1) { - QStringList &list = project->values("OBJECTS"); - pre_dep = false; - if(!list.contains(out)) - list.append(out); - } else { - QStringList &list = project->values("UNUSED_SOURCES"); - if(!list.contains(out)) - list.append(out); - } - if(pre_dep) { - QStringList &list = project->variables()["PRE_TARGETDEPS"]; - if(!list.contains(out)) - list.append(out); - } - } - } else { - QStringList &tmp = project->values((*it) + ".input"); - for(QStringList::Iterator it2 = tmp.begin(); it2 != tmp.end(); ++it2) { - const QStringList inputs = project->values((*it2)); - for(QStringList::ConstIterator input = inputs.constBegin(); input != inputs.constEnd(); ++input) { - if((*input).isEmpty()) - continue; - QString in = Option::fixPathToTargetOS((*input), false); - if(!verifyExtraCompiler((*it), in)) //verify - continue; - QString out = replaceExtraCompilerVariables(tmp_out, (*input), QString()); - out = fileFixify(out, Option::output_dir, Option::output_dir); - bool pre_dep = (project->values((*it) + ".CONFIG").indexOf("target_predeps") != -1); - if(project->variables().contains((*it) + ".variable_out")) { - const QStringList &var_out = project->variables().value((*it) + ".variable_out"); - for(int i = 0; i < var_out.size(); ++i) { - QString v = var_out.at(i); - if(v == QLatin1String("SOURCES")) - v = "GENERATED_SOURCES"; - else if(v == QLatin1String("OBJECTS")) - pre_dep = false; - QStringList &list = project->values(v); - if(!list.contains(out)) - list.append(out); - } - } else if(project->values((*it) + ".CONFIG").indexOf("no_link") == -1) { - pre_dep = false; - QStringList &list = project->values("OBJECTS"); - if(!list.contains(out)) - list.append(out); - } else { - QStringList &list = project->values("UNUSED_SOURCES"); - if(!list.contains(out)) - list.append(out); - } - if(pre_dep) { - QStringList &list = project->variables()["PRE_TARGETDEPS"]; - if(!list.contains(out)) - list.append(out); - } - } - } - } - } + //files are already properly fixified. If an input variable reads "OBJECTS", then + //stop at that compiler and do the rest later after "OBJECTS" has been populated. + QStringList::Iterator mergedOutputs = mergeCompilerOutputs(quc.begin(), quc.end(), "OBJECTS"); //handle dependencies depHeuristicsCache.clear(); @@ -764,6 +783,8 @@ MakefileGenerator::init() Option::output_dir)); } + mergeCompilerOutputs(mergedOutputs, quc.end(), QString()); + //fix up the target deps QString fixpaths[] = { QString("PRE_TARGETDEPS"), QString("POST_TARGETDEPS"), QString() }; for(int path = 0; !fixpaths[path].isNull(); path++) { diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h index fd17d06..f15f533 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h @@ -146,6 +146,8 @@ protected: //initialization void verifyCompilers(); + QStringList::Iterator mergeCompilerOutputs(QStringList::Iterator start, QStringList::Iterator end, + QString stopAt); virtual void init(); void initOutPaths(); struct Compiler -- cgit v0.12 From dc922ec5c9de96a4f96f7c866d11179230d5aba6 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 10 Jul 2009 10:41:14 +0200 Subject: Fixed qmake scope specification. Even if we compile on Linux, that doesn't mean we run it there. --- src/corelib/io/io.pri | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/io/io.pri b/src/corelib/io/io.pri index 02a1586..9178a2e 100644 --- a/src/corelib/io/io.pri +++ b/src/corelib/io/io.pri @@ -72,7 +72,7 @@ win32 { SOURCES += io/qsettings_mac.cpp io/qfilesystemwatcher_fsevents.cpp } - linux-*:{ + linux-*:!symbian { SOURCES += \ io/qfilesystemwatcher_inotify.cpp \ io/qfilesystemwatcher_dnotify.cpp -- cgit v0.12 From 3d30a4c9a43ea3a9f378ff51d353f350813e31bb Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 27 Oct 2009 14:55:25 +0100 Subject: Made some basic build instructions for Symbian on Linux. --- README.s60-mkspec | 74 ++++++++++++++++++++++++++++++++++++++++++++++ templates/.gitattributes | 1 + templates/.gitignore | 1 + templates/pkg_template.pkg | 23 ++++++++++++++ 4 files changed, 99 insertions(+) create mode 100644 README.s60-mkspec create mode 100644 templates/.gitattributes create mode 100644 templates/.gitignore create mode 100644 templates/pkg_template.pkg diff --git a/README.s60-mkspec b/README.s60-mkspec new file mode 100644 index 0000000..6bfe357 --- /dev/null +++ b/README.s60-mkspec @@ -0,0 +1,74 @@ +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/. The part about Wine setup I didn't + have to do, but Wine does need to be available. + +Compiling: + + 1. First a few environment variables need to be set: + + export RVCT22INC=<s60-root>/Epoc32/include + export RVCT22INC=$RVCT22INC,<s60-root>/Epoc32/include/rvct2_2 + export RVCT22INC=$RVCT22INC,<s60-root>/Epoc32/include/variant + export RVCT22INC=$RVCT22INC,<s60-root>/Epoc32/include/stdapis + export RVCT22INC=$RVCT22INC,<s60-root>/Epoc32/include/stdapis/stlport + export RVCT22LIB=<s60-root>/Epoc32/release/armv5/lib + export PATH=$PATH:<s60-root>/Epoc32/tools + 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 the host tools. This unfortunately does not happen + automatically. + + cd src/tools + for i in bootstrap moc rcc uic; do make -C $i; done + + 4. Compile QtCore.dll: + + cd ../corelib + qmake -platform symbian/linux-armcc + make + + and then wait for a while. + + 5. Compile some helloworld application (I leave the details to you + ;-) + + qmake -platform symbian/linux-armcc + make + + 6. Package and run on the phone. This is unfortunately a bit of a + manual step at the moment. Your best bet is to look at a Windows + build of the same application, and manually grab the .rsc files + that it refers to and put them in the application directory on + Linux. Then you can take the pkg_template.pkg file provided in + the repository and tweak it to include the files you want. Note + that due to limitations on how the makesis tool interprets file + paths, all the files included need to be in the current directory + (or a link from there). + + Assuming that all the files are in place, do this: + + cp <qt-root>/src/s60installs/selfsigned.* . + winewrapper makesis.exe MyApp.pkg MyApp_unsigned.sis + winewrapper signsis.exe MyApp_unsigned.sis MyApp.sis \ + selfsigned.cer selfsigned.key + + 7. Enjoy QObjects and "hello world" on the phone! 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..d931401 --- /dev/null +++ b/templates/pkg_template.pkg @@ -0,0 +1,23 @@ +; 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 +"MyApp.exe" - "!:\sys\bin\MyApp.exe" +"MyApp.rsc" - "!:\resource\apps\MyApp.rsc" +"QtCore.dll" - "!:\resource\apps\QtCore.dll" -- cgit v0.12 From 9f3ec4c09d11bddacfcc8e3aa8d4e459ff3c4931 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Wed, 28 Oct 2009 16:44:33 +0100 Subject: Updated the documentation about epoc32 paths. --- README.s60-mkspec | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/README.s60-mkspec b/README.s60-mkspec index 6bfe357..3f12013 100644 --- a/README.s60-mkspec +++ b/README.s60-mkspec @@ -14,33 +14,39 @@ Compiling: 1. First a few environment variables need to be set: - export RVCT22INC=<s60-root>/Epoc32/include - export RVCT22INC=$RVCT22INC,<s60-root>/Epoc32/include/rvct2_2 - export RVCT22INC=$RVCT22INC,<s60-root>/Epoc32/include/variant - export RVCT22INC=$RVCT22INC,<s60-root>/Epoc32/include/stdapis - export RVCT22INC=$RVCT22INC,<s60-root>/Epoc32/include/stdapis/stlport - export RVCT22LIB=<s60-root>/Epoc32/release/armv5/lib - export PATH=$PATH:<s60-root>/Epoc32/tools + export RVCT22INC=<s60-root>/epoc32/include + export RVCT22INC=$RVCT22INC,<s60-root>/epoc32/include/rvct2_2 + export RVCT22INC=$RVCT22INC,<s60-root>/epoc32/include/variant + export RVCT22INC=$RVCT22INC,<s60-root>/epoc32/include/stdapis + export RVCT22INC=$RVCT22INC,<s60-root>/epoc32/include/stdapis/stlport + export RVCT22LIB=<s60-root>/epoc32/release/armv5/lib + export PATH=$PATH:<s60-root>/epoc32/tools 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 + 2. Switch out a few variables in profiles. Open + mkspecs/symbian/linux-armcc/qmake.conf, search for + "FIXME/Epoc32" and switch out the FIXME part with your SDK + installation directory. You might have to switch the case of the + Epoc32 directory as well. + + 3. 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 the host tools. This unfortunately does not happen + 4. Compile the host tools. This unfortunately does not happen automatically. cd src/tools for i in bootstrap moc rcc uic; do make -C $i; done - 4. Compile QtCore.dll: + 5. Compile QtCore.dll: cd ../corelib qmake -platform symbian/linux-armcc @@ -48,13 +54,13 @@ Compiling: and then wait for a while. - 5. Compile some helloworld application (I leave the details to you + 6. Compile some helloworld application (I leave the details to you ;-) qmake -platform symbian/linux-armcc make - 6. Package and run on the phone. This is unfortunately a bit of a + 7. Package and run on the phone. This is unfortunately a bit of a manual step at the moment. Your best bet is to look at a Windows build of the same application, and manually grab the .rsc files that it refers to and put them in the application directory on @@ -71,4 +77,4 @@ Compiling: winewrapper signsis.exe MyApp_unsigned.sis MyApp.sis \ selfsigned.cer selfsigned.key - 7. Enjoy QObjects and "hello world" on the phone! + 8. Enjoy QObjects and "hello world" on the phone! -- cgit v0.12 From 351ba8b9ca4f0db176c9e3553d105be0ef35c844 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 30 Oct 2009 11:30:34 +0100 Subject: Added generation of Symbian resource files. They are specified in the SYMBIAN_RESOURCES variable. --- .../symbian/linux-armcc/features/default_post.prf | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/mkspecs/symbian/linux-armcc/features/default_post.prf b/mkspecs/symbian/linux-armcc/features/default_post.prf index c2b2c10..c570eba 100644 --- a/mkspecs/symbian/linux-armcc/features/default_post.prf +++ b/mkspecs/symbian/linux-armcc/features/default_post.prf @@ -45,3 +45,34 @@ contains(TEMPLATE, app) { QMAKE_LIBS += -leexe.lib\\(uc_exe_.o\\) } + +# 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, "/$", "") + +for(symbian_resource, SYMBIAN_RESOURCES) { + symbian_resource = $$basename(symbian_resource) + symbian_resource_clean = $$replace(symbian_resource, "\.rss$", ".rsc") + QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${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 -s$${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rpp \ + -o$${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rsc \ + -h$${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rsg \ + -i${QMAKE_FILE_NAME} +symbianresources.CONFIG = target_predeps no_link + +QMAKE_EXTRA_COMPILERS += symbianresources -- cgit v0.12 From 6448dcd057f6831606eb6a805540db228e2fac88 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 6 Nov 2009 16:46:53 +0100 Subject: Added a missing POSIX macro to the Symbian qplatformdefs.h. --- mkspecs/symbian/linux-armcc/qplatformdefs.h | 1 + 1 file changed, 1 insertion(+) diff --git a/mkspecs/symbian/linux-armcc/qplatformdefs.h b/mkspecs/symbian/linux-armcc/qplatformdefs.h index ebcd295..a96742a 100644 --- a/mkspecs/symbian/linux-armcc/qplatformdefs.h +++ b/mkspecs/symbian/linux-armcc/qplatformdefs.h @@ -120,6 +120,7 @@ #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 -- cgit v0.12 From f0de149de54d9c058722161bc3d66a89fc7cce53 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 13 Nov 2009 11:13:00 +0100 Subject: Added automatic mangling of LIBS to include vtable exports. --- .../symbian/linux-armcc/features/default_post.prf | 78 ------------------ mkspecs/symbian/linux-armcc/features/qt.prf | 96 ++++++++++++++++++++++ mkspecs/symbian/linux-armcc/platformlibs.conf | 1 + mkspecs/symbian/linux-armcc/qmake.conf | 3 +- 4 files changed, 98 insertions(+), 80 deletions(-) delete mode 100644 mkspecs/symbian/linux-armcc/features/default_post.prf create mode 100644 mkspecs/symbian/linux-armcc/features/qt.prf create mode 100644 mkspecs/symbian/linux-armcc/platformlibs.conf diff --git a/mkspecs/symbian/linux-armcc/features/default_post.prf b/mkspecs/symbian/linux-armcc/features/default_post.prf deleted file mode 100644 index c570eba..0000000 --- a/mkspecs/symbian/linux-armcc/features/default_post.prf +++ /dev/null @@ -1,78 +0,0 @@ -isEmpty(DESTDIR) { - DESTDIR = . -} - -contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { - exports.commands = winewrapper getexports.exe ${QMAKE_FILE_NAME} > ${OBJECTS_DIR}${QMAKE_FILE_BASE}.exports - exports.output = $$OBJECTS_DIR/${QMAKE_FILE_BASE}.exports - exports.input = OBJECTS - exports.variable_out = ORDINALMAP - exports.CONFIG = no_link - - deffile.input = ORDINALMAP - deffile.output = $$OBJECTS_DIR/$${TARGET}.def - deffile.commands = makedeffile $$OBJECTS_DIR/$${TARGET}.def ${QMAKE_FILE_NAME} - deffile.variable_out = DEFFILE - deffile.CONFIG = no_link combine - - expfile.input = DEFFILE - expfile.output = $$OBJECTS_DIR/$${TARGET}.exp - expfile.commands = makeexpfile ${QMAKE_FILE_NAME} $$OBJECTS_DIR/$${TARGET}.exp - expfile.variable_out = QMAKE_LIBS - expfile.CONFIG = target_predeps - - ordinalmap.input = DEFFILE - ordinalmap.output = $$DESTDIR/$${TARGET}.lib - ordinalmap.commands = makeordinalmap $$OBJECTS_DIR ${QMAKE_FILE_NAME} $${TARGET}.dll $$DESTDIR/$${TARGET}.lib - ordinalmap.variable_out = PRE_TARGETDEPS - - !isEmpty($$QMAKE_POST_LINK):QMAKE_POST_LINK += && - QMAKE_POST_LINK += $$QMAKE_MOVE $$DESTDIR/$${TARGET}.dll $$DESTDIR/$${TARGET}.sym - QMAKE_POST_LINK += && winewrapper elftran.exe -version 4.1536 -sid 0xe001b2dc -allow -nocall -heap 0x00020000 0x00800000 -stack 0x00014000 -unpaged -uid1 0x10000079 -uid2 0x1000008d -uid3 0xe001b2dc -fpu softvfp -capability None $${DESTDIR}/$${TARGET}.sym $${DESTDIR}/$${TARGET}.dll - QMAKE_DISTCLEAN += $${DESTDIR}/$${TARGET}.sym - - QMAKE_EXTRA_COMPILERS += exports - QMAKE_EXTRA_COMPILERS += deffile - QMAKE_EXTRA_COMPILERS += expfile - QMAKE_EXTRA_COMPILERS += ordinalmap - - QMAKE_LIBS += -ledllstub -ledll.lib\\(uc_dll_.o\\) -} - -contains(TEMPLATE, app) { - QMAKE_POST_LINK += winewrapper elftran.exe -version 10.0 -sid 0xe4d10fc9 -nocall -heap 0x00020000 0x00800000 -stack 0x00014000 -unpaged -uid1 0x1000007a -uid2 0x1000008d -uid3 0xe4d10fc9 -fpu softvfp -capability None $${DESTDIR}/$${TARGET} $${DESTDIR}/$${TARGET}.tran - QMAKE_DISTCLEAN += $${DESTDIR}/$${TARGET}.tran - - QMAKE_LIBS += -leexe.lib\\(uc_exe_.o\\) -} - -# 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, "/$", "") - -for(symbian_resource, SYMBIAN_RESOURCES) { - symbian_resource = $$basename(symbian_resource) - symbian_resource_clean = $$replace(symbian_resource, "\.rss$", ".rsc") - QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${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 -s$${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rpp \ - -o$${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rsc \ - -h$${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rsg \ - -i${QMAKE_FILE_NAME} -symbianresources.CONFIG = target_predeps no_link - -QMAKE_EXTRA_COMPILERS += symbianresources diff --git a/mkspecs/symbian/linux-armcc/features/qt.prf b/mkspecs/symbian/linux-armcc/features/qt.prf new file mode 100644 index 0000000..50c219d --- /dev/null +++ b/mkspecs/symbian/linux-armcc/features/qt.prf @@ -0,0 +1,96 @@ +load(qt) + +isEmpty(DESTDIR) { + DESTDIR = . +} + +for(libraries, LIBS) { + isLib = $$find(libraries, \.lib) + isEmpty(isLib) { + LIBS += $${libraries}.lib\\(VtblExports.o\\) + } +} +for(libraries, QMAKE_LIBS) { + isLib = $$find(libraries, \.lib) + isEmpty(isLib) { + QMAKE_LIBS += $${libraries}.lib\\(VtblExports.o\\) + } +} + +# This needs to be done after the above LIBS mangling. +include(../platformlibs.conf) + +contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { + exports.commands = winewrapper getexports.exe ${QMAKE_FILE_NAME} > ${OBJECTS_DIR}${QMAKE_FILE_BASE}.exports + exports.output = $$OBJECTS_DIR/${QMAKE_FILE_BASE}.exports + exports.input = OBJECTS + exports.variable_out = ORDINALMAP + exports.CONFIG = no_link + + deffile.input = ORDINALMAP + deffile.output = $$OBJECTS_DIR/$${TARGET}.def + deffile.commands = makedeffile $$OBJECTS_DIR/$${TARGET}.def ${QMAKE_FILE_NAME} + deffile.variable_out = DEFFILE + deffile.CONFIG = no_link combine + + expfile.input = DEFFILE + expfile.output = $$OBJECTS_DIR/$${TARGET}.exp + expfile.commands = makeexpfile ${QMAKE_FILE_NAME} $$OBJECTS_DIR/$${TARGET}.exp + expfile.variable_out = QMAKE_LIBS + expfile.CONFIG = target_predeps + + ordinalmap.input = DEFFILE + ordinalmap.output = $$DESTDIR/$${TARGET}.lib + ordinalmap.commands = makeordinalmap $$OBJECTS_DIR ${QMAKE_FILE_NAME} $${TARGET}.dll $$DESTDIR/$${TARGET}.lib + ordinalmap.variable_out = PRE_TARGETDEPS + + !isEmpty($$QMAKE_POST_LINK):QMAKE_POST_LINK += && + QMAKE_POST_LINK += $$QMAKE_MOVE $$DESTDIR/$${TARGET}.dll $$DESTDIR/$${TARGET}.sym + QMAKE_POST_LINK += && winewrapper elftran.exe -version 4.1536 -sid 0xe001b2dc -allow -nocall -heap 0x00020000 0x00800000 -stack 0x00014000 -unpaged -uid1 0x10000079 -uid2 0x1000008d -uid3 0xe001b2dc -fpu softvfp -capability None $${DESTDIR}/$${TARGET}.sym $${DESTDIR}/$${TARGET}.dll + QMAKE_DISTCLEAN += $${DESTDIR}/$${TARGET}.sym + + QMAKE_EXTRA_COMPILERS += exports + QMAKE_EXTRA_COMPILERS += deffile + QMAKE_EXTRA_COMPILERS += expfile + QMAKE_EXTRA_COMPILERS += ordinalmap + + QMAKE_LIBS += -ledllstub -ledll.lib\\(uc_dll_.o\\) +} + +contains(TEMPLATE, app) { + QMAKE_POST_LINK += winewrapper elftran.exe -version 10.0 -sid 0xe4d10fc9 -nocall -heap 0x00020000 0x00800000 -stack 0x00014000 -unpaged -uid1 0x1000007a -uid2 0x1000008d -uid3 0xe4d10fc9 -fpu softvfp -capability None $${DESTDIR}/$${TARGET} $${DESTDIR}/$${TARGET}.tran + QMAKE_DISTCLEAN += $${DESTDIR}/$${TARGET}.tran + + QMAKE_LIBS += -leexe.lib\\(uc_exe_.o\\) +} + +# 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, "/$", "") + +for(symbian_resource, SYMBIAN_RESOURCES) { + symbian_resource = $$basename(symbian_resource) + symbian_resource_clean = $$replace(symbian_resource, "\.rss$", ".rsc") + QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${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 -s$${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rpp \ + -o$${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rsc \ + -h$${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rsg \ + -i${QMAKE_FILE_NAME} +symbianresources.CONFIG = target_predeps no_link + +QMAKE_EXTRA_COMPILERS += symbianresources diff --git a/mkspecs/symbian/linux-armcc/platformlibs.conf b/mkspecs/symbian/linux-armcc/platformlibs.conf new file mode 100644 index 0000000..9ef31dc --- /dev/null +++ b/mkspecs/symbian/linux-armcc/platformlibs.conf @@ -0,0 +1 @@ +QMAKE_LIBS += -lusrt2_2 -ldfpaeabi -ldfprvct2_2.lib -ldrtaeabi -ldrtaeabi.lib\\(VtblExports.o\\) -lscppnwdl -ldrtrvct2_2 diff --git a/mkspecs/symbian/linux-armcc/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf index 577c4e2..8639367 100644 --- a/mkspecs/symbian/linux-armcc/qmake.conf +++ b/mkspecs/symbian/linux-armcc/qmake.conf @@ -39,7 +39,6 @@ DEFINES += __SYMBIAN32__ EKA2 __S60_50__ __S60_3X__ __SERIES60_3X__ INCLUDEPATH += $$[QT_INSTALL_PREFIX]/mkspecs/common/symbian/stl-off # ### FIXME Move these to proper locations. -QMAKE_LIBS += -llibc -llibm -leuser -llibdl -llibpthread -lefsrv -llibstdcpp -llibc.lib\\(VtblExports.o\\) -llibm.lib\\(VtblExports.o\\) -leuser.lib\\(VtblExports.o\\) -llibdl.lib\\(VtblExports.o\\) -llibpthread.lib\\(VtblExports.o\\) -lefsrv.lib\\(VtblExports.o\\) -llibstdcpp.lib\\(VtblExports.o\\) -QMAKE_LIBS += -lusrt2_2 -ldfpaeabi -ldfprvct2_2.lib -ldrtaeabi -ldrtaeabi.lib\\(VtblExports.o\\) -lscppnwdl -ldrtrvct2_2 +QMAKE_LIBS += -llibc -llibm -leuser -llibdl -llibpthread -lefsrv -llibstdcpp include(../../common/unix.conf) -- cgit v0.12 From af6ad82b04135a485b3efc88d654c8209db70673 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 13 Nov 2009 16:31:22 +0100 Subject: Some compile fixes. --- src/gui/dialogs/qerrormessage.cpp | 2 +- src/gui/painting/qwindowsurface_s60.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/dialogs/qerrormessage.cpp b/src/gui/dialogs/qerrormessage.cpp index 762936a..a50b2ca 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/painting/qwindowsurface_s60.cpp b/src/gui/painting/qwindowsurface_s60.cpp index 5244fea..4939d37 100644 --- a/src/gui/painting/qwindowsurface_s60.cpp +++ b/src/gui/painting/qwindowsurface_s60.cpp @@ -44,7 +44,7 @@ #include <QtGui/qpaintdevice.h> #include <private/qwidget_p.h> #include "qwindowsurface_s60_p.h" -#include "qpixmap_s60_p.h" +#include <private/qpixmap_s60_p.h> #include <private/qt_s60_p.h> #include "private/qdrawhelper_p.h" -- cgit v0.12 From 403a8b1d755b673178d203d5ec9bef64f37ac8d0 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 13 Nov 2009 16:31:49 +0100 Subject: Fixed compilation on S60 without keypad navigation. --- src/gui/kernel/qapplication_s60.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 4291bee..d23b071 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -1145,11 +1145,13 @@ void qt_init(QApplicationPrivate * /* priv */, int) S60->virtualMouseRequired = false; } +#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 -- cgit v0.12 From 8bb40eda987dfda3ad9da2400da6ce043a54fa9b Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 13 Nov 2009 16:32:40 +0100 Subject: Added Symbian resources for QtGui. --- src/gui/s60framework/s60framework.pri | 2 ++ 1 file changed, 2 insertions(+) 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 -- cgit v0.12 From 4b54e147943e3678ca86209ae81ce593a585405c Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 13 Nov 2009 16:45:16 +0100 Subject: Added UIDs to the resource generation to avoid warning. --- mkspecs/symbian/linux-armcc/features/qt.prf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mkspecs/symbian/linux-armcc/features/qt.prf b/mkspecs/symbian/linux-armcc/features/qt.prf index 50c219d..fc508bc 100644 --- a/mkspecs/symbian/linux-armcc/features/qt.prf +++ b/mkspecs/symbian/linux-armcc/features/qt.prf @@ -87,7 +87,8 @@ symbianresources.commands = cpp -nostdinc -undef \ $$symbian_resources_DEFINES \ ${QMAKE_FILE_NAME} \ -o $${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rpp \ - && rcomp -s$${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rpp \ + && rcomp -u -m045,046,047 \ + -s$${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rpp \ -o$${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rsc \ -h$${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rsg \ -i${QMAKE_FILE_NAME} -- cgit v0.12 From 08292ab6d8153ca380ce2a13b03f17049df46740 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 13 Nov 2009 16:30:12 +0100 Subject: Updated documentation to include Wine and Open C setup. --- README.s60-mkspec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.s60-mkspec b/README.s60-mkspec index 3f12013..5aa9f06 100644 --- a/README.s60-mkspec +++ b/README.s60-mkspec @@ -7,8 +7,13 @@ Prerequisites: yet. - A working GnuPoc environment. See this page for details: - http://www.martin.st/symbian/. The part about Wine setup I didn't - have to do, but Wine does need to be available. + http://www.martin.st/symbian/. Make sure you do the part about + Wine setup as well. + + - Anderson Lizardo's patches for GnuPoc. Look for the + qt_s60_gnupoc_v9.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: -- cgit v0.12 From c76fdeffce0e8d486e995b29772966382a3e077d Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 13 Nov 2009 16:50:29 +0100 Subject: Removed useless dependency. --- mkspecs/symbian/linux-armcc/features/qt.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/symbian/linux-armcc/features/qt.prf b/mkspecs/symbian/linux-armcc/features/qt.prf index fc508bc..acd56bf 100644 --- a/mkspecs/symbian/linux-armcc/features/qt.prf +++ b/mkspecs/symbian/linux-armcc/features/qt.prf @@ -92,6 +92,6 @@ symbianresources.commands = cpp -nostdinc -undef \ -o$${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rsc \ -h$${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rsg \ -i${QMAKE_FILE_NAME} -symbianresources.CONFIG = target_predeps no_link +symbianresources.CONFIG = no_link QMAKE_EXTRA_COMPILERS += symbianresources -- cgit v0.12 From d1e4778546148b4ac47ba7f8ab1cf06bc7dcd6a3 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 27 Nov 2009 10:07:25 +0100 Subject: Revert "Modify visibility test to support armcc as well." This reverts commit 1ca27669332b5e19284297b0bbc57700f59fed33. --- config.tests/unix/fvisibility.test | 19 +++++++------------ configure | 6 +----- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/config.tests/unix/fvisibility.test b/config.tests/unix/fvisibility.test index 2b26381..b2bcc07 100755 --- a/config.tests/unix/fvisibility.test +++ b/config.tests/unix/fvisibility.test @@ -2,27 +2,22 @@ FVISIBILITY_SUPPORT=no COMPILER=$1 -HIDESYMS=$2 -VERBOSE=$3 +VERBOSE=$2 RunCompileTest() { cat >>fvisibility.c << EOF -#if defined(__ARMCC__) || defined(__CC_ARM) -__declspec(dllexport) void blah(void); -#elif defined(__GNUC__) -# if __GNUC__ < 4 -# error "GCC3 with backported visibility patch is known to miscompile Qt" -# endif __attribute__((visibility("default"))) void blah(); -#else -# error "Visibility support requires GCC or RVCT" +#if !defined(__GNUC__) +# error "Visiblility support requires GCC" +#elif __GNUC__ < 4 +# error "GCC3 with backported visibility patch is known to miscompile Qt" #endif EOF if [ "$VERBOSE" = "yes" ] ; then - "$COMPILER" -c $HIDESYMS fvisibility.c && FVISIBILITY_SUPPORT=yes + "$COMPILER" -c -fvisibility=hidden fvisibility.c && FVISIBILITY_SUPPORT=yes else - "$COMPILER" -c $HIDESYMS fvisibility.c >/dev/null 2>&1 && FVISIBILITY_SUPPORT=yes + "$COMPILER" -c -fvisibility=hidden fvisibility.c >/dev/null 2>&1 && FVISIBILITY_SUPPORT=yes fi rm -f fvisibility.c fvisibility.o } diff --git a/configure b/configure index f3f371a..d607584 100755 --- a/configure +++ b/configure @@ -2907,10 +2907,6 @@ QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | TEST_COMPILER="$CC" [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER -QMAKE_CONF_HIDESYMS=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CFLAGS_HIDESYMS" | sed "s,.* *= *\(.*\)$,\1," | tail -1` -TEST_HIDESYMS=$QMAKE_CONF_HIDESYMS -[ -z "$TEST_HIDESYMS" ] && TEST_HIDESYMS="-fvisibility=hidden" - # auto-detect precompiled header support if [ "$CFG_PRECOMPILE" = "auto" ]; then if [ `echo "$CFG_MAC_ARCHS" | wc -w` -gt 1 ]; then @@ -2975,7 +2971,7 @@ fi # auto-detect -fvisibility support if [ "$CFG_REDUCE_EXPORTS" = "auto" ]; then - if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$TEST_HIDESYMS" "$OPT_VERBOSE"; then + if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then CFG_REDUCE_EXPORTS=no else CFG_REDUCE_EXPORTS=yes -- cgit v0.12 From ea7ea93c28fdde7f8d2701ac067d3c399fe799e0 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 27 Nov 2009 16:08:39 +0100 Subject: Switched to Symbian export rules when building. This was done by enabling the QT_DLL flag when configuring for Symbian. --- configure | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure b/configure index d607584..237d6df 100755 --- a/configure +++ b/configure @@ -6995,6 +6995,10 @@ fi 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 -- cgit v0.12 From 48eb6baa27b02987e0b81d2964de1d0f1f3890c4 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 27 Nov 2009 16:06:57 +0100 Subject: Added support for -s60 option to configure. This was required in order to enable the pieces of code inside QT_WS_S60. --- configure | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 237d6df..65356df 100755 --- a/configure +++ b/configure @@ -639,6 +639,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 @@ -914,7 +915,7 @@ while [ "$#" -gt 0 ]; do VAL=no ;; #Qt style yes options - -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-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|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-svg|-declarative|-webkit|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config) + -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-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|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-svg|-declarative|-webkit|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60) VAR=`echo $1 | sed "s,^-\(.*\),\1,"` VAL=yes ;; @@ -1616,6 +1617,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 @@ -3254,6 +3262,7 @@ Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir [-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)] @@ -3429,6 +3438,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. @@ -4490,6 +4502,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 @@ -6170,6 +6190,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" @@ -6942,6 +6966,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" @@ -7373,6 +7398,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}" -- cgit v0.12 From 1be557c71982c13796afbc30d01fc00203ee0ecb Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 27 Nov 2009 16:09:55 +0100 Subject: Disable the forced profile recursion on Qt's Symbian build system. This makes configure a lot faster. --- qmake/project.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qmake/project.cpp b/qmake/project.cpp index 035362d..f56180b 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -551,8 +551,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; } -- cgit v0.12 From f722cae67b412404d253b5794f638c271fb1eea8 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 11 Dec 2009 10:28:42 +0100 Subject: Switched to using ABIv2 format to generate Symbian binaries. This means using elf2e32 instead of elftran, and eliminates the need for generating exports manually. --- bin/makedeffile | 48 ------------------ bin/makeexpfile | 39 --------------- bin/makeordinalmap | 58 ---------------------- mkspecs/symbian/linux-armcc/features/qt.prf | 70 +++++++++++++-------------- mkspecs/symbian/linux-armcc/platformlibs.conf | 2 +- mkspecs/symbian/linux-armcc/qmake.conf | 4 +- qmake/generators/unix/unixmake.cpp | 6 +-- 7 files changed, 37 insertions(+), 190 deletions(-) delete mode 100755 bin/makedeffile delete mode 100755 bin/makeexpfile delete mode 100755 bin/makeordinalmap diff --git a/bin/makedeffile b/bin/makedeffile deleted file mode 100755 index e1534c4..0000000 --- a/bin/makedeffile +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/perl -w - -my $deffile = $ARGV[0]; - -shift @ARGV; - -sub uniqueify { - # String must be sorted beforehand. - my $c; - my $last = $_[0]; - for ($c = 1; $c < scalar(@_); $c++) { - if ($_[$c] eq $last) { - splice(@_, $c, 1); - $c--; - } else { - $last = $_[$c]; - } - } - - return @_; -} - -my @exports; - -foreach (@ARGV) { - my $file; - open($file, "< $_") or die("Could not open $_"); - while (<$file>) { - s/[\r\n]//g; - push (@exports, $_); - } - close($file); -} - -@exports = sort(@exports); - -@exports = uniqueify(@exports); - -open(HANDLE, "> $deffile"); -print (HANDLE "EXPORTS\n; NEW:\n"); -for (my $c = 0; $c < scalar(@exports); $c++) { - if ($exports[$c] =~ /[ ]*([^ ]+)(.*)/) { - print (HANDLE "\t$1 \@ " . ($c + 1) . " NONAME$2\n"); - } -} -print(HANDLE "\n"); -close(HANDLE); - diff --git a/bin/makeexpfile b/bin/makeexpfile deleted file mode 100755 index 521791d..0000000 --- a/bin/makeexpfile +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/perl -w - -my $deffile = $ARGV[0]; -my $target = $ARGV[1]; - -my @exports; -open (HANDLE, "< $deffile") or die ("Could not open $deffile"); -while (<HANDLE>) { - while (/(_Z[^ ]+)/xg) { - push (@exports, $1); - } -} -close(HANDLE); - -open(HANDLE, "> $target.s") or die("Could not open $target.s"); -print (HANDLE "\tEXPORT __DLL_Export_Table__\n\n"); -print (HANDLE "\tEXPORT |DLL##ExportTable|\n\n"); -print (HANDLE "\tEXPORT |DLL##ExportTableSize|\n\n"); -print (HANDLE "\tAREA ExportTable, CODE\n"); -print (HANDLE "__DLL_Export_Table__\n"); -print (HANDLE "\tBX lr\n"); -print (HANDLE "|DLL##ExportTableSize|\n"); -print (HANDLE "\tDCD " . scalar(@exports) . "\n"); -print (HANDLE "|DLL##ExportTable|\n"); -print (HANDLE "\tPRESERVE8\n\n"); -for (my $c = 0; $c < scalar(@exports); $c++) { - print (HANDLE "\tIMPORT $exports[$c]\n"); - print (HANDLE "\tDCD $exports[$c] ; \@ ". ($c + 1) . "\n"); -} -print (HANDLE "\n"); -print (HANDLE "\tAREA |.directive|, READONLY, NOALLOC\n"); -print (HANDLE "\tDCB \"#<SYMEDIT>#\\n\"\n"); -print (HANDLE "\tDCB \"EXPORT DLL##ExportTable\\n\"\n"); -print (HANDLE "\tDCB \"EXPORT DLL##ExportTableSize\\n\"\n"); -print (HANDLE "\tEND\n"); -close(HANDLE); - -my $result = system("armasm --apcs /inter -o $target $target.s"); -die("Could not execute armar") if ($result); diff --git a/bin/makeordinalmap b/bin/makeordinalmap deleted file mode 100755 index f81e1ee..0000000 --- a/bin/makeordinalmap +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/perl -w - -my $objects_dir = $ARGV[0]; -my $deffile = $ARGV[1]; -my $dllFile = $ARGV[2]; -my $target = $ARGV[3]; - -my @exports; -my @isData; -open (HANDLE, "< $deffile") or die ("Could not open $deffile"); -while (<HANDLE>) { - if (/([a-z0-9_]+)[ ]+\@/ixg) { - push (@exports, $1); - if (/\bDATA\b/x) { - push (@isData, 1); - } else { - push (@isData, 0); - } - } -} -close(HANDLE); - -my @ordinalfiles; -my $vtblExports; -open($vtblExports, "> $objects_dir/VtblExports.s") or die("Could not open $objects_dir/VtblExports.s"); -print($vtblExports "\tAREA |.directive|, NOALLOC, READONLY, ALIGN=2\n"); -print($vtblExports "\tDCB \"#\<SYMEDIT\>#\\n\"\n"); - -for (my $c = 1; $c < scalar(@exports) + 1; $c++) { - my $symbol = $exports[$c - 1]; - my $genstubs; - my $dllFileWithId = $dllFile; - $dllFileWithId =~ s/^(.*)(\.dll)$/$1\{00010000\}\[e001b2dc\]$2/x; - if ($isData[$c - 1]) { - printf ($vtblExports "\tDCB \"IMPORT #<DLL>$dllFileWithId#<\\\\DLL>%x AS $symbol \\n\"\n", $c); - } else { - open ($genstubs, "| winewrapper genstubs.exe") or die ("Could not execute genstubs"); - printf ($genstubs "$objects_dir/ordinal-$c.o $symbol #<DLL>$dllFileWithId#<\\DLL>%x\n", $c); - push (@ordinalfiles, "$objects_dir/ordinal-$c.o"); - close ($genstubs); - } -} - -print($vtblExports "\tEND\n"); -close($vtblExports); -my $result = system("armasm --apcs /inter -o $objects_dir/VtblExports.o $objects_dir/VtblExports.s"); -die("Could not execute armar") if ($result); - -my $via; -open ($via, "> $objects_dir/input.via") or die("Could not open $objects_dir/input.via"); -print ($via join("\n", @ordinalfiles)); -print ($via "\n$objects_dir/VtblExports.o\n"); -close($via); - -$result = system("armar --create $target --via $objects_dir/input.via"); -die("Could not execute armar") if ($result); - -exit 0 diff --git a/mkspecs/symbian/linux-armcc/features/qt.prf b/mkspecs/symbian/linux-armcc/features/qt.prf index acd56bf..efe7fbd 100644 --- a/mkspecs/symbian/linux-armcc/features/qt.prf +++ b/mkspecs/symbian/linux-armcc/features/qt.prf @@ -5,63 +5,59 @@ isEmpty(DESTDIR) { } for(libraries, LIBS) { - isLib = $$find(libraries, \.lib) - isEmpty(isLib) { - LIBS += $${libraries}.lib\\(VtblExports.o\\) + isFullName = $$find(libraries, \.) + isEmpty(isFullName) { + LIBS = $$replace(LIBS, "$$libraries", "$${libraries}.dso") } } for(libraries, QMAKE_LIBS) { - isLib = $$find(libraries, \.lib) - isEmpty(isLib) { - QMAKE_LIBS += $${libraries}.lib\\(VtblExports.o\\) + isFullName = $$find(libraries, \.) + isEmpty(isFullName) { + QMAKE_LIBS = $$replace(QMAKE_LIBS, "$$libraries", "$${libraries}.dso") } } # This needs to be done after the above LIBS mangling. include(../platformlibs.conf) -contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { - exports.commands = winewrapper getexports.exe ${QMAKE_FILE_NAME} > ${OBJECTS_DIR}${QMAKE_FILE_BASE}.exports - exports.output = $$OBJECTS_DIR/${QMAKE_FILE_BASE}.exports - exports.input = OBJECTS - exports.variable_out = ORDINALMAP - exports.CONFIG = no_link - - deffile.input = ORDINALMAP - deffile.output = $$OBJECTS_DIR/$${TARGET}.def - deffile.commands = makedeffile $$OBJECTS_DIR/$${TARGET}.def ${QMAKE_FILE_NAME} - deffile.variable_out = DEFFILE - deffile.CONFIG = no_link combine - - expfile.input = DEFFILE - expfile.output = $$OBJECTS_DIR/$${TARGET}.exp - expfile.commands = makeexpfile ${QMAKE_FILE_NAME} $$OBJECTS_DIR/$${TARGET}.exp - expfile.variable_out = QMAKE_LIBS - expfile.CONFIG = target_predeps - - ordinalmap.input = DEFFILE - ordinalmap.output = $$DESTDIR/$${TARGET}.lib - ordinalmap.commands = makeordinalmap $$OBJECTS_DIR ${QMAKE_FILE_NAME} $${TARGET}.dll $$DESTDIR/$${TARGET}.lib - ordinalmap.variable_out = PRE_TARGETDEPS +elf2e32_LIBPATH = +for(libPath, QMAKE_LIBDIR) { + elf2e32_LIBPATH += "--libpath=$$libPath" +} + +splitVersion = $$split(VERSION, ".") +intVersion = "00" +for(verNumber, splitVersion) { + # Poor man's printf + !contains(verNumber, "[0-9][0-9]"):intVersion = "$${intVersion}0" + intVersion = "$${intVersion}$${verNumber}" +} + +intUid3 = $$lower($$replace(TARGET.UID3, "^0x", "")) +contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { !isEmpty($$QMAKE_POST_LINK):QMAKE_POST_LINK += && QMAKE_POST_LINK += $$QMAKE_MOVE $$DESTDIR/$${TARGET}.dll $$DESTDIR/$${TARGET}.sym - QMAKE_POST_LINK += && winewrapper elftran.exe -version 4.1536 -sid 0xe001b2dc -allow -nocall -heap 0x00020000 0x00800000 -stack 0x00014000 -unpaged -uid1 0x10000079 -uid2 0x1000008d -uid3 0xe001b2dc -fpu softvfp -capability None $${DESTDIR}/$${TARGET}.sym $${DESTDIR}/$${TARGET}.dll + QMAKE_POST_LINK += && elf2e32 --version 4.1536 --sid 0xe001b2dc --uid1 0x10000079 --uid2 0x1000008d --uid3 0xe001b2dc --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --capability=None --fpu=softvfp --targettype=DLL --elfinput=$${DESTDIR}/$${TARGET}.sym --output=$${DESTDIR}/$${TARGET}.dll --dso=$$DESTDIR/$${TARGET}.dso --defoutput=$$OBJECTS_DIR/$${TARGET}.def --unfrozen --linkas=$${TARGET}\\{$${intVersion}\\}\\[$${intUid3}\\].dll --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged QMAKE_DISTCLEAN += $${DESTDIR}/$${TARGET}.sym + QMAKE_DISTCLEAN += $${DESTDIR}/$${TARGET}.dso + QMAKE_CLEAN += $${OBJECTS_DIR}/$${TARGET}.def - QMAKE_EXTRA_COMPILERS += exports - QMAKE_EXTRA_COMPILERS += deffile - QMAKE_EXTRA_COMPILERS += expfile - QMAKE_EXTRA_COMPILERS += ordinalmap + QMAKE_LIBS += -ledllstub.lib -ledll.lib\\(uc_dll_.o\\) - QMAKE_LIBS += -ledllstub -ledll.lib\\(uc_dll_.o\\) + QMAKE_LFLAGS += --symver_soname --soname $${TARGET}\\{$${intVersion}\\}\\[$${intUid3}\\].dll } contains(TEMPLATE, app) { - QMAKE_POST_LINK += winewrapper elftran.exe -version 10.0 -sid 0xe4d10fc9 -nocall -heap 0x00020000 0x00800000 -stack 0x00014000 -unpaged -uid1 0x1000007a -uid2 0x1000008d -uid3 0xe4d10fc9 -fpu softvfp -capability None $${DESTDIR}/$${TARGET} $${DESTDIR}/$${TARGET}.tran - QMAKE_DISTCLEAN += $${DESTDIR}/$${TARGET}.tran + !isEmpty($$QMAKE_POST_LINK):QMAKE_POST_LINK += && + + QMAKE_POST_LINK += $$QMAKE_MOVE $$DESTDIR/$${TARGET} $$DESTDIR/$${TARGET}.sym + QMAKE_POST_LINK += && elf2e32 --version 4.1536 --sid 0xe001b2dc --uid1 0x10000079 --uid2 0x1000008d --uid3 $$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --capability=None --fpu=softvfp --targettype=EXE --elfinput=$${DESTDIR}/$${TARGET}.sym --output=$${DESTDIR}/$${TARGET}.exe --unfrozen --linkas=$${TARGET}\\{$${intVersion}\\}\\[$${intUid3}\\].exe --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged + QMAKE_DISTCLEAN += $${DESTDIR}/$${TARGET}.exe QMAKE_LIBS += -leexe.lib\\(uc_exe_.o\\) + + QMAKE_LFLAGS += --symver_soname --soname $${TARGET}\\{$${intVersion}\\}\\[$${intUid3}\\].dll } # Symbian resource files diff --git a/mkspecs/symbian/linux-armcc/platformlibs.conf b/mkspecs/symbian/linux-armcc/platformlibs.conf index 9ef31dc..ac57790 100644 --- a/mkspecs/symbian/linux-armcc/platformlibs.conf +++ b/mkspecs/symbian/linux-armcc/platformlibs.conf @@ -1 +1 @@ -QMAKE_LIBS += -lusrt2_2 -ldfpaeabi -ldfprvct2_2.lib -ldrtaeabi -ldrtaeabi.lib\\(VtblExports.o\\) -lscppnwdl -ldrtrvct2_2 +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 index c28acb8..780ff29 100644 --- a/mkspecs/symbian/linux-armcc/qmake.conf +++ b/mkspecs/symbian/linux-armcc/qmake.conf @@ -26,9 +26,9 @@ QMAKE_DEL_DIR = rmdir QMAKE_CHK_DIR_EXISTS = test -d QMAKE_MKDIR = mkdir -p -QMAKE_CFLAGS += --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 --dllimport_runtime --gnu +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 --visibility_inlines_hidden QMAKE_CXXFLAGS += $$QMAKE_CFLAGS --no_parse_templates -QMAKE_LFLAGS += --diag_suppress 6331,6780 --shl --reloc --split --rw-base 0x400000 --noscanlib +QMAKE_LFLAGS += --diag_suppress 6331,6780 --bpabi --reloc --datacompressor=off --split --rw-base 0x400000 --dll --no_scanlib QMAKE_LFLAGS_APP += --entry _E32Startup QMAKE_LFLAGS_SHLIB += --entry _E32Dll diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index 62eee19..7c8e173 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -456,11 +456,7 @@ UnixMakefileGenerator::findLibraries() libdirs.append(f); } else if(opt.startsWith("-l")) { if (!project->isEmpty("QMAKE_SYMBIAN_SHLIB")) { - if (opt.indexOf(".lib") == -1) { - (*it) = opt.mid(2) + ".lib"; - } else { - (*it) = opt.mid(2); - } + (*it) = opt.mid(2); } else if (project->isActiveConfig("rvct_linker")) { (*it) = "lib" + opt.mid(2) + ".so"; } else { -- cgit v0.12 From 952952bea94a3eb7374c94d29736c3d6e233b71e Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 27 Nov 2009 16:14:58 +0100 Subject: Fixed a bug in the LIBS mangling on Symbian. Previously, if one entry appeared more than once it would receive several extensions. --- mkspecs/symbian/linux-armcc/features/qt.prf | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/mkspecs/symbian/linux-armcc/features/qt.prf b/mkspecs/symbian/linux-armcc/features/qt.prf index efe7fbd..ec7cbe0 100644 --- a/mkspecs/symbian/linux-armcc/features/qt.prf +++ b/mkspecs/symbian/linux-armcc/features/qt.prf @@ -7,15 +7,22 @@ isEmpty(DESTDIR) { for(libraries, LIBS) { isFullName = $$find(libraries, \.) isEmpty(isFullName) { - LIBS = $$replace(LIBS, "$$libraries", "$${libraries}.dso") + newLIBS += "$${libraries}.dso" + } else { + newLIBS += "$${libraries}" } } +LIBS = $$newLIBS +newLIBS = for(libraries, QMAKE_LIBS) { isFullName = $$find(libraries, \.) isEmpty(isFullName) { - QMAKE_LIBS = $$replace(QMAKE_LIBS, "$$libraries", "$${libraries}.dso") + newLIBS += "$${libraries}.dso" + } else { + newLIBS += "$${libraries}" } } +QMAKE_LIBS = $$newLIBS # This needs to be done after the above LIBS mangling. include(../platformlibs.conf) -- cgit v0.12 From 4e523a24410deab4cd6d9eb505244a138a2d12b0 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 27 Nov 2009 16:18:42 +0100 Subject: Fixed some bugs in the exe generation on Symbian. --- mkspecs/symbian/linux-armcc/features/qt.prf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkspecs/symbian/linux-armcc/features/qt.prf b/mkspecs/symbian/linux-armcc/features/qt.prf index ec7cbe0..e5d8893 100644 --- a/mkspecs/symbian/linux-armcc/features/qt.prf +++ b/mkspecs/symbian/linux-armcc/features/qt.prf @@ -59,12 +59,12 @@ contains(TEMPLATE, app) { !isEmpty($$QMAKE_POST_LINK):QMAKE_POST_LINK += && QMAKE_POST_LINK += $$QMAKE_MOVE $$DESTDIR/$${TARGET} $$DESTDIR/$${TARGET}.sym - QMAKE_POST_LINK += && elf2e32 --version 4.1536 --sid 0xe001b2dc --uid1 0x10000079 --uid2 0x1000008d --uid3 $$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --capability=None --fpu=softvfp --targettype=EXE --elfinput=$${DESTDIR}/$${TARGET}.sym --output=$${DESTDIR}/$${TARGET}.exe --unfrozen --linkas=$${TARGET}\\{$${intVersion}\\}\\[$${intUid3}\\].exe --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged + QMAKE_POST_LINK += && elf2e32 --version 4.1536 --sid 0xe001b2dc --uid1 0x1000007a --uid2 0x1000008d --uid3 $$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --capability=None --fpu=softvfp --targettype=EXE --elfinput=$${DESTDIR}/$${TARGET}.sym --output=$${DESTDIR}/$${TARGET}.exe --unfrozen --linkas=$${TARGET}\\{$${intVersion}\\}\\[$${intUid3}\\].exe --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged QMAKE_DISTCLEAN += $${DESTDIR}/$${TARGET}.exe QMAKE_LIBS += -leexe.lib\\(uc_exe_.o\\) - QMAKE_LFLAGS += --symver_soname --soname $${TARGET}\\{$${intVersion}\\}\\[$${intUid3}\\].dll + QMAKE_LFLAGS += --symver_soname --soname $${TARGET}\\{$${intVersion}\\}\\[$${intUid3}\\].exe } # Symbian resource files -- cgit v0.12 From 2409649053279db13f829c168dccbb6da98c866b Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 11 Dec 2009 11:36:06 +0100 Subject: Added the Qt tree to search paths. Conflicts: mkspecs/symbian/linux-armcc/qmake.conf --- mkspecs/symbian/linux-armcc/qmake.conf | 2 ++ mkspecs/symbian/linux-armcc/symbian.conf | 4 ++++ 2 files changed, 6 insertions(+) create mode 100644 mkspecs/symbian/linux-armcc/symbian.conf diff --git a/mkspecs/symbian/linux-armcc/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf index 780ff29..567bcf6 100644 --- a/mkspecs/symbian/linux-armcc/qmake.conf +++ b/mkspecs/symbian/linux-armcc/qmake.conf @@ -47,3 +47,5 @@ QMAKE_LIBS += -llibc -llibm -leuser -llibdl -llibpthread -lefsrv -llib include(../../common/unix.conf) QMAKE_PREFIX_SHLIB = + +include(symbian.conf) diff --git a/mkspecs/symbian/linux-armcc/symbian.conf b/mkspecs/symbian/linux-armcc/symbian.conf new file mode 100644 index 0000000..8b1dbea --- /dev/null +++ b/mkspecs/symbian/linux-armcc/symbian.conf @@ -0,0 +1,4 @@ +# ALL OF THIS SHOULD BE MOVED TO mkspecs/common. + +QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] +QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS] -- cgit v0.12 From 1e6d71f5560f651041a574d899979a770c1974c1 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 27 Nov 2009 16:20:05 +0100 Subject: Added support for QT_*_STATICLIB variables in qmake. This is so that Symbian can have custom prefixes and extensions. --- mkspecs/common/unix.conf | 2 ++ mkspecs/symbian/linux-armcc/qmake.conf | 7 ++++--- qmake/generators/unix/unixmake2.cpp | 16 ++++++++++------ 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/mkspecs/common/unix.conf b/mkspecs/common/unix.conf index 75e3b9f..c480ba4 100644 --- a/mkspecs/common/unix.conf +++ b/mkspecs/common/unix.conf @@ -10,3 +10,5 @@ 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/symbian/linux-armcc/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf index 567bcf6..97d3c2d 100644 --- a/mkspecs/symbian/linux-armcc/qmake.conf +++ b/mkspecs/symbian/linux-armcc/qmake.conf @@ -32,9 +32,6 @@ QMAKE_LFLAGS += --diag_suppress 6331,6780 --bpabi --reloc --datacompressor QMAKE_LFLAGS_APP += --entry _E32Startup QMAKE_LFLAGS_SHLIB += --entry _E32Dll -QMAKE_EXTENSION_SHLIB += dll -QMAKE_SYMBIAN_SHLIB = 1 - QT_ARCH = symbian DEFINES += __SYMBIAN32__ EKA2 __S60_50__ __S60_3X__ __SERIES60_3X__ __EPOC32__ __MARM__ __EABI__ __ARMCC__ __ARMcc_2__ __ARMCC_2_2__ __MARM_ARMV5__ __MARM_THUMB__ __MARM_INTERWORK__ __DLL__ _UNICODE __SUPPORT_CPP_EXCEPTIONS__ @@ -47,5 +44,9 @@ QMAKE_LIBS += -llibc -llibm -leuser -llibdl -llibpthread -lefsrv -llib include(../../common/unix.conf) QMAKE_PREFIX_SHLIB = +QMAKE_EXTENSION_SHLIB = dll +QMAKE_PREFIX_STATICLIB = +QMAKE_EXTENSION_STATICLIB = lib +QMAKE_SYMBIAN_SHLIB = 1 include(symbian.conf) diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 6a23708..5bfee16 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -334,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")) { @@ -873,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; } @@ -1006,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); @@ -1059,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") + "." + -- cgit v0.12 From 1a54594e26f1d078ae67ea34ce109d2b175a046c Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 27 Nov 2009 16:21:21 +0100 Subject: Fixed a scoping bug GUI. --- src/gui/widgets/widgets.pri | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 } -- cgit v0.12 From 8e6ce5c5bb337e525c5bc7e6c809f5891c0f09c9 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 27 Nov 2009 16:21:56 +0100 Subject: Increased section base address to avoid overlap at link time. --- mkspecs/symbian/linux-armcc/qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/symbian/linux-armcc/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf index 97d3c2d..8c70f5e 100644 --- a/mkspecs/symbian/linux-armcc/qmake.conf +++ b/mkspecs/symbian/linux-armcc/qmake.conf @@ -28,7 +28,7 @@ QMAKE_MKDIR = mkdir -p 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 --visibility_inlines_hidden QMAKE_CXXFLAGS += $$QMAKE_CFLAGS --no_parse_templates -QMAKE_LFLAGS += --diag_suppress 6331,6780 --bpabi --reloc --datacompressor=off --split --rw-base 0x400000 --dll --no_scanlib +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 -- cgit v0.12 From 206446d3020d77577d6d86d9313f4d40ebb29105 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 11 Dec 2009 11:49:56 +0100 Subject: Added some libraries. These should be moved later on. Conflicts: mkspecs/symbian/linux-armcc/qmake.conf --- mkspecs/symbian/linux-armcc/qmake.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mkspecs/symbian/linux-armcc/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf index 8c70f5e..be59baf 100644 --- a/mkspecs/symbian/linux-armcc/qmake.conf +++ b/mkspecs/symbian/linux-armcc/qmake.conf @@ -39,7 +39,9 @@ DEFINES += __SYMBIAN32__ EKA2 __S60_50__ __S60_3X__ __SERIES60_3X__ INCLUDEPATH += $$[QT_INSTALL_PREFIX]/mkspecs/common/symbian/stl-off # ### FIXME Move these to proper locations. -QMAKE_LIBS += -llibc -llibm -leuser -llibdl -llibpthread -lefsrv -llibstdcpp +QMAKE_LIBS += -llibc -llibm -leuser -llibdl -llibpthread -lefsrv -llibstdcpp -lplatformenv +QMAKE_LIBS_GUI += -lfbscli -lbitgdi -lhal -lgdi -lws32 -lapgrfx -lcone -leikcore -lmediaclientaudio -leikcoctl -leiksrv -lapparc +QMAKE_LIBS_S60 += -lavkon include(../../common/unix.conf) -- cgit v0.12 From 4f0dcc99a329796347e63bfa353c12694b6e1ff9 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 11 Dec 2009 12:08:25 +0100 Subject: Corrected instructions after dependence on armlib was introduced. --- README.s60-mkspec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.s60-mkspec b/README.s60-mkspec index 5aa9f06..cee4b2f 100644 --- a/README.s60-mkspec +++ b/README.s60-mkspec @@ -34,9 +34,10 @@ Compiling: 2. Switch out a few variables in profiles. Open mkspecs/symbian/linux-armcc/qmake.conf, search for - "FIXME/Epoc32" and switch out the FIXME part with your SDK + "FIXME" and switch out the FIXME part with your SDK installation directory. You might have to switch the case of the Epoc32 directory as well. + There may also be other FIXMEs. 3. Run configure. It needs a bit more switches than usual, so here's the full line: -- cgit v0.12 From 77f4173f191ac946af1cab50610ef99d8b03a618 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 11 Dec 2009 19:00:38 +0100 Subject: Fixed a lot of small bugs in the version and UID handling. This patch introduces a dependency on a Unix shell to parse the values. This naturally has to go away if we port to Windows later, but it's good enough for now. --- mkspecs/symbian/linux-armcc/features/qt.prf | 41 ++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/mkspecs/symbian/linux-armcc/features/qt.prf b/mkspecs/symbian/linux-armcc/features/qt.prf index e5d8893..348839a 100644 --- a/mkspecs/symbian/linux-armcc/features/qt.prf +++ b/mkspecs/symbian/linux-armcc/features/qt.prf @@ -32,39 +32,66 @@ for(libPath, QMAKE_LIBDIR) { elf2e32_LIBPATH += "--libpath=$$libPath" } +# 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, ".") -intVersion = "00" +# Default Symbian version if none is specified. +isEmpty(splitVersion):splitVersion = 10 +hexVersion = "00" +versionPart = 1 +versionPart1 = 10 +versionPart2 = 0 +versionPart3 = 0 for(verNumber, splitVersion) { # Poor man's printf - !contains(verNumber, "[0-9][0-9]"):intVersion = "$${intVersion}0" - intVersion = "$${intVersion}$${verNumber}" + hexVersion = $$hexVersion$$system("sh -c 'printf %02x $$verNumber'") + contains(versionPart, 3) { + versionPart3 = $$verNumber + versionPart = 4 + } + contains(versionPart, 2) { + versionPart2 = $$verNumber + versionPart = 3 + } + contains(versionPart, 1) { + versionPart1 = $$verNumber + versionPart = 2 + } } +!contains(hexVersion, "[0-9a-z]{8}"):hexVersion = "$${hexVersion}00" +!contains(hexVersion, "[0-9a-z]{8}"):hexVersion = "$${hexVersion}00" +decVersion = $$sprintf("%1.%2", $$versionPart1, $$system("sh -c 'echo \$[$$versionPart2 * 256 + $$versionPart3]'")) intUid3 = $$lower($$replace(TARGET.UID3, "^0x", "")) +isEmpty(TARGET.SID):TARGET.SID = $$TARGET.UID3 +isEmpty(TARGET.UID2):TARGET.UID2 = 0x00000000 contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { !isEmpty($$QMAKE_POST_LINK):QMAKE_POST_LINK += && QMAKE_POST_LINK += $$QMAKE_MOVE $$DESTDIR/$${TARGET}.dll $$DESTDIR/$${TARGET}.sym - QMAKE_POST_LINK += && elf2e32 --version 4.1536 --sid 0xe001b2dc --uid1 0x10000079 --uid2 0x1000008d --uid3 0xe001b2dc --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --capability=None --fpu=softvfp --targettype=DLL --elfinput=$${DESTDIR}/$${TARGET}.sym --output=$${DESTDIR}/$${TARGET}.dll --dso=$$DESTDIR/$${TARGET}.dso --defoutput=$$OBJECTS_DIR/$${TARGET}.def --unfrozen --linkas=$${TARGET}\\{$${intVersion}\\}\\[$${intUid3}\\].dll --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged + QMAKE_POST_LINK += && elf2e32 --version=$$decVersion --sid=$$TARGET.SID --uid1=0x10000079 --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --capability=None --fpu=softvfp --targettype=DLL --elfinput=$${DESTDIR}/$${TARGET}.sym --output=$${DESTDIR}/$${TARGET}.dll --dso=$$DESTDIR/$${TARGET}.dso --defoutput=$$OBJECTS_DIR/$${TARGET}.def --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged QMAKE_DISTCLEAN += $${DESTDIR}/$${TARGET}.sym QMAKE_DISTCLEAN += $${DESTDIR}/$${TARGET}.dso QMAKE_CLEAN += $${OBJECTS_DIR}/$${TARGET}.def QMAKE_LIBS += -ledllstub.lib -ledll.lib\\(uc_dll_.o\\) - QMAKE_LFLAGS += --symver_soname --soname $${TARGET}\\{$${intVersion}\\}\\[$${intUid3}\\].dll + QMAKE_LFLAGS += --symver_soname --soname $${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll } contains(TEMPLATE, app) { !isEmpty($$QMAKE_POST_LINK):QMAKE_POST_LINK += && QMAKE_POST_LINK += $$QMAKE_MOVE $$DESTDIR/$${TARGET} $$DESTDIR/$${TARGET}.sym - QMAKE_POST_LINK += && elf2e32 --version 4.1536 --sid 0xe001b2dc --uid1 0x1000007a --uid2 0x1000008d --uid3 $$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --capability=None --fpu=softvfp --targettype=EXE --elfinput=$${DESTDIR}/$${TARGET}.sym --output=$${DESTDIR}/$${TARGET}.exe --unfrozen --linkas=$${TARGET}\\{$${intVersion}\\}\\[$${intUid3}\\].exe --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged + QMAKE_POST_LINK += && elf2e32 --version $$decVersion --sid=$$TARGET.SID --uid1=0x1000007a --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --capability=None --fpu=softvfp --targettype=EXE --elfinput=$${DESTDIR}/$${TARGET}.sym --output=$${DESTDIR}/$${TARGET}.exe --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged QMAKE_DISTCLEAN += $${DESTDIR}/$${TARGET}.exe QMAKE_LIBS += -leexe.lib\\(uc_exe_.o\\) - QMAKE_LFLAGS += --symver_soname --soname $${TARGET}\\{$${intVersion}\\}\\[$${intUid3}\\].exe + QMAKE_LFLAGS += --symver_soname --soname $${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe } # Symbian resource files -- cgit v0.12 From 0ee77b86b383d741069e7e9d534c3be399173243 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 11 Dec 2009 19:20:27 +0100 Subject: Fixed Symbian resource creation. --- mkspecs/symbian/linux-armcc/features/qt.prf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mkspecs/symbian/linux-armcc/features/qt.prf b/mkspecs/symbian/linux-armcc/features/qt.prf index 348839a..83c4f30 100644 --- a/mkspecs/symbian/linux-armcc/features/qt.prf +++ b/mkspecs/symbian/linux-armcc/features/qt.prf @@ -101,6 +101,7 @@ 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) @@ -122,6 +123,7 @@ symbianresources.commands = cpp -nostdinc -undef \ -o$${symbian_resources_RCC_DIR}/${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 QMAKE_EXTRA_COMPILERS += symbianresources -- cgit v0.12 From c194e9b1df887c5106413bf5f9c8eba42cb9af05 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 11 Dec 2009 20:09:22 +0100 Subject: Disabled Qt3Support on Symbian. --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 65356df..6be7072 100755 --- a/configure +++ b/configure @@ -5959,9 +5959,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 -- cgit v0.12 From bcf5564eccd7bc7591894561cdfc5eee7e77ba57 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 11 Dec 2009 20:10:39 +0100 Subject: Disabled OpenGL on Symbian. --- configure | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/configure b/configure index 6be7072..06a60d0 100755 --- a/configure +++ b/configure @@ -6015,6 +6015,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" -- cgit v0.12 From 2a4efd12c8498cf8a23fc9d3c2d6283a65a5890e Mon Sep 17 00:00:00 2001 From: Friedemann Kleint <Friedemann.Kleint@nokia.com> Date: Mon, 11 Jan 2010 16:19:54 +0100 Subject: configure/S60: Make work on Linux 64bit. Acked-by: axis --- configure | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configure b/configure index cf8564e..bb0d11a 100755 --- a/configure +++ b/configure @@ -4522,7 +4522,7 @@ if [ "$CFG_ZLIB" = "auto" ]; then fi if [ "$CFG_S60" = "auto" ]; then - if echo "$XQMAKESPEC" | grep symbian >& /dev/null; then + if echo "$XQMAKESPEC" | grep symbian > /dev/null; then CFG_S60=yes else CFG_S60=no @@ -7052,7 +7052,8 @@ 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 +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" -- cgit v0.12 From 3e940b87578b2b324f8d13cf0980f4762ad3ca7b Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 12 Jan 2010 15:50:06 +0100 Subject: Made sure that Symbian picks up STL. --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index cf8564e..4bd7f8d 100755 --- a/configure +++ b/configure @@ -5620,7 +5620,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 -- cgit v0.12 From a2cdb14a9aa1ab5957b179484d4f77441c6f3e8d Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 12 Jan 2010 15:56:31 +0100 Subject: Reorganized the Symbian build system profiles. Now we try share as much as possible between the different Symbian build systems, so that changes made to the MMP systems will also work in the makefile based one. --- mkspecs/common/symbian/symbian-makefile.conf | 32 +++ mkspecs/common/symbian/symbian-mmp.conf | 50 +++++ mkspecs/common/symbian/symbian.conf | 98 +++------- mkspecs/features/symbian/debug.prf | 1 + mkspecs/features/symbian/platform_paths.prf | 217 +++++++++++---------- mkspecs/features/symbian/release.prf | 1 + mkspecs/symbian-abld/qmake.conf | 2 +- mkspecs/symbian-sbsv2/qmake.conf | 2 +- .../symbian/linux-armcc/features/default_post.prf | 5 + mkspecs/symbian/linux-armcc/features/qt.prf | 131 +------------ .../linux-armcc/features/symbian_building.prf | 132 +++++++++++++ mkspecs/symbian/linux-armcc/qmake.conf | 49 +---- mkspecs/symbian/linux-armcc/symbian.conf | 4 - 13 files changed, 364 insertions(+), 360 deletions(-) create mode 100644 mkspecs/common/symbian/symbian-makefile.conf create mode 100644 mkspecs/common/symbian/symbian-mmp.conf create mode 100644 mkspecs/features/symbian/debug.prf create mode 100644 mkspecs/features/symbian/release.prf create mode 100644 mkspecs/symbian/linux-armcc/features/default_post.prf create mode 100644 mkspecs/symbian/linux-armcc/features/symbian_building.prf delete mode 100644 mkspecs/symbian/linux-armcc/symbian.conf diff --git a/mkspecs/common/symbian/symbian-makefile.conf b/mkspecs/common/symbian/symbian-makefile.conf new file mode 100644 index 0000000..bf4f43c --- /dev/null +++ b/mkspecs/common/symbian/symbian-makefile.conf @@ -0,0 +1,32 @@ +# +# qmake configuration for makefile based symbian +# + +MAKEFILE_GENERATOR = 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 + +DEFINES += __SYMBIAN32__ EKA2 __S60_50__ __S60_3X__ __SERIES60_3X__ __EPOC32__ __MARM__ __EABI__ __ARMCC__ __ARMcc_2__ __ARMCC_2_2__ __MARM_ARMV5__ __MARM_THUMB__ __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..3a22647 --- /dev/null +++ b/mkspecs/common/symbian/symbian-mmp.conf @@ -0,0 +1,50 @@ +# +# qmake configuration for symbian-* +# + +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 + +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 + } +} diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index 0f06b92..c05bd3d 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 @@ -45,12 +43,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 = @@ -75,75 +67,33 @@ QMAKE_LIBS_QT_ENTRY = -llibcrt0.lib QMAKE_LIBS_S60 = -lavkon !isEmpty(QMAKE_SH) { - 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 + 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 } -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 +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(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 - } -} 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/platform_paths.prf b/mkspecs/features/symbian/platform_paths.prf index bec9811..e06ffd4 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 # --------------------------------------- @@ -235,19 +241,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: @@ -263,10 +269,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) } # --------------------------------------- @@ -274,10 +280,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) } # --------------------------------------- @@ -285,10 +291,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) } # --------------------------------------- @@ -296,10 +302,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) } # --------------------------------------- @@ -307,11 +313,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) } # --------------------------------------- @@ -319,10 +325,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) } # --------------------------------------- @@ -349,20 +355,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 @@ -370,16 +376,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 @@ -387,12 +393,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 @@ -401,9 +407,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 # --------------------------------------- @@ -413,38 +419,38 @@ 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 exists($${EPOCROOT}epoc32/include/osextensions/stdapis/stlportv5)|exists($${EPOCROOT}epoc32/include/stdapis/stlportv5) { OS_LAYER_STDCPP_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlportv5) \ - /epoc32/include/stdapis/stlportv5 + $${epocroot_prefix}epoc32/include/stdapis/stlportv5 } else { 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 @@ -452,19 +458,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: @@ -476,5 +482,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/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/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 index 83c4f30..04371f9 100644 --- a/mkspecs/symbian/linux-armcc/features/qt.prf +++ b/mkspecs/symbian/linux-armcc/features/qt.prf @@ -1,129 +1,8 @@ -load(qt) - -isEmpty(DESTDIR) { - DESTDIR = . -} - -for(libraries, LIBS) { - isFullName = $$find(libraries, \.) - isEmpty(isFullName) { - newLIBS += "$${libraries}.dso" - } else { - newLIBS += "$${libraries}" - } -} -LIBS = $$newLIBS -newLIBS = -for(libraries, QMAKE_LIBS) { - 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" -} - -# 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, ".") -# Default Symbian version if none is specified. -isEmpty(splitVersion):splitVersion = 10 -hexVersion = "00" -versionPart = 1 -versionPart1 = 10 -versionPart2 = 0 -versionPart3 = 0 -for(verNumber, splitVersion) { - # Poor man's printf - hexVersion = $$hexVersion$$system("sh -c 'printf %02x $$verNumber'") - contains(versionPart, 3) { - versionPart3 = $$verNumber - versionPart = 4 - } - contains(versionPart, 2) { - versionPart2 = $$verNumber - versionPart = 3 - } - contains(versionPart, 1) { - versionPart1 = $$verNumber - versionPart = 2 - } -} -!contains(hexVersion, "[0-9a-z]{8}"):hexVersion = "$${hexVersion}00" -!contains(hexVersion, "[0-9a-z]{8}"):hexVersion = "$${hexVersion}00" -decVersion = $$sprintf("%1.%2", $$versionPart1, $$system("sh -c 'echo \$[$$versionPart2 * 256 + $$versionPart3]'")) - -intUid3 = $$lower($$replace(TARGET.UID3, "^0x", "")) -isEmpty(TARGET.SID):TARGET.SID = $$TARGET.UID3 -isEmpty(TARGET.UID2):TARGET.UID2 = 0x00000000 - -contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { - !isEmpty($$QMAKE_POST_LINK):QMAKE_POST_LINK += && - QMAKE_POST_LINK += $$QMAKE_MOVE $$DESTDIR/$${TARGET}.dll $$DESTDIR/$${TARGET}.sym - QMAKE_POST_LINK += && elf2e32 --version=$$decVersion --sid=$$TARGET.SID --uid1=0x10000079 --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --capability=None --fpu=softvfp --targettype=DLL --elfinput=$${DESTDIR}/$${TARGET}.sym --output=$${DESTDIR}/$${TARGET}.dll --dso=$$DESTDIR/$${TARGET}.dso --defoutput=$$OBJECTS_DIR/$${TARGET}.def --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged - QMAKE_DISTCLEAN += $${DESTDIR}/$${TARGET}.sym - QMAKE_DISTCLEAN += $${DESTDIR}/$${TARGET}.dso - QMAKE_CLEAN += $${OBJECTS_DIR}/$${TARGET}.def +QMAKE_LIBDIR_QT += $${EPOCROOT}epoc32/release/armv5/lib +QMAKE_LIBDIR_QT *= $$(RVCT22LIB) - QMAKE_LIBS += -ledllstub.lib -ledll.lib\\(uc_dll_.o\\) +INCLUDEPATH *= $${EPOCROOT}epoc32/include $${EPOCROOT}epoc32/include/rvct2_2 $${EPOCROOT}epoc32/include/variant $${EPOCROOT}epoc32/include/stdapis $${EPOCROOT}epoc32/include/stdapis/stlport - QMAKE_LFLAGS += --symver_soname --soname $${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll -} +DEFINES *= __PRODUCT_INCLUDE__=$${EPOCROOT}epoc32/include/variant/symbian_os.hrh -contains(TEMPLATE, app) { - !isEmpty($$QMAKE_POST_LINK):QMAKE_POST_LINK += && - - QMAKE_POST_LINK += $$QMAKE_MOVE $$DESTDIR/$${TARGET} $$DESTDIR/$${TARGET}.sym - QMAKE_POST_LINK += && elf2e32 --version $$decVersion --sid=$$TARGET.SID --uid1=0x1000007a --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --capability=None --fpu=softvfp --targettype=EXE --elfinput=$${DESTDIR}/$${TARGET}.sym --output=$${DESTDIR}/$${TARGET}.exe --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged - QMAKE_DISTCLEAN += $${DESTDIR}/$${TARGET}.exe - - 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_CLEAN += $${symbian_resources_RCC_DIR}/$${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$${symbian_resources_RCC_DIR}/${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 - -QMAKE_EXTRA_COMPILERS += symbianresources +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..8a0d121 --- /dev/null +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -0,0 +1,132 @@ +QMAKE_CFLAGS += $$QMAKE_CFLAGS.ARMCC +QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS.ARMCC + +isEmpty(DESTDIR) { + DESTDIR = . +} + +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" +} + +# 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, ".") +# Default Symbian version if none is specified. +isEmpty(splitVersion):splitVersion = 10 +hexVersion = "00" +versionPart = 1 +versionPart1 = 10 +versionPart2 = 0 +versionPart3 = 0 +for(verNumber, splitVersion) { + # Poor man's printf + hexVersion = $$hexVersion$$system("sh -c 'printf %02x $$verNumber'") + contains(versionPart, 3) { + versionPart3 = $$verNumber + versionPart = 4 + } + contains(versionPart, 2) { + versionPart2 = $$verNumber + versionPart = 3 + } + contains(versionPart, 1) { + versionPart1 = $$verNumber + versionPart = 2 + } +} +!contains(hexVersion, "[0-9a-z]{8}"):hexVersion = "$${hexVersion}00" +!contains(hexVersion, "[0-9a-z]{8}"):hexVersion = "$${hexVersion}00" +decVersion = $$sprintf("%1.%2", $$versionPart1, $$system("sh -c 'echo \$[$$versionPart2 * 256 + $$versionPart3]'")) + +intUid3 = $$lower($$replace(TARGET.UID3, "^0x", "")) +isEmpty(TARGET.SID):TARGET.SID = $$TARGET.UID3 +isEmpty(TARGET.UID2):TARGET.UID2 = 0x00000000 + +contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { + !isEmpty($$QMAKE_POST_LINK):QMAKE_POST_LINK += && + QMAKE_POST_LINK += $$QMAKE_MOVE $$DESTDIR/$${TARGET}.dll $$DESTDIR/$${TARGET}.sym + QMAKE_POST_LINK += && elf2e32 --version=$$decVersion --sid=$$TARGET.SID --uid1=0x10000079 --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --capability=None --fpu=softvfp --targettype=DLL --elfinput=$${DESTDIR}/$${TARGET}.sym --output=$${DESTDIR}/$${TARGET}.dll --dso=$$DESTDIR/$${TARGET}.dso --defoutput=$$OBJECTS_DIR/$${TARGET}.def --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged + QMAKE_DISTCLEAN += $${DESTDIR}/$${TARGET}.sym + QMAKE_DISTCLEAN += $${DESTDIR}/$${TARGET}.dso + QMAKE_CLEAN += $${OBJECTS_DIR}/$${TARGET}.def + + QMAKE_LIBS += -ledllstub.lib -ledll.lib\\(uc_dll_.o\\) + + QMAKE_LFLAGS += --symver_soname --soname $${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll +} + +contains(TEMPLATE, app) { + !isEmpty($$QMAKE_POST_LINK):QMAKE_POST_LINK += && + + QMAKE_POST_LINK += $$QMAKE_MOVE $$DESTDIR/$${TARGET} $$DESTDIR/$${TARGET}.sym + QMAKE_POST_LINK += && elf2e32 --version $$decVersion --sid=$$TARGET.SID --uid1=0x1000007a --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --capability=None --fpu=softvfp --targettype=EXE --elfinput=$${DESTDIR}/$${TARGET}.sym --output=$${DESTDIR}/$${TARGET}.exe --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged + QMAKE_DISTCLEAN += $${DESTDIR}/$${TARGET}.exe + + 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_CLEAN += $${symbian_resources_RCC_DIR}/$${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$${symbian_resources_RCC_DIR}/${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 + +QMAKE_EXTRA_COMPILERS += symbianresources diff --git a/mkspecs/symbian/linux-armcc/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf index be59baf..c98c1f0 100644 --- a/mkspecs/symbian/linux-armcc/qmake.conf +++ b/mkspecs/symbian/linux-armcc/qmake.conf @@ -2,53 +2,6 @@ # qmake configuration for symbian/linux-armcc # -MAKEFILE_GENERATOR = UNIX -TEMPLATE = app -CONFIG += qt warn_on release incremental link_prl rvct_linker -QT += core gui -QMAKE_INCREMENTAL_STYLE = sublib +include(../../common/symbian/symbian-makefile.conf) include(../../common/armcc.conf) -load(qt_config) - -QMAKE_MOC = $$[QT_INSTALL_BINS]/moc -QMAKE_UIC = $$[QT_INSTALL_BINS]/uic - -QMAKE_TAR = tar -cf -QMAKE_GZIP = gzip -9f - -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 - -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 --visibility_inlines_hidden -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 - -QT_ARCH = symbian - -DEFINES += __SYMBIAN32__ EKA2 __S60_50__ __S60_3X__ __SERIES60_3X__ __EPOC32__ __MARM__ __EABI__ __ARMCC__ __ARMcc_2__ __ARMCC_2_2__ __MARM_ARMV5__ __MARM_THUMB__ __MARM_INTERWORK__ __DLL__ _UNICODE __SUPPORT_CPP_EXCEPTIONS__ - -INCLUDEPATH += $$[QT_INSTALL_PREFIX]/mkspecs/common/symbian/stl-off - -# ### FIXME Move these to proper locations. -QMAKE_LIBS += -llibc -llibm -leuser -llibdl -llibpthread -lefsrv -llibstdcpp -lplatformenv -QMAKE_LIBS_GUI += -lfbscli -lbitgdi -lhal -lgdi -lws32 -lapgrfx -lcone -leikcore -lmediaclientaudio -leikcoctl -leiksrv -lapparc -QMAKE_LIBS_S60 += -lavkon - -include(../../common/unix.conf) - -QMAKE_PREFIX_SHLIB = -QMAKE_EXTENSION_SHLIB = dll -QMAKE_PREFIX_STATICLIB = -QMAKE_EXTENSION_STATICLIB = lib -QMAKE_SYMBIAN_SHLIB = 1 - -include(symbian.conf) diff --git a/mkspecs/symbian/linux-armcc/symbian.conf b/mkspecs/symbian/linux-armcc/symbian.conf deleted file mode 100644 index 8b1dbea..0000000 --- a/mkspecs/symbian/linux-armcc/symbian.conf +++ /dev/null @@ -1,4 +0,0 @@ -# ALL OF THIS SHOULD BE MOVED TO mkspecs/common. - -QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] -QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS] -- cgit v0.12 From 8383e6ccab52098c2aa184cdf672f92579cde0f7 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 12 Jan 2010 16:05:24 +0100 Subject: Corrected incorrect case. --- src/gui/widgets/qabstractspinbox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widgets/qabstractspinbox.cpp b/src/gui/widgets/qabstractspinbox.cpp index c036c32..513fe4f 100644 --- a/src/gui/widgets/qabstractspinbox.cpp +++ b/src/gui/widgets/qabstractspinbox.cpp @@ -66,7 +66,7 @@ #endif #if defined(Q_OS_SYMBIAN) -#include <W32STD.H> +#include <w32std.h> #include <private/qt_s60_p.h> #endif -- cgit v0.12 From 87709391a71173b1faa70b9ee379132b7ae0e279 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 12 Jan 2010 16:06:12 +0100 Subject: Fixed Symbian detection in profile. --- src/plugins/imageformats/tiff/tiff.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 } } -- cgit v0.12 From 7b2a79e3e933d7decdcbaf9e695294906398279d Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Thu, 14 Jan 2010 11:41:11 +0100 Subject: Removed some build instructions that were no longer needed. --- README.s60-mkspec | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/README.s60-mkspec b/README.s60-mkspec index cee4b2f..dec8a9b 100644 --- a/README.s60-mkspec +++ b/README.s60-mkspec @@ -19,12 +19,8 @@ Compiling: 1. First a few environment variables need to be set: - export RVCT22INC=<s60-root>/epoc32/include - export RVCT22INC=$RVCT22INC,<s60-root>/epoc32/include/rvct2_2 - export RVCT22INC=$RVCT22INC,<s60-root>/epoc32/include/variant - export RVCT22INC=$RVCT22INC,<s60-root>/epoc32/include/stdapis - export RVCT22INC=$RVCT22INC,<s60-root>/epoc32/include/stdapis/stlport - export RVCT22LIB=<s60-root>/epoc32/release/armv5/lib + export RVCT22LIB=<rvct-dir>/lib/armlib + export EPOCROOT=<s60-root> export PATH=$PATH:<s60-root>/epoc32/tools export PATH=$PATH:<qt-root>/bin @@ -32,27 +28,20 @@ Compiling: and the qt-root with the root of your Qt repository. These are good candidates for putting in a script somewhere. - 2. Switch out a few variables in profiles. Open - mkspecs/symbian/linux-armcc/qmake.conf, search for - "FIXME" and switch out the FIXME part with your SDK - installation directory. You might have to switch the case of the - Epoc32 directory as well. - There may also be other FIXMEs. - - 3. Run configure. It needs a bit more switches than usual, so here's + 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 - 4. Compile the host tools. This unfortunately does not happen + 3. Compile the host tools. This unfortunately does not happen automatically. cd src/tools for i in bootstrap moc rcc uic; do make -C $i; done - 5. Compile QtCore.dll: + 4. Compile QtCore.dll: cd ../corelib qmake -platform symbian/linux-armcc @@ -60,13 +49,13 @@ Compiling: and then wait for a while. - 6. Compile some helloworld application (I leave the details to you + 5. Compile some helloworld application (I leave the details to you ;-) qmake -platform symbian/linux-armcc make - 7. Package and run on the phone. This is unfortunately a bit of a + 6. Package and run on the phone. This is unfortunately a bit of a manual step at the moment. Your best bet is to look at a Windows build of the same application, and manually grab the .rsc files that it refers to and put them in the application directory on @@ -83,4 +72,4 @@ Compiling: winewrapper signsis.exe MyApp_unsigned.sis MyApp.sis \ selfsigned.cer selfsigned.key - 8. Enjoy QObjects and "hello world" on the phone! + 7. Enjoy QObjects and "hello world" on the phone! -- cgit v0.12 From aeacc35349165e9fd614455288f5e7f4e7f71b08 Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Wed, 13 Jan 2010 11:14:23 +0100 Subject: Updates in docs Signed-off-by: axis <qt-info@nokia.com> --- README.s60-mkspec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.s60-mkspec b/README.s60-mkspec index dec8a9b..9e0db89 100644 --- a/README.s60-mkspec +++ b/README.s60-mkspec @@ -7,11 +7,14 @@ Prerequisites: yet. - A working GnuPoc environment. See this page for details: - http://www.martin.st/symbian/. Make sure you do the part about - Wine setup as well. + 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_v9.patch on this page: + 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. -- cgit v0.12 From 1c668ede4f1b629cab2ca907df6d33d655df3b83 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Thu, 14 Jan 2010 14:22:40 +0100 Subject: Modified pkg template to be a bit more realistic. --- templates/pkg_template.pkg | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/pkg_template.pkg b/templates/pkg_template.pkg index d931401..5a076b0 100644 --- a/templates/pkg_template.pkg +++ b/templates/pkg_template.pkg @@ -19,5 +19,7 @@ ; Executable and default resource files "MyApp.exe" - "!:\sys\bin\MyApp.exe" +"QtCore.dll" - "!:\sys\bin\QtCore.dll" +"QtGui.dll" - "!:\sys\bin\QtGui.dll" +; Currently you need to get this from a Windows build. "MyApp.rsc" - "!:\resource\apps\MyApp.rsc" -"QtCore.dll" - "!:\resource\apps\QtCore.dll" -- cgit v0.12 From 6ee2b1dd38fe64796036a01b42f382d87fcfe5de Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Thu, 14 Jan 2010 14:58:22 +0100 Subject: Fixed makefile generation for Symbian. This enables fast makefiles as well as intermodule dependencies. This hasn't been tested with the other Symbian build systems. It's quite possible that they will break because of this, but we will handle that at a later time. --- configure | 1 - src/src.pro | 8 +++++--- src/tools/tools.pro | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 21ccefe..abab9a1 100755 --- a/configure +++ b/configure @@ -7753,7 +7753,6 @@ for file in .projects .projects.3; do case $a in *winmain/winmain.pro) continue ;; - *s60main/s60main.pro) continue ;; *examples/activeqt/*) continue ;; */qmake/qmake.pro) continue ;; *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*linguist/lrelease*) SPEC=$QMAKESPEC ;; diff --git a/src/src.pro b/src/src.pro index 8dec49b..92101d6 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 @@ -117,7 +120,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 @@ -164,6 +167,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/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 -- cgit v0.12 From d66b5c6579d79625da655c2fe3c134309b40fe6e Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 19 Jan 2010 15:23:58 +0100 Subject: Added some stub rsc files as templates. All apps will show up as wiggly at the moment, but it's just to get things running. --- templates/pkg_template.pkg | 3 ++- templates/wiggly.rsc | Bin 0 -> 93 bytes templates/wiggly_reg.rsc | Bin 0 -> 103 bytes 3 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 templates/wiggly.rsc create mode 100644 templates/wiggly_reg.rsc diff --git a/templates/pkg_template.pkg b/templates/pkg_template.pkg index 5a076b0..1dbd40b 100644 --- a/templates/pkg_template.pkg +++ b/templates/pkg_template.pkg @@ -22,4 +22,5 @@ "QtCore.dll" - "!:\sys\bin\QtCore.dll" "QtGui.dll" - "!:\sys\bin\QtGui.dll" ; Currently you need to get this from a Windows build. -"MyApp.rsc" - "!:\resource\apps\MyApp.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 Binary files /dev/null and b/templates/wiggly.rsc differ diff --git a/templates/wiggly_reg.rsc b/templates/wiggly_reg.rsc new file mode 100644 index 0000000..6f52a2c Binary files /dev/null and b/templates/wiggly_reg.rsc differ -- cgit v0.12 From 8aa93a61de0db9bbcfe8ed10c075af50673de78a Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 19 Jan 2010 15:30:00 +0100 Subject: Updated comments in the templates. --- templates/pkg_template.pkg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/pkg_template.pkg b/templates/pkg_template.pkg index 1dbd40b..5d98347 100644 --- a/templates/pkg_template.pkg +++ b/templates/pkg_template.pkg @@ -21,6 +21,7 @@ "MyApp.exe" - "!:\sys\bin\MyApp.exe" "QtCore.dll" - "!:\sys\bin\QtCore.dll" "QtGui.dll" - "!:\sys\bin\QtGui.dll" -; Currently you need to get this from a Windows build. +; Currently you need to get this from a Windows build, but there are some +; precompiled ones in this directory for testing. "wiggly.rsc" - "!:\resource\apps\wiggly.rsc" "wiggly_reg.rsc" - "!:\private\10003a3f\import\apps\wiggly_reg.rsc" -- cgit v0.12 From c0e094d924d6fc095f52b336f02db5d41f71ab48 Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Wed, 13 Jan 2010 17:08:55 +0100 Subject: Fix rules for recreating the Makefile in a subdir The code generated would always create the Makefile in the sourcedir, even if you had src!=build --- qmake/generators/makefile.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 2bf9e7b..b2468d7 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -2411,17 +2411,17 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT //qmake it if(!subtarget->profile.isEmpty()) { - QString out = out_directory + subtarget->makefile, - in = fileFixify(in_directory + subtarget->profile, in_directory); + QString out = subtarget->makefile; + QString in = fileFixify(in_directory + subtarget->profile, in_directory); if(in.startsWith(in_directory)) in = in.mid(in_directory.length()); if(out.startsWith(in_directory)) out = out.mid(in_directory.length()); t << mkfile << ": " << "\n\t"; if(!in_directory.isEmpty()) { - t << mkdir_p_asstring(in_directory) - << in_directory_cdin - << "$(QMAKE) " << in << buildArgs(in_directory) << " -o " << out + t << mkdir_p_asstring(out_directory) + << out_directory_cdin + << "$(QMAKE) " << subtarget->in_directory << QDir::separator() << in << buildArgs(in_directory) << " -o " << out << in_directory_cdout << endl; } else { t << "$(QMAKE) " << in << buildArgs(in_directory) << " -o " << out << endl; @@ -2431,9 +2431,9 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT t << " FORCE"; t << "\n\t"; if(!in_directory.isEmpty()) { - t << mkdir_p_asstring(in_directory) - << in_directory_cdin - << "$(QMAKE) " << in << buildArgs(in_directory) << " -o " << out + t << mkdir_p_asstring(out_directory) + << out_directory_cdin + << "$(QMAKE) " << subtarget->in_directory << QDir::separator() << in << buildArgs(in_directory) << " -o " << out << in_directory_cdout << endl; } else { t << "$(QMAKE) " << in << buildArgs(in_directory) << " -o " << out << endl; -- cgit v0.12 From 2dd723f5c66a00ebb1a70e956d45cf97b04e7cdd Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Thu, 14 Jan 2010 11:48:01 +0100 Subject: Better fix for build!=src Makefile generation Make sure we always use the absolute path to the pro file so it will just work from either source or build dir. This fixes the usecase where qmake generated a relative path starting with '..' --- qmake/generators/makefile.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index b2468d7..aaada6d 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -2412,16 +2412,14 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT //qmake it if(!subtarget->profile.isEmpty()) { QString out = subtarget->makefile; - QString in = fileFixify(in_directory + subtarget->profile, in_directory); - if(in.startsWith(in_directory)) - in = in.mid(in_directory.length()); + QString in = fileFixify(in_directory + subtarget->profile, out_directory, QString(), FileFixifyAbsolute); if(out.startsWith(in_directory)) out = out.mid(in_directory.length()); t << mkfile << ": " << "\n\t"; if(!in_directory.isEmpty()) { t << mkdir_p_asstring(out_directory) << out_directory_cdin - << "$(QMAKE) " << subtarget->in_directory << QDir::separator() << in << buildArgs(in_directory) << " -o " << out + << "$(QMAKE) " << in << buildArgs(in_directory) << " -o " << out << in_directory_cdout << endl; } else { t << "$(QMAKE) " << in << buildArgs(in_directory) << " -o " << out << endl; @@ -2433,7 +2431,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT if(!in_directory.isEmpty()) { t << mkdir_p_asstring(out_directory) << out_directory_cdin - << "$(QMAKE) " << subtarget->in_directory << QDir::separator() << in << buildArgs(in_directory) << " -o " << out + << "$(QMAKE) " << in << buildArgs(in_directory) << " -o " << out << in_directory_cdout << endl; } else { t << "$(QMAKE) " << in << buildArgs(in_directory) << " -o " << out << endl; -- cgit v0.12 From 1b0028f9858a67a13f0b99d13d239563b7c994f6 Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Mon, 18 Jan 2010 11:29:15 +0100 Subject: Fix the symbian version number generation --- .../linux-armcc/features/symbian_building.prf | 45 ++++++++++------------ 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index 8a0d121..164b758 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -35,38 +35,35 @@ 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, ".") -# Default Symbian version if none is specified. -isEmpty(splitVersion):splitVersion = 10 -hexVersion = "00" -versionPart = 1 -versionPart1 = 10 -versionPart2 = 0 -versionPart3 = 0 -for(verNumber, splitVersion) { - # Poor man's printf - hexVersion = $$hexVersion$$system("sh -c 'printf %02x $$verNumber'") - contains(versionPart, 3) { - versionPart3 = $$verNumber - versionPart = 4 - } - contains(versionPart, 2) { - versionPart2 = $$verNumber - versionPart = 3 - } - contains(versionPart, 1) { - versionPart1 = $$verNumber - versionPart = 2 +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 } } -!contains(hexVersion, "[0-9a-z]{8}"):hexVersion = "$${hexVersion}00" -!contains(hexVersion, "[0-9a-z]{8}"):hexVersion = "$${hexVersion}00" -decVersion = $$sprintf("%1.%2", $$versionPart1, $$system("sh -c 'echo \$[$$versionPart2 * 256 + $$versionPart3]'")) +#error ("hexVersion: $$hexVersion, decVersion: $$decVersion") intUid3 = $$lower($$replace(TARGET.UID3, "^0x", "")) isEmpty(TARGET.SID):TARGET.SID = $$TARGET.UID3 -- cgit v0.12 From 5f3e708d56fd17ca87de152a90e32b72d348c946 Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Mon, 18 Jan 2010 14:39:49 +0100 Subject: Fix building of plugins --- .../symbian/linux-armcc/features/symbian_building.prf | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index 164b758..d2d4faa 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -1,8 +1,9 @@ QMAKE_CFLAGS += $$QMAKE_CFLAGS.ARMCC QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS.ARMCC -isEmpty(DESTDIR) { - DESTDIR = . +symbianDestdir=$$DESTDIR +isEmpty(symbianDestdir) { + symbianDestdir = . } for(libraries, LIBS) { @@ -71,10 +72,10 @@ isEmpty(TARGET.UID2):TARGET.UID2 = 0x00000000 contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { !isEmpty($$QMAKE_POST_LINK):QMAKE_POST_LINK += && - QMAKE_POST_LINK += $$QMAKE_MOVE $$DESTDIR/$${TARGET}.dll $$DESTDIR/$${TARGET}.sym - QMAKE_POST_LINK += && elf2e32 --version=$$decVersion --sid=$$TARGET.SID --uid1=0x10000079 --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --capability=None --fpu=softvfp --targettype=DLL --elfinput=$${DESTDIR}/$${TARGET}.sym --output=$${DESTDIR}/$${TARGET}.dll --dso=$$DESTDIR/$${TARGET}.dso --defoutput=$$OBJECTS_DIR/$${TARGET}.def --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged - QMAKE_DISTCLEAN += $${DESTDIR}/$${TARGET}.sym - QMAKE_DISTCLEAN += $${DESTDIR}/$${TARGET}.dso + QMAKE_POST_LINK += $$QMAKE_MOVE $$symbianDestdir/$${TARGET}.dll $$symbianDestdir/$${TARGET}.sym + QMAKE_POST_LINK += && elf2e32 --version=$$decVersion --sid=$$TARGET.SID --uid1=0x10000079 --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --capability=None --fpu=softvfp --targettype=DLL --elfinput=$${symbianDestdir}/$${TARGET}.sym --output=$${symbianDestdir}/$${TARGET}.dll --dso=$$symbianDestdir/$${TARGET}.dso --defoutput=$$OBJECTS_DIR/$${TARGET}.def --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged + QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.sym + QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.dso QMAKE_CLEAN += $${OBJECTS_DIR}/$${TARGET}.def QMAKE_LIBS += -ledllstub.lib -ledll.lib\\(uc_dll_.o\\) @@ -85,9 +86,9 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { contains(TEMPLATE, app) { !isEmpty($$QMAKE_POST_LINK):QMAKE_POST_LINK += && - QMAKE_POST_LINK += $$QMAKE_MOVE $$DESTDIR/$${TARGET} $$DESTDIR/$${TARGET}.sym - QMAKE_POST_LINK += && elf2e32 --version $$decVersion --sid=$$TARGET.SID --uid1=0x1000007a --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --capability=None --fpu=softvfp --targettype=EXE --elfinput=$${DESTDIR}/$${TARGET}.sym --output=$${DESTDIR}/$${TARGET}.exe --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged - QMAKE_DISTCLEAN += $${DESTDIR}/$${TARGET}.exe + QMAKE_POST_LINK += $$QMAKE_MOVE $$symbianDestdir/$${TARGET} $$symbianDestdir/$${TARGET}.sym + QMAKE_POST_LINK += && elf2e32 --version $$decVersion --sid=$$TARGET.SID --uid1=0x1000007a --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --capability=None --fpu=softvfp --targettype=EXE --elfinput=$${symbianDestdir}/$${TARGET}.sym --output=$${symbianDestdir}/$${TARGET}.exe --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged + QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.exe QMAKE_LIBS += -leexe.lib\\(uc_exe_.o\\) -- cgit v0.12 From 375387c529c47211a06e09c5a24d9dbf12bf426b Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Mon, 18 Jan 2010 16:40:56 +0100 Subject: Fix symbian building to always have a pre-determined uid3 For all Qt libs we use hardcoded uid3s, so these plugins should have them too. --- src/plugins/graphicssystems/trace/trace.pro | 1 + src/plugins/plugins.pro | 3 ++- src/plugins/sqldrivers/sqlite/sqlite.pro | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) 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/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/sqldrivers/sqlite/sqlite.pro b/src/plugins/sqldrivers/sqlite/sqlite.pro index c609a9e..f24db9d 100644 --- a/src/plugins/sqldrivers/sqlite/sqlite.pro +++ b/src/plugins/sqldrivers/sqlite/sqlite.pro @@ -1,5 +1,7 @@ TARGET = qsqlite +symbian:TARGET.UID3=0x2001E631 + HEADERS = ../../../sql/drivers/sqlite/qsql_sqlite.h SOURCES = smain.cpp \ ../../../sql/drivers/sqlite/qsql_sqlite.cpp -- cgit v0.12 From 62bfa2f0d67696bdb9f9d0cd0c665e2c81ca7369 Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Tue, 19 Jan 2010 15:36:11 +0100 Subject: Updates on how its easier now --- README.s60-mkspec | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/README.s60-mkspec b/README.s60-mkspec index 9e0db89..a065426 100644 --- a/README.s60-mkspec +++ b/README.s60-mkspec @@ -24,7 +24,7 @@ Compiling: export RVCT22LIB=<rvct-dir>/lib/armlib export EPOCROOT=<s60-root> - export PATH=$PATH:<s60-root>/epoc32/tools + 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, @@ -38,27 +38,20 @@ Compiling: symbian/linux-armcc -little-endian -host-little-endian \ -arch symbian - 3. Compile the host tools. This unfortunately does not happen - automatically. + 3. Compile Qt - cd src/tools - for i in bootstrap moc rcc uic; do make -C $i; done - - 4. Compile QtCore.dll: - - cd ../corelib - qmake -platform symbian/linux-armcc + cd src make and then wait for a while. - 5. Compile some helloworld application (I leave the details to you + 4. Compile some helloworld application (I leave the details to you ;-) - qmake -platform symbian/linux-armcc + qmake make - 6. Package and run on the phone. This is unfortunately a bit of a + 5. Package and run on the phone. This is unfortunately a bit of a manual step at the moment. Your best bet is to look at a Windows build of the same application, and manually grab the .rsc files that it refers to and put them in the application directory on @@ -76,3 +69,4 @@ Compiling: selfsigned.cer selfsigned.key 7. Enjoy QObjects and "hello world" on the phone! + -- cgit v0.12 From d609f7d1963e06d05fa6f7e4a098a304a177bc68 Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Tue, 19 Jan 2010 15:36:28 +0100 Subject: Fix compilation of apps outside of Qt Symbian SDK has all headers twice in two dirs, which have to be in the include path in the right order for stuff to compile. Make sure we have the proper dir first. --- mkspecs/symbian/linux-armcc/features/qt.prf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mkspecs/symbian/linux-armcc/features/qt.prf b/mkspecs/symbian/linux-armcc/features/qt.prf index 04371f9..f8a074d 100644 --- a/mkspecs/symbian/linux-armcc/features/qt.prf +++ b/mkspecs/symbian/linux-armcc/features/qt.prf @@ -1,7 +1,11 @@ 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 $${EPOCROOT}epoc32/include/stdapis/stlport +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 -- cgit v0.12 From 165f76801ef060d4a156dea1c84f057ddee8c477 Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Tue, 19 Jan 2010 19:09:37 +0100 Subject: Autogenerate the UID3 if the project file didn't supply it. --- mkspecs/symbian/linux-armcc/features/symbian_building.prf | 1 + 1 file changed, 1 insertion(+) diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index d2d4faa..1510bfd 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -66,6 +66,7 @@ count(splitVersion, 1) { } #error ("hexVersion: $$hexVersion, decVersion: $$decVersion") +isEmpty(TARGET.UID3):TARGET.UID3 = $$generate_uid("$${OUT_PWD}/$${TARGET}") intUid3 = $$lower($$replace(TARGET.UID3, "^0x", "")) isEmpty(TARGET.SID):TARGET.SID = $$TARGET.UID3 isEmpty(TARGET.UID2):TARGET.UID2 = 0x00000000 -- cgit v0.12 From 9008705d02ceb6532f9dcbee12b1c481a1312bbe Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Mon, 25 Jan 2010 13:36:46 +0100 Subject: Add a sanity check to verify that the system() command works. 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. This commit tests that system() can be successfully run. --- mkspecs/symbian/linux-armcc/features/symbian_building.prf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index 1510bfd..8f2d8a4 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -129,3 +129,13 @@ symbianresources.dependency_type = TYPE_C symbianresources.CONFIG = no_link QMAKE_EXTRA_COMPILERS += symbianresources + +# 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)") +} -- cgit v0.12 From 0062d788ca78851c6d70e708a6e9168e89682491 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 26 Jan 2010 09:28:50 +0100 Subject: Fixed def file locations if objects dir is not specified. --- mkspecs/symbian/linux-armcc/features/symbian_building.prf | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index 8f2d8a4..6ba007e 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -1,6 +1,10 @@ QMAKE_CFLAGS += $$QMAKE_CFLAGS.ARMCC QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS.ARMCC +symbianObjdir=$$OBJECTS_DIR +isEmpty(symbianObjdir) { + symbianObjdir = . +} symbianDestdir=$$DESTDIR isEmpty(symbianDestdir) { symbianDestdir = . @@ -74,10 +78,10 @@ isEmpty(TARGET.UID2):TARGET.UID2 = 0x00000000 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 - QMAKE_POST_LINK += && elf2e32 --version=$$decVersion --sid=$$TARGET.SID --uid1=0x10000079 --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --capability=None --fpu=softvfp --targettype=DLL --elfinput=$${symbianDestdir}/$${TARGET}.sym --output=$${symbianDestdir}/$${TARGET}.dll --dso=$$symbianDestdir/$${TARGET}.dso --defoutput=$$OBJECTS_DIR/$${TARGET}.def --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged + QMAKE_POST_LINK += && elf2e32 --version=$$decVersion --sid=$$TARGET.SID --uid1=0x10000079 --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --capability=None --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 QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.sym QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.dso - QMAKE_CLEAN += $${OBJECTS_DIR}/$${TARGET}.def + QMAKE_CLEAN += $${symbianObjdir}/$${TARGET}.def QMAKE_LIBS += -ledllstub.lib -ledll.lib\\(uc_dll_.o\\) -- cgit v0.12 From aaa0259441dffeae230d1cd0017fc21c0d17af5b Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 26 Jan 2010 13:40:53 +0100 Subject: Enabled detection of errors from the elf2e32 tool. For some reason, it does not return an error code, even when there clearly is an error. Therefore we scan for the occurrence of an error in the output and base the return code on that instead. --- mkspecs/symbian/linux-armcc/features/symbian_building.prf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index 6ba007e..0a697f4 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -78,7 +78,7 @@ isEmpty(TARGET.UID2):TARGET.UID2 = 0x00000000 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 - QMAKE_POST_LINK += && elf2e32 --version=$$decVersion --sid=$$TARGET.SID --uid1=0x10000079 --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --capability=None --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 + QMAKE_POST_LINK += && elf2e32 --version=$$decVersion --sid=$$TARGET.SID --uid1=0x10000079 --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --capability=None --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 | tee elf2e32.log && ! grep Error: elf2e32.log >& /dev/null && rm -f elf2e32.log QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.sym QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.dso QMAKE_CLEAN += $${symbianObjdir}/$${TARGET}.def @@ -92,7 +92,7 @@ contains(TEMPLATE, app) { !isEmpty($$QMAKE_POST_LINK):QMAKE_POST_LINK += && QMAKE_POST_LINK += $$QMAKE_MOVE $$symbianDestdir/$${TARGET} $$symbianDestdir/$${TARGET}.sym - QMAKE_POST_LINK += && elf2e32 --version $$decVersion --sid=$$TARGET.SID --uid1=0x1000007a --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --capability=None --fpu=softvfp --targettype=EXE --elfinput=$${symbianDestdir}/$${TARGET}.sym --output=$${symbianDestdir}/$${TARGET}.exe --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged + QMAKE_POST_LINK += && elf2e32 --version $$decVersion --sid=$$TARGET.SID --uid1=0x1000007a --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --capability=None --fpu=softvfp --targettype=EXE --elfinput=$${symbianDestdir}/$${TARGET}.sym --output=$${symbianDestdir}/$${TARGET}.exe --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged | tee elf2e32.log && ! grep Error: elf2e32.log >& /dev/null && rm -f elf2e32.log QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.exe QMAKE_LIBS += -leexe.lib\\(uc_exe_.o\\) -- cgit v0.12 From d64407cf376c5723663ebe81f156a3da98d7df24 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 26 Jan 2010 13:43:24 +0100 Subject: Switched to using the QMAKE_LIBS_THREAD variable for thread libs. --- doc/src/development/qmake-manual.qdoc | 2 +- mkspecs/common/symbian/symbian.conf | 3 ++- mkspecs/features/symbian/thread.prf | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 mkspecs/features/symbian/thread.prf diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc index d7aa0db..0172cf2 100644 --- a/doc/src/development/qmake-manual.qdoc +++ b/doc/src/development/qmake-manual.qdoc @@ -2582,7 +2582,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/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index c05bd3d..beea4f0 100644 --- a/mkspecs/common/symbian/symbian.conf +++ b/mkspecs/common/symbian/symbian.conf @@ -56,12 +56,13 @@ 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 QMAKE_LIBS_NETWORK = QMAKE_LIBS_EGL = -llibEGL QMAKE_LIBS_OPENGL = QMAKE_LIBS_OPENVG = -llibOpenVG -lgraphicsresource +QMAKE_LIBS_THREAD = -llibpthread QMAKE_LIBS_COMPAT = QMAKE_LIBS_QT_ENTRY = -llibcrt0.lib QMAKE_LIBS_S60 = -lavkon 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) -- cgit v0.12 From e3777a6f99992412a47be215e5dfecbe9e0e78bd Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 26 Jan 2010 15:46:03 +0100 Subject: Made the package template a little more correct. - First of all, make sure that the exe file is named wiggly, because that is what the rsc files contain, and therefore what the menu will try to launch. - Second, make sure that s60main.rsc is included as a resource since GUI applications will not run without it. --- templates/pkg_template.pkg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/pkg_template.pkg b/templates/pkg_template.pkg index 5d98347..955ab49 100644 --- a/templates/pkg_template.pkg +++ b/templates/pkg_template.pkg @@ -18,10 +18,11 @@ [0x1028315F],0,0,0,{"S60ProductID"} ; Executable and default resource files -"MyApp.exe" - "!:\sys\bin\MyApp.exe" +"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" -- cgit v0.12 From fdd83d54b88fbe82937878d4ac73257120ec480e Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Mon, 1 Feb 2010 10:34:12 +0100 Subject: Fixed path separators in the plugin stub generator. --- qmake/generators/symbian/initprojectdeploy_symbian.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.cpp b/qmake/generators/symbian/initprojectdeploy_symbian.cpp index f3e3c3a..a685b0f 100644 --- a/qmake/generators/symbian/initprojectdeploy_symbian.cpp +++ b/qmake/generators/symbian/initprojectdeploy_symbian.cpp @@ -175,12 +175,12 @@ static void createPluginStub(const QFileInfo& info, QStringList& generatedDirs, QStringList& generatedFiles) { - QDir().mkpath(QLatin1String(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(QLatin1String(PLUGIN_STUB_DIR "\\") + 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(); -- cgit v0.12 From 3fefcaff4abbb32c978d97fbac66929eb5fef1f6 Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Mon, 1 Feb 2010 17:27:08 +0100 Subject: Remove bash-isms and make elf2e32 work properly. elf2e32 doesn't seem to return a non-null value on error. To avoid silently continuing we need to detect there is an error in the output of the command and stop the build if there is. --- mkspecs/symbian/linux-armcc/features/symbian_building.prf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index 0a697f4..a176547 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -78,7 +78,8 @@ isEmpty(TARGET.UID2):TARGET.UID2 = 0x00000000 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 - QMAKE_POST_LINK += && elf2e32 --version=$$decVersion --sid=$$TARGET.SID --uid1=0x10000079 --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --capability=None --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 | tee elf2e32.log && ! grep Error: elf2e32.log >& /dev/null && rm -f elf2e32.log + # 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 --capability=None --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 | 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 @@ -92,7 +93,8 @@ contains(TEMPLATE, app) { !isEmpty($$QMAKE_POST_LINK):QMAKE_POST_LINK += && QMAKE_POST_LINK += $$QMAKE_MOVE $$symbianDestdir/$${TARGET} $$symbianDestdir/$${TARGET}.sym - QMAKE_POST_LINK += && elf2e32 --version $$decVersion --sid=$$TARGET.SID --uid1=0x1000007a --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --capability=None --fpu=softvfp --targettype=EXE --elfinput=$${symbianDestdir}/$${TARGET}.sym --output=$${symbianDestdir}/$${TARGET}.exe --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged | tee elf2e32.log && ! grep Error: elf2e32.log >& /dev/null && rm -f elf2e32.log + # 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 --capability=None --fpu=softvfp --targettype=EXE --elfinput=$${symbianDestdir}/$${TARGET}.sym --output=$${symbianDestdir}/$${TARGET}.exe --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged | tee elf2e32.log && test `grep -c 'Error:' elf2e32.log` = 0 && rm elf2e32.log QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.exe QMAKE_LIBS += -leexe.lib\\(uc_exe_.o\\) -- cgit v0.12 From 4efb96943e863e29d5e20e1b0417dd83b014593d Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Thu, 4 Feb 2010 09:22:49 +0100 Subject: Fixed compiler arguments when compiling in debug/release mode. --- mkspecs/common/symbian/symbian-makefile.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mkspecs/common/symbian/symbian-makefile.conf b/mkspecs/common/symbian/symbian-makefile.conf index bf4f43c..341e27a 100644 --- a/mkspecs/common/symbian/symbian-makefile.conf +++ b/mkspecs/common/symbian/symbian-makefile.conf @@ -18,6 +18,10 @@ 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_THUMB__ __MARM_INTERWORK__ __DLL__ _UNICODE __SUPPORT_CPP_EXCEPTIONS__ -- cgit v0.12 From b22525edc8c75c1aae34b10dc47d3dabf77e030d Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Thu, 4 Feb 2010 09:46:06 +0100 Subject: Fixed compilation in ARM mode. An extra define needs to change between ARM/Thumb. --- mkspecs/common/symbian/symbian-makefile.conf | 2 +- mkspecs/symbian/linux-armcc/features/symbian_building.prf | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/mkspecs/common/symbian/symbian-makefile.conf b/mkspecs/common/symbian/symbian-makefile.conf index 341e27a..dc428b9 100644 --- a/mkspecs/common/symbian/symbian-makefile.conf +++ b/mkspecs/common/symbian/symbian-makefile.conf @@ -23,7 +23,7 @@ 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_THUMB__ __MARM_INTERWORK__ __DLL__ _UNICODE __SUPPORT_CPP_EXCEPTIONS__ +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) diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index 0a697f4..b8b5639 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -10,6 +10,10 @@ 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, \.) -- cgit v0.12 From 08581d2aa53fff9ff8625a484b9633753ba9b1a0 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Thu, 4 Feb 2010 09:21:44 +0100 Subject: Make webkit compile on linux+armcc Based on a patch by Thomas Zander. --- src/3rdparty/webkit/WebCore/WebCore.pro | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index 04aba62..de185c1 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -23,9 +23,15 @@ symbian: { TARGET.UID3 = 0x200267C2 # 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. - MMP_RULES += "LINKEROPTION armcc --rw-base 0xE00000" - MMP_RULES += ALWAYS_BUILD_AS_ARM - QMAKE_CXXFLAGS.ARMCC += -OTime -O3 + QMAKE_LFLAGS.ARMCC += --rw-base 0xE00000 + 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 + } } include($$PWD/../WebKit.pri) -- cgit v0.12 From 0de1cf57c6ad80776dc4d57a394ea5e0982686a6 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 2 Feb 2010 12:55:12 +0100 Subject: Implemented pkg generator for the symbian/linux-armcc mkspec. It reuses almost everything from the original pkg generator, but the code had to be restructured to accomodate for the new makefile generator. In addition a few new codepaths and profile changes had to be introduced to cope with the fact that this mkspec puts files in different places than Symbian does (inside $QTDIR/lib instead of $EPOCROOT/...). This enables the pkg generator to generate correct pkg files for Qt itself, but applications will not work yet because they also require generated rss files. --- mkspecs/common/symbian/symbian-makefile.conf | 2 +- mkspecs/features/symbian/default_post.prf | 4 +- .../linux-armcc/features/symbian_building.prf | 3 +- qmake/Makefile.unix | 9 +- qmake/Makefile.win32 | 8 +- qmake/Makefile.win32-g++ | 7 +- qmake/Makefile.win32-g++-sh | 7 +- qmake/generators/makefile.h | 5 + qmake/generators/metamakefile.cpp | 3 + .../symbian/initprojectdeploy_symbian.cpp | 13 +- .../generators/symbian/initprojectdeploy_symbian.h | 1 + qmake/generators/symbian/symbian_makefile.h | 72 ++++++ qmake/generators/symbian/symbiancommon.cpp | 276 +++++++++++++++++++++ qmake/generators/symbian/symbiancommon.h | 82 ++++++ qmake/generators/symbian/symmake.cpp | 234 +---------------- qmake/generators/symbian/symmake.h | 22 +- qmake/generators/symbian/symmake_abld.cpp | 2 +- qmake/generators/symbian/symmake_sbsv2.cpp | 2 +- qmake/generators/unix/unixmake.h | 2 +- src/s60installs/s60installs.pro | 64 +++-- 20 files changed, 521 insertions(+), 297 deletions(-) create mode 100644 qmake/generators/symbian/symbian_makefile.h create mode 100644 qmake/generators/symbian/symbiancommon.cpp create mode 100644 qmake/generators/symbian/symbiancommon.h diff --git a/mkspecs/common/symbian/symbian-makefile.conf b/mkspecs/common/symbian/symbian-makefile.conf index bf4f43c..e8f00d5 100644 --- a/mkspecs/common/symbian/symbian-makefile.conf +++ b/mkspecs/common/symbian/symbian-makefile.conf @@ -2,7 +2,7 @@ # qmake configuration for makefile based symbian # -MAKEFILE_GENERATOR = UNIX +MAKEFILE_GENERATOR = UNIX_SYMBIAN include(symbian.conf) 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/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index 0a697f4..25d6e0b 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -70,7 +70,6 @@ count(splitVersion, 1) { } #error ("hexVersion: $$hexVersion, decVersion: $$decVersion") -isEmpty(TARGET.UID3):TARGET.UID3 = $$generate_uid("$${OUT_PWD}/$${TARGET}") intUid3 = $$lower($$replace(TARGET.UID3, "^0x", "")) isEmpty(TARGET.SID):TARGET.SID = $$TARGET.UID3 isEmpty(TARGET.UID2):TARGET.UID2 = 0x00000000 @@ -126,7 +125,7 @@ symbianresources.commands = cpp -nostdinc -undef \ -o $${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rpp \ && rcomp -u -m045,046,047 \ -s$${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rpp \ - -o$${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rsc \ + -o$${symbianDestdir}/${QMAKE_FILE_BASE}.rsc \ -h$${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rsg \ -i${QMAKE_FILE_NAME} symbianresources.dependency_type = TYPE_C 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.h b/qmake/generators/makefile.h index d89c3b1..0b3bdfa 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h @@ -248,6 +248,11 @@ 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; } + + // This 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. + friend class SymbianCommonGenerator; }; inline void MakefileGenerator::setNoIO(bool o) diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp index 4151193..54df7bc 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 == "UNIX_SYMBIAN") { + 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 a685b0f..efeaaae 100644 --- a/qmake/generators/symbian/initprojectdeploy_symbian.cpp +++ b/qmake/generators/symbian/initprojectdeploy_symbian.cpp @@ -239,6 +239,7 @@ void initProjectDeploySymbian(QMakeProject* project, DeploymentList &deploymentList, const QString &testPath, bool deployBinaries, + bool epocBuild, const QString &platform, const QString &build, QStringList& generatedDirs, @@ -321,7 +322,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,12 +330,16 @@ void initProjectDeploySymbian(QMakeProject* project, if (isBinary(info)) { if (deployBinaries) { // Executables and libraries are deployed to \sys\bin - QFileInfo releasePath(epocRoot() + "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(releasePath.absolutePath() + "\\" + info.fileName(), false, true), + deploymentList.append(CopyItem(Option::fixPathToLocalOS(targetPath.absolutePath() + "\\" + info.fileName(), false, true), Option::fixPathToLocalOS(devicePath.left(2) + QLatin1String(SYSBIN_DIR "\\") + info.fileName()))); } else { - deploymentList.append(CopyItem(Option::fixPathToLocalOS(releasePath.absolutePath() + "\\" + info.fileName(), false, true), + deploymentList.append(CopyItem(Option::fixPathToLocalOS(targetPath.absolutePath() + "\\" + info.fileName(), false, true), Option::fixPathToLocalOS(deploymentDrive + QLatin1String(SYSBIN_DIR "\\") + info.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..91b3563 --- /dev/null +++ b/qmake/generators/symbian/symbian_makefile.h @@ -0,0 +1,72 @@ +/**************************************************************************** +** +** 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) + { + bool ret = T::writeMakefile(t); + + QString iconFile; + DeploymentList depList; + generatePkgFile(iconFile, depList, false); + + return ret; + } +}; + +#endif // SYMBIAN_MAKEFILE_H diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp new file mode 100644 index 0000000..a36e4be --- /dev/null +++ b/qmake/generators/symbian/symbiancommon.cpp @@ -0,0 +1,276 @@ +/**************************************************************************** +** +** 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" + +SymbianCommonGenerator::SymbianCommonGenerator(MakefileGenerator *generator) + : generator(generator) +{ +} + +void SymbianCommonGenerator::init() +{ + QMakeProject *project = generator->project; + fixedTarget = generator->escapeFilePath(generator->fileFixify(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->values("CONFIG").contains("staticlib") || project->values("CONFIG").contains("static")) + targetType = TypeLib; + else if (project->values("CONFIG").contains("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"); + QFile pkgFile(pkgFilename); + if (!pkgFile.open(QIODevice::WriteOnly | QIODevice::Text)) { + PRINT_FILE_CREATE_ERROR(pkgFilename); + return; + } + + generatedFiles << pkgFile.fileName(); + + // Header info + QTextStream t(&pkgFile); + t << QString("; %1 generated by qmake at %2").arg(pkgFilename).arg(QDateTime::currentDateTime().toString(Qt::ISODate)) << endl; + t << "; This file is generated by qmake and should not be modified by the user" << endl; + t << ";" << endl << endl; + + // 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) + t << "; Language" << endl; + t << "&EN" << endl << endl; + } 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('.', ','); + + if (!containsStartWithItem('#', rawPkgPreRules)) { + QString visualTarget = generator->escapeFilePath(generator->fileFixify(project->first("TARGET"))); + visualTarget = removePathSeparators(visualTarget); + + t << "; SIS header: name, uid, version" << endl; + t << QString("#{\"%1\"},(%2),%3").arg(visualTarget).arg(uid3).arg(applicationVersion) << endl << endl; + } + + // Localized vendor name + if (!containsStartWithItem('%', rawPkgPreRules)) { + t << "; Localised Vendor name" << endl; + t << "%{\"Vendor\"}" << endl << endl; + } + + // Unique vendor name + if (!containsStartWithItem(':', rawPkgPreRules)) { + t << "; Unique Vendor name" << endl; + t << ":\"Vendor\"" << endl << endl; + } + + // PKG pre-rules - these are added before actual file installations i.e. SIS package body + if (rawPkgPreRules.size()) { + t << "; Manual PKG pre-rules from PRO files" << endl; + foreach(QString item, rawPkgPreRules) { + t << item << endl; + } + t << 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->values("CONFIG").contains("no_icon", Qt::CaseInsensitive)) { + 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, epocBuild, "$(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(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; + } + } +} + +QString SymbianCommonGenerator::removePathSeparators(QString &file) +{ + QString ret = file; + while (ret.indexOf(QDir::separator()) > 0) { + ret.remove(0, ret.indexOf(QDir::separator()) + 1); + } + + return ret; +} + diff --git a/qmake/generators/symbian/symbiancommon.h b/qmake/generators/symbian/symbiancommon.h new file mode 100644 index 0000000..abe6d51 --- /dev/null +++ b/qmake/generators/symbian/symbiancommon.h @@ -0,0 +1,82 @@ +/**************************************************************************** +** +** 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(); + + 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); + +protected: + MakefileGenerator *generator; + + QStringList generatedFiles; + QStringList generatedDirs; + QString fixedTarget; + QString privateDirUid; + QString uid3; + TargetType targetType; +}; + +#endif // SYMBIANCOMMON_H diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp index 20e2d0e..38b6cad 100644 --- a/qmake/generators/symbian/symmake.cpp +++ b/qmake/generators/symbian/symmake.cpp @@ -92,8 +92,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)); - QString SymbianMakefileGenerator::fixPathForMmp(const QString& origPath, const QDir& parentDir) { static QString epocRootStr; @@ -156,7 +154,7 @@ QString SymbianMakefileGenerator::canonizePath(const QString& origPath) return resultPath; } -SymbianMakefileGenerator::SymbianMakefileGenerator() : MakefileGenerator() { } +SymbianMakefileGenerator::SymbianMakefileGenerator() : MakefileGenerator(), SymbianCommonGenerator(this) { } SymbianMakefileGenerator::~SymbianMakefileGenerator() { } void SymbianMakefileGenerator::writeHeader(QTextStream &t) @@ -216,7 +214,7 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t) } if (generatePkg) { - generatePkgFile(iconFile, depList); + generatePkgFile(iconFile, depList, true); } writeBldInfContent(t, generatePkg, iconFile, depList); @@ -274,174 +272,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(); - - // Header info - QTextStream t(&pkgFile); - t << QString("; %1 generated by qmake at %2").arg(pkgFilename).arg(QDateTime::currentDateTime().toString(Qt::ISODate)) << endl; - t << "; This file is generated by qmake and should not be modified by the user" << endl; - t << ";" << endl << endl; - - // 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) - t << "; Language" << endl; - t << "&EN" << endl << endl; - } 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('.', ','); - - if (!containsStartWithItem('#', rawPkgPreRules)) { - QString visualTarget = escapeFilePath(fileFixify(project->first("TARGET"))); - visualTarget = removePathSeparators(visualTarget); - - t << "; SIS header: name, uid, version" << endl; - t << QString("#{\"%1\"},(%2),%3").arg(visualTarget).arg(uid3).arg(applicationVersion) << endl << endl; - } - - // Localized vendor name - if (!containsStartWithItem('%', rawPkgPreRules)) { - t << "; Localised Vendor name" << endl; - t << "%{\"Vendor\"}" << endl << endl; - } - - // Unique vendor name - if (!containsStartWithItem(':', rawPkgPreRules)) { - t << "; Unique Vendor name" << endl; - t << ":\"Vendor\"" << endl << endl; - } - - // PKG pre-rules - these are added before actual file installations i.e. SIS package body - if (rawPkgPreRules.size()) { - t << "; Manual PKG pre-rules from PRO files" << endl; - foreach(QString item, rawPkgPreRules) { - t << item << endl; - } - t << 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->values("CONFIG").contains("no_icon", Qt::CaseInsensitive)) { - 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(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; - } - } -} - -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->values("CONFIG").contains("stdbinary", Qt::CaseInsensitive)) { @@ -479,9 +309,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", "", " ", ""); @@ -498,27 +326,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->values("CONFIG").contains("staticlib") || project->values("CONFIG").contains("static")) - targetType = TypeLib; - else if (project->values("CONFIG").contains("plugin")) - targetType = TypePlugin; - else - targetType = TypeDll; - } else { - targetType = TypeSubdirs; - } - if (0 != project->values("TARGET.UID2").size()) { uid2 = project->first("TARGET.UID2"); } else if (project->values("CONFIG").contains("stdbinary", Qt::CaseInsensitive)) { @@ -538,20 +345,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() @@ -1727,16 +1520,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) { @@ -1768,17 +1551,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..46071b8 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,12 @@ 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(); @@ -138,7 +121,6 @@ protected: 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 d1e63cb..0b6f749 100644 --- a/qmake/generators/symbian/symmake_abld.cpp +++ b/qmake/generators/symbian/symmake_abld.cpp @@ -410,7 +410,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 5adf30d..261a158 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.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/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index aaecf6c..8cb7c18 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -11,26 +11,36 @@ 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 { + pluginLocations = $${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET) + } else { + pluginLocations = $$QT_BUILD_TREE/src/plugins/s60 + } 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 +71,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 +95,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 } BLD_INF_RULES.prj_exports += "qt.iby $$CORE_MW_LAYER_IBY_EXPORT_PATH(qt.iby)" -- cgit v0.12 From 0a44fd45d97fa5286eefdf1c2cb77a3b8585ff29 Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Wed, 3 Feb 2010 14:02:33 +0100 Subject: Fix include to work on case-sensitive filesystems. --- src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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> -- cgit v0.12 From b8705c3dd756243503fd1e469f6ac4907222b321 Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Thu, 4 Feb 2010 15:11:21 +0100 Subject: Re-anable building of lrelease and fix the translations dir to 'compile' If we want translations to work, we need lrelease, so that should not be disabled anymore for symbian. Work around the hack of translations/translations.pro to not link anything so we don't do post-linking on symbian (which failed). --- mkspecs/symbian/linux-armcc/features/symbian_building.prf | 2 +- projects.pro | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index da15872..db215cf 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -93,7 +93,7 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { QMAKE_LFLAGS += --symver_soname --soname $${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll } -contains(TEMPLATE, app) { +contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@.*") { !isEmpty($$QMAKE_POST_LINK):QMAKE_POST_LINK += && QMAKE_POST_LINK += $$QMAKE_MOVE $$symbianDestdir/$${TARGET} $$symbianDestdir/$${TARGET}.sym diff --git a/projects.pro b/projects.pro index d405a5b..d98a24f 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) { -- cgit v0.12 From 09c8071d634e043b8706f876e05e6b9e37343251 Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Thu, 4 Feb 2010 15:37:24 +0100 Subject: Fix linking for armlink using LIBS += -LanyDir is wrong as that depends on 'ld' accepting -L the correct cross-platform approach is to use QMAKE_LIBDIR += anyDir --- demos/shared/shared.pri | 6 +++--- src/tools/bootstrap/bootstrap.pri | 6 +++--- tools/assistant/tools/assistant/assistant.pro | 2 +- tools/designer/src/designer/designer.pro | 6 ++---- 4 files changed, 9 insertions(+), 11 deletions(-) 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/src/tools/bootstrap/bootstrap.pri b/src/tools/bootstrap/bootstrap.pri index b3ee948..4cdb329 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/tools/assistant/tools/assistant/assistant.pro b/tools/assistant/tools/assistant/assistant.pro index 1a7e874..2a654fc 100644 --- a/tools/assistant/tools/assistant/assistant.pro +++ b/tools/assistant/tools/assistant/assistant.pro @@ -20,7 +20,7 @@ INSTALLS += target ### 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 += helpviewer.h \ mainwindow.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 -- cgit v0.12 From f3a231700faf1da733e3894c2cfeebe6bf763e0e Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Thu, 4 Feb 2010 16:22:14 +0100 Subject: use the proper QMake option to find a shared header file --- demos/embedded/anomaly/anomaly.pro | 2 +- demos/embedded/flightinfo/flightinfo.pro | 2 +- demos/embedded/lightmaps/lightmaps.pro | 2 +- demos/embedded/weatherinfo/weatherinfo.pro | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) 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 } -- cgit v0.12 From ce51d49a0efaf3f63998f6aa9aebc688b90994a4 Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Mon, 8 Feb 2010 10:31:00 +0100 Subject: Make link bootstrap again. Fix the borked fix and re-add the dollar signs. --- src/tools/bootstrap/bootstrap.pri | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/bootstrap/bootstrap.pri b/src/tools/bootstrap/bootstrap.pri index 4cdb329..c29d59d 100644 --- a/src/tools/bootstrap/bootstrap.pri +++ b/src/tools/bootstrap/bootstrap.pri @@ -44,10 +44,10 @@ hpux-acc*|hpuxi-acc* { CONFIG(debug, debug|release) { QMAKE_LIBDIR += $$QT_BUILD_TREE/src/tools/bootstrap/debug } else { - QMAKE_LIBDIR += $QT_BUILD_TREE/src/tools/bootstrap/release + QMAKE_LIBDIR += $$QT_BUILD_TREE/src/tools/bootstrap/release } } else { - QMAKE_LIBDIR += $QT_BUILD_TREE/src/tools/bootstrap + QMAKE_LIBDIR += $$QT_BUILD_TREE/src/tools/bootstrap } LIBS += -lbootstrap } -- cgit v0.12 From b026f288a3ef5ef4ee1ed771fa464268dbbacd78 Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Mon, 8 Feb 2010 13:13:23 +0100 Subject: Don't make an s60main dir for non-symbian builds --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index b47281b..dab9c40 100755 --- a/configure +++ b/configure @@ -7791,6 +7791,7 @@ for file in .projects .projects.3; do case $a in *winmain/winmain.pro) continue ;; + *s60main/s60main.pro) continue ;; *examples/activeqt/*) continue ;; */qmake/qmake.pro) continue ;; *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*linguist/lrelease*) SPEC=$QMAKESPEC ;; -- cgit v0.12 From 31cd89e8139f178e57ebb9a1b81b289b5df5fc69 Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Mon, 8 Feb 2010 14:36:01 +0100 Subject: Disable sqlite plugin compilation on symbian by default --- configure | 8 ++++++++ src/plugins/sqldrivers/sqlite/sqlite.pro | 2 -- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/configure b/configure index dab9c40..50fcae9 100755 --- a/configure +++ b/configure @@ -4843,6 +4843,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 diff --git a/src/plugins/sqldrivers/sqlite/sqlite.pro b/src/plugins/sqldrivers/sqlite/sqlite.pro index f24db9d..c609a9e 100644 --- a/src/plugins/sqldrivers/sqlite/sqlite.pro +++ b/src/plugins/sqldrivers/sqlite/sqlite.pro @@ -1,7 +1,5 @@ TARGET = qsqlite -symbian:TARGET.UID3=0x2001E631 - HEADERS = ../../../sql/drivers/sqlite/qsql_sqlite.h SOURCES = smain.cpp \ ../../../sql/drivers/sqlite/qsql_sqlite.cpp -- cgit v0.12 From 8985620b40e92dae928d6597924eacdf36da020c Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 9 Feb 2010 10:03:06 +0100 Subject: Implemented rss file generator for Linux. Most code was reused from the Windows generator. Icons don't currently work due to a problem with the mifconv tool. In addition backslashes were changed to slashes in all common code, since qmake seems to prefer this when doing path cleanup and the like. --- mkspecs/features/symbian/application_icon.prf | 20 +- .../linux-armcc/features/symbian_building.prf | 40 ++ .../symbian/initprojectdeploy_symbian.cpp | 57 ++- qmake/generators/symbian/symbian_makefile.h | 19 +- qmake/generators/symbian/symbiancommon.cpp | 443 ++++++++++++++++++++- qmake/generators/symbian/symbiancommon.h | 12 + qmake/generators/symbian/symmake.cpp | 391 ------------------ qmake/generators/symbian/symmake.h | 10 - 8 files changed, 554 insertions(+), 438 deletions(-) diff --git a/mkspecs/features/symbian/application_icon.prf b/mkspecs/features/symbian/application_icon.prf index 1edbe14..069678e 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 - 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/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index 25d6e0b..1106fd9 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -133,6 +133,40 @@ symbianresources.CONFIG = no_link 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}_reg.rss + 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 @@ -142,3 +176,9 @@ 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)") } + +# ### FIXME! TODO! Remove this after icons have been fixed. +QMAKE_EXTRA_COMPILERS -= mifconv +RSS_RULES.number_of_icons = +RSS_RULES.icon_file = +PRE_TARGETDEPS -= $$mifconv.output diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.cpp b/qmake/generators/symbian/initprojectdeploy_symbian.cpp index efeaaae..7e24df7 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("\\", "/"); @@ -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) @@ -282,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 @@ -298,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)) { @@ -332,15 +338,21 @@ void initProjectDeploySymbian(QMakeProject* project, // Executables and libraries are deployed to \sys\bin QFileInfo targetPath; if (epocBuild) - targetPath.setFile(epocRoot() + "epoc32\\release\\" + platform + "\\" + build + "\\"); + targetPath.setFile(epocRoot() + "epoc32/release/" + platform + "/" + build + "/"); else targetPath.setFile(info.path() + QDir::separator()); if(devicePathHasDriveLetter) { - deploymentList.append(CopyItem(Option::fixPathToLocalOS(targetPath.absolutePath() + "\\" + 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(targetPath.absolutePath() + "\\" + 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)) { @@ -351,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; } } @@ -373,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/symbian_makefile.h b/qmake/generators/symbian/symbian_makefile.h index 91b3563..532ab89 100644 --- a/qmake/generators/symbian/symbian_makefile.h +++ b/qmake/generators/symbian/symbian_makefile.h @@ -59,13 +59,26 @@ public: bool writeMakefile(QTextStream &t) { - bool ret = T::writeMakefile(t); - + QString numberOfIcons; QString iconFile; + QStringList userRssRules; + readRssRules(numberOfIcons, iconFile, userRssRules); + DeploymentList depList; generatePkgFile(iconFile, depList, false); - return ret; + // 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); } }; diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp index a36e4be..ccbc8cb 100644 --- a/qmake/generators/symbian/symbiancommon.cpp +++ b/qmake/generators/symbian/symbiancommon.cpp @@ -40,6 +40,14 @@ ****************************************************************************/ #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" SymbianCommonGenerator::SymbianCommonGenerator(MakefileGenerator *generator) : generator(generator) @@ -194,39 +202,64 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, Deployment QString installPathRegResource = "!:\\private\\10003a3f\\import\\apps"; // Find location of builds - QString epocReleasePath = QString("%1epoc32/release/$(PLATFORM)/$(TARGET)") - .arg(epocRoot()); - + 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(epocReleasePath) + .arg(destDirBin) .arg(exeFile) .arg(installPathBin) .arg(exeFile) << endl; // deploy rsc & reg_rsc file if (!project->values("CONFIG").contains("no_icon", Qt::CaseInsensitive)) { - t << QString("\"%1epoc32/data/z/resource/apps/%2\" - \"%3\\%4\"") - .arg(epocRoot()) + t << QString("\"%1/%2\" - \"%3\\%4\"") + .arg(destDirResource) .arg(fixedTarget + ".rsc") .arg(installPathResource) .arg(fixedTarget + ".rsc") << endl; - t << QString("\"%1epoc32/data/z/private/10003a3f/import/apps/%2\" - \"%3\\%4\"") - .arg(epocRoot()) + t << QString("\"%1/%2\" - \"%3\\%4\"") + .arg(destDirRegResource) .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; + 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; + } } } } @@ -274,3 +307,389 @@ QString SymbianCommonGenerator::removePathSeparators(QString &file) return ret; } +void SymbianCommonGenerator::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 SymbianCommonGenerator::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 SymbianCommonGenerator::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 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(); + int tmp = 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 index abe6d51..32f9483 100644 --- a/qmake/generators/symbian/symbiancommon.h +++ b/qmake/generators/symbian/symbiancommon.h @@ -63,11 +63,21 @@ public: 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; @@ -77,6 +87,8 @@ protected: 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 38b6cad..9cb4c85 100644 --- a/qmake/generators/symbian/symmake.cpp +++ b/qmake/generators/symbian/symmake.cpp @@ -50,7 +50,6 @@ #include <qdebug.h> #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" @@ -63,11 +62,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" @@ -1123,391 +1117,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(); - int tmp = 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)) diff --git a/qmake/generators/symbian/symmake.h b/qmake/generators/symbian/symmake.h index 46071b8..7ff1ce9 100644 --- a/qmake/generators/symbian/symmake.h +++ b/qmake/generators/symbian/symmake.h @@ -66,8 +66,6 @@ protected: QMap<QString, QStringList> makmakeCommands; QStringList overriddenMmpKeywords; - QHash<QString, QString> qt2S60LangMapTable; - QString fixPathForMmp(const QString& origPath, const QDir& parentDir); QString canonizePath(const QString& origPath); @@ -110,14 +108,6 @@ 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); -- cgit v0.12 From 71eacd6505053cc44e6df6f5632bf31308cfc04a Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 9 Feb 2010 10:07:16 +0100 Subject: Fixed some files in the clean target. --- mkspecs/symbian/linux-armcc/features/symbian_building.prf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index 1106fd9..f182ca3 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -92,6 +92,7 @@ contains(TEMPLATE, app) { QMAKE_POST_LINK += $$QMAKE_MOVE $$symbianDestdir/$${TARGET} $$symbianDestdir/$${TARGET}.sym QMAKE_POST_LINK += && elf2e32 --version $$decVersion --sid=$$TARGET.SID --uid1=0x1000007a --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --capability=None --fpu=softvfp --targettype=EXE --elfinput=$${symbianDestdir}/$${TARGET}.sym --output=$${symbianDestdir}/$${TARGET}.exe --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged | tee elf2e32.log && ! grep Error: elf2e32.log >& /dev/null && rm -f elf2e32.log + QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.sym QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.exe QMAKE_LIBS += -leexe.lib\\(uc_exe_.o\\) @@ -111,7 +112,7 @@ 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_CLEAN += $${symbian_resources_RCC_DIR}/$${symbian_resource_clean} + QMAKE_DISTCLEAN += $${symbianDestdir}/$${symbian_resource_clean} symbian_resource_clean = $$replace(symbian_resource, "\.rss$", ".rpp") QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${symbian_resource_clean} } -- cgit v0.12 From 18c9ecc6a381d77128ef1caf7ab9c2990c7e49f7 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 9 Feb 2010 10:09:19 +0100 Subject: Added symbian resources to target predeps. This is required in the cases where the target does not directly include the rsg files, but the corresponding rsc file is still needed on the target device. --- mkspecs/symbian/linux-armcc/features/symbian_building.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index f182ca3..889b8b0 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -130,7 +130,7 @@ symbianresources.commands = cpp -nostdinc -undef \ -h$${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rsg \ -i${QMAKE_FILE_NAME} symbianresources.dependency_type = TYPE_C -symbianresources.CONFIG = no_link +symbianresources.CONFIG = no_link target_predeps QMAKE_EXTRA_COMPILERS += symbianresources -- cgit v0.12 From 86fd3005d79de01dca5b857988bdf2a1411e74ee Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 9 Feb 2010 11:26:04 +0100 Subject: Updated installation instructions. --- README.s60-mkspec | 59 ++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 43 insertions(+), 16 deletions(-) diff --git a/README.s60-mkspec b/README.s60-mkspec index a065426..af500e1 100644 --- a/README.s60-mkspec +++ b/README.s60-mkspec @@ -45,28 +45,55 @@ Compiling: and then wait for a while. - 4. Compile some helloworld application (I leave the details to you + 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 - 5. Package and run on the phone. This is unfortunately a bit of a - manual step at the moment. Your best bet is to look at a Windows - build of the same application, and manually grab the .rsc files - that it refers to and put them in the application directory on - Linux. Then you can take the pkg_template.pkg file provided in - the repository and tweak it to include the files you want. Note - that due to limitations on how the makesis tool interprets file - paths, all the files included need to be in the current directory - (or a link from there). + 6. Package, install and run application. - Assuming that all the files are in place, do this: + makesis helloworld_template.pkg + signsis helloworld_template.sis helloworld_template.sisx \ + <QTDIR>/src/s60installs/selfsigned.cer \ + <QTDIR>/src/s60installs/selfsigned.key - cp <qt-root>/src/s60installs/selfsigned.* . - winewrapper makesis.exe MyApp.pkg MyApp_unsigned.sis - winewrapper signsis.exe MyApp_unsigned.sis MyApp.sis \ - selfsigned.cer selfsigned.key + Then either install by memory card, or install and run like this: - 7. Enjoy QObjects and "hello world" on the phone! + runonphone -p /dev/ttyUSB1 -s helloworld_template.sisx \ + helloworld.exe + 7. Enjoy "hello world" on the phone! -- cgit v0.12 From 3cc5feeadf81b8e6d7dc6efddd751e9471888078 Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Tue, 9 Feb 2010 14:38:29 +0100 Subject: Move duplicated code out to a qmake feature --- mkspecs/symbian/features/do_not_build_as_thumb.prf | 8 ++++++++ src/3rdparty/webkit/WebCore/WebCore.pro | 9 +-------- src/s60main/s60main.pro | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) create mode 100644 mkspecs/symbian/features/do_not_build_as_thumb.prf 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/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index de185c1..7f2a17d 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -24,14 +24,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 - 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 - } + CONFIG += do_not_build_as_thumb } include($$PWD/../WebKit.pri) diff --git a/src/s60main/s60main.pro b/src/s60main/s60main.pro index 47cf020..05a045b 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 -- cgit v0.12 From 9419afc2d161bfe9004e1837191bbae58b00fea8 Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Wed, 10 Feb 2010 13:18:10 +0100 Subject: Remove dummy lines that disabled mifconv The linux mifconv wrapper script has been fixed so this disabling is no longer needed. --- mkspecs/symbian/linux-armcc/features/symbian_building.prf | 6 ------ 1 file changed, 6 deletions(-) diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index 45b5162..045c183 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -183,9 +183,3 @@ 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)") } - -# ### FIXME! TODO! Remove this after icons have been fixed. -QMAKE_EXTRA_COMPILERS -= mifconv -RSS_RULES.number_of_icons = -RSS_RULES.icon_file = -PRE_TARGETDEPS -= $$mifconv.output -- cgit v0.12 From 670d101d1f8def0c55a1e22d447d4989462ee331 Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Wed, 10 Feb 2010 13:49:03 +0100 Subject: Make the symbian build not bail out over missing files --- translations/translations.pro | 1 + 1 file changed, 1 insertion(+) 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 = -- cgit v0.12 From e2510486b8857c8f660dfc2d0ef2e4798c60a262 Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Wed, 10 Feb 2010 18:52:43 +0100 Subject: Place the generated pkg file in the build dir. --- qmake/generators/symbian/symbiancommon.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp index ccbc8cb..652025b 100644 --- a/qmake/generators/symbian/symbiancommon.cpp +++ b/qmake/generators/symbian/symbiancommon.cpp @@ -118,9 +118,9 @@ void SymbianCommonGenerator::removeSpecialCharacters(QString& str) void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, DeploymentList &depList, bool epocBuild) { QMakeProject *project = generator->project; - QString pkgFilename = QString("%1_template.%2") - .arg(fixedTarget) - .arg("pkg"); + QString pkgFilename = QString("%1/%2_template.%3") + .arg(Option::output_dir).arg(fixedTarget).arg("pkg"); + QFile pkgFile(pkgFilename); if (!pkgFile.open(QIODevice::WriteOnly | QIODevice::Text)) { PRINT_FILE_CREATE_ERROR(pkgFilename); -- cgit v0.12 From 4b4021443ba06b966c46994eeeceb34dd607bd9b Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Thu, 11 Feb 2010 13:18:13 +0100 Subject: More src!=builddir fixes for symbian makefile generator --- qmake/generators/symbian/symbiancommon.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp index 652025b..7100b57 100644 --- a/qmake/generators/symbian/symbiancommon.cpp +++ b/qmake/generators/symbian/symbiancommon.cpp @@ -57,7 +57,7 @@ SymbianCommonGenerator::SymbianCommonGenerator(MakefileGenerator *generator) void SymbianCommonGenerator::init() { QMakeProject *project = generator->project; - fixedTarget = generator->escapeFilePath(generator->fileFixify(project->first("TARGET"))); + fixedTarget = generator->escapeFilePath(project->first("TARGET")); fixedTarget = removePathSeparators(fixedTarget); removeSpecialCharacters(fixedTarget); @@ -118,8 +118,9 @@ void SymbianCommonGenerator::removeSpecialCharacters(QString& str) void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, DeploymentList &depList, bool epocBuild) { QMakeProject *project = generator->project; - QString pkgFilename = QString("%1/%2_template.%3") - .arg(Option::output_dir).arg(fixedTarget).arg("pkg"); + 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)) { @@ -311,6 +312,8 @@ 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(); @@ -344,6 +347,8 @@ void SymbianCommonGenerator::writeRegRssFile(QStringList &userItems) 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)) { @@ -390,6 +395,8 @@ void SymbianCommonGenerator::writeRssFile(QString &numberOfIcons, QString &iconF 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)) { -- cgit v0.12 From 12b5471062a52f6745f4309568b4c27c5e12d91f Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 12 Feb 2010 11:03:03 +0100 Subject: Made some changes after code review. - Changed makefile generator name to SYMBIAN_UNIX, to be more in line with the other generators. - Explained the reason for avoiding virtual inheritance in a bit more detail. - Removed an unnecessary string replacement. - Fixed the location of s60 plugins for MMP based generators. RevBy: Miikka Heikkinen --- mkspecs/common/symbian/symbian-makefile.conf | 2 +- qmake/generators/makefile.h | 34 +++++++++++++++++++++++++--- qmake/generators/metamakefile.cpp | 2 +- qmake/generators/symbian/symbiancommon.cpp | 2 +- src/s60installs/s60installs.pro | 16 ++++++++----- 5 files changed, 44 insertions(+), 12 deletions(-) diff --git a/mkspecs/common/symbian/symbian-makefile.conf b/mkspecs/common/symbian/symbian-makefile.conf index 65796b6..c8a88dd 100644 --- a/mkspecs/common/symbian/symbian-makefile.conf +++ b/mkspecs/common/symbian/symbian-makefile.conf @@ -2,7 +2,7 @@ # qmake configuration for makefile based symbian # -MAKEFILE_GENERATOR = UNIX_SYMBIAN +MAKEFILE_GENERATOR = SYMBIAN_UNIX include(symbian.conf) diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h index 0b3bdfa..85510ea 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h @@ -249,9 +249,37 @@ public: virtual bool openOutput(QFile &, const QString &build) const; virtual bool isWindowsShell() const { return Option::target_mode == Option::TARG_WIN_MODE; } - // This 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. + /* 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; }; diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp index 54df7bc..d4d1d43 100644 --- a/qmake/generators/metamakefile.cpp +++ b/qmake/generators/metamakefile.cpp @@ -477,7 +477,7 @@ MetaMakefileGenerator::createMakefileGenerator(QMakeProject *proj, bool noIO) mkfile = new SymbianAbldMakefileGenerator; } else if(gen == "SYMBIAN_SBSV2") { mkfile = new SymbianSbsv2MakefileGenerator; - } else if(gen == "UNIX_SYMBIAN") { + } 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/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp index 7100b57..e66a909 100644 --- a/qmake/generators/symbian/symbiancommon.cpp +++ b/qmake/generators/symbian/symbiancommon.cpp @@ -274,7 +274,7 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, Deployment t << "; DEPLOYMENT" << endl; for (int i = 0; i < depList.size(); ++i) { t << QString("\"%1\" - \"%2\"") - .arg(QString(depList.at(i).from).replace('\\','/')) + .arg(depList.at(i).from) .arg(depList.at(i).to) << endl; } t << endl; diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index 8cb7c18..cff8426 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -27,20 +27,24 @@ symbian: { $$QMAKE_LIBDIR_QT/QtSql.dll symbian-abld|symbian-sbsv2 { - pluginLocations = $${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET) + defineReplace(pluginLocations) { + return ($${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)) + } } else { - pluginLocations = $$QT_BUILD_TREE/src/plugins/s60 + defineReplace(pluginLocations) { + return ($$QT_BUILD_TREE/src/plugins/s60/$$1) + } } qts60plugindeployment = \ "IF package(0x1028315F)" \ - " \"$${pluginLocations}/5_0/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)" \ - " \"$${pluginLocations}/3_2/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)" \ - " \"$${pluginLocations}/3_1/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" \ - " \"$${pluginLocations}/5_0/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 -- cgit v0.12 From c9a72e309ac87f650a8678d4ad27cbf96ee76f40 Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Thu, 11 Feb 2010 15:30:25 +0100 Subject: Fix syntax passed to isEmpty for QMAKE_POST_LINK --- mkspecs/symbian/linux-armcc/features/symbian_building.prf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index 045c183..33eb161 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -79,7 +79,7 @@ isEmpty(TARGET.SID):TARGET.SID = $$TARGET.UID3 isEmpty(TARGET.UID2):TARGET.UID2 = 0x00000000 contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { - !isEmpty($$QMAKE_POST_LINK):QMAKE_POST_LINK += && + !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 --capability=None --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 | tee elf2e32.log && test `grep -c 'Error:' elf2e32.log` = 0 && rm elf2e32.log @@ -93,7 +93,7 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { } contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@.*") { - !isEmpty($$QMAKE_POST_LINK):QMAKE_POST_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 -- cgit v0.12 From 56e2dd03f58024d083a5b7a56566da1305f3321d Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Thu, 11 Feb 2010 14:15:33 +0100 Subject: use the proper QMake option to find a shared header file --- examples/network/fortuneclient/fortuneclient.pro | 2 +- examples/network/fortuneserver/fortuneserver.pro | 2 +- examples/network/network-chat/network-chat.pro | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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 -- cgit v0.12 From 8f8f6f6e4be8ca85137338a99c4cfdf1c78e3324 Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Thu, 11 Feb 2010 15:31:30 +0100 Subject: Pass in capabilities from .pro file to the symbian system Task-number: QTBUG-8055 --- mkspecs/symbian/linux-armcc/features/symbian_building.prf | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index 33eb161..a493b9e 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -81,8 +81,10 @@ isEmpty(TARGET.UID2):TARGET.UID2 = 0x00000000 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 + capability = $$replace(TARGET.CAPABILITY, " ", "+") + !isEmpty(capability): capability = "--capability=$$capability" # 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 --capability=None --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 | tee elf2e32.log && test `grep -c 'Error:' elf2e32.log` = 0 && rm elf2e32.log + QMAKE_POST_LINK += && elf2e32 --version=$$decVersion --sid=$$TARGET.SID --uid1=0x10000079 --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --capability=None --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 @@ -96,8 +98,10 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@.*") { !isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK += && QMAKE_POST_LINK += $$QMAKE_MOVE $$symbianDestdir/$${TARGET} $$symbianDestdir/$${TARGET}.sym + capability = $$replace(TARGET.CAPABILITY, " ", "+") + !isEmpty(capability): capability = "--capability=$$capability" # 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 --capability=None --fpu=softvfp --targettype=EXE --elfinput=$${symbianDestdir}/$${TARGET}.sym --output=$${symbianDestdir}/$${TARGET}.exe --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged | tee elf2e32.log && test `grep -c 'Error:' elf2e32.log` = 0 && rm elf2e32.log + QMAKE_POST_LINK += && elf2e32 --version $$decVersion --sid=$$TARGET.SID --uid1=0x1000007a --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --capability=None --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_DISTCLEAN += $${symbianDestdir}/$${TARGET}.sym QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.exe -- cgit v0.12 From 11abea2ee916bcabc9917d07333a8ae53dea2caf Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Thu, 11 Feb 2010 15:33:20 +0100 Subject: Properly clean out generated files. The rsc files are generated for the symbian build system out of rss files and end up going onto the device (much like the .exe), so we keep them around on 'make clean' but remove them on distclean. --- mkspecs/symbian/linux-armcc/features/symbian_building.prf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index a493b9e..5a54adc 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -170,7 +170,9 @@ contains(TEMPLATE, "app"):!contains(CONFIG, "no_icon") { 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 } -- cgit v0.12 From 949fd8c023af83e5a91701259699e2ebde06b4c3 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 12 Feb 2010 16:45:37 +0100 Subject: Added symbian/linux-armcc generated files to ignore file. --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index c8153fc..6eeb8c6 100644 --- a/.gitignore +++ b/.gitignore @@ -192,6 +192,11 @@ plugin_commonU.def *.sis *.sisx *.lst +*.exe +*.mif +*.rsc +*.sym +*.lib # Generated by abldfast.bat from devtools. .abldsteps.* -- cgit v0.12 From cfdf813056c5e6063e97bd01266c249ec2f9ecf1 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 12 Feb 2010 16:46:28 +0100 Subject: Fixed position of plugins on Symbian. --- src/plugins/s60/s60pluginbase.pri | 2 ++ src/s60installs/s60installs.pro | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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 60676ab..c5d5830 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -32,7 +32,7 @@ symbian: { } } else { defineReplace(pluginLocations) { - return ($$QT_BUILD_TREE/src/plugins/s60/$$1) + return ($$QT_BUILD_TREE/plugins/s60/$$1) } } -- cgit v0.12 From 3ee946d807e74787bc84752cabd2dda295f10c66 Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Mon, 15 Feb 2010 10:44:43 +0100 Subject: Fix capabilities forwarding for symbian/linux --- mkspecs/symbian/linux-armcc/features/symbian_building.prf | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index 5a54adc..6cc1e25 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -81,10 +81,12 @@ isEmpty(TARGET.UID2):TARGET.UID2 = 0x00000000 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 - capability = $$replace(TARGET.CAPABILITY, " ", "+") - !isEmpty(capability): capability = "--capability=$$capability" + capability = --capability=$$replace(TARGET.CAPABILITY, " ", "+") + capability = $$join(capability, "+") + isEmpty(capability): capability = "None" + capability = "--capability=$$capability" # 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 --capability=None --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_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 @@ -99,9 +101,11 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@.*") { QMAKE_POST_LINK += $$QMAKE_MOVE $$symbianDestdir/$${TARGET} $$symbianDestdir/$${TARGET}.sym capability = $$replace(TARGET.CAPABILITY, " ", "+") - !isEmpty(capability): capability = "--capability=$$capability" + capability = $$join(capability, "+") + isEmpty(capability): capability = "None" + capability = "--capability=$$capability" # 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 --capability=None --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 += && 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_DISTCLEAN += $${symbianDestdir}/$${TARGET}.sym QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.exe -- cgit v0.12 From 0d814d95f4f7eae88116617ac82a5fb79b3a597a Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Mon, 15 Feb 2010 15:59:19 +0100 Subject: Make sure that repeatedly calling 'make' doesn't repeatedly link On symbian a target is forcebly called ${TARGET}.exe, so when make checks for the existence on the filesystem for ${TARGET} it can't find it and links again. Avoid this by hardlinking ${TARGET} to ${TARGET}.exe --- mkspecs/symbian/linux-armcc/features/symbian_building.prf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index 6cc1e25..4f699a7 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -106,8 +106,10 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@.*") { capability = "--capability=$$capability" # 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\\) -- cgit v0.12 From 9f5b02406f38fe02a27de7843b9f8a11232d2064 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 16 Feb 2010 09:13:09 +0100 Subject: Fixed binary capability assignment on Symbian. --- mkspecs/symbian/linux-armcc/features/symbian_building.prf | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index 4f699a7..b0185d0 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -78,13 +78,15 @@ 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 - capability = --capability=$$replace(TARGET.CAPABILITY, " ", "+") - capability = $$join(capability, "+") - isEmpty(capability): capability = "None" - capability = "--capability=$$capability" # 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 @@ -100,10 +102,6 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@.*") { !isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK += && QMAKE_POST_LINK += $$QMAKE_MOVE $$symbianDestdir/$${TARGET} $$symbianDestdir/$${TARGET}.sym - capability = $$replace(TARGET.CAPABILITY, " ", "+") - capability = $$join(capability, "+") - isEmpty(capability): capability = "None" - capability = "--capability=$$capability" # 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" -- cgit v0.12 From 6ff8405b4ab06c58a9ce0b4bdd7449f38b97ba48 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 16 Feb 2010 13:15:20 +0100 Subject: Removed file templates no longer needed after pkg generator was impl. --- templates/pkg_template.pkg | 28 ---------------------------- templates/wiggly.rsc | Bin 93 -> 0 bytes templates/wiggly_reg.rsc | Bin 103 -> 0 bytes 3 files changed, 28 deletions(-) delete mode 100644 templates/pkg_template.pkg delete mode 100644 templates/wiggly.rsc delete mode 100644 templates/wiggly_reg.rsc diff --git a/templates/pkg_template.pkg b/templates/pkg_template.pkg deleted file mode 100644 index 955ab49..0000000 --- a/templates/pkg_template.pkg +++ /dev/null @@ -1,28 +0,0 @@ -; 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 deleted file mode 100644 index cb487c3..0000000 Binary files a/templates/wiggly.rsc and /dev/null differ diff --git a/templates/wiggly_reg.rsc b/templates/wiggly_reg.rsc deleted file mode 100644 index 6f52a2c..0000000 Binary files a/templates/wiggly_reg.rsc and /dev/null differ -- cgit v0.12 From b477d02479d9effbdb97e189a60dbf44dda5cbc9 Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Tue, 16 Feb 2010 15:06:37 +0100 Subject: No need to specialize for this compiler, just include the common one. --- mkspecs/symbian/linux-armcc/qplatformdefs.h | 168 +--------------------------- 1 file changed, 1 insertion(+), 167 deletions(-) diff --git a/mkspecs/symbian/linux-armcc/qplatformdefs.h b/mkspecs/symbian/linux-armcc/qplatformdefs.h index a96742a..db67648 100644 --- a/mkspecs/symbian/linux-armcc/qplatformdefs.h +++ b/mkspecs/symbian/linux-armcc/qplatformdefs.h @@ -1,167 +1 @@ -/**************************************************************************** -** -** 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 +#include "../../common/symbian/qplatformdefs.h" -- cgit v0.12 From e474d6dfb1aefec60fb0946430090d0476a85e74 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 16 Feb 2010 15:09:06 +0100 Subject: Fixed location of dll on Symbian after QtMultimedia was added. --- src/s60installs/s60installs.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index c5d5830..351da5e 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -129,7 +129,7 @@ symbian: { } contains(QT_CONFIG, multimedia) { - qtlibraries.sources += QtMultimedia.dll + qtlibraries.sources += $$QMAKE_LIBDIR_QT/QtMultimedia.dll } BLD_INF_RULES.prj_exports += "qt.iby $$CORE_MW_LAYER_IBY_EXPORT_PATH(qt.iby)" -- cgit v0.12 From 6f83ced46abe14725fc6e431d2688abaffb61015 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 16 Feb 2010 15:12:49 +0100 Subject: Fixed plugin locations in the pkg file. This broke after commit cfdf813056c5e6063e97bd01266c249ec2f9ecf1. --- src/s60installs/s60installs.pro | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index 351da5e..0f96d0e 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -27,24 +27,20 @@ symbian: { $$QMAKE_LIBDIR_QT/QtSql.dll symbian-abld|symbian-sbsv2 { - defineReplace(pluginLocations) { - return ($${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)) - } + pluginLocations = $${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET) } else { - defineReplace(pluginLocations) { - return ($$QT_BUILD_TREE/plugins/s60/$$1) - } + pluginLocations = $$QT_BUILD_TREE/plugins/s60 } qts60plugindeployment = \ "IF package(0x1028315F)" \ - " \"$$pluginLocations(5_0)/qts60plugin_5_0.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0.dll\"" \ + " \"$$pluginLocations/qts60plugin_5_0.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0.dll\"" \ "ELSEIF package(0x102752AE)" \ - " \"$$pluginLocations(3_2)/qts60plugin_3_2.dll\" - \"c:\\sys\\bin\\qts60plugin_3_2.dll\"" \ + " \"$$pluginLocations/qts60plugin_3_2.dll\" - \"c:\\sys\\bin\\qts60plugin_3_2.dll\"" \ "ELSEIF package(0x102032BE)" \ - " \"$$pluginLocations(3_1)/qts60plugin_3_1.dll\" - \"c:\\sys\\bin\\qts60plugin_3_1.dll\"" \ + " \"$$pluginLocations/qts60plugin_3_1.dll\" - \"c:\\sys\\bin\\qts60plugin_3_1.dll\"" \ "ELSE" \ - " \"$$pluginLocations(5_0)/qts60plugin_5_0.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0.dll\"" \ + " \"$$pluginLocations/qts60plugin_5_0.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0.dll\"" \ "ENDIF" qtlibraries.pkg_postrules += qts60plugindeployment -- cgit v0.12 From 0374c15075f98b0b4efbb1c00ef3812b67fabe0f Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 19 Feb 2010 11:41:01 +0100 Subject: Changed phrasing slightly. This is a better sentence and has the added benefit of not confusing emacs' highlighting, causing the last quote mark to generate a string running through the rest of the file. ;-) --- bin/createpackage.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/createpackage.pl b/bin/createpackage.pl index 1d6ab6b..dc8f3ef 100755 --- a/bin/createpackage.pl +++ b/bin/createpackage.pl @@ -85,7 +85,7 @@ Where parameters are as follows: winscw | gcce | armv5 | armv6 | armv7 certificate = The certificate file used for signing key = The certificate's private key file - passphrase = The certificate's private key file's passphrase + passphrase = The passphrase of the certificate's private key file Example: createpackage.pl fluidlauncher_template.pkg release-armv5 -- cgit v0.12 From 78ef8aadd693151b309dea320dc693707880331d Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 19 Feb 2010 13:52:51 +0100 Subject: Changed check for platform and target to depend on macro existence. This change was done in order to support build systems that do not use platform and target in the pkg file. --- bin/createpackage.pl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/createpackage.pl b/bin/createpackage.pl index dc8f3ef..e4c714e 100755 --- a/bin/createpackage.pl +++ b/bin/createpackage.pl @@ -171,14 +171,6 @@ unless (length($templatepkg)) { Usage(); } -# If the pkg file is not actually a template, there is no need for plaform or target. -if ($templatepkg =~ m/_template\.pkg/i) { - unless (length($platform) && length($target)) { - print "\nError: Platform or target is not defined!\n"; - Usage(); - } -} - # Check template exist stat($templatepkg); unless( -e _ ) { @@ -246,6 +238,14 @@ open( TEMPLATE, $templatepkg) or die "Error '$templatepkg': $!\n"; $_=<TEMPLATE>; close (TEMPLATE); +# If the pkg file does not contain macros, there is no need for platform or target. +if (m/\$\(PLATFORM\)/) { + unless (length($platform) && length($target)) { + print "\nError: Platform or target is not defined!\n"; + Usage(); + } +} + # replace the PKG variables s/\$\(PLATFORM\)/$platform/gm; s/\$\(TARGET\)/$target/gm; -- cgit v0.12 From 9d818ceb4765474c22d624ee5bdb11019f15a23f Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 19 Feb 2010 13:55:42 +0100 Subject: Got rid of some warnings when using "perl -w". --- bin/createpackage.pl | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/bin/createpackage.pl b/bin/createpackage.pl index e4c714e..10f4b40 100755 --- a/bin/createpackage.pl +++ b/bin/createpackage.pl @@ -130,16 +130,21 @@ my $templatepkg = $ARGV[0]; my $targetplatform = lc $ARGV[1]; my @tmpvalues = split('-', $targetplatform); -my $target = $tmpvalues[0]; -my $platform = $tmpvalues[1];; +my $target; +$target = $tmpvalues[0] or $target = ""; +my $platform; +$platform = $tmpvalues[1] or $platform = ""; # Convert visual target to real target (debug->udeb and release->urel) $target =~ s/debug/udeb/i; $target =~ s/release/urel/i; -my $certificate = $ARGV[2]; -my $key = $ARGV[3]; -my $passphrase = $ARGV[4]; +my $certificate; +$certificate = $ARGV[2] or $certificate = ""; +my $key; +$key = $ARGV[3] or $key = ""; +my $passphrase; +$passphrase = $ARGV[4] or $passphrase = ""; # Generate output pkg basename (i.e. file name without extension) my $pkgoutputbasename = $templatepkg; -- cgit v0.12 From 16f251a89cc4ce70eb870cfd97d9befaa19954bd Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 19 Feb 2010 13:56:21 +0100 Subject: Changed createpackage script to use relative paths. This was done in order to support signsis on Linux, where relative paths are required. --- bin/createpackage.pl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/createpackage.pl b/bin/createpackage.pl index 10f4b40..0662ad0 100755 --- a/bin/createpackage.pl +++ b/bin/createpackage.pl @@ -277,7 +277,9 @@ if($stub) { print("\n"); # Sign SIS with certificate info given as an argument. - system ("signsis $unsigned_sis_name $signed_sis_name $certificate $key $passphrase"); + my $relcert = File::Spec->abs2rel($certificate); + my $relkey = File::Spec->abs2rel($key); + system ("signsis $unsigned_sis_name $signed_sis_name $relcert $relkey $passphrase"); # Check if creating signed SIS Succeeded stat($signed_sis_name); @@ -291,10 +293,10 @@ if($stub) { # Sign with additional certificates & keys for my $row ( @certificates ) { # Get certificate absolute file names, relative paths are relative to certfilepath - my $abscert = File::Spec->rel2abs( $row->[0], $certfilepath); - my $abskey = File::Spec->rel2abs( $row->[1], $certfilepath); + my $relcert = File::Spec->abs2rel(File::Spec->rel2abs( $row->[0], $certfilepath)); + my $relkey = File::Spec->abs2rel(File::Spec->rel2abs( $row->[1], $certfilepath)); - system ("signsis $signed_sis_name $signed_sis_name $abscert $abskey $row->[2]"); + system ("signsis $signed_sis_name $signed_sis_name $relcert $relkey $row->[2]"); print ("\tAdditionally signed the SIS with certificate: $row->[0]!\n"); } -- cgit v0.12 From eca6080b2337a364c9980d72593c5b2bbff9aabd Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 19 Feb 2010 16:40:11 +0100 Subject: Prevented lowercasing of the sis file. This does not work well on case sensitive file systems. --- bin/createpackage.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/createpackage.pl b/bin/createpackage.pl index 0662ad0..3ab3909 100755 --- a/bin/createpackage.pl +++ b/bin/createpackage.pl @@ -154,11 +154,11 @@ if ($pkgoutputbasename eq $templatepkg) { $preservePkgOutput = "1"; } $pkgoutputbasename =~ s/\.pkg//g; -$pkgoutputbasename = lc($pkgoutputbasename); +$pkgoutputbasename = $pkgoutputbasename; # Store output file names to variables -my $pkgoutput = lc($pkgoutputbasename.".pkg"); -my $sisoutputbasename = lc($pkgoutputbasename); +my $pkgoutput = $pkgoutputbasename.".pkg"; +my $sisoutputbasename = $pkgoutputbasename; $sisoutputbasename =~ s/_$targetplatform//g; my $unsigned_sis_name = $sisoutputbasename."_unsigned.sis"; my $signed_sis_name = $sisoutputbasename.".sis"; -- cgit v0.12 From 1e5726a08c12a28606d0da1d8e9120a3487c5da5 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 19 Feb 2010 16:41:37 +0100 Subject: Removed the .sh extension from the createpackage script. None of our other tools have a .sh extension. Why should this one? --- bin/createpackage | 3 +++ bin/createpackage.sh | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) create mode 100755 bin/createpackage delete mode 100755 bin/createpackage.sh diff --git a/bin/createpackage b/bin/createpackage new file mode 100755 index 0000000..fdd4eeb --- /dev/null +++ b/bin/createpackage @@ -0,0 +1,3 @@ +#!/bin/sh +scriptpath=`dirname $0` +perl $scriptpath/createpackage.pl "$@" diff --git a/bin/createpackage.sh b/bin/createpackage.sh deleted file mode 100755 index fdd4eeb..0000000 --- a/bin/createpackage.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -scriptpath=`dirname $0` -perl $scriptpath/createpackage.pl "$@" -- cgit v0.12 From 95407ac02fbe7a75797653c3ff8a22c9d1cbd3d1 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 19 Feb 2010 16:43:20 +0100 Subject: Removed winewrapper. It is no longer needed after we switched to gnupoc as the S60 SDK for Linux. --- bin/winewrapper | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100755 bin/winewrapper diff --git a/bin/winewrapper b/bin/winewrapper deleted file mode 100755 index 94cc38a..0000000 --- a/bin/winewrapper +++ /dev/null @@ -1,24 +0,0 @@ -#!/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" "$@" -- cgit v0.12 From deb7ea0ff336487315fe0278a8f6bfedd482e651 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 19 Feb 2010 16:44:50 +0100 Subject: Enabled the "make sis" target with the Symbian makefile build system. --- mkspecs/features/symbian/qt.prf | 162 ++++++++++++++++++++++------------------ src/s60installs/s60installs.pro | 1 + 2 files changed, 89 insertions(+), 74 deletions(-) diff --git a/mkspecs/features/symbian/qt.prf b/mkspecs/features/symbian/qt.prf index a20aa1d..e9b4ab8 100644 --- a/mkspecs/features/symbian/qt.prf +++ b/mkspecs/features/symbian/qt.prf @@ -41,54 +41,49 @@ isEmpty(TARGET.EPOCSTACKSIZE):TARGET.EPOCSTACKSIZE = 0x14000 isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x020000 0x800000 # Sis file creation -make_cache_name = .make.cache -fixedDestdir = $$DESTDIR -!isEmpty(fixedDestdir):!contains(fixedDestdir, "[/\\]$"):fixedDestdir = $${fixedDestdir}/ -contains(QMAKE_HOST.os, "Windows"):fixedDestdir = $$replace(fixedDestdir, "/", "\\") - -sis_target.target = sis -sis_target.commands = $(if $(wildcard $$basename(TARGET)_template.pkg), \ - $(if $(wildcard $$make_cache_name), \ - $(MAKE) -f $(MAKEFILE) ok_sis MAKEFILES=$$make_cache_name \ - , \ - $(if $(QT_SIS_TARGET), \ - $(MAKE) -f $(MAKEFILE) ok_sis \ +symbian-abld|symbian-sbsv2 { + sis_destdir = + make_cache_name = .make.cache + sis_target.target = sis + sis_target.commands = $(if $(wildcard $$basename(TARGET)_template.pkg), \ + $(if $(wildcard $$make_cache_name), \ + $(MAKE) -f $(MAKEFILE) ok_sis MAKEFILES=$$make_cache_name \ , \ - $(MAKE) -f $(MAKEFILE) fail_sis_nocache \ + $(if $(QT_SIS_TARGET), \ + $(MAKE) -f $(MAKEFILE) ok_sis \ + , \ + $(MAKE) -f $(MAKEFILE) fail_sis_nocache \ + ) \ ) \ - ) \ - , \ - $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \ - ) + , \ + $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \ + ) -ok_sis_target.target = ok_sis -ok_sis_target.commands = createpackage.bat $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \ - $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) + ok_sis_target.target = ok_sis + ok_sis_target.commands = createpackage.bat $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \ + $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) -target_sis_target.target = $${fixedDestdir}$${TARGET}.sis -target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis + target_sis_target.target = $${sis_destdir}$${TARGET}.sis + target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis -installer_sis_target.target = installer_sis -installer_sis_target.commands = $(if $(wildcard $$basename(TARGET)_installer.pkg), \ - $(MAKE) -f $(MAKEFILE) ok_installer_sis \ - , \ - $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \ - ) -installer_sis_target.depends = $${fixedDestdir}$${TARGET}.sis + installer_sis_target.target = installer_sis + installer_sis_target.commands = $(if $(wildcard $$basename(TARGET)_installer.pkg), \ + $(MAKE) -f $(MAKEFILE) ok_installer_sis \ + , \ + $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \ + ) + installer_sis_target.depends = $${sis_destdir}$${TARGET}.sis -ok_installer_sis_target.target = ok_installer_sis -ok_installer_sis_target.commands = createpackage.bat $(QT_SIS_OPTIONS) $$basename(TARGET)_installer.pkg - \ - $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) + ok_installer_sis_target.target = ok_installer_sis + ok_installer_sis_target.commands = createpackage.bat $(QT_SIS_OPTIONS) $$basename(TARGET)_installer.pkg - \ + $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) -fail_sis_nopkg_target.target = fail_sis_nopkg -fail_sis_nopkg_target.commands = "$(error PKG file does not exist, 'sis' and 'installer_sis' target are only supported for executables or projects with DEPLOYMENT statement)" + fail_sis_nopkg_target.target = fail_sis_nopkg + fail_sis_nopkg_target.commands = "$(error PKG file does not exist, 'sis' and 'installer_sis' target are only supported for executables or projects with DEPLOYMENT statement)" -fail_sis_nocache_target.target = fail_sis_nocache -fail_sis_nocache_target.commands = "$(error Project has to be built or QT_SIS_TARGET environment variable has to be set before calling 'SIS' target)" + fail_sis_nocache_target.target = fail_sis_nocache + fail_sis_nocache_target.commands = "$(error Project has to be built or QT_SIS_TARGET environment variable has to be set before calling 'SIS' target)" -symbian-abld|symbian-sbsv2 { - # Only enable stub_sis files for the abld/sbsv2 build systems for now, since we don't - # support ROM builds for any other Symbian build system. stub_sis_target.target = stub_sis stub_sis_target.commands = $(if $(wildcard $$basename(TARGET)_template.pkg), \ $(if $(wildcard $$make_cache_name), \ @@ -108,44 +103,63 @@ symbian-abld|symbian-sbsv2 { ok_stub_sis_target.commands = createpackage.bat -s $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \ $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) - QMAKE_EXTRA_TARGETS += stub_sis_target \ + QMAKE_EXTRA_TARGETS += sis_target \ + ok_sis_target \ + target_sis_target \ + installer_sis_target \ + ok_installer_sis_target \ + fail_sis_nopkg_target \ + fail_sis_nocache_target \ + stub_sis_target \ ok_stub_sis_target + # Sbsv2 has its own store_build target which is using flms. + !symbian-sbsv2 { + contains(QMAKE_HOST.os, "Windows") { + shellFixedHash = $${LITERAL_HASH} + } else { + shellFixedHash = \\$${LITERAL_HASH} + } + store_build_target.target = store_build + store_build_target.commands = \ + @echo $${shellFixedHash} ============================================================================== > $$make_cache_name \ + && echo $${shellFixedHash} This file is generated by make and should not be modified by the user >> $$make_cache_name \ + && echo $${shellFixedHash} Name : $$make_cache_name >> $$make_cache_name \ + && echo $${shellFixedHash} Part of : lineedits >> $$make_cache_name \ + && echo $${shellFixedHash} Description : This file is used to cache last build target for >> $$make_cache_name \ + && echo $${shellFixedHash} make sis target. >> $$make_cache_name \ + && echo $${shellFixedHash} Version : >> $$make_cache_name \ + && echo $${shellFixedHash} >> $$make_cache_name \ + && echo $${shellFixedHash} ============================================================================== >> $$make_cache_name \ + && echo. >> $$make_cache_name \ + && echo QT_SIS_TARGET ?= $(QT_SIS_TARGET) >> $$make_cache_name + + QMAKE_EXTRA_TARGETS += store_build_target + } } else { - # DESTDIR is not honored on abld and sbsv2 + sis_destdir = $$DESTDIR + !isEmpty(sis_destdir):!contains(sis_destdir, "[/\\]$"):sis_destdir = $${sis_destdir}/ + contains(QMAKE_HOST.os, "Windows"):sis_destdir = $$replace(sis_destdir, "/", "\\") + + sis_target.target = sis + sis_target.commands = createpackage $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \ + - $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) + + target_sis_target.target = $${sis_destdir}$${TARGET}.sis + target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis + + installer_sis_target.target = installer_sis + installer_sis_target.commands = createpackage $(QT_SIS_OPTIONS) $$basename(TARGET)_installer.pkg - \ + $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) + installer_sis_target.depends = $${sis_destdir}$${TARGET}.sis + !isEmpty(DESTDIR) { - ok_sis_target.commands += && $$QMAKE_MOVE $$basename(TARGET).sis $$DESTDIR - ok_installer_sis_target.commands += && $$QMAKE_MOVE $$basename(TARGET).sis $$DESTDIR + sis_target.commands += && $$QMAKE_MOVE $$basename(TARGET).sis $$DESTDIR + installer_sis_target.commands += && $$QMAKE_MOVE $$basename(TARGET).sis $$DESTDIR } -} -QMAKE_EXTRA_TARGETS += sis_target \ - ok_sis_target \ - target_sis_target \ - installer_sis_target \ - ok_installer_sis_target \ - fail_sis_nopkg_target \ - fail_sis_nocache_target - -# Sbsv2 has its own store_build target which is using flms. -!symbian-sbsv2 { - contains(QMAKE_HOST.os, "Windows") { - shellFixedHash = $${LITERAL_HASH} - } else { - shellFixedHash = \\$${LITERAL_HASH} - } - store_build_target.target = store_build - store_build_target.commands = \ - @echo $${shellFixedHash} ============================================================================== > $$make_cache_name \ - && echo $${shellFixedHash} This file is generated by make and should not be modified by the user >> $$make_cache_name \ - && echo $${shellFixedHash} Name : $$make_cache_name >> $$make_cache_name \ - && echo $${shellFixedHash} Part of : lineedits >> $$make_cache_name \ - && echo $${shellFixedHash} Description : This file is used to cache last build target for >> $$make_cache_name \ - && echo $${shellFixedHash} make sis target. >> $$make_cache_name \ - && echo $${shellFixedHash} Version : >> $$make_cache_name \ - && echo $${shellFixedHash} >> $$make_cache_name \ - && echo $${shellFixedHash} ============================================================================== >> $$make_cache_name \ - && echo. >> $$make_cache_name \ - && echo QT_SIS_TARGET ?= $(QT_SIS_TARGET) >> $$make_cache_name - - QMAKE_EXTRA_TARGETS += store_build_target + QMAKE_EXTRA_TARGETS += sis_target \ + target_sis_target \ + installer_sis_target } + +QMAKE_DISTCLEAN += $${sis_destdir}$${TARGET}.sis diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index 0f96d0e..064366b 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -15,6 +15,7 @@ symbian: { qtresources.sources = $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/s60main.rsc } else { qtresources.sources = $$QMAKE_LIBDIR_QT/s60main.rsc + DESTDIR = $$QMAKE_LIBDIR_QT } qtresources.path = c:$$APP_RESOURCE_DIR -- cgit v0.12 From a31e40295d5f6e4bc54f8831ca0d0303e4b066d4 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Mon, 22 Feb 2010 10:40:58 +0100 Subject: Prevented pkg generation unless there are files to deploy. --- qmake/generators/symbian/symbian_makefile.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/qmake/generators/symbian/symbian_makefile.h b/qmake/generators/symbian/symbian_makefile.h index 532ab89..0f2e29a 100644 --- a/qmake/generators/symbian/symbian_makefile.h +++ b/qmake/generators/symbian/symbian_makefile.h @@ -64,8 +64,24 @@ public: QStringList userRssRules; readRssRules(numberOfIcons, iconFile, userRssRules); + // Generate pkg files if there are any actual files to deploy + bool generatePkg = false; DeploymentList depList; - generatePkgFile(iconFile, depList, false); + + if (targetType == TypeExe) { + generatePkg = true; + } else { + foreach(QString item, this->project->values("DEPLOYMENT")) { + if (!this->project->values(item + ".sources").isEmpty()) { + generatePkg = true; + break; + } + } + } + + if (generatePkg) { + generatePkgFile(iconFile, depList, true); + } // Get the application translations and convert to symbian OS lang code, i.e. decical number QStringList symbianLangCodes = symbianLangCodesFromTsFiles(); -- cgit v0.12 From ffe8b623d99f1d5d6af3ba660ad6749ff96cc19c Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 23 Feb 2010 15:42:18 +0100 Subject: Made createpackage.pl return error when one of the tools fail. Not strictly necessary for normal building, but nice to catch build system bugs. --- bin/createpackage.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/createpackage.pl b/bin/createpackage.pl index 3ab3909..3a61bc0 100755 --- a/bin/createpackage.pl +++ b/bin/createpackage.pl @@ -273,13 +273,15 @@ if($stub) { system ("makesis -s $pkgoutput $stub_sis_name"); } else { # Create SIS. - system ("makesis $pkgoutput $unsigned_sis_name"); + # The 'and' is because system uses 0 to indicate success. + system ("makesis $pkgoutput $unsigned_sis_name") and die ("makesis failed"); print("\n"); # Sign SIS with certificate info given as an argument. my $relcert = File::Spec->abs2rel($certificate); my $relkey = File::Spec->abs2rel($key); - system ("signsis $unsigned_sis_name $signed_sis_name $relcert $relkey $passphrase"); + # The 'and' is because system uses 0 to indicate success. + system ("signsis $unsigned_sis_name $signed_sis_name $relcert $relkey $passphrase") and die ("signsis failed"); # Check if creating signed SIS Succeeded stat($signed_sis_name); -- cgit v0.12 From 7bc2ab8e7001642cebfa2852888887654afab2a8 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 23 Feb 2010 15:43:58 +0100 Subject: Removed duplicate resource. --- examples/graphicsview/padnavigator/padnavigator.qrc | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/graphicsview/padnavigator/padnavigator.qrc b/examples/graphicsview/padnavigator/padnavigator.qrc index 30ee8e1..b26ab92 100644 --- a/examples/graphicsview/padnavigator/padnavigator.qrc +++ b/examples/graphicsview/padnavigator/padnavigator.qrc @@ -9,6 +9,5 @@ <file>images/kopeteavailable.png</file> <file>images/metacontact_online.png</file> <file>images/minitools.png</file> - <file>images/blue_angle_swirl.jpg</file> </qresource> </RCC> -- cgit v0.12 From 734596c1986f84f4c565f30fd436de94cf3cee1f Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 23 Feb 2010 15:45:26 +0100 Subject: Fixed copy/paste error after commit a31e40295d. --- qmake/generators/symbian/symbian_makefile.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qmake/generators/symbian/symbian_makefile.h b/qmake/generators/symbian/symbian_makefile.h index 0f2e29a..c51c780 100644 --- a/qmake/generators/symbian/symbian_makefile.h +++ b/qmake/generators/symbian/symbian_makefile.h @@ -80,7 +80,7 @@ public: } if (generatePkg) { - generatePkgFile(iconFile, depList, true); + generatePkgFile(iconFile, depList, false); } // Get the application translations and convert to symbian OS lang code, i.e. decical number -- cgit v0.12 From 3fc0b4194bffae9a0d7c7d87f97bb4d1e96e773b Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 23 Feb 2010 15:51:12 +0100 Subject: Implemented recursive "sis" target and enabled sis_targets feature. The sis target will depend on the main build target of each project, which should make it possible to simply run "make sis" in the root of a clean tree (after configure, of course), and have sis packages generated for everything. It works at least for Qt. This required some changes to the dependency generation in Qt, to make sure that s60installs builds its package after all of Qt, and that fluidlauncher has all the required files before building a package. In addition, all the sis target code was moved into its own qmake feature file, called sis_targets. It is currently enabled by default for Symbian. --- demos/demos.pro | 5 +- demos/embedded/embedded.pro | 2 + mkspecs/common/symbian/symbian.conf | 2 +- mkspecs/features/sis_targets.prf | 139 ++++++++++++++++++++++++++++++++++++ mkspecs/features/symbian/qt.prf | 124 -------------------------------- src/src.pro | 6 +- src/tools/bootstrap/bootstrap.pri | 5 ++ src/tools/bootstrap/bootstrap.pro | 6 ++ translations/translations.pro | 7 +- 9 files changed, 168 insertions(+), 128 deletions(-) create mode 100644 mkspecs/features/sis_targets.prf diff --git a/demos/demos.pro b/demos/demos.pro index 08dd8af..6340175 100644 --- a/demos/demos.pro +++ b/demos/demos.pro @@ -43,7 +43,7 @@ SUBDIRS += demos_boxes } mac*: SUBDIRS += demos_macmainwindow -wince*|symbian|embedded|x11: SUBDIRS += embedded +wince*|symbian|embedded|x11: SUBDIRS += demos_embedded !contains(QT_EDITION, Console):!cross_compile:!embedded:!wince*:SUBDIRS += demos_arthurplugin @@ -65,6 +65,9 @@ symbian: include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) demos_chip.subdir = chip demos_embeddeddialogs.subdir = embeddeddialogs +demos_embedded.subdir = embedded +# Because of fluidlauncher +demos_embedded.depends = demos_deform demos_pathstroke demos_shared.subdir = shared demos_deform.subdir = deform demos_gradients.subdir = gradients diff --git a/demos/embedded/embedded.pro b/demos/embedded/embedded.pro index 5bd3276..da764d1 100644 --- a/demos/embedded/embedded.pro +++ b/demos/embedded/embedded.pro @@ -4,6 +4,8 @@ SUBDIRS = styledemo raycasting flickable digiflip contains(QT_CONFIG, svg) { SUBDIRS += embeddedsvgviewer \ desktopservices + fluidlauncher.subdir = fluidlauncher + fluidlauncher.depends = styledemo desktopservices raycasting flickable digiflip lightmaps flightinfo !vxworks:!qnx:SUBDIRS += fluidlauncher } diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index a11f011..744ffda 100644 --- a/mkspecs/common/symbian/symbian.conf +++ b/mkspecs/common/symbian/symbian.conf @@ -3,7 +3,7 @@ # TEMPLATE = app -CONFIG += qt warn_on release incremental link_prl rvct_linker +CONFIG += qt warn_on release incremental link_prl rvct_linker sis_targets QT += core gui QMAKE_INCREMENTAL_STYLE = sublib diff --git a/mkspecs/features/sis_targets.prf b/mkspecs/features/sis_targets.prf new file mode 100644 index 0000000..66a7a9d --- /dev/null +++ b/mkspecs/features/sis_targets.prf @@ -0,0 +1,139 @@ +# Sis file creation +contains(TEMPLATE, app)|!isEmpty(DEPLOYMENT) { + symbian-abld|symbian-sbsv2 { + sis_destdir = + make_cache_name = .make.cache + sis_target.target = sis + sis_target.commands = $(if $(wildcard $$basename(TARGET)_template.pkg), \ + $(if $(wildcard $$make_cache_name), \ + $(MAKE) -f $(MAKEFILE) ok_sis MAKEFILES=$$make_cache_name \ + , \ + $(if $(QT_SIS_TARGET), \ + $(MAKE) -f $(MAKEFILE) ok_sis \ + , \ + $(MAKE) -f $(MAKEFILE) fail_sis_nocache \ + ) \ + ) \ + , \ + $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \ + ) + + ok_sis_target.target = ok_sis + ok_sis_target.commands = createpackage.bat $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \ + $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) + + target_sis_target.target = $${sis_destdir}$${TARGET}.sis + target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis + + installer_sis_target.target = installer_sis + installer_sis_target.commands = $(if $(wildcard $$basename(TARGET)_installer.pkg), \ + $(MAKE) -f $(MAKEFILE) ok_installer_sis \ + , \ + $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \ + ) + installer_sis_target.depends = $${sis_destdir}$${TARGET}.sis + + ok_installer_sis_target.target = ok_installer_sis + ok_installer_sis_target.commands = createpackage.bat $(QT_SIS_OPTIONS) $$basename(TARGET)_installer.pkg - \ + $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) + + fail_sis_nopkg_target.target = fail_sis_nopkg + fail_sis_nopkg_target.commands = "$(error PKG file does not exist, 'sis' and 'installer_sis' target are only supported for executables or projects with DEPLOYMENT statement)" + + fail_sis_nocache_target.target = fail_sis_nocache + fail_sis_nocache_target.commands = "$(error Project has to be built or QT_SIS_TARGET environment variable has to be set before calling 'SIS' target)" + + stub_sis_target.target = stub_sis + stub_sis_target.commands = $(if $(wildcard $$basename(TARGET)_template.pkg), \ + $(if $(wildcard $$make_cache_name), \ + $(MAKE) -f $(MAKEFILE) ok_stub_sis MAKEFILES=$$make_cache_name \ + , \ + $(if $(QT_SIS_TARGET), \ + $(MAKE) -f $(MAKEFILE) ok_stub_sis \ + , \ + $(MAKE) -f $(MAKEFILE) fail_sis_nocache \ + ) \ + ) \ + , \ + $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \ + ) + + ok_stub_sis_target.target = ok_stub_sis + ok_stub_sis_target.commands = createpackage.bat -s $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \ + $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) + + QMAKE_EXTRA_TARGETS += sis_target \ + ok_sis_target \ + target_sis_target \ + installer_sis_target \ + ok_installer_sis_target \ + fail_sis_nopkg_target \ + fail_sis_nocache_target \ + stub_sis_target \ + ok_stub_sis_target + # Sbsv2 has its own store_build target which is using flms. + !symbian-sbsv2 { + contains(QMAKE_HOST.os, "Windows") { + shellFixedHash = $${LITERAL_HASH} + } else { + shellFixedHash = \\$${LITERAL_HASH} + } + store_build_target.target = store_build + store_build_target.commands = \ + @echo $${shellFixedHash} ============================================================================== > $$make_cache_name \ + && echo $${shellFixedHash} This file is generated by make and should not be modified by the user >> $$make_cache_name \ + && echo $${shellFixedHash} Name : $$make_cache_name >> $$make_cache_name \ + && echo $${shellFixedHash} Part of : lineedits >> $$make_cache_name \ + && echo $${shellFixedHash} Description : This file is used to cache last build target for >> $$make_cache_name \ + && echo $${shellFixedHash} make sis target. >> $$make_cache_name \ + && echo $${shellFixedHash} Version : >> $$make_cache_name \ + && echo $${shellFixedHash} >> $$make_cache_name \ + && echo $${shellFixedHash} ============================================================================== >> $$make_cache_name \ + && echo. >> $$make_cache_name \ + && echo QT_SIS_TARGET ?= $(QT_SIS_TARGET) >> $$make_cache_name + + QMAKE_EXTRA_TARGETS += store_build_target + } + } else { + sis_destdir = $$DESTDIR + !isEmpty(sis_destdir):!contains(sis_destdir, "[/\\]$"):sis_destdir = $${sis_destdir}/ + contains(QMAKE_HOST.os, "Windows"):sis_destdir = $$replace(sis_destdir, "/", "\\") + + sis_target.target = sis + sis_target.commands = createpackage $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \ + - $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) + sis_target.depends = first + + target_sis_target.target = $${sis_destdir}$${TARGET}.sis + target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis + + installer_sis_target.target = installer_sis + installer_sis_target.commands = createpackage $(QT_SIS_OPTIONS) $$basename(TARGET)_installer.pkg - \ + $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) + installer_sis_target.depends = $${sis_destdir}$${TARGET}.sis + + !isEmpty(DESTDIR) { + sis_target.commands += && $$QMAKE_MOVE $$basename(TARGET).sis $$DESTDIR + installer_sis_target.commands += && $$QMAKE_MOVE $$basename(TARGET).sis $$DESTDIR + } + + QMAKE_EXTRA_TARGETS += sis_target \ + target_sis_target \ + installer_sis_target + } +} else { + contains(TEMPLATE, subdirs) { + # Enable recursive sis target. + sis_target.CONFIG = recursive + sis_target.recurse = $$SUBDIRS + } else { + # Make sure we build everything, since other sis targets in a recursive invocation + # may depend on them, even if this one is empty. + sis_target.depends = first + } + sis_target.commands = + sis_target.target = sis + QMAKE_EXTRA_TARGETS += sis_target +} + +QMAKE_DISTCLEAN += $${sis_destdir}$${TARGET}.sis diff --git a/mkspecs/features/symbian/qt.prf b/mkspecs/features/symbian/qt.prf index e9b4ab8..99f5ece 100644 --- a/mkspecs/features/symbian/qt.prf +++ b/mkspecs/features/symbian/qt.prf @@ -39,127 +39,3 @@ contains(CONFIG, qt):!contains(TARGET.UID3, 0x2001E61C):!contains(TARGET.UID3, 0 isEmpty(TARGET.EPOCSTACKSIZE):TARGET.EPOCSTACKSIZE = 0x14000 isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x020000 0x800000 - -# Sis file creation -symbian-abld|symbian-sbsv2 { - sis_destdir = - make_cache_name = .make.cache - sis_target.target = sis - sis_target.commands = $(if $(wildcard $$basename(TARGET)_template.pkg), \ - $(if $(wildcard $$make_cache_name), \ - $(MAKE) -f $(MAKEFILE) ok_sis MAKEFILES=$$make_cache_name \ - , \ - $(if $(QT_SIS_TARGET), \ - $(MAKE) -f $(MAKEFILE) ok_sis \ - , \ - $(MAKE) -f $(MAKEFILE) fail_sis_nocache \ - ) \ - ) \ - , \ - $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \ - ) - - ok_sis_target.target = ok_sis - ok_sis_target.commands = createpackage.bat $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \ - $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) - - target_sis_target.target = $${sis_destdir}$${TARGET}.sis - target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis - - installer_sis_target.target = installer_sis - installer_sis_target.commands = $(if $(wildcard $$basename(TARGET)_installer.pkg), \ - $(MAKE) -f $(MAKEFILE) ok_installer_sis \ - , \ - $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \ - ) - installer_sis_target.depends = $${sis_destdir}$${TARGET}.sis - - ok_installer_sis_target.target = ok_installer_sis - ok_installer_sis_target.commands = createpackage.bat $(QT_SIS_OPTIONS) $$basename(TARGET)_installer.pkg - \ - $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) - - fail_sis_nopkg_target.target = fail_sis_nopkg - fail_sis_nopkg_target.commands = "$(error PKG file does not exist, 'sis' and 'installer_sis' target are only supported for executables or projects with DEPLOYMENT statement)" - - fail_sis_nocache_target.target = fail_sis_nocache - fail_sis_nocache_target.commands = "$(error Project has to be built or QT_SIS_TARGET environment variable has to be set before calling 'SIS' target)" - - stub_sis_target.target = stub_sis - stub_sis_target.commands = $(if $(wildcard $$basename(TARGET)_template.pkg), \ - $(if $(wildcard $$make_cache_name), \ - $(MAKE) -f $(MAKEFILE) ok_stub_sis MAKEFILES=$$make_cache_name \ - , \ - $(if $(QT_SIS_TARGET), \ - $(MAKE) -f $(MAKEFILE) ok_stub_sis \ - , \ - $(MAKE) -f $(MAKEFILE) fail_sis_nocache \ - ) \ - ) \ - , \ - $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \ - ) - - ok_stub_sis_target.target = ok_stub_sis - ok_stub_sis_target.commands = createpackage.bat -s $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \ - $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) - - QMAKE_EXTRA_TARGETS += sis_target \ - ok_sis_target \ - target_sis_target \ - installer_sis_target \ - ok_installer_sis_target \ - fail_sis_nopkg_target \ - fail_sis_nocache_target \ - stub_sis_target \ - ok_stub_sis_target - # Sbsv2 has its own store_build target which is using flms. - !symbian-sbsv2 { - contains(QMAKE_HOST.os, "Windows") { - shellFixedHash = $${LITERAL_HASH} - } else { - shellFixedHash = \\$${LITERAL_HASH} - } - store_build_target.target = store_build - store_build_target.commands = \ - @echo $${shellFixedHash} ============================================================================== > $$make_cache_name \ - && echo $${shellFixedHash} This file is generated by make and should not be modified by the user >> $$make_cache_name \ - && echo $${shellFixedHash} Name : $$make_cache_name >> $$make_cache_name \ - && echo $${shellFixedHash} Part of : lineedits >> $$make_cache_name \ - && echo $${shellFixedHash} Description : This file is used to cache last build target for >> $$make_cache_name \ - && echo $${shellFixedHash} make sis target. >> $$make_cache_name \ - && echo $${shellFixedHash} Version : >> $$make_cache_name \ - && echo $${shellFixedHash} >> $$make_cache_name \ - && echo $${shellFixedHash} ============================================================================== >> $$make_cache_name \ - && echo. >> $$make_cache_name \ - && echo QT_SIS_TARGET ?= $(QT_SIS_TARGET) >> $$make_cache_name - - QMAKE_EXTRA_TARGETS += store_build_target - } -} else { - sis_destdir = $$DESTDIR - !isEmpty(sis_destdir):!contains(sis_destdir, "[/\\]$"):sis_destdir = $${sis_destdir}/ - contains(QMAKE_HOST.os, "Windows"):sis_destdir = $$replace(sis_destdir, "/", "\\") - - sis_target.target = sis - sis_target.commands = createpackage $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \ - - $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) - - target_sis_target.target = $${sis_destdir}$${TARGET}.sis - target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis - - installer_sis_target.target = installer_sis - installer_sis_target.commands = createpackage $(QT_SIS_OPTIONS) $$basename(TARGET)_installer.pkg - \ - $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) - installer_sis_target.depends = $${sis_destdir}$${TARGET}.sis - - !isEmpty(DESTDIR) { - sis_target.commands += && $$QMAKE_MOVE $$basename(TARGET).sis $$DESTDIR - installer_sis_target.commands += && $$QMAKE_MOVE $$basename(TARGET).sis $$DESTDIR - } - - QMAKE_EXTRA_TARGETS += sis_target \ - target_sis_target \ - installer_sis_target -} - -QMAKE_DISTCLEAN += $${sis_destdir}$${TARGET}.sis diff --git a/src/src.pro b/src/src.pro index 2ce5642..ec7b14b 100644 --- a/src/src.pro +++ b/src/src.pro @@ -6,7 +6,7 @@ win32:SRC_SUBDIRS += src_winmain 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 + SRC_SUBDIRS += src_s60main src_corelib src_xml src_gui src_network src_sql src_testlib !symbian-abld:!symbian-sbsv2 { include(tools/tools.pro) } @@ -32,6 +32,9 @@ contains(QT_CONFIG, script): SRC_SUBDIRS += src_script contains(QT_CONFIG, scripttools): SRC_SUBDIRS += src_scripttools contains(QT_CONFIG, declarative): SRC_SUBDIRS += src_declarative SRC_SUBDIRS += src_plugins +# s60installs need to be at the end, because projects.pro does an ordered build, +# and s60installs depends on all the others. +symbian:SRC_SUBDIRS += src_s60installs src_s60main.subdir = $$QT_SOURCE_TREE/src/s60main src_s60main.target = sub-s60main @@ -106,6 +109,7 @@ src_declarative.target = sub-declarative src_tools_activeqt.depends = src_tools_idc src_gui src_declarative.depends = src_xml src_gui src_script src_network src_svg src_plugins.depends = src_gui src_sql src_svg + src_s60installs.depends = $$TOOLS_SUBDIRS $$SRC_SUBDIRS contains(QT_CONFIG, webkit) { src_webkit.depends = src_gui src_sql src_network src_xml contains(QT_CONFIG, phonon):src_webkit.depends += src_phonon diff --git a/src/tools/bootstrap/bootstrap.pri b/src/tools/bootstrap/bootstrap.pri index c29d59d..c5e1e1c 100644 --- a/src/tools/bootstrap/bootstrap.pri +++ b/src/tools/bootstrap/bootstrap.pri @@ -62,3 +62,8 @@ mac { LIBS += -framework CoreServices } +# Make dummy "sis" target to keep recursive "make sis" working. +sis_target.target = sis +sis_target.commands = +sis_target.depends = first +QMAKE_EXTRA_TARGETS += sis_target diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro index 0dbb90f..d211f47 100644 --- a/src/tools/bootstrap/bootstrap.pro +++ b/src/tools/bootstrap/bootstrap.pro @@ -113,3 +113,9 @@ contains(QT_CONFIG, zlib) { lib.CONFIG = dummy_install INSTALLS += lib + +# Make dummy "sis" target to keep recursive "make sis" working. +sis_target.target = sis +sis_target.commands = +sis_target.depends = first +QMAKE_EXTRA_TARGETS += sis_target diff --git a/translations/translations.pro b/translations/translations.pro index 6f40b49..566458c 100644 --- a/translations/translations.pro +++ b/translations/translations.pro @@ -10,7 +10,7 @@ contains(TEMPLATE_PREFIX, vc):vcproj = 1 TEMPLATE = app TARGET = qm_phony_target -CONFIG -= qt separate_debug_info +CONFIG -= qt separate_debug_info sis_targets CONFIG += no_icon QT = LIBS = @@ -45,3 +45,8 @@ translations.files = $$TRANSLATIONS translations.files ~= s,\\.ts$,.qm,g translations.CONFIG += no_check_exist INSTALLS += translations + +# Make dummy "sis" target to keep recursive "make sis" working. +sis_target.target = sis +sis_target.commands = +QMAKE_EXTRA_TARGETS += sis_target -- cgit v0.12 From a670009fd378d48ff891602ec31204614e8a476f Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 23 Feb 2010 15:57:47 +0100 Subject: Changed fluidlauncher deployment to cope with Symbian makefile system --- demos/embedded/fluidlauncher/fluidlauncher.pro | 170 ++++++++++++++----------- 1 file changed, 93 insertions(+), 77 deletions(-) diff --git a/demos/embedded/fluidlauncher/fluidlauncher.pro b/demos/embedded/fluidlauncher/fluidlauncher.pro index f71388c..b2916d7 100644 --- a/demos/embedded/fluidlauncher/fluidlauncher.pro +++ b/demos/embedded/fluidlauncher/fluidlauncher.pro @@ -61,108 +61,124 @@ symbian { TARGET.UID3 = 0xA000A641 ICON = $$QT_SOURCE_TREE/src/s60installs/qt.svg + defineReplace(regResourceDir) { + symbian-abld|symbian-sbsv2 { + return($${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/$$basename(1)) + } else { + return($${QT_BUILD_TREE}/$$1) + } + } + + defineReplace(appResourceDir) { + symbian-abld|symbian-sbsv2 { + return($${EPOCROOT}$${HW_ZDIR}$${APP_RESOURCE_DIR}/$$basename(1)) + } else { + return($${QT_BUILD_TREE}/$$1) + } + } + executables.sources = \ - styledemo.exe \ - deform.exe \ - pathstroke.exe \ - wiggly.exe \ - qftp.exe \ - saxbookmarks.exe \ - desktopservices.exe \ - fridgemagnets.exe \ - softkeys.exe \ - raycasting.exe \ - flickable.exe \ - digiflip.exe \ - lightmaps.exe \ - flightinfo.exe + $$QT_BUILD_TREE/demos/embedded/styledemo/styledemo.exe \ + $$QT_BUILD_TREE/demos/deform/deform.exe \ + $$QT_BUILD_TREE/demos/pathstroke/pathstroke.exe \ + $$QT_BUILD_TREE/examples/widgets/wiggly/wiggly.exe \ + $$QT_BUILD_TREE/examples/network/qftp/qftp.exe \ + $$QT_BUILD_TREE/examples/xml/saxbookmarks/saxbookmarks.exe \ + $$QT_BUILD_TREE/demos/embedded/desktopservices/desktopservices.exe \ + $$QT_BUILD_TREE/examples/draganddrop/fridgemagnets/fridgemagnets.exe \ + $$QT_BUILD_TREE/examples/widgets/softkeys/softkeys.exe \ + $$QT_BUILD_TREE/demos/embedded/raycasting/raycasting.exe \ + $$QT_BUILD_TREE/demos/embedded/flickable/flickable.exe \ + $$QT_BUILD_TREE/demos/embedded/digiflip/digiflip.exe \ + $$QT_BUILD_TREE/demos/embedded/lightmaps/lightmaps.exe \ + $$QT_BUILD_TREE/demos/embedded/flightinfo/flightinfo.exe executables.path = /sys/bin reg_resource.sources = \ - $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/styledemo_reg.rsc \ - $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/deform_reg.rsc \ - $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/pathstroke_reg.rsc \ - $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/wiggly_reg.rsc \ - $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/qftp_reg.rsc\ - $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/saxbookmarks_reg.rsc \ - $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/desktopservices_reg.rsc \ - $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/fridgemagnets_reg.rsc \ - $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/softkeys_reg.rsc \ - $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/raycasting_reg.rsc \ - $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/flickable_reg.rsc \ - $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/digiflip_reg.rsc \ - $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/lightmaps_reg.rsc \ - $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/flightinfo_reg.rsc + $$regResourceDir(demos/embedded/styledemo/styledemo_reg.rsc) \ + $$regResourceDir(demos/deform/deform_reg.rsc) \ + $$regResourceDir(demos/pathstroke/pathstroke_reg.rsc) \ + $$regResourceDir(examples/widgets/wiggly/wiggly_reg.rsc) \ + $$regResourceDir(examples/network/qftp/qftp_reg.rsc)\ + $$regResourceDir(examples/xml/saxbookmarks/saxbookmarks_reg.rsc) \ + $$regResourceDir(demos/embedded/desktopservices/desktopservices_reg.rsc) \ + $$regResourceDir(examples/draganddrop/fridgemagnets/fridgemagnets_reg.rsc) \ + $$regResourceDir(examples/widgets/softkeys/softkeys_reg.rsc) \ + $$regResourceDir(demos/embedded/raycasting/raycasting_reg.rsc) \ + $$regResourceDir(demos/embedded/flickable/flickable_reg.rsc) \ + $$regResourceDir(demos/embedded/digiflip/digiflip_reg.rsc) \ + $$regResourceDir(demos/embedded/lightmaps/lightmaps_reg.rsc) \ + $$regResourceDir(demos/embedded/flightinfo/flightinfo_reg.rsc) contains(QT_CONFIG, phonon) { - reg_resource.sources += $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/qmediaplayer_reg.rsc + reg_resource.sources += $$regResourceDir(demos/qmediaplayer/qmediaplayer_reg.rsc) } reg_resource.path = $$REG_RESOURCE_IMPORT_DIR resource.sources = \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/styledemo.rsc \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/deform.rsc \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/pathstroke.rsc \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/wiggly.rsc \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/qftp.rsc\ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/saxbookmarks.rsc \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/desktopservices.rsc \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/fridgemagnets.rsc \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/softkeys.rsc \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/raycasting.rsc \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/flickable.rsc \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/digiflip.rsc \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/lightmaps.rsc \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/flightinfo.rsc + $$appResourceDir(demos/embedded/styledemo/styledemo.rsc) \ + $$appResourceDir(demos/deform/deform.rsc) \ + $$appResourceDir(demos/pathstroke/pathstroke.rsc) \ + $$appResourceDir(examples/widgets/wiggly/wiggly.rsc) \ + $$appResourceDir(examples/network/qftp/qftp.rsc)\ + $$appResourceDir(examples/xml/saxbookmarks/saxbookmarks.rsc) \ + $$appResourceDir(demos/embedded/desktopservices/desktopservices.rsc) \ + $$appResourceDir(examples/draganddrop/fridgemagnets/fridgemagnets.rsc) \ + $$appResourceDir(examples/widgets/softkeys/softkeys.rsc) \ + $$appResourceDir(demos/embedded/raycasting/raycasting.rsc) \ + $$appResourceDir(demos/embedded/flickable/flickable.rsc) \ + $$appResourceDir(demos/embedded/digiflip/digiflip.rsc) \ + $$appResourceDir(demos/embedded/lightmaps/lightmaps.rsc) \ + $$appResourceDir(demos/embedded/flightinfo/flightinfo.rsc) resource.path = $$APP_RESOURCE_DIR mifs.sources = \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/fluidlauncher.mif \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/styledemo.mif \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/deform.mif \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/pathstroke.mif \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/wiggly.mif \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/qftp.mif \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/saxbookmarks.mif \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/desktopservices.mif \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/fridgemagnets.mif \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/softkeys.mif \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/raycasting.mif \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/flickable.mif \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/digiflip.mif \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/lightmaps.mif \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/flightinfo.mif + $$appResourceDir(demos/embedded/fluidlauncher/fluidlauncher.mif) \ + $$appResourceDir(demos/embedded/styledemo/styledemo.mif) \ + $$appResourceDir(demos/deform/deform.mif) \ + $$appResourceDir(demos/pathstroke/pathstroke.mif) \ + $$appResourceDir(examples/widgets/wiggly/wiggly.mif) \ + $$appResourceDir(examples/network/qftp/qftp.mif) \ + $$appResourceDir(examples/xml/saxbookmarks/saxbookmarks.mif) \ + $$appResourceDir(demos/embedded/desktopservices/desktopservices.mif) \ + $$appResourceDir(examples/draganddrop/fridgemagnets/fridgemagnets.mif) \ + $$appResourceDir(examples/widgets/softkeys/softkeys.mif) \ + $$appResourceDir(demos/embedded/raycasting/raycasting.mif) \ + $$appResourceDir(demos/embedded/flickable/flickable.mif) \ + $$appResourceDir(demos/embedded/digiflip/digiflip.mif) \ + $$appResourceDir(demos/embedded/lightmaps/lightmaps.mif) \ + $$appResourceDir(demos/embedded/flightinfo/flightinfo.mif) mifs.path = $$APP_RESOURCE_DIR contains(QT_CONFIG, svg) { executables.sources += \ - embeddedsvgviewer.exe \ - weatherinfo.exe + $$QT_BUILD_TREE/demos/embedded/embeddedsvgviewer/embeddedsvgviewer.exe \ + $$QT_BUILD_TREE/demos/embedded/weatherinfo/weatherinfo.exe reg_resource.sources += \ - $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/embeddedsvgviewer_reg.rsc \ - $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/weatherinfo_reg.rsc + $$regResourceDir(demos/embedded/embeddedsvgviewer/embeddedsvgviewer_reg.rsc) \ + $$regResourceDir(demos/embedded/weatherinfo/weatherinfo_reg.rsc) resource.sources += \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/embeddedsvgviewer.rsc \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/weatherinfo.rsc + $$appResourceDir(demos/embedded/embeddedsvgviewer/embeddedsvgviewer.rsc) \ + $$appResourceDir(demos/embedded/weatherinfo/weatherinfo.rsc) mifs.sources += \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/embeddedsvgviewer.mif \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/weatherinfo.mif + $$appResourceDir(demos/embedded/embeddedsvgviewer/embeddedsvgviewer.mif) \ + $$appResourceDir(demos/embedded/weatherinfo/weatherinfo.mif) } contains(QT_CONFIG, webkit) { - executables.sources += anomaly.exe - reg_resource.sources += $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/anomaly_reg.rsc - resource.sources += $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/anomaly.rsc + executables.sources += $$QT_BUILD_TREE/demos/embedded/anomaly/anomaly.exe + reg_resource.sources += $$regResourceDir(demos/embedded/anomaly/anomaly_reg.rsc) + resource.sources += $$appResourceDir(demos/embedded/anomaly/anomaly.rsc) mifs.sources += \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/anomaly.mif + $$appResourceDir(demos/embedded/anomaly/anomaly.mif) # Since Fluidlauncher itself doesn't link webkit, we won't get dependency automatically executables.pkg_prerules += \ @@ -171,18 +187,18 @@ symbian { } contains(QT_CONFIG, phonon) { - executables.sources += qmediaplayer.exe - resource.sources += $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/qmediaplayer.rsc + executables.sources += $$QT_BUILD_TREE/demos/qmediaplayer/qmediaplayer.exe + resource.sources += $$appResourceDir(demos/qmediaplayer/qmediaplayer.rsc) mifs.sources += \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/qmediaplayer.mif + $$appResourceDir(demos/qmediaplayer/qmediaplayer.mif) } contains(QT_CONFIG, script) { - executables.sources += context2d.exe - reg_resource.sources += $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/context2d_reg.rsc - resource.sources += $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/context2d.rsc + executables.sources += $$QT_BUILD_TREE/examples/script/context2d/context2d.exe + reg_resource.sources += $$regResourceDir(examples/script/context2d/context2d_reg.rsc) + resource.sources += $$appResourceDir(examples/script/context2d/context2d.rsc) mifs.sources += \ - $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/context2d.mif + $$appResourceDir(examples/script/context2d/context2d.mif) } files.sources = $$PWD/screenshots $$PWD/slides -- cgit v0.12 From b95ee5e793b4804985f96fd98dd5fa7b0b9363a3 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 23 Feb 2010 16:29:57 +0100 Subject: Added missing header after merge with master. --- qmake/generators/symbian/symbiancommon.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp index 4c8253f..670f5f5 100644 --- a/qmake/generators/symbian/symbiancommon.cpp +++ b/qmake/generators/symbian/symbiancommon.cpp @@ -42,6 +42,9 @@ #include "symbiancommon.h" #include <qdebug.h> +// Included from tools/shared +#include <symbian/epocroot.h> + #define RESOURCE_DIRECTORY_RESOURCE "\\\\resource\\\\apps\\\\" #define RSS_RULES "RSS_RULES" -- cgit v0.12 From 9f0899d86afcc2304c9de824c43e363d2a881339 Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Mon, 22 Feb 2010 13:52:39 +0100 Subject: Clone the symbian/armcc mkspec for symbian/gcce. Very first start. --- mkspecs/common/symbian/symbian-makefile.conf | 12 -- .../linux-armcc/features/symbian_building.prf | 13 +- .../symbian/linux-gcce/features/default_post.prf | 5 + mkspecs/symbian/linux-gcce/features/qt.prf | 29 +++ .../linux-gcce/features/symbian_building.prf | 207 +++++++++++++++++++++ mkspecs/symbian/linux-gcce/platformlibs.conf | 1 + mkspecs/symbian/linux-gcce/qmake.conf | 16 ++ mkspecs/symbian/linux-gcce/qplatformdefs.h | 2 + 8 files changed, 271 insertions(+), 14 deletions(-) create mode 100644 mkspecs/symbian/linux-gcce/features/default_post.prf create mode 100644 mkspecs/symbian/linux-gcce/features/qt.prf create mode 100644 mkspecs/symbian/linux-gcce/features/symbian_building.prf create mode 100644 mkspecs/symbian/linux-gcce/platformlibs.conf create mode 100644 mkspecs/symbian/linux-gcce/qmake.conf create mode 100644 mkspecs/symbian/linux-gcce/qplatformdefs.h diff --git a/mkspecs/common/symbian/symbian-makefile.conf b/mkspecs/common/symbian/symbian-makefile.conf index c8a88dd..8c2bb35 100644 --- a/mkspecs/common/symbian/symbian-makefile.conf +++ b/mkspecs/common/symbian/symbian-makefile.conf @@ -13,18 +13,6 @@ 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 = diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index b0185d0..41d4325 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -1,5 +1,14 @@ -QMAKE_CFLAGS += $$QMAKE_CFLAGS.ARMCC -QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS.ARMCC +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_CFLAGS.ARMCC +QMAKE_CXXFLAGS += $$QMAKE_CFLAGS --no_parse_templates $$QMAKE_CXXFLAGS.ARMCC +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__ symbianObjdir=$$OBJECTS_DIR isEmpty(symbianObjdir) { diff --git a/mkspecs/symbian/linux-gcce/features/default_post.prf b/mkspecs/symbian/linux-gcce/features/default_post.prf new file mode 100644 index 0000000..7aa1f4d --- /dev/null +++ b/mkspecs/symbian/linux-gcce/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-gcce/features/qt.prf b/mkspecs/symbian/linux-gcce/features/qt.prf new file mode 100644 index 0000000..7c97368 --- /dev/null +++ b/mkspecs/symbian/linux-gcce/features/qt.prf @@ -0,0 +1,29 @@ +QMAKE_LIBDIR_QT += $${EPOCROOT}epoc32/release/armv5/lib + +INCLUDEPATH = $${EPOCROOT}epoc32/include/variant \ + $${EPOCROOT}epoc32/include/stdapis \ + $${EPOCROOT}epoc32/include/gcce \ + ${EPOCROOT}epoc32/include/stdapis/sys \ + ${EPOCROOT}epoc32/include/stdapis/stlport \ + $$INCLUDEPATH + +DEFINES *= __PRODUCT_INCLUDE__=\<$${EPOCROOT}epoc32/include/variant/symbian_os.hrh\> \ + __SYMBIAN32__ \ + __MARM_THUMB__ \ + __MARM_INTERWORK__ \ + NDEBUG \ + _UNICODE \ + __S60_50__ \ + __S60_3X__ \ + __SERIES60_3X__ \ + __GCCE__ \ + __EPOC32__ \ + __MARM__ \ + __EABI__ \ + __MARM_ARMV5__ \ + __EXE__ \ + UNICODE \ + _STLP_NO_EXCEPTION_HEADER \ + __SUPPORT_CPP_EXCEPTIONS__ + +load(qt) diff --git a/mkspecs/symbian/linux-gcce/features/symbian_building.prf b/mkspecs/symbian/linux-gcce/features/symbian_building.prf new file mode 100644 index 0000000..3e5324f --- /dev/null +++ b/mkspecs/symbian/linux-gcce/features/symbian_building.prf @@ -0,0 +1,207 @@ +gcceExtraFlags = --include=${EPOCROOT}epoc32/include/gcce/gcce.h -march=armv5t -mapcs -mthumb-interwork -nostdinc -c -fvisibility-inlines-hidden -mthumb -msoft-float -T script +QMAKE_CFLAGS += $${gcceExtraFlags} +QMAKE_CXXFLAGS += $${gcceExtraFlags} -x c++ -fexceptions -fno-unit-at-a-time + +# 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_CFLAGS.ARMCC +# QMAKE_CXXFLAGS += $$QMAKE_CFLAGS --no_parse_templates $$QMAKE_CXXFLAGS.ARMCC +# 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 +# + +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-gcce/platformlibs.conf b/mkspecs/symbian/linux-gcce/platformlibs.conf new file mode 100644 index 0000000..0a74ba9 --- /dev/null +++ b/mkspecs/symbian/linux-gcce/platformlibs.conf @@ -0,0 +1 @@ +QMAKE_LIBS += -lusrt2_2.lib -ldfpaeabi.dso -ldrtaeabi.dso -lscppnwdl.dso :lh_t__uf.l\\(switch8.o\\) diff --git a/mkspecs/symbian/linux-gcce/qmake.conf b/mkspecs/symbian/linux-gcce/qmake.conf new file mode 100644 index 0000000..e4b08c1 --- /dev/null +++ b/mkspecs/symbian/linux-gcce/qmake.conf @@ -0,0 +1,16 @@ +# +# qmake configuration for symbian/linux-gcce +# + +include(../../common/symbian/symbian-makefile.conf) + +include(../../common/g++.conf) + +QMAKE_CC = arm-none-symbianelf-gcc +QMAKE_CXX = arm-none-symbianelf-g++ +QMAKE_LINK = arm-none-symbianelf-g++ +QMAKE_LINK_SHLIB = arm-none-symbianelf-g++ +QMAKE_LINK_C = arm-none-symbianelf-gcc +QMAKE_LINK_C_SHLIB = arm-none-symbianelf-gcc +QMAKE_AR = arm-none-symbianelf-ar cqs + diff --git a/mkspecs/symbian/linux-gcce/qplatformdefs.h b/mkspecs/symbian/linux-gcce/qplatformdefs.h new file mode 100644 index 0000000..4a658c5 --- /dev/null +++ b/mkspecs/symbian/linux-gcce/qplatformdefs.h @@ -0,0 +1,2 @@ +#include "../../common/symbian/qplatformdefs.h" + -- cgit v0.12 From e9ea8cf1332a741eb4e4d115b96d89ff146f850f Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Wed, 24 Feb 2010 16:01:43 +0100 Subject: Make gcce xcompiler for symbian compile+link QtCore This moves some stuff from the common to linux-armcc specific and updates the cloned gcce specs to do the right thing. --- mkspecs/common/armcc.conf | 1 + mkspecs/common/symbian/symbian.conf | 2 +- mkspecs/symbian/linux-armcc/platformlibs.conf | 4 +- mkspecs/symbian/linux-gcce/features/qt.prf | 2 +- .../linux-gcce/features/symbian_building.prf | 52 ++++++++++++++-------- mkspecs/symbian/linux-gcce/platformlibs.conf | 5 ++- mkspecs/symbian/linux-gcce/qmake.conf | 19 ++++++-- qmake/generators/unix/unixmake.cpp | 4 +- 8 files changed, 60 insertions(+), 29 deletions(-) diff --git a/mkspecs/common/armcc.conf b/mkspecs/common/armcc.conf index c9a518b..2c765bc 100644 --- a/mkspecs/common/armcc.conf +++ b/mkspecs/common/armcc.conf @@ -2,6 +2,7 @@ # qmake configuration for armcc # +CONFIG += rvct_linker QMAKE_CC = armcc QMAKE_CFLAGS += QMAKE_CFLAGS_DEPS += -M diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index 744ffda..b496f72 100644 --- a/mkspecs/common/symbian/symbian.conf +++ b/mkspecs/common/symbian/symbian.conf @@ -3,7 +3,7 @@ # TEMPLATE = app -CONFIG += qt warn_on release incremental link_prl rvct_linker sis_targets +CONFIG += qt warn_on release incremental link_prl sis_targets QT += core gui QMAKE_INCREMENTAL_STYLE = sublib diff --git a/mkspecs/symbian/linux-armcc/platformlibs.conf b/mkspecs/symbian/linux-armcc/platformlibs.conf index ac57790..d03cb9b 100644 --- a/mkspecs/symbian/linux-armcc/platformlibs.conf +++ b/mkspecs/symbian/linux-armcc/platformlibs.conf @@ -1 +1,3 @@ -QMAKE_LIBS += -lusrt2_2.lib -ldfpaeabi.dso -ldfprvct2_2.dso -ldrtaeabi.dso -lscppnwdl.dso -ldrtrvct2_2.dso -lh_t__uf.l\\(switch8.o\\) +QMAKE_LIBS += usrt2_2.lib dfpaeabi.dso dfprvct2_2.dso drtaeabi.dso scppnwdl.dso drtrvct2_2.dso h_t__uf.l\\(switch8.o\\) + +QMAKE_RVCT_LINKSTYLE = 1 diff --git a/mkspecs/symbian/linux-gcce/features/qt.prf b/mkspecs/symbian/linux-gcce/features/qt.prf index 7c97368..79d46d1 100644 --- a/mkspecs/symbian/linux-gcce/features/qt.prf +++ b/mkspecs/symbian/linux-gcce/features/qt.prf @@ -1,4 +1,4 @@ -QMAKE_LIBDIR_QT += $${EPOCROOT}epoc32/release/armv5/lib +QMAKE_LIBDIR += $${EPOCROOT}epoc32/release/armv5/lib INCLUDEPATH = $${EPOCROOT}epoc32/include/variant \ $${EPOCROOT}epoc32/include/stdapis \ diff --git a/mkspecs/symbian/linux-gcce/features/symbian_building.prf b/mkspecs/symbian/linux-gcce/features/symbian_building.prf index 3e5324f..168b08b 100644 --- a/mkspecs/symbian/linux-gcce/features/symbian_building.prf +++ b/mkspecs/symbian/linux-gcce/features/symbian_building.prf @@ -26,25 +26,22 @@ 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}" - } +for(library, LIBS) { + library = $$replace(library, "\.dll$", ".dso") + library = $$replace(library, "^-l", "") + isFullName = $$find(library, \.) + isEmpty(isFullName):library="$${library}.dso" + newLIBS += "${EPOCROOT}epoc32/release/armv5/lib/$${library}" } 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 += dfpaeabi drtaeabi scppnwdl +for(library, QMAKE_LIBS) { + library = $$replace(library, "\.dll$", ".dso") + library = $$replace(library, "^-l", "") + isFullName = $$find(library, \.) + isEmpty(isFullName):library="$${library}.dso" + newLIBS += "${EPOCROOT}epoc32/release/armv5/lib/$${library}" } QMAKE_LIBS = $$newLIBS @@ -105,9 +102,20 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.dso QMAKE_CLEAN += $${symbianObjdir}/$${TARGET}.def - QMAKE_LIBS += -ledllstub.lib -ledll.lib\\(uc_dll_.o\\) + QMAKE_LIBS += ${EPOCROOT}/epoc32/release/armv5/udeb/edllstub.lib \ + ${EPOCROOT}/epoc32/release/armv5/udeb/edll.lib \ + -lsupc++ \ + -lgcc + + QMAKE_LFLAGS += --soname $${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll \ + -Ttext 0x80000 -Tdata 0x400000 \ + --target1-abs \ + --no-undefined \ + --strip-debug \ + --nostdlib \ + -L/home/zander/work/build-symbian/arm-2009q3/lib/gcc/arm-none-symbianelf/4.4.1/ \ + -L/home/zander/work/build-symbian/arm-2009q3/arm-none-symbianelf/lib/ - QMAKE_LFLAGS += --symver_soname --soname $${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll } contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@.*") { @@ -123,7 +131,13 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@.*") { QMAKE_LIBS += -leexe.lib\\(uc_exe_.o\\) - QMAKE_LFLAGS += --symver_soname --soname $${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe + QMAKE_LFLAGS += --symver_soname --soname=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe \ + --target1-abs \ + --no-undefined \ + --shared \ + -lsupc++ \ + -lgcc \ + --nostdlib } # Symbian resource files diff --git a/mkspecs/symbian/linux-gcce/platformlibs.conf b/mkspecs/symbian/linux-gcce/platformlibs.conf index 0a74ba9..d31b793 100644 --- a/mkspecs/symbian/linux-gcce/platformlibs.conf +++ b/mkspecs/symbian/linux-gcce/platformlibs.conf @@ -1 +1,4 @@ -QMAKE_LIBS += -lusrt2_2.lib -ldfpaeabi.dso -ldrtaeabi.dso -lscppnwdl.dso :lh_t__uf.l\\(switch8.o\\) +QMAKE_LIBS += "-\\( ${EPOCROOT}epoc32/release/armv5/udeb/usrt2_2.lib -\\)" + +QMAKE_LIBDIR += ${EPOCROOT}/epoc32/release/armv5/udeb/ + diff --git a/mkspecs/symbian/linux-gcce/qmake.conf b/mkspecs/symbian/linux-gcce/qmake.conf index e4b08c1..7e3dff7 100644 --- a/mkspecs/symbian/linux-gcce/qmake.conf +++ b/mkspecs/symbian/linux-gcce/qmake.conf @@ -8,9 +8,20 @@ include(../../common/g++.conf) QMAKE_CC = arm-none-symbianelf-gcc QMAKE_CXX = arm-none-symbianelf-g++ -QMAKE_LINK = arm-none-symbianelf-g++ -QMAKE_LINK_SHLIB = arm-none-symbianelf-g++ -QMAKE_LINK_C = arm-none-symbianelf-gcc -QMAKE_LINK_C_SHLIB = arm-none-symbianelf-gcc +QMAKE_LINK = arm-none-symbianelf-ld +QMAKE_LINK_SHLIB = arm-none-symbianelf-ld +QMAKE_LINK_C = arm-none-symbianelf-ld +QMAKE_LINK_C_SHLIB = arm-none-symbianelf-ld QMAKE_AR = arm-none-symbianelf-ar cqs +# never use -fPIC, gcce-linker doesn't like it. +# g++ conf above adds it if the host platform is 64 bit, so we remove it again +QMAKE_CFLAGS_SHLIB -= -fPIC +QMAKE_CFLAGS_STATIC_LIB -= -fPIC +QMAKE_CXXFLAGS_SHLIB -= -fPIC +QMAKE_CXXFLAGS_STATIC_LIB -= -fPIC + +QMAKE_LFLAGS_SONAME = +#QMAKE_LFLAGS_THREAD += +#QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined +QMAKE_RPATH = --rpath= diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index 346663a..030983d 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -455,7 +455,7 @@ UnixMakefileGenerator::findLibraries() if(!libdirs.contains(f)) libdirs.append(f); } else if(opt.startsWith("-l")) { - if (!project->isEmpty("QMAKE_SYMBIAN_SHLIB")) { + if (!project->isEmpty("QMAKE_RVCT_LINKSTYLE")) { (*it) = opt.mid(2); } else if (project->isActiveConfig("rvct_linker")) { (*it) = "lib" + opt.mid(2) + ".so"; @@ -509,7 +509,7 @@ UnixMakefileGenerator::findLibraries() + project->values("QMAKE_PREFIX_SHLIB").first() + stub + "." + (*extit)); if(exists(pathToLib)) { - if (!project->isEmpty("QMAKE_SYMBIAN_SHLIB")) + if (!project->isEmpty("QMAKE_RVCT_LINKSTYLE")) (*it) = pathToLib; else (*it) = "-l" + stub; -- cgit v0.12 From 83ea537b8e4e3ebd56c61b5fa1b5e306252476df Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Thu, 25 Feb 2010 10:57:47 +0100 Subject: Found a way to not hardcode the paths for dso / lib files --- mkspecs/symbian/linux-gcce/features/symbian_building.prf | 8 ++++---- mkspecs/symbian/linux-gcce/platformlibs.conf | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mkspecs/symbian/linux-gcce/features/symbian_building.prf b/mkspecs/symbian/linux-gcce/features/symbian_building.prf index 168b08b..21c412c 100644 --- a/mkspecs/symbian/linux-gcce/features/symbian_building.prf +++ b/mkspecs/symbian/linux-gcce/features/symbian_building.prf @@ -31,7 +31,7 @@ for(library, LIBS) { library = $$replace(library, "^-l", "") isFullName = $$find(library, \.) isEmpty(isFullName):library="$${library}.dso" - newLIBS += "${EPOCROOT}epoc32/release/armv5/lib/$${library}" + newLIBS += "-l:$${library}" } LIBS = $$newLIBS newLIBS = @@ -41,7 +41,7 @@ for(library, QMAKE_LIBS) { library = $$replace(library, "^-l", "") isFullName = $$find(library, \.) isEmpty(isFullName):library="$${library}.dso" - newLIBS += "${EPOCROOT}epoc32/release/armv5/lib/$${library}" + newLIBS += "-l:$${library}" } QMAKE_LIBS = $$newLIBS @@ -102,8 +102,8 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.dso QMAKE_CLEAN += $${symbianObjdir}/$${TARGET}.def - QMAKE_LIBS += ${EPOCROOT}/epoc32/release/armv5/udeb/edllstub.lib \ - ${EPOCROOT}/epoc32/release/armv5/udeb/edll.lib \ + QMAKE_LIBS += -l:edllstub.lib \ + -l:edll.lib \ -lsupc++ \ -lgcc diff --git a/mkspecs/symbian/linux-gcce/platformlibs.conf b/mkspecs/symbian/linux-gcce/platformlibs.conf index d31b793..4651d1e 100644 --- a/mkspecs/symbian/linux-gcce/platformlibs.conf +++ b/mkspecs/symbian/linux-gcce/platformlibs.conf @@ -1,4 +1,4 @@ -QMAKE_LIBS += "-\\( ${EPOCROOT}epoc32/release/armv5/udeb/usrt2_2.lib -\\)" +QMAKE_LIBS += -l:usrt2_2.lib QMAKE_LIBDIR += ${EPOCROOT}/epoc32/release/armv5/udeb/ -- cgit v0.12 From 1b0e960cf24894580c11c904c385ea0d12278079 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Thu, 25 Feb 2010 13:45:34 +0100 Subject: Corrected library locations for deployment on Symbian. --- src/corelib/corelib.pro | 2 +- src/gui/gui.pro | 2 +- src/s60installs/s60installs.pro | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro index efee610..c4b4be2 100644 --- a/src/corelib/corelib.pro +++ b/src/corelib/corelib.pro @@ -48,7 +48,7 @@ symbian: { pu_header = "; Partial upgrade package for testing QtCore changes without reinstalling everything" \ "$${LITERAL_HASH}{\"Qt corelib\"}, (0x2001E61C), $${QT_MAJOR_VERSION},$${QT_MINOR_VERSION},$${QT_PATCH_VERSION}, TYPE=PU" partial_upgrade.pkg_prerules = pu_header vendorinfo - partial_upgrade.sources = qtcore.dll + partial_upgrade.sources = $$QMAKE_LIBDIR_QT/QtCore.dll partial_upgrade.path = c:/sys/bin DEPLOYMENT = partial_upgrade $$DEPLOYMENT } diff --git a/src/gui/gui.pro b/src/gui/gui.pro index d46f3b4..37d39b7 100644 --- a/src/gui/gui.pro +++ b/src/gui/gui.pro @@ -70,7 +70,7 @@ symbian: { pu_header = "; Partial upgrade package for testing QtGui changes without reinstalling everything" \ "$${LITERAL_HASH}{\"Qt gui\"}, (0x2001E61C), $${QT_MAJOR_VERSION},$${QT_MINOR_VERSION},$${QT_PATCH_VERSION}, TYPE=PU" partial_upgrade.pkg_prerules = pu_header vendorinfo - partial_upgrade.sources = qtgui.dll + partial_upgrade.sources = $$QMAKE_LIBDIR_QT/QtGui.dll partial_upgrade.path = c:/sys/bin DEPLOYMENT = partial_upgrade $$DEPLOYMENT } diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index 51bf898..4b57864 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -90,7 +90,7 @@ symbian: { } contains(QT_CONFIG, audio-backend) { - qaudio_backend_plugins.sources += qaudio.dll + qaudio_backend_plugins.sources += $$QT_BUILD_TREE/plugins/audio/qaudio.dll qaudio_backend_plugins.path = c:$$QT_PLUGINS_BASE_DIR/audio DEPLOYMENT += qaudio_backend_plugins } -- cgit v0.12 From 01be0a8fa617ff65eae73865c111e70fdcc5b87a Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Thu, 25 Feb 2010 13:46:44 +0100 Subject: Fixed a bug where the library extension would be embedded in pkg name qmake is a bit inconsistent in what it assigns to QMAKE_ORIG_TARGET and TARGET, so we need to cope with the case where QMAKE_ORIG_TARGET contains the proper target name and also when TARGET contains it. --- qmake/generators/symbian/symbiancommon.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp index 670f5f5..9992faa 100644 --- a/qmake/generators/symbian/symbiancommon.cpp +++ b/qmake/generators/symbian/symbiancommon.cpp @@ -65,7 +65,10 @@ SymbianCommonGenerator::SymbianCommonGenerator(MakefileGenerator *generator) void SymbianCommonGenerator::init() { QMakeProject *project = generator->project; - fixedTarget = generator->escapeFilePath(project->first("TARGET")); + fixedTarget = project->first("QMAKE_ORIG_TARGET"); + if (fixedTarget.isEmpty()) + fixedTarget = project->first("TARGET"); + fixedTarget = generator->escapeFilePath(fixedTarget); fixedTarget = removePathSeparators(fixedTarget); removeSpecialCharacters(fixedTarget); @@ -126,7 +129,12 @@ void SymbianCommonGenerator::removeSpecialCharacters(QString& str) void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, DeploymentList &depList, bool epocBuild) { QMakeProject *project = generator->project; - QString pkgFilename = QString("%1_template.%2").arg(fixedTarget).arg("pkg"); + QString pkgTarget = project->first("QMAKE_ORIG_TARGET"); + if (pkgTarget.isEmpty()) + pkgTarget = project->first("TARGET"); + pkgTarget = generator->escapeFilePath(pkgTarget); + pkgTarget = removePathSeparators(pkgTarget); + QString pkgFilename = QString("%1_template.%2").arg(pkgTarget).arg("pkg"); if (!Option::output_dir.isEmpty()) pkgFilename = Option::output_dir + '/' + pkgFilename; @@ -147,7 +155,7 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, Deployment // Header info QString wrapperPkgFilename = QString("%1_installer.%2") - .arg(fixedTarget) + .arg(pkgTarget) .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" @@ -383,7 +391,7 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, Deployment // Wrapped files deployment QString currentPath = qmake_getpwd(); - QString sisName = QString("%1.sis").arg(fixedTarget); + QString sisName = QString("%1.sis").arg(pkgTarget); twf << "\"" << currentPath << "/" << sisName << "\" - \"c:\\adm\\" << sisName << "\"" << endl; QString bootStrapPath = QLibraryInfo::location(QLibraryInfo::PrefixPath); -- cgit v0.12 From 1edd1229b5a2381da2a85ebbfb4539d83a13ef3f Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Thu, 25 Feb 2010 13:41:11 +0100 Subject: Added configure test for audio backend on Symbian. --- config.tests/symbian/audio/.gitignore | 2 ++ config.tests/symbian/audio/audio.cpp | 47 +++++++++++++++++++++++++++++++++++ config.tests/symbian/audio/audio.pro | 7 ++++++ config.tests/symbian/compile.test | 46 ++++++++++++++++++++++++++++++++++ configure | 11 +++++++- 5 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 config.tests/symbian/audio/.gitignore create mode 100644 config.tests/symbian/audio/audio.cpp create mode 100644 config.tests/symbian/audio/audio.pro create mode 100755 config.tests/symbian/compile.test diff --git a/config.tests/symbian/audio/.gitignore b/config.tests/symbian/audio/.gitignore new file mode 100644 index 0000000..87a251c --- /dev/null +++ b/config.tests/symbian/audio/.gitignore @@ -0,0 +1,2 @@ +audio.rpp +audio.rsg diff --git a/config.tests/symbian/audio/audio.cpp b/config.tests/symbian/audio/audio.cpp new file mode 100644 index 0000000..4ffc728 --- /dev/null +++ b/config.tests/symbian/audio/audio.cpp @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** 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 config.tests 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 <sounddevice.h> + +int main(int argc, char **argv) +{ + return 0; +} diff --git a/config.tests/symbian/audio/audio.pro b/config.tests/symbian/audio/audio.pro new file mode 100644 index 0000000..abbde6e --- /dev/null +++ b/config.tests/symbian/audio/audio.pro @@ -0,0 +1,7 @@ +TARGET = audio +SOURCES = audio.cpp + +INCLUDEPATH += $${EPOCROOT}epoc32/include/mmf/server +INCLUDEPATH += $${EPOCROOT}epoc32/include/mmf/common + +LIBS += -lmmfdevsound diff --git a/config.tests/symbian/compile.test b/config.tests/symbian/compile.test new file mode 100755 index 0000000..20a3039 --- /dev/null +++ b/config.tests/symbian/compile.test @@ -0,0 +1,46 @@ +#!/bin/sh + +SUCCESS=no +QMKSPEC=$1 +XPLATFORM=`basename "$1"` +QMAKE_CONFIG=$2 +VERBOSE=$3 +SRCDIR=$4 +OUTDIR=$5 +TEST=$6 +EXE=`basename "$6"` +DESCRIPTION=$7 +shift 7 +LFLAGS="" +INCLUDEPATH="" +CXXFLAGS="" +MAC_ARCH_CXXFLAGS="" +MAC_ARCH_LFLAGS="" + +# debuggery +[ "$VERBOSE" = "yes" ] && echo "$DESCRIPTION auto-detection... ($*)" + +test -d "$OUTDIR/$TEST" || mkdir -p "$OUTDIR/$TEST" + +cd "$OUTDIR/$TEST" + +test -r Makefile && $MAKE distclean >/dev/null 2>&1 + +"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile" + +if [ "$VERBOSE" = "yes" ]; then + $MAKE +else + $MAKE >/dev/null 2>&1 +fi + +[ -x "$EXE.exe" ] && SUCCESS=yes + +# done +if [ "$SUCCESS" != "yes" ]; then + [ "$VERBOSE" = "yes" ] && echo "$DESCRIPTION disabled." + exit 1 +else + [ "$VERBOSE" = "yes" ] && echo "$DESCRIPTION enabled." + exit 0 +fi diff --git a/configure b/configure index d39503f..0cb67bf 100755 --- a/configure +++ b/configure @@ -677,7 +677,7 @@ CFG_RELEASE_QMAKE=no CFG_PHONON=auto CFG_PHONON_BACKEND=yes CFG_MULTIMEDIA=yes -CFG_AUDIO_BACKEND=yes +CFG_AUDIO_BACKEND=auto CFG_SVG=yes CFG_DECLARATIVE=auto CFG_WEBKIT=auto # (yes|no|auto) @@ -2151,6 +2151,7 @@ esac # where to find which.. unixtests="$relpath/config.tests/unix" mactests="$relpath/config.tests/mac" +symbiantests="$relpath/config.tests/symbian" WHICH="$unixtests/which.test" PERL=`$WHICH perl 2>/dev/null` @@ -5913,6 +5914,14 @@ elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then QMakeVar set JAVASCRIPTCORE_JIT no fi +if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then + if echo "$XQMAKESPEC" | grep symbian > /dev/null 2>&1; then + "$symbiantests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/symbian/audio "audio" $L_FLAGS $I_FLAGS $l_FLAGS + else + CFG_AUDIO_BACKEND=yes + fi +fi + #------------------------------------------------------------------------------- # ask for all that hasn't been auto-detected or specified in the arguments #------------------------------------------------------------------------------- -- cgit v0.12 From cef67062373434e6ba737b3fc327f9e94e4381a2 Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Thu, 25 Feb 2010 14:01:59 +0100 Subject: Make per-library settings for the gcce linker/compiler The defaults are apparently not all that useful in gcce as elf2e32 doesn't like the stuff generated with them. So provide some defaults and make a simple structure to set the gcce-only defaults in one place. The qmake.conf for this mkspec --- mkspecs/symbian/linux-gcce/features/qt.prf | 1 - .../linux-gcce/features/symbian_building.prf | 25 ++++++++++------------ mkspecs/symbian/linux-gcce/qmake.conf | 22 +++++++++++++++++++ 3 files changed, 33 insertions(+), 15 deletions(-) diff --git a/mkspecs/symbian/linux-gcce/features/qt.prf b/mkspecs/symbian/linux-gcce/features/qt.prf index 79d46d1..fd2cd1b 100644 --- a/mkspecs/symbian/linux-gcce/features/qt.prf +++ b/mkspecs/symbian/linux-gcce/features/qt.prf @@ -9,7 +9,6 @@ INCLUDEPATH = $${EPOCROOT}epoc32/include/variant \ DEFINES *= __PRODUCT_INCLUDE__=\<$${EPOCROOT}epoc32/include/variant/symbian_os.hrh\> \ __SYMBIAN32__ \ - __MARM_THUMB__ \ __MARM_INTERWORK__ \ NDEBUG \ _UNICODE \ diff --git a/mkspecs/symbian/linux-gcce/features/symbian_building.prf b/mkspecs/symbian/linux-gcce/features/symbian_building.prf index 21c412c..fc9d621 100644 --- a/mkspecs/symbian/linux-gcce/features/symbian_building.prf +++ b/mkspecs/symbian/linux-gcce/features/symbian_building.prf @@ -1,17 +1,16 @@ -gcceExtraFlags = --include=${EPOCROOT}epoc32/include/gcce/gcce.h -march=armv5t -mapcs -mthumb-interwork -nostdinc -c -fvisibility-inlines-hidden -mthumb -msoft-float -T script +gcceExtraFlags = -I${EPOCROOT}epoc32/include/ --include=${EPOCROOT}epoc32/include/gcce/gcce.h -march=armv5t -mapcs -mthumb-interwork -nostdinc -c -fvisibility-inlines-hidden -msoft-float -T script QMAKE_CFLAGS += $${gcceExtraFlags} QMAKE_CXXFLAGS += $${gcceExtraFlags} -x c++ -fexceptions -fno-unit-at-a-time -# 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_CFLAGS.ARMCC -# QMAKE_CXXFLAGS += $$QMAKE_CFLAGS --no_parse_templates $$QMAKE_CXXFLAGS.ARMCC -# 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 -# +# we have some module specific options (defined in qt.prf) lets add them +eval(TMPVAR = \$\$QMAKE_$${TARGET}_CXXFLAGS) +!isEmpty(TMPVAR):QMAKE_CXXFLAGS += $$TMPVAR +eval(TMPVAR = \$\$QMAKE_$${TARGET}_LFLAGS) +!isEmpty(TMPVAR) { + QMAKE_LFLAGS += $$TMPVAR +} else { # lets provide a simple default. Without elf2e32 complains + QMAKE_LFLAGS += -Ttext 0x80000 -Tdata 0x400000 +} symbianObjdir=$$OBJECTS_DIR isEmpty(symbianObjdir) { @@ -22,7 +21,7 @@ isEmpty(symbianDestdir) { symbianDestdir = . } -contains(QMAKE_CFLAGS, "--thumb")|contains(QMAKE_CXXFLAGS, "--thumb") { +contains(QMAKE_CFLAGS, "-mthumb")|contains(QMAKE_CXXFLAGS, "-mthumb") { DEFINES += __MARM_THUMB__ } @@ -108,14 +107,12 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { -lgcc QMAKE_LFLAGS += --soname $${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll \ - -Ttext 0x80000 -Tdata 0x400000 \ --target1-abs \ --no-undefined \ --strip-debug \ --nostdlib \ -L/home/zander/work/build-symbian/arm-2009q3/lib/gcc/arm-none-symbianelf/4.4.1/ \ -L/home/zander/work/build-symbian/arm-2009q3/arm-none-symbianelf/lib/ - } contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@.*") { diff --git a/mkspecs/symbian/linux-gcce/qmake.conf b/mkspecs/symbian/linux-gcce/qmake.conf index 7e3dff7..cb30f61 100644 --- a/mkspecs/symbian/linux-gcce/qmake.conf +++ b/mkspecs/symbian/linux-gcce/qmake.conf @@ -14,6 +14,28 @@ QMAKE_LINK_C = arm-none-symbianelf-ld QMAKE_LINK_C_SHLIB = arm-none-symbianelf-ld QMAKE_AR = arm-none-symbianelf-ar cqs +# gcce defaults to 'arm' instruction set. Lets use the better 'thumb' if possible +# notice that the middle part of the following set of vars matches the TARGET content of the libs + +QMAKE_qtmain_CXXFLAGS = -mthumb +QMAKE_QtCore_CXXFLAGS = -mthumb +QMAKE_QtGui_LFLAGS = -Ttext 0x8000 -Tdata 0xE00000 +QMAKE_QtDBus_CXXFLAGS = -mthumb +QMAKE_QtDeclarative_CXXFLAGS = -mthumb +QMAKE_QtMultimedia_CXXFLAGS = -mthumb +QMAKE_QtNetwork_CXXFLAGS = -mthumb +QMAKE_QtOpenGL_CXXFLAGS = -mthumb +QMAKE_QtOpenVG_CXXFLAGS = -mthumb +QMAKE_phonon_CXXFLAGS = -mthumb +QMAKE_QtScript_CXXFLAGS = -mthumb +QMAKE_QtScriptTools_CXXFLAGS = -mthumb +QMAKE_QtSql_CXXFLAGS = -mthumb +QMAKE_QtSvg_CXXFLAGS = -mthumb +QMAKE_QtTest_CXXFLAGS = -mthumb +QMAKE_QtXmlPatterns_CXXFLAGS = -mthumb +QMAKE_QtXml_CXXFLAGS = -mthumb +QMAKE_QtWebKit_LFLAGS = -Ttext 0x8000 -Tdata 0xE00000 + # never use -fPIC, gcce-linker doesn't like it. # g++ conf above adds it if the host platform is 64 bit, so we remove it again QMAKE_CFLAGS_SHLIB -= -fPIC -- cgit v0.12 From 721d7a47ba22fd791f2569427dd6285ac3384ff5 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 26 Feb 2010 13:07:02 +0100 Subject: Removed restrictions on file names from the Symbian makefile system. Spaces in filenames still won't work, but that is very tricky to fix because you cannot escape filenames inside the QMAKE_EXTRA_COMPILERS section. Task: QTBUG-8555 --- mkspecs/features/symbian/application_icon.prf | 8 +++++--- .../symbian/linux-armcc/features/symbian_building.prf | 4 +--- qmake/generators/symbian/symbiancommon.cpp | 19 ++++++++++++++----- qmake/generators/symbian/symbiancommon.h | 1 + qmake/generators/symbian/symmake.cpp | 4 ++-- qmake/generators/symbian/symmake_abld.cpp | 4 ++-- 6 files changed, 25 insertions(+), 15 deletions(-) diff --git a/mkspecs/features/symbian/application_icon.prf b/mkspecs/features/symbian/application_icon.prf index 41f1718..527c33d 100644 --- a/mkspecs/features/symbian/application_icon.prf +++ b/mkspecs/features/symbian/application_icon.prf @@ -22,10 +22,12 @@ contains( CONFIG, no_icon ) { baseTarget = $$basename(TARGET) baseTarget = $$replace(baseTarget, /,_) baseTarget = $$replace(baseTarget, \\,_) - baseTarget = $$replace(baseTarget, -,_) - baseTarget = $$replace(baseTarget, :,_) - baseTarget = $$replace(baseTarget, \.,_) baseTarget = $$replace(baseTarget, " ",_) + symbian-abld|symbian-sbsv2 { + baseTarget = $$replace(baseTarget, -,_) + baseTarget = $$replace(baseTarget, \.,_) + baseTarget = $$replace(baseTarget, :,_) + } # Note: symbian-sbsv2 builds can't utilize extra compiler for mifconv, so ICON handling is done in code !symbian-sbsv2 { diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index b0185d0..67b3075 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -150,9 +150,7 @@ QMAKE_EXTRA_COMPILERS += symbianresources contains(TEMPLATE, "app"):!contains(CONFIG, "no_icon") { baseTarget = $$basename(TARGET) - baseTarget = $$replace(baseTarget, -,_) - baseTarget = $$replace(baseTarget, :,_) - baseTarget = $$replace(baseTarget, \.,_) + # If you change this, also see application_icon.prf baseTarget = $$replace(baseTarget, " ",_) # Make our own extra compiler target in order to get dependencies for generated diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp index 9992faa..c7f8cd4 100644 --- a/qmake/generators/symbian/symbiancommon.cpp +++ b/qmake/generators/symbian/symbiancommon.cpp @@ -68,9 +68,13 @@ void SymbianCommonGenerator::init() fixedTarget = project->first("QMAKE_ORIG_TARGET"); if (fixedTarget.isEmpty()) fixedTarget = project->first("TARGET"); - fixedTarget = generator->escapeFilePath(fixedTarget); + fixedTarget = generator->unescapeFilePath(fixedTarget); fixedTarget = removePathSeparators(fixedTarget); - removeSpecialCharacters(fixedTarget); + if (project->first("MAKEFILE_GENERATOR") == "SYMBIAN_ABLD" + || project->first("MAKEFILE_GENERATOR") == "SYMBIAN_SBSV2") + removeEpocSpecialCharacters(fixedTarget); + else + removeSpecialCharacters(fixedTarget); // This should not be empty since the mkspecs are supposed to set it if missing. uid3 = project->first("TARGET.UID3").trimmed(); @@ -120,10 +124,16 @@ 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("_")); +} + +void SymbianCommonGenerator::removeEpocSpecialCharacters(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("_")); + removeSpecialCharacters(str); } void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, DeploymentList &depList, bool epocBuild) @@ -132,7 +142,7 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, Deployment QString pkgTarget = project->first("QMAKE_ORIG_TARGET"); if (pkgTarget.isEmpty()) pkgTarget = project->first("TARGET"); - pkgTarget = generator->escapeFilePath(pkgTarget); + pkgTarget = generator->unescapeFilePath(pkgTarget); pkgTarget = removePathSeparators(pkgTarget); QString pkgFilename = QString("%1_template.%2").arg(pkgTarget).arg("pkg"); if (!Option::output_dir.isEmpty()) @@ -309,7 +319,6 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, Deployment 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()) diff --git a/qmake/generators/symbian/symbiancommon.h b/qmake/generators/symbian/symbiancommon.h index 32f9483..9aaa9a1 100644 --- a/qmake/generators/symbian/symbiancommon.h +++ b/qmake/generators/symbian/symbiancommon.h @@ -67,6 +67,7 @@ protected: QString removePathSeparators(QString &file); void removeSpecialCharacters(QString& str); + void removeEpocSpecialCharacters(QString& str); void generatePkgFile(const QString &iconFile, DeploymentList &depList, bool epocBuild); bool containsStartWithItem(const QChar &c, const QStringList& src); diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp index 5283bfa..5b230e4 100644 --- a/qmake/generators/symbian/symmake.cpp +++ b/qmake/generators/symbian/symmake.cpp @@ -173,7 +173,7 @@ void SymbianMakefileGenerator::writeHeader(QTextStream &t) bldinfDefine.append(generate_uid(project->projectFile())); bldinfDefine.prepend("BLD_INF_"); - removeSpecialCharacters(bldinfDefine); + removeEpocSpecialCharacters(bldinfDefine); t << "#define " << bldinfDefine.toUpper() << endl << endl; } @@ -1032,7 +1032,7 @@ void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploy QString uid = generate_uid(fullProName); QString bldinfDefine = QString("BLD_INF_") + subdirFileName + QString("_") + uid; bldinfDefine = bldinfDefine.toUpper(); - removeSpecialCharacters(bldinfDefine); + removeEpocSpecialCharacters(bldinfDefine); t << "#ifndef " << bldinfDefine << endl; t << "\t#include \"" << bldinfFilename << "\"" << endl; diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp index b620258..aec16fd 100644 --- a/qmake/generators/symbian/symmake_abld.cpp +++ b/qmake/generators/symbian/symmake_abld.cpp @@ -69,7 +69,7 @@ SymbianAbldMakefileGenerator::~SymbianAbldMakefileGenerator() { } void SymbianAbldMakefileGenerator::writeMkFile(const QString& wrapperFileName, bool deploymentOnly) { QString gnuMakefileName = QLatin1String("Makefile_") + uid3; - removeSpecialCharacters(gnuMakefileName); + removeEpocSpecialCharacters(gnuMakefileName); gnuMakefileName.append(".mk"); QFile ft(gnuMakefileName); @@ -451,7 +451,7 @@ void SymbianAbldMakefileGenerator::writeBldInfMkFilePart(QTextStream& t, bool ad // do not get that, special deployment only makefile is generated for them if needed. if (targetType != TypeSubdirs || addDeploymentExtension) { QString gnuMakefileName = QLatin1String("Makefile_") + uid3; - removeSpecialCharacters(gnuMakefileName); + removeEpocSpecialCharacters(gnuMakefileName); gnuMakefileName.append(".mk"); t << "gnumakefile " << gnuMakefileName << endl; } -- cgit v0.12 From f822fb20b806386509aa31c1aefd0004366a19d3 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 26 Feb 2010 13:12:50 +0100 Subject: Corrected a wrong comment. --- mkspecs/features/symbian/application_icon.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/features/symbian/application_icon.prf b/mkspecs/features/symbian/application_icon.prf index 527c33d..32f4d9f 100644 --- a/mkspecs/features/symbian/application_icon.prf +++ b/mkspecs/features/symbian/application_icon.prf @@ -15,7 +15,7 @@ contains( CONFIG, no_icon ) { } # Try to produce indentical string to fixedTarget in SymbianMakefileGenerator, replaced chars taken - # from SymbianMakefileGenerator::removeSpecialCharacters. + # from SymbianCommonGenerator::removeSpecialCharacters. # # Note: it is not a major problem even baseTarget is not 100% identical to fixedTarget since qmake # only uses filename from RSS_RULES.icon_file when referring to icon file name. -- cgit v0.12 From ec45c75f443f21d47fa47d1fc0396af02befa1c7 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 26 Feb 2010 16:11:57 +0100 Subject: Enabled patch_capabilities to work on Linux. --- bin/patch_capabilities.pl | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/bin/patch_capabilities.pl b/bin/patch_capabilities.pl index f82c48f..bac7e64 100755 --- a/bin/patch_capabilities.pl +++ b/bin/patch_capabilities.pl @@ -73,11 +73,16 @@ if (@ARGV) if (($pkgFileName =~ m|_template\.pkg$|i) && -r($pkgFileName)) { my $targetplatform; - unless ($targetplatform = shift(@ARGV)) + my $templateFile; + my $templateContents; + open($templateFile, "< $pkgFileName") or die ("Could not open $pkgFileName"); + $templateContents = <$templateFile>; + close($templateFile); + unless (($targetplatform = shift(@ARGV)) || $templateContents !~ /\$\(PLATFORM\)/) { Usage(); } - + $targetplatform = "-" if (!$targetplatform); my @tmpvalues = split('-', $targetplatform); $target = $tmpvalues[0]; $platform = $tmpvalues[1]; @@ -174,7 +179,7 @@ if (@ARGV) my $destinationPath = $2; # If the given file is a binary, check the target and binary type (+ the actual filename) from its path. - if ($sourcePath =~ m:/epoc32/release/([^/]+)/(udeb|urel|\$\(TARGET\))/(\w+(\.dll|\.exe)):i) + if ($sourcePath =~ m:\w+(\.dll|\.exe)$:i) { # Do preprocessing for template pkg, # In case of template pkg target and platform variables are set -- cgit v0.12 From 2850abde744ae8140cf7187ca80dea684f60f3fa Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Fri, 26 Feb 2010 16:12:29 +0100 Subject: Switched the order of message and execution in patch_capabilities. It seems more natural to have the message first, so that you can tell which file is taking long to complete. --- bin/patch_capabilities.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/patch_capabilities.pl b/bin/patch_capabilities.pl index bac7e64..d51f154 100755 --- a/bin/patch_capabilities.pl +++ b/bin/patch_capabilities.pl @@ -217,8 +217,8 @@ if (@ARGV) $commandToExecute .= $binaryPath; # Actually execute the elftran command to set the capabilities. + print ("Executing ".$commandToExecute."\n"); system ($commandToExecute." > NUL"); - print ("Executed ".$commandToExecute."\n"); ## Create another command line to check that the set capabilities are correct. #$commandToExecute = "elftran -dump s ".$binaryPath; -- cgit v0.12 From 30efd4ba1b9b595f1184ff9fc3441bf4f5391206 Mon Sep 17 00:00:00 2001 From: Marius Storm-Olsen <marius.storm-olsen@nokia.com> Date: Thu, 18 Feb 2010 15:02:13 +0100 Subject: Make createpackage.pl auto-patch the capabilites for self signed packages This allows you to simply call 'make ok_sis' to have a sis package which is self signed with patched capabilities, ready for install on an consumer system. Reviewed-by: Shane Kearns (cherry picked from commit 1f9e501bf9f3287a424b36915d4436a74cf21847) --- bin/createpackage.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/createpackage.pl b/bin/createpackage.pl index 3a61bc0..c16c692 100755 --- a/bin/createpackage.pl +++ b/bin/createpackage.pl @@ -272,6 +272,10 @@ if($stub) { # Create stub SIS. system ("makesis -s $pkgoutput $stub_sis_name"); } else { + if ($certtext eq "Self Signed" && !@certificates) { + print("Patching capabilities for self signed package $certificate\n"); + system ("patch_capabilities $templatepkg $targetplatform"); + } # Create SIS. # The 'and' is because system uses 0 to indicate success. system ("makesis $pkgoutput $unsigned_sis_name") and die ("makesis failed"); -- cgit v0.12 From fd7d6597326796c5ac694262dfc8c1c33a54ee89 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Mon, 1 Mar 2010 10:50:49 +0100 Subject: Made patch_capabilities.pl not raise capabilities unnecessarily. --- bin/patch_capabilities.pl | 52 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 40 insertions(+), 12 deletions(-) diff --git a/bin/patch_capabilities.pl b/bin/patch_capabilities.pl index d51f154..d3013f6 100755 --- a/bin/patch_capabilities.pl +++ b/bin/patch_capabilities.pl @@ -50,14 +50,23 @@ sub Usage() { print("This script can be used to set capabilities of all binaries\n"); print("specified for deployment in a .pkg file.\n"); print("If no capabilities are given, the binaries will be given the\n"); - print("capabilities supported by self-signed certificates.\n"); - print("\n *** NOTE: If *_template.pkg file is given, 'target-platform' is REQUIRED. ***\n"); - print("\nUsage: patch_capabilities.pl pkg_filename <target-platform> [capability list]\n"); + print("capabilities supported by self-signed certificates.\n\n"); + print(" *** NOTE: If *_template.pkg file is given and one is using symbian-abld or\n"); + print(" symbian-sbsv2 platform, 'target-platform' is REQUIRED. ***\n"); + print("\nUsage: patch_capabilities.pl pkg_filename [target-platform [capability list]]\n"); print("\nE.g. patch_capabilities.pl myapp_template.pkg release-armv5 \"All -TCB\"\n"); exit(); } -my @capabilitiesToSet = ("LocalServices", "NetworkServices", "ReadUserData", "UserEnvironment", "WriteUserData"); +sub trim($) { + my $string = shift; + $string =~ s/^\s+//; + $string =~ s/\s+$//; + return $string; +} + +my @capabilitiesToAllow = ("LocalServices", "NetworkServices", "ReadUserData", "UserEnvironment", "WriteUserData"); +my @capabilitiesSpecified = (); # If arguments were given to the script, if (@ARGV) @@ -98,10 +107,10 @@ if (@ARGV) # If there are more arguments given, parse them as capabilities. if (@ARGV) { - @capabilitiesToSet = (); + @capabilitiesSpecified = (); while (@ARGV) { - push (@capabilitiesToSet, pop(@ARGV)); + push (@capabilitiesSpecified, pop(@ARGV)); } } @@ -202,18 +211,37 @@ if (@ARGV) print ("\n"); - my $baseCommandToExecute = "elftran -vid 0x0 -capability \""; - if (@capabilitiesToSet) - { - $baseCommandToExecute .= join(" ", @capabilitiesToSet); - } - $baseCommandToExecute .= "\" "; + my $baseCommandToExecute = "elftran -vid 0x0 -capability \"%s\" "; # Actually set the capabilities of the listed binaries. foreach my $binaryPath(@binaries) { # Create the command line for setting the capabilities. my $commandToExecute = $baseCommandToExecute; + if (@capabilitiesSpecified) + { + $commandToExecute = sprintf($baseCommandToExecute, join(" ", @capabilitiesSpecified)); + } else { + # Test which capabilities are present and then restrict them to the allowed set. + # This avoid raising the capabilities of apps that already have none. + my $dllCaps; + open($dllCaps, "elftran -dump s $binaryPath |") or die ("Could not execute elftran"); + my $capsFound = 0; + my @capabilitiesToSet; + my $capabilitiesToAllow = join(" ", @capabilitiesToAllow); + while (<$dllCaps>) { + if (!$capsFound) { + $capsFound = 1 if (/Capabilities:/); + } else { + $_ = trim($_); + if ($capabilitiesToAllow =~ /$_/) { + push(@capabilitiesToSet, $_); + } + } + } + close($dllCaps); + $commandToExecute = sprintf($baseCommandToExecute, join(" ", @capabilitiesToSet)); + } $commandToExecute .= $binaryPath; # Actually execute the elftran command to set the capabilities. -- cgit v0.12 From 555ca584a791b9d3eacaf3d1a97bb1bc8517696f Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Mon, 1 Mar 2010 10:52:37 +0100 Subject: Made redirection to /dev/null cross platform. --- bin/patch_capabilities.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/patch_capabilities.pl b/bin/patch_capabilities.pl index d3013f6..4390957 100755 --- a/bin/patch_capabilities.pl +++ b/bin/patch_capabilities.pl @@ -65,6 +65,9 @@ sub trim($) { return $string; } +my $nullDevice = "/dev/null"; +$nullDevice = "NUL" if ($^O =~ /MSWin/); + my @capabilitiesToAllow = ("LocalServices", "NetworkServices", "ReadUserData", "UserEnvironment", "WriteUserData"); my @capabilitiesSpecified = (); @@ -246,7 +249,7 @@ if (@ARGV) # Actually execute the elftran command to set the capabilities. print ("Executing ".$commandToExecute."\n"); - system ($commandToExecute." > NUL"); + system ($commandToExecute." > $nullDevice"); ## Create another command line to check that the set capabilities are correct. #$commandToExecute = "elftran -dump s ".$binaryPath; -- cgit v0.12 From 4be1e01c6faebe11bfe205c1b910049747b5c335 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Mon, 1 Mar 2010 10:53:28 +0100 Subject: Added wrapper for patch_capabilities on non-Windows platforms. --- bin/patch_capabilities | 3 +++ 1 file changed, 3 insertions(+) create mode 100755 bin/patch_capabilities diff --git a/bin/patch_capabilities b/bin/patch_capabilities new file mode 100755 index 0000000..0d89622 --- /dev/null +++ b/bin/patch_capabilities @@ -0,0 +1,3 @@ +#!/bin/sh +scriptpath=`dirname $0` +perl $scriptpath/patch_capabilities.pl "$@" -- cgit v0.12 From b45eeb23718ce0b01391c74039587b22c996854b Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Mon, 1 Mar 2010 15:39:10 +0100 Subject: Corrected a mismerge by Git. --- qmake/generators/symbian/symmake_sbsv2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp index 3d8b556..8c7eabf 100644 --- a/qmake/generators/symbian/symmake_sbsv2.cpp +++ b/qmake/generators/symbian/symmake_sbsv2.cpp @@ -386,7 +386,7 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t //write emulator deployment t << "#if defined(WINSCW)" << endl; - initProjectDeploySymbian(project, depList, remoteTestPath, false, + initProjectDeploySymbian(project, depList, remoteTestPath, false, true, QLatin1String(EMULATOR_DEPLOYMENT_PLATFORM), QString(), generatedDirs, generatedFiles); writeSbsDeploymentList(depList, t); t << "#endif" << endl; -- cgit v0.12 From 441cb080885c86e243bb4b5d5b80a7c5b39e6bf7 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Mon, 1 Mar 2010 15:40:07 +0100 Subject: Made header inclusion Linux friendly. --- src/plugins/bearer/symbian/qnetworksession_impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.h b/src/plugins/bearer/symbian/qnetworksession_impl.h index 30f51e1..98d4222 100644 --- a/src/plugins/bearer/symbian/qnetworksession_impl.h +++ b/src/plugins/bearer/symbian/qnetworksession_impl.h @@ -58,7 +58,7 @@ #include <QDateTime> #include <e32base.h> -#include <CommDbConnPref.h> +#include <commdbconnpref.h> #include <es_sock.h> #include <rconnmon.h> #ifdef SNAP_FUNCTIONALITY_AVAILABLE -- cgit v0.12 From 9dd8f91feee30d908fae1245fcd470df2aa88ee6 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Mon, 1 Mar 2010 15:40:18 +0100 Subject: Fixed location of dll for the makefile based Symbian build system. --- src/s60installs/s60installs.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index 8a6cb38..4bb9220 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -100,7 +100,7 @@ symbian: { qtbackup.path = c:/private/10202D56/import/packages/$$replace(TARGET.UID3, 0x,) bearer_plugins.path = c:$$QT_PLUGINS_BASE_DIR/bearer - bearer_plugins.sources += qsymbianbearer.dll + bearer_plugins.sources += $$QT_BUILD_TREE/plugins/bearer/qsymbianbearer.dll DEPLOYMENT += qtresources \ qtlibraries \ -- cgit v0.12 From 04bda2f714ab2b8352d00a36cec906cdc0ca53ea Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Mon, 1 Mar 2010 15:51:19 +0100 Subject: Added gitignore rules for Symbian plugins. --- imports/Qt/.gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 imports/Qt/.gitignore diff --git a/imports/Qt/.gitignore b/imports/Qt/.gitignore new file mode 100644 index 0000000..bc54bd5 --- /dev/null +++ b/imports/Qt/.gitignore @@ -0,0 +1,2 @@ +*.dll +*.dso -- cgit v0.12 From a45b064645cda7d0dfe8fa55f3e9e16859bee5c5 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 2 Mar 2010 11:29:15 +0100 Subject: Reversed order of user QMAKE_POST_LINK statements and generated ones. Otherwise the users' statements would run before the binary was fully linked. --- .../linux-armcc/features/symbian_building.prf | 36 +++++++++++++++++----- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index 67b3075..ef8e4e6 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -85,10 +85,22 @@ 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 + !isEmpty(QMAKE_POST_LINK) { + # No way to honor the '@' :-( + QMAKE_POST_LINK = $$replace(QMAKE_POST_LINK, "^@", "") + QMAKE_POST_LINK = && $$QMAKE_POST_LINK + } # 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_POST_LINK = $$QMAKE_MOVE $$symbianDestdir/$${TARGET}.dll $$symbianDestdir/$${TARGET}.sym \ + && 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_POST_LINK QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.sym QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.dso QMAKE_CLEAN += $${symbianObjdir}/$${TARGET}.def @@ -99,11 +111,21 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { } contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@.*") { - !isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK += && - - QMAKE_POST_LINK += $$QMAKE_MOVE $$symbianDestdir/$${TARGET} $$symbianDestdir/$${TARGET}.sym + !isEmpty(QMAKE_POST_LINK) { + # No way to honor the '@' :-( + QMAKE_POST_LINK = $$replace(QMAKE_POST_LINK, "^@", "") + QMAKE_POST_LINK = && $$QMAKE_POST_LINK + } # 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 = $$QMAKE_MOVE $$symbianDestdir/$${TARGET} $$symbianDestdir/$${TARGET}.sym \ + && 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 QMAKE_POST_LINK += && ln "$${TARGET}.exe" "$$TARGET" QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.sym QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.exe -- cgit v0.12 From bdff51768dfe7953324102ccaaca64da927c6b98 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 2 Mar 2010 10:57:10 +0100 Subject: Added dso dependencies to Symbian targets. This is required for correct intermodule building when def files are off, since otherwise the ordinals present in the DLLs and the ordinals linked to may be different. In layman's terms: If you build QtCore, QtGui will also trigger rebuilding as a result of that. --- .../linux-armcc/features/symbian_building.prf | 25 +++++++++++----------- qmake/generators/unix/unixmake2.cpp | 4 ++++ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index ef8e4e6..795d055 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -14,27 +14,28 @@ contains(QMAKE_CFLAGS, "--thumb")|contains(QMAKE_CXXFLAGS, "--thumb") { DEFINES += __MARM_THUMB__ } -for(libraries, LIBS) { - libraries = $$replace(libraries, "\.dll$", ".dso") - isFullName = $$find(libraries, \.) +defineReplace(processSymbianLibraries) { + library = $$replace(1, "\.dll$", ".dso") + isFullName = $$find(library, \.) isEmpty(isFullName) { - newLIBS += "$${libraries}.dso" + newLIB = "$${library}.dso" } else { - newLIBS += "$${libraries}" + newLIB = "$${library}" } + return($$newLIB) +} + +for(libraries, LIBS) { + newLIBS += $$processSymbianLibraries($$libraries) } LIBS = $$newLIBS +PRE_TARGETDEPS += $$replace(newLIBS, "-l", "") newLIBS = for(libraries, QMAKE_LIBS) { - libraries = $$replace(libraries, "\.dll$", ".dso") - isFullName = $$find(libraries, \.) - isEmpty(isFullName) { - newLIBS += "$${libraries}.dso" - } else { - newLIBS += "$${libraries}" - } + newLIBS += $$processSymbianLibraries($$libraries) } QMAKE_LIBS = $$newLIBS +PRE_TARGETDEPS += $$replace(newLIBS, "-l", "") # This needs to be done after the above LIBS mangling. include(../platformlibs.conf) diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 6516786..cff0138 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -177,6 +177,10 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) if(!project->isEmpty("QMAKE_MACOSX_DEPLOYMENT_TARGET")) t << "export MACOSX_DEPLOYMENT_TARGET = " //exported to children processes << project->first("QMAKE_MACOSX_DEPLOYMENT_TARGET") << endl; + + if (!project->isEmpty("QMAKE_SYMBIAN_SHLIB")) + t << "vpath %.dso " << project->values("QMAKE_LIBDIR").join(":") << endl; + t << endl; t << "####### Output directory" << endl << endl; -- cgit v0.12 From 34898eaa384684c74786cd59fc322054c8888c51 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 2 Mar 2010 13:16:55 +0100 Subject: Enabled conditional updating of dso files. This saves rebuilding of components that depend on the current one, by not updating the dso file unless it has changed. --- mkspecs/symbian/linux-armcc/features/symbian_building.prf | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index 795d055..dab2fbf 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -91,19 +91,26 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { QMAKE_POST_LINK = $$replace(QMAKE_POST_LINK, "^@", "") QMAKE_POST_LINK = && $$QMAKE_POST_LINK } - # the tee and grep at the end work around the issue that elf2e32 doesn't return non-null on error + # The tee and grep at the end work around the issue that elf2e32 doesn't return non-null on error. + # The comparison of dso files is to avoid extra building of modules that depend on this dso, in + # case it has not changed. QMAKE_POST_LINK = $$QMAKE_MOVE $$symbianDestdir/$${TARGET}.dll $$symbianDestdir/$${TARGET}.sym \ && 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 \ + --dso=$$symbianObjdir/$${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 \ + && if ! diff -q $${symbianObjdir}/$${TARGET}.dso $${symbianDestdir}/$${TARGET}.dso \ + > /dev/null 2>&1; then \ + $$QMAKE_COPY $${symbianObjdir}/$${TARGET}.dso $${symbianDestdir}/$${TARGET}.dso; \ + fi \ $$QMAKE_POST_LINK QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.sym QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.dso + QMAKE_CLEAN += $${symbianObjdir}/$${TARGET}.dso QMAKE_CLEAN += $${symbianObjdir}/$${TARGET}.def QMAKE_LIBS += -ledllstub.lib -ledll.lib\\(uc_dll_.o\\) -- cgit v0.12 From 984c227bb23cff57fbad6710fdac5c5dfc056409 Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Tue, 2 Mar 2010 13:11:22 +0100 Subject: Properly get the paths for the compiler-provided libs I call g++ to tell me the library paths for the compiler so I can pass that on to ld. I'm a bit confused why this is needed, need to find out if thats expected behavior for gcce --- .../symbian/linux-gcce/features/symbian_building.prf | 16 +++------------- mkspecs/symbian/linux-gcce/platformlibs.conf | 18 +++++++++++++++++- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/mkspecs/symbian/linux-gcce/features/symbian_building.prf b/mkspecs/symbian/linux-gcce/features/symbian_building.prf index fc9d621..58d0b5e 100644 --- a/mkspecs/symbian/linux-gcce/features/symbian_building.prf +++ b/mkspecs/symbian/linux-gcce/features/symbian_building.prf @@ -101,18 +101,11 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.dso QMAKE_CLEAN += $${symbianObjdir}/$${TARGET}.def - QMAKE_LIBS += -l:edllstub.lib \ - -l:edll.lib \ - -lsupc++ \ - -lgcc - QMAKE_LFLAGS += --soname $${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll \ --target1-abs \ --no-undefined \ --strip-debug \ - --nostdlib \ - -L/home/zander/work/build-symbian/arm-2009q3/lib/gcc/arm-none-symbianelf/4.4.1/ \ - -L/home/zander/work/build-symbian/arm-2009q3/arm-none-symbianelf/lib/ + --nostdlib } contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@.*") { @@ -126,14 +119,11 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@.*") { 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 \ + QMAKE_LFLAGS += --soname=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe \ --target1-abs \ --no-undefined \ + --strip-debug \ --shared \ - -lsupc++ \ - -lgcc \ --nostdlib } diff --git a/mkspecs/symbian/linux-gcce/platformlibs.conf b/mkspecs/symbian/linux-gcce/platformlibs.conf index 4651d1e..f344ef0 100644 --- a/mkspecs/symbian/linux-gcce/platformlibs.conf +++ b/mkspecs/symbian/linux-gcce/platformlibs.conf @@ -1,4 +1,20 @@ -QMAKE_LIBS += -l:usrt2_2.lib +QMAKE_LIBS += -l:usrt2_2.lib \ + -l:edllstub.lib \ + -l:edll.lib \ + -lsupc++ \ + -lgcc QMAKE_LIBDIR += ${EPOCROOT}/epoc32/release/armv5/udeb/ + +# g++ knows the path to the gcc-shipped-libs, ld doesn't. So cache the full path in the generate Makefile +QMAKE_GCC_SEARCH_DIRS =$$system($$QMAKE_CXX -print-search-dirs) +for(line, QMAKE_GCC_SEARCH_DIRS) { + contains(line, "libraries:") { + foundIt="1" + } else { + contains(foundIt, "1") { + QMAKE_LFLAGS += $$replace(line, "[=:]", " -L") + } + } +} -- cgit v0.12 From c8502375c5b31d1b5726cad3efe95539d41fbb4e Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Tue, 2 Mar 2010 17:02:51 +0100 Subject: Make the symbian_building.prf be shared file the fork I made for gcce is similar enough to now be shared between gcce and armcc so move stuff around a bit to avoid the code duplication. --- mkspecs/common/symbian/symbian-makefile.conf | 19 ++ mkspecs/symbian/features/symbian_building.prf | 221 +++++++++++++++++++++ .../linux-armcc/features/symbian_building.prf | 202 ------------------- mkspecs/symbian/linux-armcc/platformlibs.conf | 3 - mkspecs/symbian/linux-armcc/qmake.conf | 15 ++ .../linux-gcce/features/symbian_building.prf | 208 ------------------- mkspecs/symbian/linux-gcce/platformlibs.conf | 20 -- mkspecs/symbian/linux-gcce/qmake.conf | 31 +++ 8 files changed, 286 insertions(+), 433 deletions(-) create mode 100644 mkspecs/symbian/features/symbian_building.prf delete mode 100644 mkspecs/symbian/linux-armcc/features/symbian_building.prf delete mode 100644 mkspecs/symbian/linux-armcc/platformlibs.conf delete mode 100644 mkspecs/symbian/linux-gcce/features/symbian_building.prf delete mode 100644 mkspecs/symbian/linux-gcce/platformlibs.conf diff --git a/mkspecs/common/symbian/symbian-makefile.conf b/mkspecs/common/symbian/symbian-makefile.conf index 8c2bb35..ab2ef98 100644 --- a/mkspecs/common/symbian/symbian-makefile.conf +++ b/mkspecs/common/symbian/symbian-makefile.conf @@ -22,3 +22,22 @@ QMAKE_EXTENSION_PLUGIN = dll QMAKE_PREFIX_STATICLIB = QMAKE_EXTENSION_STATICLIB = lib QMAKE_SYMBIAN_SHLIB = 1 + +DEFINES *= __PRODUCT_INCLUDE__=\<$${EPOCROOT}epoc32/include/variant/symbian_os.hrh\> \ + __SYMBIAN32__ \ + __MARM_INTERWORK__ \ + _UNICODE \ + __S60_50__ \ + __S60_3X__ \ + __SERIES60_3X__ \ + __EPOC32__ \ + __MARM__ \ + __EABI__ \ + __MARM_ARMV5__ \ + __SUPPORT_CPP_EXCEPTIONS__ + +QMAKE_CFLAGS_DEBUG += -g +QMAKE_CXXFLAGS_DEBUG += -g +QMAKE_CFLAGS_RELEASE += -O2 -Otime +QMAKE_CXXFLAGS_RELEASE += -O2 -Otime + diff --git a/mkspecs/symbian/features/symbian_building.prf b/mkspecs/symbian/features/symbian_building.prf new file mode 100644 index 0000000..5c1a16d --- /dev/null +++ b/mkspecs/symbian/features/symbian_building.prf @@ -0,0 +1,221 @@ +# we have some module specific options (defined in qt.prf) lets add them +eval(TMPVAR = \$\$QMAKE_$${TARGET}_CXXFLAGS) +!isEmpty(TMPVAR):QMAKE_CXXFLAGS += $$TMPVAR +eval(TMPVAR = \$\$QMAKE_$${TARGET}_LFLAGS) +!isEmpty(TMPVAR) { + QMAKE_LFLAGS += $$TMPVAR +} else :linux-gcce { # lets provide a simple default. Without elf2e32 complains + QMAKE_LFLAGS += -Ttext 0x80000 -Tdata 0x400000 +} + +symbianObjdir=$$OBJECTS_DIR +isEmpty(symbianObjdir) { + symbianObjdir = . +} +symbianDestdir=$$DESTDIR +isEmpty(symbianDestdir) { + symbianDestdir = . +} + +contains(QMAKE_CFLAGS, "--thumb")|contains(QMAKE_CXXFLAGS, "--thumb")|contains(QMAKE_CFLAGS, "-mthumb")|contains(QMAKE_CXXFLAGS, "-mthumb") { + DEFINES += __MARM_THUMB__ +} + +for(library, LIBS) { + library = $$replace(library, "\.dll$", ".dso") + library = $$replace(library, "^-l", "") + isFullName = $$find(library, \.) + isEmpty(isFullName):library="$${library}.dso" + linux-gcce { + newLIBS += "-l:$${library}" + } else { + newLIBS += "$${library}" + } +} +LIBS = $$newLIBS +newLIBS = +for(library, QMAKE_LIBS) { + library = $$replace(library, "\.dll$", ".dso") + library = $$replace(library, "^-l", "") + isFullName = $$find(library, \.) + isEmpty(isFullName):library="$${library}.dso" + linux-gcce { + newLIBS += "-l:$${library}" + } else { + newLIBS += "$${library}" + } +} +QMAKE_LIBS = $$newLIBS + +linux-gcce { + QMAKE_LIBS += -l:usrt2_2.lib \ + -l:dfpaeabi.dso \ + -l:drtaeabi.dso \ + -l:scppnwdl.dso \ + -lsupc++ \ + -lgcc +} + +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 + + linux-armcc: { + QMAKE_LIBS += -ledllstub.lib -ledll.lib\\(uc_dll_.o\\) + } else :linux-gcce { + #QMAKE_LIBS += -l:edllstub.lib -l:edll.lib + } + + QMAKE_LFLAGS += --soname $${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll -u _E32Dll --entry=_E32Dll + DEFINES += __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} + + linux-armcc: { + QMAKE_LIBS += -leexe.lib\\(uc_exe_.o\\) + } else :linux-gcce { + #QMAKE_LIBS += -l:eexe.lib + } + + QMAKE_LFLAGS += --soname $${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe +# TODO gcce added --shared here... + DEFINES += __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) + # If you change this, also see application_icon.prf + 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/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf deleted file mode 100644 index dc52730..0000000 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ /dev/null @@ -1,202 +0,0 @@ -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_CFLAGS.ARMCC -QMAKE_CXXFLAGS += $$QMAKE_CFLAGS --no_parse_templates $$QMAKE_CXXFLAGS.ARMCC -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__ - -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) - # If you change this, also see application_icon.prf - 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 deleted file mode 100644 index d03cb9b..0000000 --- a/mkspecs/symbian/linux-armcc/platformlibs.conf +++ /dev/null @@ -1,3 +0,0 @@ -QMAKE_LIBS += usrt2_2.lib dfpaeabi.dso dfprvct2_2.dso drtaeabi.dso scppnwdl.dso drtrvct2_2.dso h_t__uf.l\\(switch8.o\\) - -QMAKE_RVCT_LINKSTYLE = 1 diff --git a/mkspecs/symbian/linux-armcc/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf index c98c1f0..a8194b2 100644 --- a/mkspecs/symbian/linux-armcc/qmake.conf +++ b/mkspecs/symbian/linux-armcc/qmake.conf @@ -5,3 +5,18 @@ include(../../common/symbian/symbian-makefile.conf) include(../../common/armcc.conf) + +QMAKE_LIBS += usrt2_2.lib dfpaeabi.dso dfprvct2_2.dso drtaeabi.dso scppnwdl.dso drtrvct2_2.dso h_t__uf.l\\(switch8.o\\) + +QMAKE_RVCT_LINKSTYLE = 1 + +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_CFLAGS.ARMCC +QMAKE_CXXFLAGS += $$QMAKE_CFLAGS --no_parse_templates $$QMAKE_CXXFLAGS.ARMCC +QMAKE_LFLAGS += --symver_soname --diag_suppress 6331,6780 --bpabi --reloc --datacompressor=off --split --rw-base 0x800000 --dll --no_scanlib +QMAKE_LFLAGS_APP += --entry _E32Startup + +DEFINES += EKA2 \ + __ARMCC__ \ + __ARMcc_2__ \ + __ARMCC_2_2__ + diff --git a/mkspecs/symbian/linux-gcce/features/symbian_building.prf b/mkspecs/symbian/linux-gcce/features/symbian_building.prf deleted file mode 100644 index 58d0b5e..0000000 --- a/mkspecs/symbian/linux-gcce/features/symbian_building.prf +++ /dev/null @@ -1,208 +0,0 @@ -gcceExtraFlags = -I${EPOCROOT}epoc32/include/ --include=${EPOCROOT}epoc32/include/gcce/gcce.h -march=armv5t -mapcs -mthumb-interwork -nostdinc -c -fvisibility-inlines-hidden -msoft-float -T script -QMAKE_CFLAGS += $${gcceExtraFlags} -QMAKE_CXXFLAGS += $${gcceExtraFlags} -x c++ -fexceptions -fno-unit-at-a-time - -# we have some module specific options (defined in qt.prf) lets add them -eval(TMPVAR = \$\$QMAKE_$${TARGET}_CXXFLAGS) -!isEmpty(TMPVAR):QMAKE_CXXFLAGS += $$TMPVAR -eval(TMPVAR = \$\$QMAKE_$${TARGET}_LFLAGS) -!isEmpty(TMPVAR) { - QMAKE_LFLAGS += $$TMPVAR -} else { # lets provide a simple default. Without elf2e32 complains - QMAKE_LFLAGS += -Ttext 0x80000 -Tdata 0x400000 -} - -symbianObjdir=$$OBJECTS_DIR -isEmpty(symbianObjdir) { - symbianObjdir = . -} -symbianDestdir=$$DESTDIR -isEmpty(symbianDestdir) { - symbianDestdir = . -} - -contains(QMAKE_CFLAGS, "-mthumb")|contains(QMAKE_CXXFLAGS, "-mthumb") { - DEFINES += __MARM_THUMB__ -} - -for(library, LIBS) { - library = $$replace(library, "\.dll$", ".dso") - library = $$replace(library, "^-l", "") - isFullName = $$find(library, \.) - isEmpty(isFullName):library="$${library}.dso" - newLIBS += "-l:$${library}" -} -LIBS = $$newLIBS -newLIBS = -QMAKE_LIBS += dfpaeabi drtaeabi scppnwdl -for(library, QMAKE_LIBS) { - library = $$replace(library, "\.dll$", ".dso") - library = $$replace(library, "^-l", "") - isFullName = $$find(library, \.) - isEmpty(isFullName):library="$${library}.dso" - newLIBS += "-l:$${library}" -} -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_LFLAGS += --soname $${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll \ - --target1-abs \ - --no-undefined \ - --strip-debug \ - --nostdlib -} - -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_LFLAGS += --soname=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe \ - --target1-abs \ - --no-undefined \ - --strip-debug \ - --shared \ - --nostdlib -} - -# 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-gcce/platformlibs.conf b/mkspecs/symbian/linux-gcce/platformlibs.conf deleted file mode 100644 index f344ef0..0000000 --- a/mkspecs/symbian/linux-gcce/platformlibs.conf +++ /dev/null @@ -1,20 +0,0 @@ -QMAKE_LIBS += -l:usrt2_2.lib \ - -l:edllstub.lib \ - -l:edll.lib \ - -lsupc++ \ - -lgcc - -QMAKE_LIBDIR += ${EPOCROOT}/epoc32/release/armv5/udeb/ - - -# g++ knows the path to the gcc-shipped-libs, ld doesn't. So cache the full path in the generate Makefile -QMAKE_GCC_SEARCH_DIRS =$$system($$QMAKE_CXX -print-search-dirs) -for(line, QMAKE_GCC_SEARCH_DIRS) { - contains(line, "libraries:") { - foundIt="1" - } else { - contains(foundIt, "1") { - QMAKE_LFLAGS += $$replace(line, "[=:]", " -L") - } - } -} diff --git a/mkspecs/symbian/linux-gcce/qmake.conf b/mkspecs/symbian/linux-gcce/qmake.conf index cb30f61..3eb6d56 100644 --- a/mkspecs/symbian/linux-gcce/qmake.conf +++ b/mkspecs/symbian/linux-gcce/qmake.conf @@ -34,6 +34,7 @@ QMAKE_QtSvg_CXXFLAGS = -mthumb QMAKE_QtTest_CXXFLAGS = -mthumb QMAKE_QtXmlPatterns_CXXFLAGS = -mthumb QMAKE_QtXml_CXXFLAGS = -mthumb +#TODO fails with; arm-none-symbianelf-ld: section .data loaded at [00e00000,00e05973] overlaps section .text loaded at [00008000,00fe748b] QMAKE_QtWebKit_LFLAGS = -Ttext 0x8000 -Tdata 0xE00000 # never use -fPIC, gcce-linker doesn't like it. @@ -47,3 +48,33 @@ QMAKE_LFLAGS_SONAME = #QMAKE_LFLAGS_THREAD += #QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined QMAKE_RPATH = --rpath= + +DEFINES += __GCCE__ \ + UNICODE \ + _STLP_NO_EXCEPTION_HEADER + +QMAKE_LFLAGS_APP += --entry _E32Startup +QMAKE_LFLAGS_SHLIB += --default-symver + +gcceExtraFlags = -I${EPOCROOT}epoc32/include/ --include=${EPOCROOT}epoc32/include/gcce/gcce.h -march=armv5t -mapcs -mthumb-interwork -nostdinc -c -fvisibility-inlines-hidden -msoft-float -T script +QMAKE_CFLAGS += $${gcceExtraFlags} +QMAKE_CXXFLAGS += $${gcceExtraFlags} -x c++ -fexceptions -fno-unit-at-a-time + +QMAKE_LFLAGS += --target1-abs \ + --no-undefined \ + --strip-debug \ + --nostdlib + +QMAKE_LIBDIR += ${EPOCROOT}/epoc32/release/armv5/udeb/ + +# g++ knows the path to the gcc-shipped-libs, ld doesn't. So cache the full path in the generate Makefile +QMAKE_GCC_SEARCH_DIRS =$$system($$QMAKE_CXX -print-search-dirs) +for(line, QMAKE_GCC_SEARCH_DIRS) { + contains(line, "libraries:") { + foundIt="1" + } else { + contains(foundIt, "1") { + QMAKE_LFLAGS += $$replace(line, "[=:]", " -L") + } + } +} -- cgit v0.12 From 425e1941633e0d96f469a06e4cc8eeb0fd22ff9f Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Thu, 4 Mar 2010 10:50:48 +0100 Subject: Do the correct thing for make sis for webkit --- src/3rdparty/webkit/WebCore/WebCore.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index c7e5655..8cd97a9 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -8,7 +8,7 @@ symbian: { TARGET.CAPABILITY = All -Tcb TARGET.UID3 = 0x200267C2 - webkitlibs.sources = QtWebKit.dll + webkitlibs.sources = $$QMAKE_LIBDIR_QT/QtWebKit.dll webkitlibs.path = /sys/bin vendorinfo = \ "; Localised Vendor name" \ -- cgit v0.12 From 86ef6dc634ccf8518188a73262aa95b782352f20 Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Thu, 4 Mar 2010 11:01:36 +0100 Subject: Fix src!=build issue --- qmake/generators/symbian/symbiancommon.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp index c7f8cd4..b85f711 100644 --- a/qmake/generators/symbian/symbiancommon.cpp +++ b/qmake/generators/symbian/symbiancommon.cpp @@ -206,7 +206,8 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, Deployment // 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"))); + QString visualTarget = generator->escapeFilePath(project->first("TARGET")); + visualTarget = removePathSeparators(visualTarget); QString wrapperTarget = visualTarget + " installer"; -- cgit v0.12 From 1a289e35cffc55b341a7c4894a26c1693a575f98 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Mon, 8 Mar 2010 16:53:35 +0100 Subject: Added Symbian def file support to Linux build system. This also switches the official def file variable in qmake profiles to DEF_FILE. Support for freezing def files was also added, but needs more work and is therefore disabled for now. Task: QTBUG-7510 Task: QTBUG-8052 --- configure | 29 ++++++- doc/src/development/qmake-manual.qdoc | 8 +- mkspecs/common/symbian/symbian-makefile.conf | 1 + mkspecs/features/symbian/def_files.prf | 95 ++++++++++++++++------ .../linux-armcc/features/symbian_building.prf | 2 + src/qbase.pri | 2 +- src/tools/bootstrap/bootstrap.pri | 6 +- src/tools/bootstrap/bootstrap.pro | 6 +- 8 files changed, 116 insertions(+), 33 deletions(-) diff --git a/configure b/configure index cf8ed13..b6ba1e8 100755 --- a/configure +++ b/configure @@ -644,6 +644,7 @@ CFG_XVIDEO=auto CFG_XINERAMA=runtime CFG_XFIXES=runtime CFG_ZLIB=auto +CFG_SYMBIAN_DEFFILES=auto CFG_S60=auto CFG_SQLITE=qt CFG_GIF=auto @@ -927,7 +928,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|-mediaservice|-audio-backend|-svg|-declarative|-webkit|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60) + -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|-mediaservice|-audio-backend|-svg|-declarative|-webkit|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60|-usedeffiles) VAR=`echo $1 | sed "s,^-\(.*\),\1,"` VAL=yes ;; @@ -1660,6 +1661,13 @@ while [ "$#" -gt 0 ]; do UNKNOWN_OPT=yes fi ;; + usedeffiles) + if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then + CFG_SYMBIAN_DEFFILES="$VAL" + else + UNKNOWN_OPT=yes + fi + ;; sqlite) if [ "$VAL" = "system" ]; then CFG_SQLITE=system @@ -3343,7 +3351,7 @@ Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir [-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] + [-no-s60] [-s60] [-no-usedeffiles] [-usedeffiles] [additional platform specific options (see below)] @@ -3529,6 +3537,8 @@ cat << EOF -no-s60 ............ Do not compile in S60 support. + -s60 ............... Compile with support for the S60 UI Framework. + -no-usedeffiles .... Disable the usage of DEF files. + + -usedeffiles ....... Enable the usage of DEF files. -no-mmx ............ Do not compile with use of MMX instructions. -no-3dnow .......... Do not compile with use of 3DNOW instructions. @@ -4625,6 +4635,14 @@ if [ "$CFG_S60" = "auto" ]; then fi fi +if [ "$CFG_SYMBIAN_DEFFILES" = "auto" ]; then + if echo "$XQMAKESPEC" | grep symbian > /dev/null && [ "$CFG_DEV" = "no" ]; then + CFG_SYMBIAN_DEFFILES=yes + else + CFG_SYMBIAN_DEFFILES=no + fi +fi + # detect how jpeg should be built if [ "$CFG_JPEG" = "auto" ]; then if [ "$CFG_SHARED" = "yes" ]; then @@ -6358,6 +6376,12 @@ if [ "$CFG_S60" = "yes" ]; then QT_CONFIG="$QT_CONFIG s60" fi +if [ "$CFG_SYMBIAN_DEFFILES" = "yes" ]; then + QMAKE_CONFIG="$QMAKE_CONFIG def_files" +else + QMAKE_CONFIG="$QMAKE_CONFIG def_files_disabled" +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" @@ -7584,6 +7608,7 @@ if [ "$CFG_WEBKIT" = "yes" ]; then fi echo "Declarative module ..... $CFG_DECLARATIVE" echo "Support for S60 ........ $CFG_S60" +echo "Symbian DEF files ...... $CFG_SYMBIAN_DEFFILES" 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/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc index a960382..c314eb8 100644 --- a/doc/src/development/qmake-manual.qdoc +++ b/doc/src/development/qmake-manual.qdoc @@ -1329,9 +1329,13 @@ \target DEF_FILE \section1 DEF_FILE - \e {This is only used on Windows when using the \c app template}. + \e {This is only used on Windows when using the \c app template, + and on Symbian when building a shared DLL}. - Specifies a \c .def file to be included in the project. + Specifies a \c .def file to be included in the project. On Symbian + a directory may be specified instead, in which case the real files + will be located under the standard Symbian directories \c bwins and + \c eabi. \target DEPENDPATH \section1 DEPENDPATH diff --git a/mkspecs/common/symbian/symbian-makefile.conf b/mkspecs/common/symbian/symbian-makefile.conf index c8a88dd..13b335a 100644 --- a/mkspecs/common/symbian/symbian-makefile.conf +++ b/mkspecs/common/symbian/symbian-makefile.conf @@ -22,6 +22,7 @@ QMAKE_CFLAGS_DEBUG += -g QMAKE_CXXFLAGS_DEBUG += -g QMAKE_CFLAGS_RELEASE += -O2 -Otime QMAKE_CXXFLAGS_RELEASE += -O2 -Otime +QMAKE_ELF2E32_FLAGS += 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__ diff --git a/mkspecs/features/symbian/def_files.prf b/mkspecs/features/symbian/def_files.prf index 48d91aa..a1f0c8d 100644 --- a/mkspecs/features/symbian/def_files.prf +++ b/mkspecs/features/symbian/def_files.prf @@ -3,32 +3,75 @@ CONFIG -= def_files_disabled -# Firstly, if the MMP_RULES already contain a defBlock variable, don't generate another one -# (this bit is slightly magic, because it depends upon everyone creating their DEFFILE statements -# in a defBlock variable; but otherwise we have to expand MMP_RULES then scan for the DEFFILE keyword) -!contains(MMP_RULES, defBlock) { - # Apps are executables on Symbian, so don't have exports, and therefore don't have DEF files - # Plugins use standard DEF files, which qmake generates, so shouldn't be using these DEFFILE - # statements - they use the qmake generated statements instead - # Static libraries obviously don't have DEF files, as they don't take part in dynamic linkage - !contains(TEMPLATE, app):!contains(CONFIG, plugin):!contains(CONFIG, staticlib): { - !isEmpty(defFilePath) { - defBlock = \ - "$${LITERAL_HASH}ifdef WINSCW" \ - "DEFFILE $$defFilePath/bwins/$${TARGET}.def" \ - "$${LITERAL_HASH}elif defined EABI" \ - "DEFFILE $$defFilePath/eabi/$${TARGET}.def" \ - "$${LITERAL_HASH}endif" - } else { - # If defFilePath is not defined, then put the folders containing the DEF files at the - # same level as the .pro (and generated MMP) file(s) - defBlock = \ - "$${LITERAL_HASH}ifdef WINSCW" \ - "DEFFILE ./bwins/$${TARGET}.def" \ - "$${LITERAL_HASH}elif defined EABI" \ - "DEFFILE ./eabi/$${TARGET}.def" \ - "$${LITERAL_HASH}endif" +symbian-abld|symbian-sbsv2 { + # Firstly, if the MMP_RULES already contain a defBlock variable, don't generate another one + # (this bit is slightly magic, because it depends upon everyone creating their DEFFILE statements + # in a defBlock variable; but otherwise we have to expand MMP_RULES then scan for the DEFFILE keyword) + !contains(MMP_RULES, defBlock) { + # Apps are executables on Symbian, so don't have exports, and therefore don't have DEF files + # Plugins use standard DEF files, which qmake generates, so shouldn't be using these DEFFILE + # statements - they use the qmake generated statements instead + # Static libraries obviously don't have DEF files, as they don't take part in dynamic linkage + !contains(TEMPLATE, app):!contains(CONFIG, plugin):!contains(CONFIG, staticlib): { + !isEmpty(DEF_FILE) { + defBlock = \ + "$${LITERAL_HASH}ifdef WINSCW" \ + "DEFFILE $$DEF_FILE/bwins/$${TARGET}.def" \ + "$${LITERAL_HASH}elif defined EABI" \ + "DEFFILE $$DEF_FILE/eabi/$${TARGET}.def" \ + "$${LITERAL_HASH}endif" + } else:!isEmpty(defFilePath) { + defBlock = \ + "$${LITERAL_HASH}ifdef WINSCW" \ + "DEFFILE $$defFilePath/bwins/$${TARGET}.def" \ + "$${LITERAL_HASH}elif defined EABI" \ + "DEFFILE $$defFilePath/eabi/$${TARGET}.def" \ + "$${LITERAL_HASH}endif" + } else { + # If defFilePath is not defined, then put the folders containing the DEF files at the + # same level as the .pro (and generated MMP) file(s) + defBlock = \ + "$${LITERAL_HASH}ifdef WINSCW" \ + "DEFFILE ./bwins/$${TARGET}.def" \ + "$${LITERAL_HASH}elif defined EABI" \ + "DEFFILE ./eabi/$${TARGET}.def" \ + "$${LITERAL_HASH}endif" + } + MMP_RULES += defBlock } - MMP_RULES += defBlock } + +} else:contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { + !isEmpty(DEF_FILE) { + defFile = $$DEF_FILE + } else { + defFile = . + } + system("$$QMAKE_CHK_DIR_EXISTS $$_PRO_FILE_PWD_/$$defFile") { + !exists("$$_PRO_FILE_PWD_/$$defFile/eabi") { + system("$$QMAKE_MKDIR $$_PRO_FILE_PWD_/$$defFile/eabi") + } + elf2e32FileToAdd = $$_PRO_FILE_PWD_/$$defFile/eabi/$$basename(TARGET)u.def + } else { + elf2e32FileToAdd = $$_PRO_FILE_PWD_/$$defFile + } + QMAKE_ELF2E32_FLAGS += "`test -e $$elf2e32FileToAdd && echo --definput=$$elf2e32FileToAdd`" + + symbianObjdir = $$OBJECTS_DIR + isEmpty(symbianObjdir):symbianObjdir = . + + freeze_target.target = freeze + freeze_target.depends = first + # The perl part is to convert to unix line endings and remove comments, which the s60 tools refuse to do. + freeze_target.commands = perl -n -e \'next if (/; NEW/); s/\r//g; if (/MISSING:(.*)/x) { print(\"\$\$1 ABSENT\\n\"); } else { print; }\' < $$symbianObjdir/$${TARGET}.def > $$elf2e32FileToAdd + #QMAKE_EXTRA_TARGETS += freeze_target +} else:contains(TEMPLATE, subdirs) { + freeze_target.target = freeze + freeze_target.CONFIG = recursive + freeze_target.recurse = $$SUBDIRS + #QMAKE_EXTRA_TARGETS += freeze_target +} else { + freeze_target.target = freeze + freeze_target.commands = + #QMAKE_EXTRA_TARGETS += freeze_target } diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index dab2fbf..12ca516 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -102,6 +102,7 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { --dso=$$symbianObjdir/$${TARGET}.dso --defoutput=$$symbianObjdir/$${TARGET}.def \ --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll \ --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged $$capability \ + $$QMAKE_ELF2E32_FLAGS \ | tee elf2e32.log && test `grep -c 'Error:' elf2e32.log` = 0 && rm elf2e32.log \ && if ! diff -q $${symbianObjdir}/$${TARGET}.dso $${symbianDestdir}/$${TARGET}.dso \ > /dev/null 2>&1; then \ @@ -132,6 +133,7 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@.*") { --elfinput=$${symbianDestdir}/$${TARGET}.sym --output=$${symbianDestdir}/$${TARGET}.exe \ --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe \ --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged $$capability \ + $$QMAKE_ELF2E32_FLAGS \ | tee elf2e32.log && test `grep -c 'Error:' elf2e32.log` = 0 && rm elf2e32.log \ $$QMAKE_POST_LINK QMAKE_POST_LINK += && ln "$${TARGET}.exe" "$$TARGET" diff --git a/src/qbase.pri b/src/qbase.pri index 835ed0e..4a75565 100644 --- a/src/qbase.pri +++ b/src/qbase.pri @@ -104,7 +104,7 @@ symbian { # built in this exact environment. *Never* use this when building a version # for release. contains(CONFIG, def_files) { - defFilePath=../s60installs + DEF_FILE=../s60installs } } load(armcc_warnings) diff --git a/src/tools/bootstrap/bootstrap.pri b/src/tools/bootstrap/bootstrap.pri index c5e1e1c..15e746a 100644 --- a/src/tools/bootstrap/bootstrap.pri +++ b/src/tools/bootstrap/bootstrap.pri @@ -62,8 +62,12 @@ mac { LIBS += -framework CoreServices } -# Make dummy "sis" target to keep recursive "make sis" working. +# Make dummy "sis" and "freeze" target to keep recursive "make sis/freeze" working. sis_target.target = sis sis_target.commands = sis_target.depends = first QMAKE_EXTRA_TARGETS += sis_target +freeze_target.target = freeze +freeze_target.commands = +freeze_target.depends = first +QMAKE_EXTRA_TARGETS += freeze_target diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro index d211f47..48dc444 100644 --- a/src/tools/bootstrap/bootstrap.pro +++ b/src/tools/bootstrap/bootstrap.pro @@ -114,8 +114,12 @@ contains(QT_CONFIG, zlib) { lib.CONFIG = dummy_install INSTALLS += lib -# Make dummy "sis" target to keep recursive "make sis" working. +# Make dummy "sis" and "freeze" target to keep recursive "make sis/freeze" working. sis_target.target = sis sis_target.commands = sis_target.depends = first QMAKE_EXTRA_TARGETS += sis_target +freeze_target.target = freeze +freeze_target.commands = +freeze_target.depends = first +QMAKE_EXTRA_TARGETS += freeze_target -- cgit v0.12 From 16113ecd5135aea01aac1fa3954143e59269bd50 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Mon, 8 Mar 2010 16:57:33 +0100 Subject: Switched to using DEF_FILE, which is the official variable. --- src/3rdparty/webkit/WebCore/WebCore.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index c7e5655..22bd762 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -3418,7 +3418,7 @@ CONFIG(QTDIR_build):isEqual(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 4 symbian { shared { contains(CONFIG, def_files) { - defFilePath=../WebKit/qt/symbian + DEF_FILE=../WebKit/qt/symbian } } } -- cgit v0.12 From aaf189b084f524c6e4230fddb25b8494364d83e9 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 9 Mar 2010 10:02:49 +0100 Subject: Enabled dependencies for .dso and .lib libraries only. This adds support for .lib files, as well as removes support for all others than .dso and .lib. This builds on the original commit bdff51768dfe. --- mkspecs/symbian/features/symbian_building.prf | 3 +-- qmake/generators/unix/unixmake2.cpp | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/mkspecs/symbian/features/symbian_building.prf b/mkspecs/symbian/features/symbian_building.prf index a7663af..f1907c2 100644 --- a/mkspecs/symbian/features/symbian_building.prf +++ b/mkspecs/symbian/features/symbian_building.prf @@ -31,6 +31,7 @@ defineReplace(processSymbianLibraries) { } else { newLIB = "$${library}" } + contains(library, "\.dso$")|contains(library, ".lib$"):PRE_TARGETDEPS += $$library return($$newLIB) } @@ -38,13 +39,11 @@ for(libraries, LIBS) { newLIBS += $$processSymbianLibraries($$libraries) } LIBS = $$newLIBS -PRE_TARGETDEPS += $$replace(newLIBS, "-l", "") newLIBS = for(libraries, QMAKE_LIBS) { newLIBS += $$processSymbianLibraries($$libraries) } QMAKE_LIBS = $$newLIBS -PRE_TARGETDEPS += $$replace(newLIBS, "-l", "") linux-gcce { QMAKE_LIBS += -l:usrt2_2.lib \ diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index cff0138..b9e0ec8 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -178,8 +178,10 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << "export MACOSX_DEPLOYMENT_TARGET = " //exported to children processes << project->first("QMAKE_MACOSX_DEPLOYMENT_TARGET") << endl; - if (!project->isEmpty("QMAKE_SYMBIAN_SHLIB")) + if (!project->isEmpty("QMAKE_SYMBIAN_SHLIB")) { t << "vpath %.dso " << project->values("QMAKE_LIBDIR").join(":") << endl; + t << "vpath %.lib " << project->values("QMAKE_LIBDIR").join(":") << endl; + } t << endl; -- cgit v0.12 From c6333338b900f0571428af84f1da74aa9dfb1a80 Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Mon, 8 Mar 2010 13:43:08 +0100 Subject: Make sure that we have all compile flags available always Users may do a CONFIG -= qt which means that the qt.prf won't be loaded. So, lets make sure we don't have any critical properties in those files. --- mkspecs/features/symbian/debug.prf | 2 +- mkspecs/features/symbian/release.prf | 2 +- mkspecs/symbian/features/symbian_building.prf | 8 +++++--- mkspecs/symbian/linux-armcc/features/qt.prf | 12 ------------ mkspecs/symbian/linux-armcc/qmake.conf | 8 ++++++++ mkspecs/symbian/linux-gcce/features/qt.prf | 28 --------------------------- mkspecs/symbian/linux-gcce/qmake.conf | 13 ++++++++++++- 7 files changed, 27 insertions(+), 46 deletions(-) delete mode 100644 mkspecs/symbian/linux-armcc/features/qt.prf delete mode 100644 mkspecs/symbian/linux-gcce/features/qt.prf diff --git a/mkspecs/features/symbian/debug.prf b/mkspecs/features/symbian/debug.prf index 19f5348..b5afeb6 100644 --- a/mkspecs/features/symbian/debug.prf +++ b/mkspecs/features/symbian/debug.prf @@ -1 +1 @@ -QMAKE_LIBDIR_QT += $${EPOCROOT}epoc32/release/armv5/udeb +QMAKE_LIBDIR += $${EPOCROOT}epoc32/release/armv5/udeb diff --git a/mkspecs/features/symbian/release.prf b/mkspecs/features/symbian/release.prf index abfa3ac..8164495 100644 --- a/mkspecs/features/symbian/release.prf +++ b/mkspecs/features/symbian/release.prf @@ -1 +1 @@ -QMAKE_LIBDIR_QT += $${EPOCROOT}epoc32/release/armv5/urel +QMAKE_LIBDIR += $${EPOCROOT}epoc32/release/armv5/urel diff --git a/mkspecs/symbian/features/symbian_building.prf b/mkspecs/symbian/features/symbian_building.prf index f1907c2..4760e09 100644 --- a/mkspecs/symbian/features/symbian_building.prf +++ b/mkspecs/symbian/features/symbian_building.prf @@ -69,7 +69,7 @@ isEmpty(VERSION) { } splitVersion = $$split(VERSION, ".") -count(splitVersion, 1) { +count(splitVersion, 0) { # Default Symbian version if none is specified. hexVersion = "000a0000" decVersion = "10.0" @@ -172,8 +172,10 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@.*") { } # Symbian resource files - -linux-armcc:symbian_resources_INCLUDES = -I$$(RVCT22INC) +linux-armcc: { + SYMBIAN_RVCT22INC=$$(RVCT22INC) + !isEmpty(SYMBIAN_RVCT22INC):symbian_resources_INCLUDES = -I$${SYMBIAN_RVCT22INC} +} symbian_resources_INCLUDES = $$replace(symbian_resources_INCLUDES, ",", " -I") symbian_resources_INCLUDES += $$join(INCLUDEPATH, " -I", "-I") symbian_resources_DEFINES = $$join(DEFINES, " -D", "-D") diff --git a/mkspecs/symbian/linux-armcc/features/qt.prf b/mkspecs/symbian/linux-armcc/features/qt.prf deleted file mode 100644 index f8a074d..0000000 --- a/mkspecs/symbian/linux-armcc/features/qt.prf +++ /dev/null @@ -1,12 +0,0 @@ -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/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf index a8194b2..f8c666a 100644 --- a/mkspecs/symbian/linux-armcc/qmake.conf +++ b/mkspecs/symbian/linux-armcc/qmake.conf @@ -20,3 +20,11 @@ DEFINES += EKA2 \ __ARMcc_2__ \ __ARMCC_2_2__ +QMAKE_LIBDIR += $${EPOCROOT}epoc32/release/armv5/lib +QMAKE_LIBDIR *= $$(RVCT22LIB) + +INCLUDEPATH = $${EPOCROOT}epoc32/include \ + $${EPOCROOT}epoc32/include/rvct2_2 \ + $${EPOCROOT}epoc32/include/variant \ + $${EPOCROOT}epoc32/include/stdapis \ + $$INCLUDEPATH diff --git a/mkspecs/symbian/linux-gcce/features/qt.prf b/mkspecs/symbian/linux-gcce/features/qt.prf deleted file mode 100644 index fd2cd1b..0000000 --- a/mkspecs/symbian/linux-gcce/features/qt.prf +++ /dev/null @@ -1,28 +0,0 @@ -QMAKE_LIBDIR += $${EPOCROOT}epoc32/release/armv5/lib - -INCLUDEPATH = $${EPOCROOT}epoc32/include/variant \ - $${EPOCROOT}epoc32/include/stdapis \ - $${EPOCROOT}epoc32/include/gcce \ - ${EPOCROOT}epoc32/include/stdapis/sys \ - ${EPOCROOT}epoc32/include/stdapis/stlport \ - $$INCLUDEPATH - -DEFINES *= __PRODUCT_INCLUDE__=\<$${EPOCROOT}epoc32/include/variant/symbian_os.hrh\> \ - __SYMBIAN32__ \ - __MARM_INTERWORK__ \ - NDEBUG \ - _UNICODE \ - __S60_50__ \ - __S60_3X__ \ - __SERIES60_3X__ \ - __GCCE__ \ - __EPOC32__ \ - __MARM__ \ - __EABI__ \ - __MARM_ARMV5__ \ - __EXE__ \ - UNICODE \ - _STLP_NO_EXCEPTION_HEADER \ - __SUPPORT_CPP_EXCEPTIONS__ - -load(qt) diff --git a/mkspecs/symbian/linux-gcce/qmake.conf b/mkspecs/symbian/linux-gcce/qmake.conf index 3eb6d56..0d81693 100644 --- a/mkspecs/symbian/linux-gcce/qmake.conf +++ b/mkspecs/symbian/linux-gcce/qmake.conf @@ -56,7 +56,7 @@ DEFINES += __GCCE__ \ QMAKE_LFLAGS_APP += --entry _E32Startup QMAKE_LFLAGS_SHLIB += --default-symver -gcceExtraFlags = -I${EPOCROOT}epoc32/include/ --include=${EPOCROOT}epoc32/include/gcce/gcce.h -march=armv5t -mapcs -mthumb-interwork -nostdinc -c -fvisibility-inlines-hidden -msoft-float -T script +gcceExtraFlags = --include=${EPOCROOT}epoc32/include/gcce/gcce.h -march=armv5t -mapcs -mthumb-interwork -nostdinc -c -fvisibility-inlines-hidden -msoft-float -T script QMAKE_CFLAGS += $${gcceExtraFlags} QMAKE_CXXFLAGS += $${gcceExtraFlags} -x c++ -fexceptions -fno-unit-at-a-time @@ -78,3 +78,14 @@ for(line, QMAKE_GCC_SEARCH_DIRS) { } } } + +QMAKE_LIBDIR += $${EPOCROOT}epoc32/release/armv5/lib + +INCLUDEPATH = ${EPOCROOT}epoc32/include/ \ + $${EPOCROOT}epoc32/include/variant \ + $${EPOCROOT}epoc32/include/stdapis \ + $${EPOCROOT}epoc32/include/gcce \ + ${EPOCROOT}epoc32/include/stdapis/sys \ + ${EPOCROOT}epoc32/include/stdapis/stlport \ + $$INCLUDEPATH + -- cgit v0.12 From cbfc8b442e6765bf23de1ead6699bd7cf5b8cd57 Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Tue, 9 Mar 2010 12:28:17 +0100 Subject: Remove largefile config test Somewhere in 2005 the code was changed to no longer run the exe but just to compile it which means that as soon as the simple exe compiled large file support was set to true. Removing the complexity and just setting the default to true in the configure script sounds like the honest thing to do :) --- config.tests/unix/largefile/largefile.pro | 3 -- config.tests/unix/largefile/largefiletest.cpp | 73 --------------------------- configure | 19 +------ 3 files changed, 1 insertion(+), 94 deletions(-) delete mode 100644 config.tests/unix/largefile/largefile.pro delete mode 100644 config.tests/unix/largefile/largefiletest.cpp diff --git a/config.tests/unix/largefile/largefile.pro b/config.tests/unix/largefile/largefile.pro deleted file mode 100644 index d7affc6..0000000 --- a/config.tests/unix/largefile/largefile.pro +++ /dev/null @@ -1,3 +0,0 @@ -SOURCES=largefiletest.cpp -CONFIG-=qt dylib -mac:CONFIG -= app_bundle diff --git a/config.tests/unix/largefile/largefiletest.cpp b/config.tests/unix/largefile/largefiletest.cpp deleted file mode 100644 index bf25de9..0000000 --- a/config.tests/unix/largefile/largefiletest.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** -** -** 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 config.tests 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$ -** -****************************************************************************/ - -/* Sample program for configure to test Large File support on target -platforms. -*/ - -#define _LARGEFILE_SOURCE -#define _LARGE_FILES -#define _FILE_OFFSET_BITS 64 -#include <unistd.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <assert.h> -#include <stdio.h> - -int main( int, char **argv ) -{ -// check that off_t can hold 2^63 - 1 and perform basic operations... -#define OFF_T_64 (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - if (OFF_T_64 % 2147483647 != 1) - return 1; - - // stat breaks on SCO OpenServer - struct stat buf; - stat( argv[0], &buf ); - if (!S_ISREG(buf.st_mode)) - return 2; - - FILE *file = fopen( argv[0], "r" ); - off_t offset = ftello( file ); - fseek( file, offset, SEEK_CUR ); - fclose( file ); - return 0; -} diff --git a/configure b/configure index b6ba1e8..94ea874 100755 --- a/configure +++ b/configure @@ -725,7 +725,7 @@ CFG_DBUS=auto CFG_GLIB=auto CFG_GSTREAMER=auto CFG_QGTKSTYLE=auto -CFG_LARGEFILE=auto +CFG_LARGEFILE=yes CFG_OPENSSL=auto CFG_PTMALLOC=no CFG_STL=auto @@ -5888,23 +5888,6 @@ if [ "$CFG_GETIFADDRS" != "no" ]; then fi fi -# find if the platform supports X/Open Large File compilation environment -if [ "$CFG_LARGEFILE" != "no" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/largefile "X/Open Large File" $L_FLAGS $I_FLAGS $l_FLAGS; then - CFG_LARGEFILE=yes - else - if [ "$CFG_LARGEFILE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then - echo "X/Open Large File support cannot be enabled due to functionality tests!" - echo " Turn on verbose messaging (-v) to $0 to see the final report." - echo " If you believe this message is in error you may use the continue" - echo " switch (-continue) to $0 to continue." - exit 101 - else - CFG_LARGEFILE=no - fi - fi -fi - # detect OpenSSL if [ "$CFG_OPENSSL" != "no" ]; then if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/openssl "OpenSSL" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then -- cgit v0.12 From 1cf511976f1c9130a2ab263aa11ea3a1707f8766 Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Tue, 9 Mar 2010 12:30:14 +0100 Subject: Symbian doesn't have large file support currently, just turn it off --- mkspecs/common/symbian/qplatformdefs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mkspecs/common/symbian/qplatformdefs.h b/mkspecs/common/symbian/qplatformdefs.h index 38a1314..2b075ba 100644 --- a/mkspecs/common/symbian/qplatformdefs.h +++ b/mkspecs/common/symbian/qplatformdefs.h @@ -85,6 +85,8 @@ #include <arpa/inet.h> #define QT_USE_XOPEN_LFS_EXTENSIONS +// unset large file as symbian doesn't support it +#undef QT_LARGEFILE_SUPPORT #include "../posix/qplatformdefs.h" #undef QT_OPEN_LARGEFILE -- cgit v0.12 From fbe80a0094d7ef501f2308e70f19342f875dd94c Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Tue, 9 Mar 2010 14:16:54 +0100 Subject: Consistently use the * in configure --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 94ea874..377311f 100755 --- a/configure +++ b/configure @@ -3538,7 +3538,7 @@ cat << EOF -no-s60 ............ Do not compile in S60 support. + -s60 ............... Compile with support for the S60 UI Framework. -no-usedeffiles .... Disable the usage of DEF files. - + -usedeffiles ....... Enable the usage of DEF files. + * -usedeffiles ....... Enable the usage of DEF files. -no-mmx ............ Do not compile with use of MMX instructions. -no-3dnow .......... Do not compile with use of 3DNOW instructions. -- cgit v0.12 From 02f6da62a42bd1059eb0da091d1f46efbb919750 Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Tue, 9 Mar 2010 16:53:19 +0100 Subject: Use the same concept for per-lib tweaks as armcc Now the compiler specific options in gui.pro and WebCore.pro are only for the mmp based build systems. Lets make that clear and mark them as such. --- mkspecs/symbian/linux-armcc/qmake.conf | 24 +++++++++++++++++++++++- src/3rdparty/webkit/WebCore/WebCore.pro | 10 ++++++---- src/gui/gui.pro | 10 ++++++---- 3 files changed, 35 insertions(+), 9 deletions(-) diff --git a/mkspecs/symbian/linux-armcc/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf index f8c666a..750fb79 100644 --- a/mkspecs/symbian/linux-armcc/qmake.conf +++ b/mkspecs/symbian/linux-armcc/qmake.conf @@ -10,9 +10,31 @@ QMAKE_LIBS += usrt2_2.lib dfpaeabi.dso dfprvct2_2.dso drtaeabi.dso scp QMAKE_RVCT_LINKSTYLE = 1 +# notice that the middle part of the following set of vars matches the TARGET content of the libs + +#QMAKE_qtmain_CXXFLAGS = --arm +#QMAKE_QtCore_CXXFLAGS = +QMAKE_QtGui_LFLAGS = "--rw-base 0x800000" +#QMAKE_QtDBus_CXXFLAGS = +#QMAKE_QtDeclarative_CXXFLAGS = +#QMAKE_QtMultimedia_CXXFLAGS = +#QMAKE_QtNetwork_CXXFLAGS = +#QMAKE_QtOpenGL_CXXFLAGS = +#QMAKE_QtOpenVG_CXXFLAGS = +#QMAKE_phonon_CXXFLAGS = +#QMAKE_QtScript_CXXFLAGS = +#QMAKE_QtScriptTools_CXXFLAGS = +#QMAKE_QtSql_CXXFLAGS = +#QMAKE_QtSvg_CXXFLAGS = +#QMAKE_QtTest_CXXFLAGS = +#QMAKE_QtXmlPatterns_CXXFLAGS = +#QMAKE_QtXml_CXXFLAGS = +# Move RW-section base address to start from 0xE00000 instead of the toolchain default 0x400000. +QMAKE_QtWebKit_LFLAGS = --rw-base 0xE00000 + 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_CFLAGS.ARMCC QMAKE_CXXFLAGS += $$QMAKE_CFLAGS --no_parse_templates $$QMAKE_CXXFLAGS.ARMCC -QMAKE_LFLAGS += --symver_soname --diag_suppress 6331,6780 --bpabi --reloc --datacompressor=off --split --rw-base 0x800000 --dll --no_scanlib +QMAKE_LFLAGS += --symver_soname --diag_suppress 6331,6780 --bpabi --reloc --datacompressor=off --split --dll --no_scanlib QMAKE_LFLAGS_APP += --entry _E32Startup DEFINES += EKA2 \ diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index 1870a80..2095179 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -24,10 +24,12 @@ symbian: { DEPLOYMENT += webkitlibs webkitbackup - # 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 + symbian-abld:symbian-sbsv2 { + # 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/gui/gui.pro b/src/gui/gui.pro index 37d39b7..52531a3 100644 --- a/src/gui/gui.pro +++ b/src/gui/gui.pro @@ -51,12 +51,14 @@ contains(DEFINES,QT_EVAL):include($$QT_SOURCE_TREE/src/corelib/eval.pri) QMAKE_DYNAMIC_LIST_FILE = $$PWD/QtGui.dynlist DEFINES += Q_INTERNAL_QAPP_SRC -symbian: { +symbian { TARGET.UID3=0x2001B2DD - # ro-section in gui can exceed default allocated space, so move rw-section a little further - QMAKE_LFLAGS.ARMCC += --rw-base 0x800000 - QMAKE_LFLAGS.GCCE += -Tdata 0xC00000 + symbian-abld:symbian-sbsv2 { + # ro-section in gui can exceed default allocated space, so move rw-section a little further + QMAKE_LFLAGS.ARMCC += --rw-base 0x800000 + QMAKE_LFLAGS.GCCE += -Tdata 0xC00000 + } # Partial upgrade SIS file vendorinfo = \ -- cgit v0.12 From a65738d8e81f165e32d948ffbaea98702717d8db Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Thu, 11 Mar 2010 11:21:09 +0100 Subject: Temporarily disable problematic dll. This should be reverted later, and investigated. --- src/s60installs/s60installs.pro | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index 4bb9220..11778b7 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -131,7 +131,9 @@ symbian: { } contains(QT_CONFIG, declarative): { - qtlibraries.sources += $$QMAKE_LIBDIR_QT/QtDeclarative.dll + # TODO FIXME For some reason QtDeclarative cannot install on symbian/linux-armcc. + # Revert this patch and investigate later. + symbian-abld|symbian-sbsv2:qtlibraries.sources += $$QMAKE_LIBDIR_QT/QtDeclarative.dll } graphicssystems_plugins.path = c:$$QT_PLUGINS_BASE_DIR/graphicssystems -- cgit v0.12 From dec1e78c9602bad64657f12475733538e1accd26 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen <miikka.heikkinen@digia.com> Date: Wed, 10 Mar 2010 11:45:02 +0200 Subject: Fix build break caused by undefined symbol SetDialogPreference A recent sym_iap_util.h change make it depend on different libraries. Fixed LIBS statements on relevant examples and demos. Reviewed-by: Janne Anttila --- demos/embedded/anomaly/anomaly.pro | 2 +- demos/embedded/flightinfo/flightinfo.pro | 2 +- demos/embedded/lightmaps/lightmaps.pro | 2 +- demos/embedded/weatherinfo/weatherinfo.pro | 2 +- examples/network/fortuneclient/fortuneclient.pro | 2 +- examples/network/fortuneserver/fortuneserver.pro | 2 +- examples/network/network-chat/network-chat.pro | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/demos/embedded/anomaly/anomaly.pro b/demos/embedded/anomaly/anomaly.pro index 5b2698c..1577c65 100644 --- a/demos/embedded/anomaly/anomaly.pro +++ b/demos/embedded/anomaly/anomaly.pro @@ -27,7 +27,7 @@ symbian { TARGET.UID3 = 0xA000CF71 include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/ - LIBS += -lesock -linsock -lconnmon + LIBS += -lesock -lcommdb -linsock -lconnmon TARGET.CAPABILITY = NetworkServices TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 } diff --git a/demos/embedded/flightinfo/flightinfo.pro b/demos/embedded/flightinfo/flightinfo.pro index 2dff7f6..ec0041b 100644 --- a/demos/embedded/flightinfo/flightinfo.pro +++ b/demos/embedded/flightinfo/flightinfo.pro @@ -9,7 +9,7 @@ symbian { TARGET.UID3 = 0xA000CF74 include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/ - LIBS += -lesock -lconnmon -linsock + LIBS += -lesock -lcommdb -lconnmon -linsock TARGET.CAPABILITY = NetworkServices } diff --git a/demos/embedded/lightmaps/lightmaps.pro b/demos/embedded/lightmaps/lightmaps.pro index d982d05..3fda982 100644 --- a/demos/embedded/lightmaps/lightmaps.pro +++ b/demos/embedded/lightmaps/lightmaps.pro @@ -6,7 +6,7 @@ symbian { TARGET.UID3 = 0xA000CF75 include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/ - LIBS += -lesock -lconnmon -linsock + LIBS += -lesock -lcommdb -lconnmon -linsock TARGET.CAPABILITY = NetworkServices TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 } diff --git a/demos/embedded/weatherinfo/weatherinfo.pro b/demos/embedded/weatherinfo/weatherinfo.pro index 3fe640b..5a2449c 100644 --- a/demos/embedded/weatherinfo/weatherinfo.pro +++ b/demos/embedded/weatherinfo/weatherinfo.pro @@ -8,7 +8,7 @@ symbian { TARGET.UID3 = 0xA000CF77 include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/ - LIBS += -lesock -lconnmon -linsock + LIBS += -lesock -lcommdb -lconnmon -linsock TARGET.CAPABILITY = NetworkServices } diff --git a/examples/network/fortuneclient/fortuneclient.pro b/examples/network/fortuneclient/fortuneclient.pro index 98974b4..0cfbf80 100644 --- a/examples/network/fortuneclient/fortuneclient.pro +++ b/examples/network/fortuneclient/fortuneclient.pro @@ -12,7 +12,7 @@ INSTALLS += target sources symbian { include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/ - LIBS += -lesock + LIBS += -lesock -lcommdb TARGET.CAPABILITY = "NetworkServices ReadUserData WriteUserData" TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 } diff --git a/examples/network/fortuneserver/fortuneserver.pro b/examples/network/fortuneserver/fortuneserver.pro index f7d127d..d7d2789 100644 --- a/examples/network/fortuneserver/fortuneserver.pro +++ b/examples/network/fortuneserver/fortuneserver.pro @@ -13,7 +13,7 @@ symbian { TARGET.UID3 = 0xA000CF71 include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/ - LIBS += -lesock + LIBS += -lesock -lcommdb 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 d9d5e43..d4813ad 100644 --- a/examples/network/network-chat/network-chat.pro +++ b/examples/network/network-chat/network-chat.pro @@ -21,7 +21,7 @@ INSTALLS += target sources symbian { include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/ - LIBS += -lesock -lconnmon -lcharconv -linsock + LIBS += -lesock -lcommdb -lcharconv -linsock # For IAP selection TARGET.CAPABILITY = "NetworkServices ReadUserData WriteUserData" TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 } -- cgit v0.12 From 9029f66ef73156040a42581dbf020345d048e5c4 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Thu, 11 Mar 2010 19:48:21 +0100 Subject: Moved two profiles to the correct directory. This gets applications building again. --- mkspecs/features/symbian/do_not_build_as_thumb.prf | 8 + mkspecs/features/symbian/symbian_building.prf | 252 +++++++++++++++++++++ mkspecs/symbian/features/do_not_build_as_thumb.prf | 8 - mkspecs/symbian/features/symbian_building.prf | 252 --------------------- 4 files changed, 260 insertions(+), 260 deletions(-) create mode 100644 mkspecs/features/symbian/do_not_build_as_thumb.prf create mode 100644 mkspecs/features/symbian/symbian_building.prf delete mode 100644 mkspecs/symbian/features/do_not_build_as_thumb.prf delete mode 100644 mkspecs/symbian/features/symbian_building.prf diff --git a/mkspecs/features/symbian/do_not_build_as_thumb.prf b/mkspecs/features/symbian/do_not_build_as_thumb.prf new file mode 100644 index 0000000..60d9382 --- /dev/null +++ b/mkspecs/features/symbian/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/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf new file mode 100644 index 0000000..4760e09 --- /dev/null +++ b/mkspecs/features/symbian/symbian_building.prf @@ -0,0 +1,252 @@ +# we have some module specific options (defined in qt.prf) lets add them +eval(TMPVAR = \$\$QMAKE_$${TARGET}_CXXFLAGS) +!isEmpty(TMPVAR):QMAKE_CXXFLAGS += $$TMPVAR +eval(TMPVAR = \$\$QMAKE_$${TARGET}_LFLAGS) +!isEmpty(TMPVAR) { + QMAKE_LFLAGS += $$TMPVAR +} else :linux-gcce { # lets provide a simple default. Without elf2e32 complains + QMAKE_LFLAGS += -Ttext 0x80000 -Tdata 0x400000 +} + +symbianObjdir=$$OBJECTS_DIR +isEmpty(symbianObjdir) { + symbianObjdir = . +} +symbianDestdir=$$DESTDIR +isEmpty(symbianDestdir) { + symbianDestdir = . +} + +contains(QMAKE_CFLAGS, "--thumb")|contains(QMAKE_CXXFLAGS, "--thumb")|contains(QMAKE_CFLAGS, "-mthumb")|contains(QMAKE_CXXFLAGS, "-mthumb") { + DEFINES += __MARM_THUMB__ +} + +defineReplace(processSymbianLibraries) { + library = $$replace(1, "\.dll$", ".dso") + library = $$replace(library, "^-l", "") + isFullName = $$find(library, \.) + isEmpty(isFullName):library="$${library}.dso" + linux-gcce { + newLIB = "-l:$${library}" + } else { + newLIB = "$${library}" + } + contains(library, "\.dso$")|contains(library, ".lib$"):PRE_TARGETDEPS += $$library + return($$newLIB) +} + +for(libraries, LIBS) { + newLIBS += $$processSymbianLibraries($$libraries) +} +LIBS = $$newLIBS +newLIBS = +for(libraries, QMAKE_LIBS) { + newLIBS += $$processSymbianLibraries($$libraries) +} +QMAKE_LIBS = $$newLIBS + +linux-gcce { + QMAKE_LIBS += -l:usrt2_2.lib \ + -l:dfpaeabi.dso \ + -l:drtaeabi.dso \ + -l:scppnwdl.dso \ + -lsupc++ \ + -lgcc +} + +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, 0) { + # 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) { + # No way to honor the '@' :-( + QMAKE_POST_LINK = $$replace(QMAKE_POST_LINK, "^@", "") + QMAKE_POST_LINK = && $$QMAKE_POST_LINK + } + # The tee and grep at the end work around the issue that elf2e32 doesn't return non-null on error. + # The comparison of dso files is to avoid extra building of modules that depend on this dso, in + # case it has not changed. + QMAKE_POST_LINK = $$QMAKE_MOVE $$symbianDestdir/$${TARGET}.dll $$symbianDestdir/$${TARGET}.sym \ + && 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=$$symbianObjdir/$${TARGET}.dso --defoutput=$$symbianObjdir/$${TARGET}.def \ + --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll \ + --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged $$capability \ + $$QMAKE_ELF2E32_FLAGS \ + | tee elf2e32.log && test `grep -c 'Error:' elf2e32.log` = 0 && rm elf2e32.log \ + && if ! diff -q $${symbianObjdir}/$${TARGET}.dso $${symbianDestdir}/$${TARGET}.dso \ + > /dev/null 2>&1; then \ + $$QMAKE_COPY $${symbianObjdir}/$${TARGET}.dso $${symbianDestdir}/$${TARGET}.dso; \ + fi \ + $$QMAKE_POST_LINK + QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.sym + QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.dso + QMAKE_CLEAN += $${symbianObjdir}/$${TARGET}.dso + QMAKE_CLEAN += $${symbianObjdir}/$${TARGET}.def + + linux-armcc: { + QMAKE_LIBS += -ledllstub.lib -ledll.lib\\(uc_dll_.o\\) + } else :linux-gcce { + #QMAKE_LIBS += -l:edllstub.lib -l:edll.lib + } + + QMAKE_LFLAGS += --soname $${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll -u _E32Dll --entry=_E32Dll + DEFINES += __DLL__ +} + +contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@.*") { + !isEmpty(QMAKE_POST_LINK) { + # No way to honor the '@' :-( + QMAKE_POST_LINK = $$replace(QMAKE_POST_LINK, "^@", "") + QMAKE_POST_LINK = && $$QMAKE_POST_LINK + } + # the tee and grep at the end work around the issue that elf2e32 doesn't return non-null on error + QMAKE_POST_LINK = $$QMAKE_MOVE $$symbianDestdir/$${TARGET} $$symbianDestdir/$${TARGET}.sym \ + && 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 \ + $$QMAKE_ELF2E32_FLAGS \ + | tee elf2e32.log && test `grep -c 'Error:' elf2e32.log` = 0 && rm elf2e32.log \ + $$QMAKE_POST_LINK + QMAKE_POST_LINK += && ln "$${TARGET}.exe" "$$TARGET" + QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.sym + QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.exe + QMAKE_CLEAN += $${symbianDestdir}/$${TARGET} + + linux-armcc: { + QMAKE_LIBS += -leexe.lib\\(uc_exe_.o\\) + } else :linux-gcce { + #QMAKE_LIBS += -l:eexe.lib + } + + QMAKE_LFLAGS += --soname $${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe +# TODO gcce added --shared here... + DEFINES += __EXE__ +} + +# Symbian resource files +linux-armcc: { + SYMBIAN_RVCT22INC=$$(RVCT22INC) + !isEmpty(SYMBIAN_RVCT22INC):symbian_resources_INCLUDES = -I$${SYMBIAN_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) + # If you change this, also see application_icon.prf + 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/features/do_not_build_as_thumb.prf b/mkspecs/symbian/features/do_not_build_as_thumb.prf deleted file mode 100644 index 60d9382..0000000 --- a/mkspecs/symbian/features/do_not_build_as_thumb.prf +++ /dev/null @@ -1,8 +0,0 @@ -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/features/symbian_building.prf b/mkspecs/symbian/features/symbian_building.prf deleted file mode 100644 index 4760e09..0000000 --- a/mkspecs/symbian/features/symbian_building.prf +++ /dev/null @@ -1,252 +0,0 @@ -# we have some module specific options (defined in qt.prf) lets add them -eval(TMPVAR = \$\$QMAKE_$${TARGET}_CXXFLAGS) -!isEmpty(TMPVAR):QMAKE_CXXFLAGS += $$TMPVAR -eval(TMPVAR = \$\$QMAKE_$${TARGET}_LFLAGS) -!isEmpty(TMPVAR) { - QMAKE_LFLAGS += $$TMPVAR -} else :linux-gcce { # lets provide a simple default. Without elf2e32 complains - QMAKE_LFLAGS += -Ttext 0x80000 -Tdata 0x400000 -} - -symbianObjdir=$$OBJECTS_DIR -isEmpty(symbianObjdir) { - symbianObjdir = . -} -symbianDestdir=$$DESTDIR -isEmpty(symbianDestdir) { - symbianDestdir = . -} - -contains(QMAKE_CFLAGS, "--thumb")|contains(QMAKE_CXXFLAGS, "--thumb")|contains(QMAKE_CFLAGS, "-mthumb")|contains(QMAKE_CXXFLAGS, "-mthumb") { - DEFINES += __MARM_THUMB__ -} - -defineReplace(processSymbianLibraries) { - library = $$replace(1, "\.dll$", ".dso") - library = $$replace(library, "^-l", "") - isFullName = $$find(library, \.) - isEmpty(isFullName):library="$${library}.dso" - linux-gcce { - newLIB = "-l:$${library}" - } else { - newLIB = "$${library}" - } - contains(library, "\.dso$")|contains(library, ".lib$"):PRE_TARGETDEPS += $$library - return($$newLIB) -} - -for(libraries, LIBS) { - newLIBS += $$processSymbianLibraries($$libraries) -} -LIBS = $$newLIBS -newLIBS = -for(libraries, QMAKE_LIBS) { - newLIBS += $$processSymbianLibraries($$libraries) -} -QMAKE_LIBS = $$newLIBS - -linux-gcce { - QMAKE_LIBS += -l:usrt2_2.lib \ - -l:dfpaeabi.dso \ - -l:drtaeabi.dso \ - -l:scppnwdl.dso \ - -lsupc++ \ - -lgcc -} - -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, 0) { - # 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) { - # No way to honor the '@' :-( - QMAKE_POST_LINK = $$replace(QMAKE_POST_LINK, "^@", "") - QMAKE_POST_LINK = && $$QMAKE_POST_LINK - } - # The tee and grep at the end work around the issue that elf2e32 doesn't return non-null on error. - # The comparison of dso files is to avoid extra building of modules that depend on this dso, in - # case it has not changed. - QMAKE_POST_LINK = $$QMAKE_MOVE $$symbianDestdir/$${TARGET}.dll $$symbianDestdir/$${TARGET}.sym \ - && 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=$$symbianObjdir/$${TARGET}.dso --defoutput=$$symbianObjdir/$${TARGET}.def \ - --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll \ - --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged $$capability \ - $$QMAKE_ELF2E32_FLAGS \ - | tee elf2e32.log && test `grep -c 'Error:' elf2e32.log` = 0 && rm elf2e32.log \ - && if ! diff -q $${symbianObjdir}/$${TARGET}.dso $${symbianDestdir}/$${TARGET}.dso \ - > /dev/null 2>&1; then \ - $$QMAKE_COPY $${symbianObjdir}/$${TARGET}.dso $${symbianDestdir}/$${TARGET}.dso; \ - fi \ - $$QMAKE_POST_LINK - QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.sym - QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.dso - QMAKE_CLEAN += $${symbianObjdir}/$${TARGET}.dso - QMAKE_CLEAN += $${symbianObjdir}/$${TARGET}.def - - linux-armcc: { - QMAKE_LIBS += -ledllstub.lib -ledll.lib\\(uc_dll_.o\\) - } else :linux-gcce { - #QMAKE_LIBS += -l:edllstub.lib -l:edll.lib - } - - QMAKE_LFLAGS += --soname $${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll -u _E32Dll --entry=_E32Dll - DEFINES += __DLL__ -} - -contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@.*") { - !isEmpty(QMAKE_POST_LINK) { - # No way to honor the '@' :-( - QMAKE_POST_LINK = $$replace(QMAKE_POST_LINK, "^@", "") - QMAKE_POST_LINK = && $$QMAKE_POST_LINK - } - # the tee and grep at the end work around the issue that elf2e32 doesn't return non-null on error - QMAKE_POST_LINK = $$QMAKE_MOVE $$symbianDestdir/$${TARGET} $$symbianDestdir/$${TARGET}.sym \ - && 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 \ - $$QMAKE_ELF2E32_FLAGS \ - | tee elf2e32.log && test `grep -c 'Error:' elf2e32.log` = 0 && rm elf2e32.log \ - $$QMAKE_POST_LINK - QMAKE_POST_LINK += && ln "$${TARGET}.exe" "$$TARGET" - QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.sym - QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.exe - QMAKE_CLEAN += $${symbianDestdir}/$${TARGET} - - linux-armcc: { - QMAKE_LIBS += -leexe.lib\\(uc_exe_.o\\) - } else :linux-gcce { - #QMAKE_LIBS += -l:eexe.lib - } - - QMAKE_LFLAGS += --soname $${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe -# TODO gcce added --shared here... - DEFINES += __EXE__ -} - -# Symbian resource files -linux-armcc: { - SYMBIAN_RVCT22INC=$$(RVCT22INC) - !isEmpty(SYMBIAN_RVCT22INC):symbian_resources_INCLUDES = -I$${SYMBIAN_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) - # If you change this, also see application_icon.prf - 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)") -} -- cgit v0.12 From fc3f88b5c22c12c8f61da152ca82cb10f18d2902 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Thu, 11 Mar 2010 14:41:06 +0100 Subject: Added rpp and rsg files to ignore filter. --- config.tests/.gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 config.tests/.gitignore diff --git a/config.tests/.gitignore b/config.tests/.gitignore new file mode 100644 index 0000000..bd76520 --- /dev/null +++ b/config.tests/.gitignore @@ -0,0 +1,2 @@ +*.rpp +*.rsg -- cgit v0.12 From 1c8b5d83301455b8dabb9674503bb0990ca50909 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Mon, 15 Mar 2010 15:41:32 +0100 Subject: Moved UID2 processing from cpp code to profiles. This enables it to be used by all Symbian build systems. RevBy: Miikka Heikkinen --- mkspecs/features/symbian/default_post.prf | 15 +++++++++++++++ qmake/generators/symbian/symmake.cpp | 18 +----------------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/mkspecs/features/symbian/default_post.prf b/mkspecs/features/symbian/default_post.prf index ed90e3c..d29e460 100644 --- a/mkspecs/features/symbian/default_post.prf +++ b/mkspecs/features/symbian/default_post.prf @@ -31,3 +31,18 @@ contains(TEMPLATE, ".*app"):contains(QT, gui):contains(CONFIG,qt) { } isEmpty(TARGET.UID3):TARGET.UID3 = $$generate_uid("$${OUT_PWD}/$${TARGET}") +isEmpty(TARGET.UID2) { + contains(CONFIG, stdbinary) { + TARGET.UID2 = 0x20004C45 + } else { + contains(TEMPLATE, app) { + contains(QT, gui) { + TARGET.UID2 = 0x100039CE + } else { + TARGET.UID2 = 0 + } + } else:contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { + TARGET.UID2 = 0x1000008d + } + } +} diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp index 393e56b..83d1149 100644 --- a/qmake/generators/symbian/symmake.cpp +++ b/qmake/generators/symbian/symmake.cpp @@ -315,23 +315,7 @@ void SymbianMakefileGenerator::init() // .mmp initMmpVariables(); - if (0 != project->values("TARGET.UID2").size()) { - uid2 = project->first("TARGET.UID2"); - } else if (project->isActiveConfig("stdbinary")) { - uid2 = "0x20004C45"; - } else { - if (targetType == TypeExe) { - if (project->values("QT").contains("gui", Qt::CaseInsensitive)) { - // exe and gui -> uid2 needed - uid2 = "0x100039CE"; - } else { - // exe but not gui: uid2 is ignored anyway -> set it to 0 - uid2 = "0"; - } - } else if (targetType == TypeDll || targetType == TypeLib || targetType == TypePlugin) { - uid2 = "0x1000008d"; - } - } + uid2 = project->first("TARGET.UID2"); uid2 = uid2.trimmed(); } -- cgit v0.12 From 7ca339be57f1b8dbf9e289fae578c110813eb767 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Mon, 15 Mar 2010 17:00:35 +0100 Subject: Fixed a building bug where the DLL entry point was undefined. --- mkspecs/features/symbian/symbian_building.prf | 2 +- mkspecs/symbian/linux-armcc/qmake.conf | 1 + mkspecs/symbian/linux-gcce/qmake.conf | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf index 4760e09..b543587 100644 --- a/mkspecs/features/symbian/symbian_building.prf +++ b/mkspecs/features/symbian/symbian_building.prf @@ -134,7 +134,7 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { #QMAKE_LIBS += -l:edllstub.lib -l:edll.lib } - QMAKE_LFLAGS += --soname $${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll -u _E32Dll --entry=_E32Dll + QMAKE_LFLAGS += --soname $${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll DEFINES += __DLL__ } diff --git a/mkspecs/symbian/linux-armcc/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf index 750fb79..57eb1fc 100644 --- a/mkspecs/symbian/linux-armcc/qmake.conf +++ b/mkspecs/symbian/linux-armcc/qmake.conf @@ -36,6 +36,7 @@ QMAKE_CFLAGS += --dllimport_runtime --preinclude rvct2_2.h --diag_suppress 186 QMAKE_CXXFLAGS += $$QMAKE_CFLAGS --no_parse_templates $$QMAKE_CXXFLAGS.ARMCC QMAKE_LFLAGS += --symver_soname --diag_suppress 6331,6780 --bpabi --reloc --datacompressor=off --split --dll --no_scanlib QMAKE_LFLAGS_APP += --entry _E32Startup +QMAKE_LFLAGS_SHLIB += --entry _E32Dll DEFINES += EKA2 \ __ARMCC__ \ diff --git a/mkspecs/symbian/linux-gcce/qmake.conf b/mkspecs/symbian/linux-gcce/qmake.conf index 0d81693..6d31f66 100644 --- a/mkspecs/symbian/linux-gcce/qmake.conf +++ b/mkspecs/symbian/linux-gcce/qmake.conf @@ -54,7 +54,7 @@ DEFINES += __GCCE__ \ _STLP_NO_EXCEPTION_HEADER QMAKE_LFLAGS_APP += --entry _E32Startup -QMAKE_LFLAGS_SHLIB += --default-symver +QMAKE_LFLAGS_SHLIB += --default-symver --entry _E32Dll gcceExtraFlags = --include=${EPOCROOT}epoc32/include/gcce/gcce.h -march=armv5t -mapcs -mthumb-interwork -nostdinc -c -fvisibility-inlines-hidden -msoft-float -T script QMAKE_CFLAGS += $${gcceExtraFlags} -- cgit v0.12 From ad20768753905dcec196fe0a8e35fb832c0f3256 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen <miikka.heikkinen@digia.com> Date: Mon, 15 Mar 2010 14:10:36 +0200 Subject: Added close button to Anomaly demo browser Part of QtP delta reduction effort, original task: QTTH-52 Reviewed-by: Janne Anttila --- demos/embedded/anomaly/src/BrowserView.cpp | 1 + demos/embedded/anomaly/src/ControlStrip.cpp | 15 ++++++++++++--- demos/embedded/anomaly/src/ControlStrip.h | 2 ++ demos/embedded/anomaly/src/anomaly.qrc | 1 + demos/embedded/anomaly/src/images/button-close.png | Bin 0 -> 1833 bytes 5 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 demos/embedded/anomaly/src/images/button-close.png diff --git a/demos/embedded/anomaly/src/BrowserView.cpp b/demos/embedded/anomaly/src/BrowserView.cpp index 0945b89..41318ad 100644 --- a/demos/embedded/anomaly/src/BrowserView.cpp +++ b/demos/embedded/anomaly/src/BrowserView.cpp @@ -82,6 +82,7 @@ void BrowserView::initialize() connect(m_controlStrip, SIGNAL(menuClicked()), SIGNAL(menuButtonClicked())); connect(m_controlStrip, SIGNAL(backClicked()), m_webView, SLOT(back())); connect(m_controlStrip, SIGNAL(forwardClicked()), m_webView, SLOT(forward())); + connect(m_controlStrip, SIGNAL(closeClicked()), qApp, SLOT(quit())); QPalette pal = m_webView->palette(); pal.setBrush(QPalette::Base, Qt::white); diff --git a/demos/embedded/anomaly/src/ControlStrip.cpp b/demos/embedded/anomaly/src/ControlStrip.cpp index 265d9a0..dc6d5c2 100644 --- a/demos/embedded/anomaly/src/ControlStrip.cpp +++ b/demos/embedded/anomaly/src/ControlStrip.cpp @@ -50,6 +50,7 @@ ControlStrip::ControlStrip(QWidget *parent) menuPixmap.load(":/images/edit-find.png"); backPixmap.load(":/images/go-previous.png"); forwardPixmap.load(":/images/go-next.png"); + closePixmap.load(":/images/button-close.png"); } QSize ControlStrip::sizeHint() const @@ -74,12 +75,18 @@ void ControlStrip::mousePressEvent(QMouseEvent *event) } if (x > width() - h) { - emit forwardClicked(); + emit closeClicked(); event->accept(); return; } if ((x < width() - 2 * h) && (x > width() - 3 * h)) { + emit forwardClicked(); + event->accept(); + return; + } + + if ((x < width() - 3 * h) && (x > width() - 5 * h)) { emit backClicked(); event->accept(); return; @@ -95,7 +102,9 @@ void ControlStrip::paintEvent(QPaintEvent *event) p.fillRect(event->rect(), QColor(32, 32, 32, 192)); p.setCompositionMode(QPainter::CompositionMode_SourceOver); p.drawPixmap(s, s, menuPixmap); - p.drawPixmap(width() - 3 * h + s, s, backPixmap); - p.drawPixmap(width() - h + s, s, forwardPixmap); + p.drawPixmap(width() - h + s, s, closePixmap); + p.drawPixmap(width() - 3 * h + s, s, forwardPixmap); + p.drawPixmap(width() - 5 * h + s, s, backPixmap); + p.end(); } diff --git a/demos/embedded/anomaly/src/ControlStrip.h b/demos/embedded/anomaly/src/ControlStrip.h index bbaea87..b6003a1 100644 --- a/demos/embedded/anomaly/src/ControlStrip.h +++ b/demos/embedded/anomaly/src/ControlStrip.h @@ -58,6 +58,7 @@ signals: void menuClicked(); void backClicked(); void forwardClicked(); + void closeClicked(); protected: void paintEvent(QPaintEvent *event); @@ -67,6 +68,7 @@ private: QPixmap menuPixmap; QPixmap backPixmap; QPixmap forwardPixmap; + QPixmap closePixmap; }; #endif // CONTROLSTRIP_H diff --git a/demos/embedded/anomaly/src/anomaly.qrc b/demos/embedded/anomaly/src/anomaly.qrc index 601a34e..d8ea630 100644 --- a/demos/embedded/anomaly/src/anomaly.qrc +++ b/demos/embedded/anomaly/src/anomaly.qrc @@ -5,5 +5,6 @@ <file>images/edit-find.png</file> <file>images/list-add.png</file> <file>images/list-remove.png</file> + <file>images/button-close.png</file> </qresource> </RCC> diff --git a/demos/embedded/anomaly/src/images/button-close.png b/demos/embedded/anomaly/src/images/button-close.png new file mode 100644 index 0000000..7a7b048 Binary files /dev/null and b/demos/embedded/anomaly/src/images/button-close.png differ -- cgit v0.12 From 9931ceb49685fde68f623ae18d4497273162cf76 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen <miikka.heikkinen@digia.com> Date: Tue, 16 Mar 2010 10:18:05 +0200 Subject: Make sure target path exists in qmake_extra_pre_targetdep.flm Since newer versions of Raptor delete all empty parent directories when cleaning up the files, qmake created moc output directories get also deleted when sbs clean is invoked. Fixed by always creating the extra compiler target directory during build. Task-number: QTBUG-6795 Reviewed-by: Janne Koskinen --- mkspecs/symbian-sbsv2/flm/qt/qmake_extra_pre_targetdep.flm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mkspecs/symbian-sbsv2/flm/qt/qmake_extra_pre_targetdep.flm b/mkspecs/symbian-sbsv2/flm/qt/qmake_extra_pre_targetdep.flm index daf33d4..1338515 100644 --- a/mkspecs/symbian-sbsv2/flm/qt/qmake_extra_pre_targetdep.flm +++ b/mkspecs/symbian-sbsv2/flm/qt/qmake_extra_pre_targetdep.flm @@ -10,6 +10,8 @@ SINGLETON:=$(call sanitise,TARGET_$(PREDEP_TARGET)) +$(call makepathfor,$(PREDEP_TARGET)) + define qmake_extra_pre_targetdep EXPORT:: $(PREDEP_TARGET) -- cgit v0.12 From 6682c96867037cfc9f8dc789bcb23decc324a200 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 16 Mar 2010 12:50:19 +0100 Subject: Enabled compilation of plugins again. --- mkspecs/symbian/linux-armcc/qmake.conf | 1 + mkspecs/symbian/linux-gcce/qmake.conf | 1 + 2 files changed, 2 insertions(+) diff --git a/mkspecs/symbian/linux-armcc/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf index 57eb1fc..6042fa4 100644 --- a/mkspecs/symbian/linux-armcc/qmake.conf +++ b/mkspecs/symbian/linux-armcc/qmake.conf @@ -37,6 +37,7 @@ QMAKE_CXXFLAGS += $$QMAKE_CFLAGS --no_parse_templates $$QMAKE_CXXFLAGS.ARMCC QMAKE_LFLAGS += --symver_soname --diag_suppress 6331,6780 --bpabi --reloc --datacompressor=off --split --dll --no_scanlib QMAKE_LFLAGS_APP += --entry _E32Startup QMAKE_LFLAGS_SHLIB += --entry _E32Dll +QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB DEFINES += EKA2 \ __ARMCC__ \ diff --git a/mkspecs/symbian/linux-gcce/qmake.conf b/mkspecs/symbian/linux-gcce/qmake.conf index 6d31f66..de3791c 100644 --- a/mkspecs/symbian/linux-gcce/qmake.conf +++ b/mkspecs/symbian/linux-gcce/qmake.conf @@ -55,6 +55,7 @@ DEFINES += __GCCE__ \ QMAKE_LFLAGS_APP += --entry _E32Startup QMAKE_LFLAGS_SHLIB += --default-symver --entry _E32Dll +QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB gcceExtraFlags = --include=${EPOCROOT}epoc32/include/gcce/gcce.h -march=armv5t -mapcs -mthumb-interwork -nostdinc -c -fvisibility-inlines-hidden -msoft-float -T script QMAKE_CFLAGS += $${gcceExtraFlags} -- cgit v0.12 From 30688ce70b4bc161b45826063a242d58a6f06126 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 16 Mar 2010 12:53:21 +0100 Subject: Worked around case differences in Symbian^3 and Gnupoc. RevBy: Miikka Heikkinen --- mkspecs/common/symbian/header-wrappers/AknDoc.h | 1 + mkspecs/common/symbian/header-wrappers/AknPopupFader.h | 1 + mkspecs/common/symbian/header-wrappers/AknServerApp.h | 1 + mkspecs/common/symbian/header-wrappers/AknUtils.h | 1 + mkspecs/common/symbian/header-wrappers/CDirectoryLocalizer.h | 1 + mkspecs/common/symbian/header-wrappers/DocumentHandler.h | 1 + mkspecs/features/symbian/qt.prf | 6 ++++++ mkspecs/features/symbian/qt_config.prf | 9 +++++++++ src/gui/util/util.pri | 9 ++++++++- src/plugins/s60/3_2/3_2.pro | 7 ++++++- src/plugins/s60/5_0/5_0.pro | 7 ++++++- 11 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 mkspecs/common/symbian/header-wrappers/AknDoc.h create mode 100644 mkspecs/common/symbian/header-wrappers/AknPopupFader.h create mode 100644 mkspecs/common/symbian/header-wrappers/AknServerApp.h create mode 100644 mkspecs/common/symbian/header-wrappers/AknUtils.h create mode 100644 mkspecs/common/symbian/header-wrappers/CDirectoryLocalizer.h create mode 100644 mkspecs/common/symbian/header-wrappers/DocumentHandler.h create mode 100644 mkspecs/features/symbian/qt_config.prf diff --git a/mkspecs/common/symbian/header-wrappers/AknDoc.h b/mkspecs/common/symbian/header-wrappers/AknDoc.h new file mode 100644 index 0000000..d4dbd7d --- /dev/null +++ b/mkspecs/common/symbian/header-wrappers/AknDoc.h @@ -0,0 +1 @@ +#include <akndoc.h> diff --git a/mkspecs/common/symbian/header-wrappers/AknPopupFader.h b/mkspecs/common/symbian/header-wrappers/AknPopupFader.h new file mode 100644 index 0000000..60a007a --- /dev/null +++ b/mkspecs/common/symbian/header-wrappers/AknPopupFader.h @@ -0,0 +1 @@ +#include <aknpopupfader.h> diff --git a/mkspecs/common/symbian/header-wrappers/AknServerApp.h b/mkspecs/common/symbian/header-wrappers/AknServerApp.h new file mode 100644 index 0000000..b4dc69f --- /dev/null +++ b/mkspecs/common/symbian/header-wrappers/AknServerApp.h @@ -0,0 +1 @@ +#include <aknserverapp.h> diff --git a/mkspecs/common/symbian/header-wrappers/AknUtils.h b/mkspecs/common/symbian/header-wrappers/AknUtils.h new file mode 100644 index 0000000..66a3784 --- /dev/null +++ b/mkspecs/common/symbian/header-wrappers/AknUtils.h @@ -0,0 +1 @@ +#include <aknutils.h> diff --git a/mkspecs/common/symbian/header-wrappers/CDirectoryLocalizer.h b/mkspecs/common/symbian/header-wrappers/CDirectoryLocalizer.h new file mode 100644 index 0000000..f251302 --- /dev/null +++ b/mkspecs/common/symbian/header-wrappers/CDirectoryLocalizer.h @@ -0,0 +1 @@ +#include <cdirectorylocalizer.h> diff --git a/mkspecs/common/symbian/header-wrappers/DocumentHandler.h b/mkspecs/common/symbian/header-wrappers/DocumentHandler.h new file mode 100644 index 0000000..8981af6 --- /dev/null +++ b/mkspecs/common/symbian/header-wrappers/DocumentHandler.h @@ -0,0 +1 @@ +#include <documenthandler.h> diff --git a/mkspecs/features/symbian/qt.prf b/mkspecs/features/symbian/qt.prf index 99f5ece..294a68c 100644 --- a/mkspecs/features/symbian/qt.prf +++ b/mkspecs/features/symbian/qt.prf @@ -39,3 +39,9 @@ contains(CONFIG, qt):!contains(TARGET.UID3, 0x2001E61C):!contains(TARGET.UID3, 0 isEmpty(TARGET.EPOCSTACKSIZE):TARGET.EPOCSTACKSIZE = 0x14000 isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x020000 0x800000 + +# Workaround for the fact that Gnupoc and Symbian chose different approaches to +# the letter casing of headers. +contains(CONFIG, is_using_gnupoc) { + INCLUDEPATH += $$QT_SOURCE_TREE/mkspecs/common/symbian/header-wrappers +} diff --git a/mkspecs/features/symbian/qt_config.prf b/mkspecs/features/symbian/qt_config.prf new file mode 100644 index 0000000..2f446dc --- /dev/null +++ b/mkspecs/features/symbian/qt_config.prf @@ -0,0 +1,9 @@ +load(qt_config) + +!contains(QMAKE_HOST.os, "Windows") { + # Test for the existence of lower cased headers, a sign of using Gnupoc. + # Note that the qmake "exists" test won't do because it is case insensitive. + system("test -f $${EPOCROOT}/epoc32/include/akndoc.h") { + CONFIG += is_using_gnupoc + } +} diff --git a/src/gui/util/util.pri b/src/gui/util/util.pri index 3074367..bd2af85 100644 --- a/src/gui/util/util.pri +++ b/src/gui/util/util.pri @@ -41,5 +41,12 @@ embedded { symbian { LIBS += -lsendas2 -letext -lapmime - contains(QT_CONFIG, s60): LIBS += -lplatformenv -lCommonUI + contains(QT_CONFIG, s60) { + LIBS += -lplatformenv + contains(CONFIG, is_using_gnupoc) { + LIBS += -lcommonui + } else { + LIBS += -lCommonUI + } + } } diff --git a/src/plugins/s60/3_2/3_2.pro b/src/plugins/s60/3_2/3_2.pro index 468197d..7700677 100644 --- a/src/plugins/s60/3_2/3_2.pro +++ b/src/plugins/s60/3_2/3_2.pro @@ -10,7 +10,12 @@ contains(S60_VERSION, 3.1) { SOURCES += ../src/qlocale_3_2.cpp \ ../src/qdesktopservices_3_2.cpp \ ../src/qcoreapplication_3_2.cpp - LIBS += -lDirectoryLocalizer -lefsrv + contains(CONFIG, is_using_gnupoc) { + LIBS += -ldirectorylocalizer + } else { + LIBS += -lDirectoryLocalizer + } + LIBS += -lefsrv INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE } diff --git a/src/plugins/s60/5_0/5_0.pro b/src/plugins/s60/5_0/5_0.pro index 86e3dc9..164dfaa 100644 --- a/src/plugins/s60/5_0/5_0.pro +++ b/src/plugins/s60/5_0/5_0.pro @@ -10,7 +10,12 @@ contains(S60_VERSION, 3.1) { SOURCES += ../src/qlocale_3_2.cpp \ ../src/qdesktopservices_3_2.cpp \ ../src/qcoreapplication_3_2.cpp - LIBS += -lDirectoryLocalizer -lefsrv + contains(CONFIG, is_using_gnupoc) { + LIBS += -ldirectorylocalizer + } else { + LIBS += -lDirectoryLocalizer + } + LIBS += -lefsrv INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE } -- cgit v0.12 From 27f6a2b79c5ded8ce54c8a3ab068f3e42804c94c Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 16 Mar 2010 12:56:31 +0100 Subject: Worked around a crash in the elf2e32 postlinker tool. RevBy: Thomas Zander --- src/xml/dom/qdom.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp index 0150515..1267e7e 100644 --- a/src/xml/dom/qdom.cpp +++ b/src/xml/dom/qdom.cpp @@ -625,6 +625,11 @@ private: bool cdata; bool nsProcessing; QXmlLocator *locator; + +#ifdef Q_OS_SYMBIAN + // Workaround crash in elf2e32 under Wine. + virtual void dummy() {} +#endif }; /************************************************************** -- cgit v0.12 From 0fc2735a80300139510933e2b8856f6c7fbc9a2b Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 16 Mar 2010 15:12:29 +0100 Subject: Fixed "Cannot install protected application" message on Symbian. This was due the patch_capabilities step running too late in the sis creation process. This led to the package ID being wrong the first time "make sis" was run, but correct on subsequent runs. RevBy: Trust me Task: QTBUG-8770 --- bin/createpackage.pl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/createpackage.pl b/bin/createpackage.pl index c16c692..554d619 100755 --- a/bin/createpackage.pl +++ b/bin/createpackage.pl @@ -237,6 +237,11 @@ if (!$preservePkgOutput) { } # Preprocess PKG +if ($certtext eq "Self Signed" && !@certificates) { + print("Patching capabilities for self signed package $certificate\n"); + system ("patch_capabilities $templatepkg $targetplatform"); +} + local $/; # read template file open( TEMPLATE, $templatepkg) or die "Error '$templatepkg': $!\n"; @@ -272,10 +277,6 @@ if($stub) { # Create stub SIS. system ("makesis -s $pkgoutput $stub_sis_name"); } else { - if ($certtext eq "Self Signed" && !@certificates) { - print("Patching capabilities for self signed package $certificate\n"); - system ("patch_capabilities $templatepkg $targetplatform"); - } # Create SIS. # The 'and' is because system uses 0 to indicate success. system ("makesis $pkgoutput $unsigned_sis_name") and die ("makesis failed"); -- cgit v0.12 From 38c58afc2cc67b8d4d928d734932aa25dfd367e2 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 16 Mar 2010 15:16:15 +0100 Subject: Revert "Temporarily disable problematic dll." This reverts commit a65738d8e81f165e32d948ffbaea98702717d8db. --- src/s60installs/s60installs.pro | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index 9cc8ff0..b2e873f 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -125,9 +125,7 @@ symbian: { } contains(QT_CONFIG, declarative): { - # TODO FIXME For some reason QtDeclarative cannot install on symbian/linux-armcc. - # Revert this patch and investigate later. - symbian-abld|symbian-sbsv2:qtlibraries.sources += $$QMAKE_LIBDIR_QT/QtDeclarative.dll + qtlibraries.sources += $$QMAKE_LIBDIR_QT/QtDeclarative.dll } graphicssystems_plugins.path = c:$$QT_PLUGINS_BASE_DIR/graphicssystems -- cgit v0.12 From 567fbee08643fb21e4c36640f36ee6e056e45605 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 16 Mar 2010 17:08:18 +0100 Subject: Removed a warning about generated rss files. Also cleaned up the "clean" and "distclean" targets a bit. Task: QTBUG-8854 --- mkspecs/features/symbian/application_icon.prf | 16 +++---- mkspecs/features/symbian/symbian_building.prf | 65 ++++++++++++++++++--------- 2 files changed, 53 insertions(+), 28 deletions(-) diff --git a/mkspecs/features/symbian/application_icon.prf b/mkspecs/features/symbian/application_icon.prf index 04560c5..1109060 100644 --- a/mkspecs/features/symbian/application_icon.prf +++ b/mkspecs/features/symbian/application_icon.prf @@ -32,7 +32,8 @@ contains( CONFIG, no_icon ) { # Note: symbian-sbsv2 builds can't utilize extra compiler for mifconv, so ICON handling is done in code !symbian-sbsv2 { #Makefile: requires paths with backslash - ICON_backslashed = $$replace( ICON, /, \\) + ICON_backslashed = $$ICON + contains(QMAKE_HOST.os, "Windows"):ICON_backslashed = $$replace( ICON_backslashed, /, \\) symbian-abld { mifIconZDir = ${ZDIR}$$APP_RESOURCE_DIR @@ -45,15 +46,14 @@ contains( CONFIG, no_icon ) { } # Extra compiler rules for mifconv - mifconv.output = $$mifIconZDir/$${baseTarget}.mif + mifconv.target = $$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_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 + mifconv.commands = mifconv $$mifconv.target /c32 $$ICON_backslashed + mifconv.depends = $$ICON + PRE_TARGETDEPS += $$mifconv.target + QMAKE_EXTRA_TARGETS += mifconv + QMAKE_DISTCLEAN += $$mifconv.target } # Rules to use generated MIF file from symbian resources RSS_RULES.number_of_icons = $$size(ICON_backslashed) diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf index b543587..aae7e39 100644 --- a/mkspecs/features/symbian/symbian_building.prf +++ b/mkspecs/features/symbian/symbian_building.prf @@ -212,28 +212,53 @@ contains(TEMPLATE, "app"):!contains(CONFIG, "no_icon") { # If you change this, also see application_icon.prf baseTarget = $$replace(baseTarget, " ",_) - # Make our own extra compiler target in order to get dependencies for generated + # Make our own extra 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 + symbianGenResource.target = $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg + symbianGenResource.commands = cpp -nostdinc -undef \ + $$symbian_resources_INCLUDES \ + $$symbian_resources_DEFINES \ + $${baseTarget}.rss \ + -o $${symbian_resources_RCC_DIR}/$${baseTarget}.rpp \ + && rcomp -u -m045,046,047 \ + -s$${symbian_resources_RCC_DIR}/$${baseTarget}.rpp \ + -o$${symbianDestdir}/$${baseTarget}.rsc \ + -h$${symbian_resources_RCC_DIR}/$${baseTarget}.rsg \ + -i$${baseTarget}.rss + symbianGenResource.depends = $${baseTarget}.rss + PRE_TARGETDEPS += $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg + QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg + QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${baseTarget}.rpp + QMAKE_DISTCLEAN += $${baseTarget}.rss + QMAKE_DISTCLEAN += $${symbianDestdir}/$${baseTarget}.rsc + + symbianGenRegResource.target = $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rsg + symbianGenRegResource.commands = cpp -nostdinc -undef \ + $$symbian_resources_INCLUDES \ + $$symbian_resources_DEFINES \ + $${baseTarget}_reg.rss \ + -o $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rpp \ + && rcomp -u -m045,046,047 \ + -s$${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rpp \ + -o$${symbianDestdir}/$${baseTarget}_reg.rsc \ + -h$${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rsg \ + -i$${baseTarget}_reg.rss + symbianGenRegResource.depends = $${baseTarget}_reg.rss $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg + PRE_TARGETDEPS += $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rsg + QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rsg + QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rpp QMAKE_DISTCLEAN += $${TARGET}_reg.rss - QMAKE_DISTCLEAN += $${TARGET}_reg.rsc + QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}_reg.rsc + + # Trick to get qmake to create the RCC_DIR for us. + symbianRccDirCreation.input = SOURCES + symbianRccDirCreation.commands = + symbianRccDirCreation.output = $${symbian_resources_RCC_DIR}/symbian_resource_dummy + symbianRccDirCreation.CONFIG = no_link combine + + QMAKE_EXTRA_TARGETS += symbianGenResource symbianGenRegResource + QMAKE_EXTRA_COMPILERS += symbianRccDirCreation + QMAKE_DISTCLEAN += $${TARGET}.loc } -- cgit v0.12 From ecaccfc50b7d5432347a3d0725e4b7a505fe2ac2 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 16 Mar 2010 17:12:10 +0100 Subject: Fixed Symbian applications with DESTDIR set. --- mkspecs/features/symbian/symbian_building.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf index aae7e39..9ccfd2f 100644 --- a/mkspecs/features/symbian/symbian_building.prf +++ b/mkspecs/features/symbian/symbian_building.prf @@ -154,8 +154,8 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@.*") { --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged $$capability \ $$QMAKE_ELF2E32_FLAGS \ | tee elf2e32.log && test `grep -c 'Error:' elf2e32.log` = 0 && rm elf2e32.log \ + && ln "$${symbianDestdir}/$${TARGET}.exe" "$${symbianDestdir}/$$TARGET" \ $$QMAKE_POST_LINK - QMAKE_POST_LINK += && ln "$${TARGET}.exe" "$$TARGET" QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.sym QMAKE_DISTCLEAN += $${symbianDestdir}/$${TARGET}.exe QMAKE_CLEAN += $${symbianDestdir}/$${TARGET} -- cgit v0.12 From 3675bfca72e8e848a3a547dfc68fadbd775e973b Mon Sep 17 00:00:00 2001 From: Alessandro Portale <alessandro.portale@nokia.com> Date: Tue, 16 Mar 2010 22:07:09 +0100 Subject: Fix linking issues of QtOpenVG.dll QEglContext::display() is a static function, and exported as such. qpixmapdata_vg.cpp and qwindowsurface_vgegl.cpp referenced it as a non- static function which made the linking of QtOpenVG.dll fail. Reviewed-by: Jason Barron --- src/openvg/qpixmapdata_vg.cpp | 16 ++++++---------- src/openvg/qwindowsurface_vgegl.cpp | 22 +++++++++++----------- 2 files changed, 17 insertions(+), 21 deletions(-) diff --git a/src/openvg/qpixmapdata_vg.cpp b/src/openvg/qpixmapdata_vg.cpp index 3087b77..15a2712 100644 --- a/src/openvg/qpixmapdata_vg.cpp +++ b/src/openvg/qpixmapdata_vg.cpp @@ -467,10 +467,6 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type) #if defined(QT_SYMBIAN_SUPPORTS_SGIMAGE) && !defined(QT_NO_EGL) if (type == QPixmapData::SgImage && pixmap) { RSgImage *sgImage = reinterpret_cast<RSgImage*>(pixmap); - // when "0" used as argument then - // default display, context are used - if (!context) - context = qt_vg_create_context(0, QInternal::Pixmap); destroyImages(); prevSize = QSize(); @@ -508,7 +504,7 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type) } const EGLint KEglImageAttribs[] = {EGL_IMAGE_PRESERVED_SYMBIAN, EGL_TRUE, EGL_NONE}; - EGLImageKHR eglImage = eglCreateImageKHR(context->display(), + EGLImageKHR eglImage = eglCreateImageKHR(QEglContext::display(), EGL_NO_CONTEXT, EGL_NATIVE_PIXMAP_KHR, (EGLClientBuffer)sgImage, @@ -523,7 +519,7 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type) vgImage = vgCreateEGLImageTargetKHR(eglImage); if(vgGetError() != VG_NO_ERROR) { cleanup(); - eglDestroyImageKHR(context->display(), eglImage); + eglDestroyImageKHR(QEglContext::display(), eglImage); SgDriver::Close(); return; } @@ -537,7 +533,7 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type) prevSize = QSize(w, h); setSerialNumber(++qt_vg_pixmap_serial); // release stuff - eglDestroyImageKHR(context->display(), eglImage); + eglDestroyImageKHR(QEglContext::display(), eglImage); SgDriver::Close(); } else if (type == QPixmapData::FbsBitmap) { CFbsBitmap *bitmap = reinterpret_cast<CFbsBitmap*>(pixmap); @@ -632,7 +628,7 @@ void* QVGPixmapData::toNativeType(NativeType type) } const EGLint KEglImageAttribs[] = {EGL_IMAGE_PRESERVED_SYMBIAN, EGL_TRUE, EGL_NONE}; - EGLImageKHR eglImage = eglCreateImageKHR(context->display(), + EGLImageKHR eglImage = eglCreateImageKHR(QEglContext::display(), EGL_NO_CONTEXT, EGL_NATIVE_PIXMAP_KHR, (EGLClientBuffer)sgImage, @@ -645,7 +641,7 @@ void* QVGPixmapData::toNativeType(NativeType type) VGImage dstVgImage = vgCreateEGLImageTargetKHR(eglImage); if(vgGetError() != VG_NO_ERROR) { - eglDestroyImageKHR(context->display(), eglImage); + eglDestroyImageKHR(QEglContext::display(), eglImage); sgImage->Close(); SgDriver::Close(); return 0; @@ -661,7 +657,7 @@ void* QVGPixmapData::toNativeType(NativeType type) } // release stuff vgDestroyImage(dstVgImage); - eglDestroyImageKHR(context->display(), eglImage); + eglDestroyImageKHR(QEglContext::display(), eglImage); SgDriver::Close(); return reinterpret_cast<void*>(sgImage); } else if (type == QPixmapData::FbsBitmap) { diff --git a/src/openvg/qwindowsurface_vgegl.cpp b/src/openvg/qwindowsurface_vgegl.cpp index 693312a..f46d6c2 100644 --- a/src/openvg/qwindowsurface_vgegl.cpp +++ b/src/openvg/qwindowsurface_vgegl.cpp @@ -230,9 +230,9 @@ static QEglContext *createContext(QPaintDevice *device) // Set the swap interval for the display. QByteArray interval = qgetenv("QT_VG_SWAP_INTERVAL"); if (!interval.isEmpty()) - eglSwapInterval(context->display(), interval.toInt()); + eglSwapInterval(QEglContext::display(), interval.toInt()); else - eglSwapInterval(context->display(), 1); + eglSwapInterval(QEglContext::display(), 1); #ifdef EGL_RENDERABLE_TYPE // Has the user specified an explicit EGL configuration to use? @@ -246,16 +246,16 @@ static QEglContext *createContext(QPaintDevice *device) EGLint matching = 0; EGLConfig cfg; if (eglChooseConfig - (context->display(), properties, &cfg, 1, &matching) && + (QEglContext::display(), properties, &cfg, 1, &matching) && matching > 0) { // Check that the selected configuration actually supports OpenVG // and then create the context with it. EGLint id = 0; EGLint type = 0; eglGetConfigAttrib - (context->display(), cfg, EGL_CONFIG_ID, &id); + (QEglContext::display(), cfg, EGL_CONFIG_ID, &id); eglGetConfigAttrib - (context->display(), cfg, EGL_RENDERABLE_TYPE, &type); + (QEglContext::display(), cfg, EGL_RENDERABLE_TYPE, &type); if (cfgId == id && (type & EGL_OPENVG_BIT) != 0) { context->setConfig(cfg); if (!context->createContext()) { @@ -334,7 +334,7 @@ static void qt_vg_destroy_shared_context(QVGSharedContext *shared) shared->engine = 0; shared->context->doneCurrent(); if (shared->surface != EGL_NO_SURFACE) { - eglDestroySurface(shared->context->display(), shared->surface); + eglDestroySurface(QEglContext::display(), shared->surface); shared->surface = EGL_NO_SURFACE; } delete shared->context; @@ -412,7 +412,7 @@ EGLSurface qt_vg_shared_surface(void) attribs[4] = EGL_NONE; } shared->surface = eglCreatePbufferSurface - (shared->context->display(), shared->context->config(), attribs); + (QEglContext::display(), shared->context->config(), attribs); } return shared->surface; } @@ -555,7 +555,7 @@ void QVGEGLWindowSurfaceVGImage::beginPaint(QWidget *widget) context->makeCurrent(mainSurface()); recreateBackBuffer = false; if (backBufferSurface != EGL_NO_SURFACE) { - eglDestroySurface(context->display(), backBufferSurface); + eglDestroySurface(QEglContext::display(), backBufferSurface); backBufferSurface = EGL_NO_SURFACE; } if (backBuffer != VG_INVALID_HANDLE) { @@ -568,7 +568,7 @@ void QVGEGLWindowSurfaceVGImage::beginPaint(QWidget *widget) if (backBuffer != VG_INVALID_HANDLE) { // Create an EGL surface for rendering into the VGImage. backBufferSurface = eglCreatePbufferFromClientBuffer - (context->display(), EGL_OPENVG_IMAGE, + (QEglContext::display(), EGL_OPENVG_IMAGE, (EGLClientBuffer)(backBuffer), context->config(), NULL); if (backBufferSurface == EGL_NO_SURFACE) { @@ -704,7 +704,7 @@ QEglContext *QVGEGLWindowSurfaceDirect::ensureContext(QWidget *widget) #if defined(QVG_DIRECT_TO_WINDOW) // Did we get a direct to window rendering surface? EGLint buffer = 0; - if (eglQueryContext(context->display(), context->context(), + if (eglQueryContext(QEglContext::display(), context->context(), EGL_RENDER_BUFFER, &buffer) && buffer == EGL_SINGLE_BUFFER) { needToSwap = false; @@ -714,7 +714,7 @@ QEglContext *QVGEGLWindowSurfaceDirect::ensureContext(QWidget *widget) // Try to force the surface back buffer to preserve its contents. if (needToSwap) { eglGetError(); // Clear error state first. - eglSurfaceAttrib(context->display(), surface, + eglSurfaceAttrib(QEglContext::display(), surface, EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED); if (eglGetError() != EGL_SUCCESS) { qWarning("QVG: could not enable preserved swap"); -- cgit v0.12 From 24096c5613731ae19e8fefe071570fa1d0e7ab36 Mon Sep 17 00:00:00 2001 From: Alessandro Portale <alessandro.portale@nokia.com> Date: Tue, 16 Mar 2010 22:32:28 +0100 Subject: Handle Symbian's file name encoding, correctly. On Symbian, we incorrectly assumed that filenames are encoded in local8bit. OpenC's implementation of wcstombs, mbstowcs, etc. are all UTF-8, regardless of the locale. Task-number: QTBUG-7175 Reviewed-by: Shane Kearns --- src/corelib/io/qfile.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp index 728c316..aa1c7d9 100644 --- a/src/corelib/io/qfile.cpp +++ b/src/corelib/io/qfile.cpp @@ -62,21 +62,25 @@ static const int QFILE_WRITEBUFFER_SIZE = 16384; static QByteArray locale_encode(const QString &f) { -#ifndef Q_OS_DARWIN - return f.toLocal8Bit(); -#else +#if defined(Q_OS_DARWIN) // Mac always expects UTF-8... and decomposed... return f.normalized(QString::NormalizationForm_D).toUtf8(); +#elif defined(Q_OS_SYMBIAN) + return f.toUtf8(); +#else + return f.toLocal8Bit(); #endif } static QString locale_decode(const QByteArray &f) { -#ifndef Q_OS_DARWIN - return QString::fromLocal8Bit(f); -#else +#if defined(Q_OS_DARWIN) // Mac always gives us UTF-8 and decomposed, we want that composed... return QString::fromUtf8(f).normalized(QString::NormalizationForm_C); +#elif defined(Q_OS_SYMBIAN) + return QString::fromUtf8(f); +#else + return QString::fromLocal8Bit(f); #endif } -- cgit v0.12 From ad4f9cbd52310bf5624e8504c4df22255399b99e Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Wed, 17 Mar 2010 11:59:54 +0100 Subject: This should likely get webkit linking again on windows/sbsv2 Reinstate the MMP rule as this block is for sbsv2 only anyway --- src/3rdparty/webkit/WebCore/WebCore.pro | 1 + 1 file changed, 1 insertion(+) diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index 2095179..2f3b490 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -29,6 +29,7 @@ symbian: { # 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 + MMP_RULES += "LINKEROPTION armcc --rw-base 0xE00000" } } -- cgit v0.12 From ceff979ce3c9401151acdcd53af872cefbaaa962 Mon Sep 17 00:00:00 2001 From: Sami Merila <sami.merila@nokia.com> Date: Wed, 17 Mar 2010 14:21:22 +0200 Subject: Change QS60Style to use combobox popup menu Instead of using traditional dropdown menus, use popup menu, like native side does. Related to https://qtrequirements.europe.nokia.com/browse/QT-2274 Popup is positioned according to S60 popup position rules: - in portrait at the bottom, with square popup (dimension is screen width minus border) - in landscape, centered on Y-axis, on X-axis to the right border (with LeftToRight UI direction) Background behind popup is dimmed. Popup has automatic scrollbar if content does not fit into the popup. Popup background graphic is S60 dialog graphic. Task-number: QT-2274 Reviewed-by: Alessandro Portale --- src/gui/kernel/qapplication_s60.cpp | 8 +++++- src/gui/styles/qs60style.cpp | 26 ++++++++++++++++--- src/gui/widgets/qcombobox.cpp | 50 +++++++++++++++++++++++++++++++++++++ src/gui/widgets/qcombobox_p.h | 2 ++ 4 files changed, 82 insertions(+), 4 deletions(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 4a15cf2..e7a7093 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -52,6 +52,7 @@ #include "qstring.h" #include "qdebug.h" #include "qimage.h" +#include "qcombobox.h" #include "private/qkeymapper_p.h" #include "private/qfont_p.h" #ifndef QT_NO_STYLE_S60 @@ -1407,11 +1408,13 @@ void QApplicationPrivate::leaveModal_sys(QWidget *widget) void QApplicationPrivate::openPopup(QWidget *popup) { + if (popup && qobject_cast<QComboBox *>(popup->parentWidget())) + static_cast<QSymbianControl *>(popup->effectiveWinId())->FadeBehindPopup(ETrue); + if (!QApplicationPrivate::popupWidgets) QApplicationPrivate::popupWidgets = new QWidgetList; QApplicationPrivate::popupWidgets->append(popup); - // Cancel focus widget pointer capture and long tap timer if (QApplication::focusWidget()) { static_cast<QSymbianControl*>(QApplication::focusWidget()->effectiveWinId())->CancelLongTapTimer(); @@ -1450,6 +1453,9 @@ void QApplicationPrivate::openPopup(QWidget *popup) void QApplicationPrivate::closePopup(QWidget *popup) { + if (popup && qobject_cast<QComboBox *>(popup->parentWidget())) + static_cast<QSymbianControl *>(popup->effectiveWinId())->FadeBehindPopup(EFalse); + if (!QApplicationPrivate::popupWidgets) return; QApplicationPrivate::popupWidgets->removeAll(popup); diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index bf5a62e..a610176 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -2475,6 +2475,9 @@ int QS60Style::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w { int retValue = -1; switch (sh) { + case SH_ComboBox_Popup: + retValue = true; + break; case SH_Table_GridLineColor: retValue = int(QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnLineColors, 2, 0).rgba()); break; @@ -2690,6 +2693,19 @@ QRect QS60Style::subControlRect(ComplexControl control, const QStyleOptionComple height - 2 * frameThickness); } break; + case SC_ComboBoxListBoxPopup: { + const QRect desktopContent = QApplication::desktop()->availableGeometry(); + + // take the size of this and position bottom above available area + QRect popupRect; + const int width = desktopContent.width() - pixelMetric(PM_LayoutRightMargin) - pixelMetric(PM_LayoutLeftMargin); + popupRect.setWidth(width); + popupRect.setHeight(desktopContent.height()); //combobox resets height anyway based on content + popupRect.setBottom(desktopContent.bottom()); + popupRect.translate(pixelMetric(PM_LayoutLeftMargin), 0); + ret = popupRect; + } + break; default: break; } @@ -2844,9 +2860,13 @@ QRect QS60Style::subElementRect(SubElement element, const QStyleOption *opt, con ret = menuItem->rect; if (element == SE_ItemViewItemDecoration) { - if (menuItem->direction == Qt::RightToLeft) - ret.translate(ret.width()-indicatorWidth, 0); - ret.setWidth(indicatorWidth); + if (menuItem->icon.isNull()) { + ret = QRect(); + } else { + if (menuItem->direction == Qt::RightToLeft) + ret.translate(ret.width()-indicatorWidth, 0); + ret.setWidth(indicatorWidth); + } } else { ret = menuItem->rect; if (!menuItem->icon.isNull()) diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp index 585db70..7d02e14 100644 --- a/src/gui/widgets/qcombobox.cpp +++ b/src/gui/widgets/qcombobox.cpp @@ -532,9 +532,11 @@ void QComboBoxPrivateContainer::setItemView(QAbstractItemView *itemView) QStyleOptionComboBox opt = comboStyleOption(); const bool usePopup = combo->style()->styleHint(QStyle::SH_ComboBox_Popup, &opt, combo); #ifndef QT_NO_SCROLLBAR +#ifndef Q_WS_S60 if (usePopup) view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); #endif +#endif if (combo->style()->styleHint(QStyle::SH_ComboBox_ListMouseTracking, &opt, combo) || usePopup) { view->setMouseTracking(true); @@ -2416,24 +2418,44 @@ void QComboBox::showPopup() // Position horizontally. listRect.moveLeft(above.x()); +#ifndef Q_WS_S60 // Position vertically so the curently selected item lines up // with the combo box. const QRect currentItemRect = view()->visualRect(view()->currentIndex()); const int offset = listRect.top() - currentItemRect.top(); listRect.moveTop(above.y() + offset - listRect.top()); +#endif // Clamp the listRect height and vertical position so we don't expand outside the // available screen geometry.This may override the vertical position, but it is more // important to show as much as possible of the popup. const int height = !boundToScreen ? listRect.height() : qMin(listRect.height(), screen.height()); +#ifdef Q_WS_S60 + //popup needs to be stretched with screen minimum dimension + listRect.setHeight(qMin(screen.height(), screen.width())); +#else listRect.setHeight(height); +#endif + if (boundToScreen) { if (listRect.top() < screen.top()) listRect.moveTop(screen.top()); if (listRect.bottom() > screen.bottom()) listRect.moveBottom(screen.bottom()); } +#ifdef Q_WS_S60 + if (screen.width() < screen.height()) { + // in portait, menu should be positioned above softkeys + listRect.moveBottom(screen.bottom()); + } else { + // landscape, menu should be at the right and horizontally centered + listRect.setWidth(listRect.height()); + listRect.moveCenter(screen.center()); + (opt.direction == Qt::LeftToRight) ? listRect.setRight(screen.right()) : + listRect.setLeft(screen.left()); + } +#endif } else if (!boundToScreen || listRect.height() <= belowHeight) { listRect.moveTopLeft(below); } else if (listRect.height() <= aboveHeight) { @@ -2642,6 +2664,34 @@ void QComboBox::changeEvent(QEvent *e) if (d->lineEdit) d->updateLineEditGeometry(); d->setLayoutItemMargins(QStyle::SE_ComboBoxLayoutItem); + +#ifdef Q_WS_S60 + if (d->container) { + QStyleOptionComboBox opt; + initStyleOption(&opt); + + if (style()->styleHint(QStyle::SH_ComboBox_Popup, &opt, this)) { + const QRect screen = d->popupGeometry(QApplication::desktop()->screenNumber(this)); + + QRect listRect(style()->subControlRect(QStyle::CC_ComboBox, &opt, + QStyle::SC_ComboBoxListBoxPopup, this)); + listRect.setHeight(qMin(screen.height(), screen.width())); + + if (screen.width() < screen.height()) { + // in portait, menu should be positioned above softkeys + listRect.moveBottom(screen.bottom()); + } else { + // landscape, menu should be at the right and horizontally centered + listRect.setWidth(listRect.height()); + listRect.moveCenter(screen.center()); + (opt.direction == Qt::LeftToRight) ? listRect.setRight(screen.right()) : + listRect.setLeft(screen.left()); + } + d->container->setGeometry(listRect); + } + } +#endif + // ### need to update scrollers etc. as well here break; case QEvent::EnabledChange: diff --git a/src/gui/widgets/qcombobox_p.h b/src/gui/widgets/qcombobox_p.h index 74dfdc9..92d85cc 100644 --- a/src/gui/widgets/qcombobox_p.h +++ b/src/gui/widgets/qcombobox_p.h @@ -270,7 +270,9 @@ protected: const QStyleOptionViewItem &option, const QModelIndex &index) const { QStyleOptionMenuItem opt = getStyleOption(option, index); +#ifndef Q_WS_S60 painter->fillRect(option.rect, opt.palette.background()); +#endif mCombo->style()->drawControl(QStyle::CE_MenuItem, &opt, painter, mCombo); } QSize sizeHint(const QStyleOptionViewItem &option, -- cgit v0.12 From 4bec9a7dcb89e18b54a7bc3f5230b5a98611fd06 Mon Sep 17 00:00:00 2001 From: Sami Merila <sami.merila@nokia.com> Date: Wed, 17 Mar 2010 14:28:05 +0200 Subject: Set PM_MenuScrollerHeight to zero Previously QS60Style didn't define a pixel metrics value for PM_MenuScrollerHeight at all and value was fetched from qcommonstyle. However, QS60Style didn't draw the CE_MenuScroller area at all, so menuscrollers were layoutted and drawn. Thus, long menus were left with a 'hole' in them. With this fix, PM_MenuScrollerHeight is zero. This is related to QT-2274. Task-number: QT-2274 Reviewed-by: Alessandro Portale --- src/gui/styles/qs60style.cpp | 10 +++++----- util/s60pixelmetrics/pixel_metrics.cpp | 5 ++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index a610176..a2ebebb 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -104,11 +104,11 @@ const int QS60StylePrivate::m_numberOfLayouts = const short QS60StylePrivate::data[][MAX_PIXELMETRICS] = { // *** generated pixel metrics *** -{5,0,-909,0,0,2,0,0,-1,7,12,19,13,13,6,200,-909,-909,-909,20,13,2,0,0,21,7,18,-909,3,3,1,-909,-909,0,1,0,0,12,20,15,15,18,18,1,115,18,0,-909,-909,-909,-909,0,0,16,2,-909,0,0,-909,16,-909,-909,-909,-909,32,18,55,24,55,4,4,4,9,13,-909,5,51,11,5,0,3,3,6,8,3,3,-909,2,-909,-909,-909,-909,5,5,3,1}, -{5,0,-909,0,0,1,0,0,-1,8,14,22,15,15,7,164,-909,-909,-909,19,15,2,0,0,21,8,27,-909,4,4,1,-909,-909,0,7,6,0,13,23,17,17,21,21,7,115,21,0,-909,-909,-909,-909,0,0,15,1,-909,0,0,-909,15,-909,-909,-909,-909,32,21,65,27,65,3,3,5,10,15,-909,5,58,13,5,0,4,4,7,9,4,4,-909,2,-909,-909,-909,-909,6,6,3,1}, -{7,0,-909,0,0,2,0,0,-1,25,69,28,19,19,9,258,-909,-909,-909,23,19,26,0,0,32,25,72,-909,5,5,2,-909,-909,0,7,21,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,25,2,-909,0,0,-909,25,-909,-909,-909,-909,87,27,77,35,77,13,13,6,8,19,-909,7,74,19,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1}, -{7,0,-909,0,0,2,0,0,-1,25,68,28,19,19,9,258,-909,-909,-909,31,19,6,0,0,32,25,60,-909,5,5,2,-909,-909,0,7,32,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,26,2,-909,0,0,-909,26,-909,-909,-909,-909,87,27,96,35,96,12,12,6,8,19,-909,7,74,22,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1}, -{7,0,-909,0,0,2,0,0,-1,10,20,27,18,18,9,301,-909,-909,-909,29,18,5,0,0,35,7,32,-909,5,5,2,-909,-909,0,2,8,0,16,28,21,21,26,26,2,170,26,0,-909,-909,-909,-909,0,0,21,6,-909,0,0,-909,-909,-909,-909,-909,-909,54,26,265,34,265,5,5,6,3,18,-909,7,72,19,7,0,5,6,8,11,6,5,-909,2,-909,-909,-909,-909,5,5,3,1} +{5,0,-909,0,0,2,0,0,-1,7,12,19,13,13,6,200,-909,-909,-909,20,13,2,0,0,21,7,18,0,3,3,1,-909,-909,0,1,0,0,12,20,15,15,18,18,1,115,18,0,-909,-909,-909,-909,0,0,16,2,-909,0,0,-909,16,-909,-909,-909,-909,32,18,55,24,55,4,4,4,9,13,-909,5,51,11,5,0,3,3,6,8,3,3,-909,2,-909,-909,-909,-909,5,5,3,1}, +{5,0,-909,0,0,1,0,0,-1,8,14,22,15,15,7,164,-909,-909,-909,19,15,2,0,0,21,8,27,0,4,4,1,-909,-909,0,7,6,0,13,23,17,17,21,21,7,115,21,0,-909,-909,-909,-909,0,0,15,1,-909,0,0,-909,15,-909,-909,-909,-909,32,21,65,27,65,3,3,5,10,15,-909,5,58,13,5,0,4,4,7,9,4,4,-909,2,-909,-909,-909,-909,6,6,3,1}, +{7,0,-909,0,0,2,0,0,-1,25,69,28,19,19,9,258,-909,-909,-909,23,19,26,0,0,32,25,72,0,5,5,2,-909,-909,0,7,21,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,25,2,-909,0,0,-909,25,-909,-909,-909,-909,87,27,77,35,77,13,13,6,8,19,-909,7,74,19,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1}, +{7,0,-909,0,0,2,0,0,-1,25,68,28,19,19,9,258,-909,-909,-909,31,19,6,0,0,32,25,60,0,5,5,2,-909,-909,0,7,32,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,26,2,-909,0,0,-909,26,-909,-909,-909,-909,87,27,96,35,96,12,12,6,8,19,-909,7,74,22,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1}, +{7,0,-909,0,0,2,0,0,-1,10,20,27,18,18,9,301,-909,-909,-909,29,18,5,0,0,35,7,32,0,5,5,2,-909,-909,0,2,8,0,16,28,21,21,26,26,2,170,26,0,-909,-909,-909,-909,0,0,21,6,-909,0,0,-909,-909,-909,-909,-909,-909,54,26,265,34,265,5,5,6,3,18,-909,7,72,19,7,0,5,6,8,11,6,5,-909,2,-909,-909,-909,-909,5,5,3,1} // *** End of generated data *** }; diff --git a/util/s60pixelmetrics/pixel_metrics.cpp b/util/s60pixelmetrics/pixel_metrics.cpp index 93873fb..beb785e 100644 --- a/util/s60pixelmetrics/pixel_metrics.cpp +++ b/util/s60pixelmetrics/pixel_metrics.cpp @@ -1012,12 +1012,15 @@ TInt PixelMetrics::PixelMetricValue(QStyle::PixelMetric metric) value = PixelMetricTabValue(QStyle::PM_TabBarScrollButtonWidth, appWindow.Rect(), landscape); break; + case QStyle::PM_MenuScrollerHeight: + value = 0; + break; + // todo: re-check if these really are not available in s60 case QStyle::PM_MenuDesktopFrameWidth: // not needed in S60 - dislocates Menu both horizontally and vertically case QStyle::PM_HeaderMarkSize: // The size of the sort indicator in a header. Not in S60 case QStyle::PM_SpinBoxSliderHeight: // The height of the optional spin box slider. Not in S60 case QStyle::PM_HeaderMargin: // not in S60 - case QStyle::PM_MenuScrollerHeight: // not in S60 case QStyle::PM_MenuTearoffHeight: // not in S60 case QStyle::PM_DockWidgetFrameWidth: // not in S60 case QStyle::PM_DockWidgetSeparatorExtent: // not in S60 -- cgit v0.12 From 3ebb4163472031a62189b9c4f1d1307c08005de2 Mon Sep 17 00:00:00 2001 From: Thomas Zander <t.zander@nokia.com> Date: Wed, 17 Mar 2010 14:57:37 +0100 Subject: Fix dependency so it works also on massive parrallel systems --- tests/auto/xmlpatterns.pro | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/auto/xmlpatterns.pro b/tests/auto/xmlpatterns.pro index f670266..923f2c4 100644 --- a/tests/auto/xmlpatterns.pro +++ b/tests/auto/xmlpatterns.pro @@ -37,6 +37,7 @@ xmlpatternsdiagnosticsts.depends = xmlpatternssdk xmlpatternsview.depends = xmlpatternssdk xmlpatternsxslts.depends = xmlpatternssdk xmlpatternsschemats.depends = xmlpatternssdk +xmlpatternsxqts.depends = xmlpatternssdk !contains(QT_CONFIG, private_tests): SUBDIRS -= \ xmlpatternsdiagnosticsts \ -- cgit v0.12 From 765d1dc555e19c2c71e75e9690ffcb08469043e0 Mon Sep 17 00:00:00 2001 From: Rohan McGovern <rohan.mcgovern@nokia.com> Date: Thu, 18 Mar 2010 11:25:07 +1000 Subject: Fixed recursive QMAKE_EXTRA_TARGETS for symbian makefiles. When using recursive QMAKE_EXTRA_TARGETS, qmake will use CHK_DIR_EXISTS and MKDIR when ensuring each subdir has a Makefile created. These previously weren't defined for Symbian. Note that this problem was hidden in most cases, because a `qmake -r' would have created the necessary makefiles already. The problem is revealed when a .pro file does SUBDIRS+=foo.pro and foo.pro is also a subdirs project. Reviewed-by: Michael Goddard --- qmake/generators/symbian/symmake_abld.cpp | 2 ++ qmake/generators/symbian/symmake_sbsv2.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp index cd613e0..ad6e743 100644 --- a/qmake/generators/symbian/symmake_abld.cpp +++ b/qmake/generators/symbian/symmake_abld.cpp @@ -204,6 +204,8 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; t << "MOVE = " << var("QMAKE_MOVE") << endl; + t << "CHK_DIR_EXISTS = " << var("QMAKE_CHK_DIR_EXISTS") << endl; + t << "MKDIR = " << var("QMAKE_MKDIR") << endl; t << "XCOPY = xcopy /d /f /h /r /y /i" << endl; t << "ABLD = ABLD.BAT" << endl; t << "DEBUG_PLATFORMS = " << debugPlatforms.join(" ") << endl; diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp index 8289f7f..1014ba2 100644 --- a/qmake/generators/symbian/symmake_sbsv2.cpp +++ b/qmake/generators/symbian/symmake_sbsv2.cpp @@ -147,6 +147,8 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo t << "QMAKE = " << Option::fixPathToTargetOS(var("QMAKE_QMAKE")) << endl; t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; + t << "CHK_DIR_EXISTS = " << var("QMAKE_CHK_DIR_EXISTS") << endl; + t << "MKDIR = " << var("QMAKE_MKDIR") << endl; t << "MOVE = " << var("QMAKE_MOVE") << endl; t << "DEBUG_PLATFORMS = " << debugPlatforms.join(" ") << endl; t << "RELEASE_PLATFORMS = " << releasePlatforms.join(" ") << endl; -- cgit v0.12 From 05c20cbf719746f295ac4c3ebb484ea6c3555d70 Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Thu, 11 Mar 2010 19:21:29 +0100 Subject: Fixed broken test. When the new QLineEdit got assigned to the proxy, the event spy was not updated, meaning that all the remaining tests would pass regardless of whether more events came in or not. Fixed by adding the line edits in separate blocks. RevBy: Trust me --- .../tst_qgraphicsproxywidget.cpp | 133 +++++++++++---------- 1 file changed, 71 insertions(+), 62 deletions(-) diff --git a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp index 69d2ad2..17311e2 100644 --- a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp +++ b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp @@ -3426,85 +3426,94 @@ void tst_QGraphicsProxyWidget::clickFocus() scene.setItemIndexMethod(QGraphicsScene::NoIndex); QGraphicsProxyWidget *proxy = scene.addWidget(new QLineEdit); - EventSpy proxySpy(proxy); - EventSpy widgetSpy(proxy->widget()); - QGraphicsView view(&scene); - view.setFrameStyle(0); - view.resize(300, 300); - view.show(); -#ifdef Q_WS_X11 - qt_x11_wait_for_window_manager(&view); -#endif - QApplication::setActiveWindow(&view); - QTest::qWait(25); - QTRY_COMPARE(QApplication::activeWindow(), &view); - QVERIFY(!proxy->hasFocus()); - QVERIFY(!proxy->widget()->hasFocus()); + { + EventSpy proxySpy(proxy); + EventSpy widgetSpy(proxy->widget()); - QCOMPARE(proxySpy.counts[QEvent::FocusIn], 0); - QCOMPARE(proxySpy.counts[QEvent::FocusOut], 0); - QCOMPARE(widgetSpy.counts[QEvent::FocusIn], 0); - QCOMPARE(widgetSpy.counts[QEvent::FocusOut], 0); + view.setFrameStyle(0); + view.resize(300, 300); + view.show(); +#ifdef Q_WS_X11 + qt_x11_wait_for_window_manager(&view); +#endif + QApplication::setActiveWindow(&view); + QTest::qWait(25); + QTRY_COMPARE(QApplication::activeWindow(), &view); - QPointF lineEditCenter = proxy->mapToScene(proxy->boundingRect().center()); - // Spontaneous mouse click sets focus on a clickable widget. - for (int retry = 0; retry < 50 && !proxy->hasFocus(); retry++) - QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(lineEditCenter)); - QVERIFY(proxy->hasFocus()); - QVERIFY(proxy->widget()->hasFocus()); - QCOMPARE(proxySpy.counts[QEvent::FocusIn], 1); - QCOMPARE(widgetSpy.counts[QEvent::FocusIn], 1); + QVERIFY(!proxy->hasFocus()); + QVERIFY(!proxy->widget()->hasFocus()); - scene.setFocusItem(0); - QVERIFY(!proxy->hasFocus()); - QVERIFY(!proxy->widget()->hasFocus()); - QCOMPARE(proxySpy.counts[QEvent::FocusOut], 1); - QCOMPARE(widgetSpy.counts[QEvent::FocusOut], 1); + QCOMPARE(proxySpy.counts[QEvent::FocusIn], 0); + QCOMPARE(proxySpy.counts[QEvent::FocusOut], 0); + QCOMPARE(widgetSpy.counts[QEvent::FocusIn], 0); + QCOMPARE(widgetSpy.counts[QEvent::FocusOut], 0); - // Non-spontaneous mouse click sets focus if the widget has been clicked before - { - QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMousePress); - event.setScenePos(lineEditCenter); - event.setButton(Qt::LeftButton); - qApp->sendEvent(&scene, &event); + QPointF lineEditCenter = proxy->mapToScene(proxy->boundingRect().center()); + // Spontaneous mouse click sets focus on a clickable widget. + for (int retry = 0; retry < 50 && !proxy->hasFocus(); retry++) + QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(lineEditCenter)); QVERIFY(proxy->hasFocus()); QVERIFY(proxy->widget()->hasFocus()); - QCOMPARE(proxySpy.counts[QEvent::FocusIn], 2); - QCOMPARE(widgetSpy.counts[QEvent::FocusIn], 2); + QCOMPARE(proxySpy.counts[QEvent::FocusIn], 1); + QCOMPARE(widgetSpy.counts[QEvent::FocusIn], 1); + + scene.setFocusItem(0); + QVERIFY(!proxy->hasFocus()); + QVERIFY(!proxy->widget()->hasFocus()); + QCOMPARE(proxySpy.counts[QEvent::FocusOut], 1); + QCOMPARE(widgetSpy.counts[QEvent::FocusOut], 1); + + // Non-spontaneous mouse click sets focus if the widget has been clicked before + { + QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMousePress); + event.setScenePos(lineEditCenter); + event.setButton(Qt::LeftButton); + qApp->sendEvent(&scene, &event); + QVERIFY(proxy->hasFocus()); + QVERIFY(proxy->widget()->hasFocus()); + QCOMPARE(proxySpy.counts[QEvent::FocusIn], 2); + QCOMPARE(widgetSpy.counts[QEvent::FocusIn], 2); + } } scene.setFocusItem(0); proxy->setWidget(new QLineEdit); // resets focusWidget - QVERIFY(!proxy->hasFocus()); - QVERIFY(!proxy->widget()->hasFocus()); - QCOMPARE(proxySpy.counts[QEvent::FocusOut], 2); - QCOMPARE(widgetSpy.counts[QEvent::FocusOut], 2); - // Non-spontaneous mouse click does not set focus on the embedded widget. { - QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMousePress); - event.setScenePos(lineEditCenter); - event.setButton(Qt::LeftButton); - qApp->sendEvent(&scene, &event); + QPointF lineEditCenter = proxy->mapToScene(proxy->boundingRect().center()); + EventSpy proxySpy(proxy); + EventSpy widgetSpy(proxy->widget()); QVERIFY(!proxy->hasFocus()); QVERIFY(!proxy->widget()->hasFocus()); - QCOMPARE(proxySpy.counts[QEvent::FocusIn], 2); - QCOMPARE(widgetSpy.counts[QEvent::FocusIn], 2); - } + QCOMPARE(proxySpy.counts[QEvent::FocusOut], 0); + QCOMPARE(widgetSpy.counts[QEvent::FocusOut], 0); - scene.setFocusItem(0); - QVERIFY(!proxy->hasFocus()); - QVERIFY(!proxy->widget()->hasFocus()); - QCOMPARE(proxySpy.counts[QEvent::FocusOut], 2); - QCOMPARE(widgetSpy.counts[QEvent::FocusOut], 2); - - // Spontaneous click on non-clickable widget does not give focus. - proxy->widget()->setFocusPolicy(Qt::NoFocus); - QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(lineEditCenter)); - QVERIFY(!proxy->hasFocus()); - QVERIFY(!proxy->widget()->hasFocus()); + // Non-spontaneous mouse click does not set focus on the embedded widget. + { + QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMousePress); + event.setScenePos(lineEditCenter); + event.setButton(Qt::LeftButton); + qApp->sendEvent(&scene, &event); + QVERIFY(!proxy->hasFocus()); + QVERIFY(!proxy->widget()->hasFocus()); + QCOMPARE(proxySpy.counts[QEvent::FocusIn], 0); + QCOMPARE(widgetSpy.counts[QEvent::FocusIn], 0); + } + + scene.setFocusItem(0); + QVERIFY(!proxy->hasFocus()); + QVERIFY(!proxy->widget()->hasFocus()); + QCOMPARE(proxySpy.counts[QEvent::FocusOut], 0); + QCOMPARE(widgetSpy.counts[QEvent::FocusOut], 0); + + // Spontaneous click on non-clickable widget does not give focus. + proxy->widget()->setFocusPolicy(Qt::NoFocus); + QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(lineEditCenter)); + QVERIFY(!proxy->hasFocus()); + QVERIFY(!proxy->widget()->hasFocus()); + } } void tst_QGraphicsProxyWidget::windowFrameMargins() -- cgit v0.12 From e483886bcfcf7252af9ac7cc89de15f912bf69da Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Tue, 9 Mar 2010 15:32:05 +0100 Subject: Fixed a bug where a proxy widget received FocusIn over and over. This also fixed the issue where an input panel would not be requested by the widget, because it thought it was being focused over and over, instead of focused, and then clicked (focus followed by click is default input panel popup behavior on Symbian). AutoTest: Included and passed RevBy: yoann RevBy: Jan-Arve --- src/gui/graphicsview/qgraphicsproxywidget.cpp | 5 ++++- src/gui/graphicsview/qgraphicsproxywidget_p.h | 1 + src/gui/kernel/qwidget.cpp | 2 ++ tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp | 12 ++++++++++++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/gui/graphicsview/qgraphicsproxywidget.cpp b/src/gui/graphicsview/qgraphicsproxywidget.cpp index a39ccfd..483eb62 100644 --- a/src/gui/graphicsview/qgraphicsproxywidget.cpp +++ b/src/gui/graphicsview/qgraphicsproxywidget.cpp @@ -1315,6 +1315,8 @@ void QGraphicsProxyWidget::focusInEvent(QFocusEvent *event) return; } + d->proxyIsGivingFocus = true; + switch (event->reason()) { case Qt::TabFocusReason: { if (QWidget *focusChild = d->findFocusChild(0, true)) @@ -1328,10 +1330,11 @@ void QGraphicsProxyWidget::focusInEvent(QFocusEvent *event) default: if (d->widget && d->widget->focusWidget()) { d->widget->focusWidget()->setFocus(event->reason()); - return; } break; } + + d->proxyIsGivingFocus = false; } /*! diff --git a/src/gui/graphicsview/qgraphicsproxywidget_p.h b/src/gui/graphicsview/qgraphicsproxywidget_p.h index 60eb058..8aed363 100644 --- a/src/gui/graphicsview/qgraphicsproxywidget_p.h +++ b/src/gui/graphicsview/qgraphicsproxywidget_p.h @@ -118,6 +118,7 @@ public: quint32 styleChangeMode : 2; quint32 paletteChangeMode : 2; quint32 focusFromWidgetToProxy : 1; + quint32 proxyIsGivingFocus : 1; }; QT_END_NAMESPACE diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index b5ccb3e..cd943cd 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -6123,6 +6123,8 @@ void QWidget::setFocus(Qt::FocusReason reason) previousProxyFocus = topData->proxyWidget->widget()->focusWidget(); if (previousProxyFocus && previousProxyFocus->focusProxy()) previousProxyFocus = previousProxyFocus->focusProxy(); + if (previousProxyFocus == this && !topData->proxyWidget->d_func()->proxyIsGivingFocus) + return; } } #endif diff --git a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp index 17311e2..23b3458 100644 --- a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp +++ b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp @@ -3513,6 +3513,18 @@ void tst_QGraphicsProxyWidget::clickFocus() QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(lineEditCenter)); QVERIFY(!proxy->hasFocus()); QVERIFY(!proxy->widget()->hasFocus()); + + // Multiple clicks should only result in one FocusIn. + proxy->widget()->setFocusPolicy(Qt::StrongFocus); + scene.setFocusItem(0); + QVERIFY(!proxy->hasFocus()); + QVERIFY(!proxy->widget()->hasFocus()); + QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(lineEditCenter)); + QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(lineEditCenter)); + QVERIFY(proxy->hasFocus()); + QVERIFY(proxy->widget()->hasFocus()); + QCOMPARE(widgetSpy.counts[QEvent::FocusIn], 1); + QCOMPARE(proxySpy.counts[QEvent::FocusIn], 1); } } -- cgit v0.12 From d7aa84d9f4ea9f34dfcdf4409508475a11015e9f Mon Sep 17 00:00:00 2001 From: axis <qt-info@nokia.com> Date: Thu, 18 Mar 2010 10:26:23 +0100 Subject: Fixed wrong qmake logic for Symbian. Also remove a redundant line. --- src/3rdparty/webkit/WebCore/WebCore.pro | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index 2f3b490..a80eed4 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -24,12 +24,11 @@ symbian: { DEPLOYMENT += webkitlibs webkitbackup - symbian-abld:symbian-sbsv2 { + symbian-abld|symbian-sbsv2 { # 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 - MMP_RULES += "LINKEROPTION armcc --rw-base 0xE00000" } } -- cgit v0.12 From bfb976c4ca539c7207083aa57e3d707dcad88bd5 Mon Sep 17 00:00:00 2001 From: Jason Barron <jbarron@trolltech.com> Date: Thu, 18 Mar 2010 12:58:04 +0100 Subject: Fix compilation of OpenVG. As simple as QEglContext::display -> QEgl::display. Reviewed-by: Tom Cooksey --- src/openvg/qpixmapdata_vg.cpp | 12 ++++++------ src/openvg/qwindowsurface_vgegl.cpp | 22 +++++++++++----------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/openvg/qpixmapdata_vg.cpp b/src/openvg/qpixmapdata_vg.cpp index 8adf5af..53f6b4c 100644 --- a/src/openvg/qpixmapdata_vg.cpp +++ b/src/openvg/qpixmapdata_vg.cpp @@ -496,7 +496,7 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type) } const EGLint KEglImageAttribs[] = {EGL_IMAGE_PRESERVED_SYMBIAN, EGL_TRUE, EGL_NONE}; - EGLImageKHR eglImage = eglCreateImageKHR(QEglContext::display(), + EGLImageKHR eglImage = eglCreateImageKHR(QEgl::display(), EGL_NO_CONTEXT, EGL_NATIVE_PIXMAP_KHR, (EGLClientBuffer)sgImage, @@ -511,7 +511,7 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type) vgImage = vgCreateEGLImageTargetKHR(eglImage); if(vgGetError() != VG_NO_ERROR) { cleanup(); - eglDestroyImageKHR(QEglContext::display(), eglImage); + eglDestroyImageKHR(QEgl::display(), eglImage); SgDriver::Close(); return; } @@ -525,7 +525,7 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type) prevSize = QSize(w, h); setSerialNumber(++qt_vg_pixmap_serial); // release stuff - eglDestroyImageKHR(QEglContext::display(), eglImage); + eglDestroyImageKHR(QEgl::display(), eglImage); SgDriver::Close(); } else if (type == QPixmapData::FbsBitmap) { CFbsBitmap *bitmap = reinterpret_cast<CFbsBitmap*>(pixmap); @@ -620,7 +620,7 @@ void* QVGPixmapData::toNativeType(NativeType type) } const EGLint KEglImageAttribs[] = {EGL_IMAGE_PRESERVED_SYMBIAN, EGL_TRUE, EGL_NONE}; - EGLImageKHR eglImage = eglCreateImageKHR(QEglContext::display(), + EGLImageKHR eglImage = eglCreateImageKHR(QEgl::display(), EGL_NO_CONTEXT, EGL_NATIVE_PIXMAP_KHR, (EGLClientBuffer)sgImage, @@ -633,7 +633,7 @@ void* QVGPixmapData::toNativeType(NativeType type) VGImage dstVgImage = vgCreateEGLImageTargetKHR(eglImage); if(vgGetError() != VG_NO_ERROR) { - eglDestroyImageKHR(QEglContext::display(), eglImage); + eglDestroyImageKHR(QEgl::display(), eglImage); sgImage->Close(); SgDriver::Close(); return 0; @@ -649,7 +649,7 @@ void* QVGPixmapData::toNativeType(NativeType type) } // release stuff vgDestroyImage(dstVgImage); - eglDestroyImageKHR(QEglContext::display(), eglImage); + eglDestroyImageKHR(QEgl::display(), eglImage); SgDriver::Close(); return reinterpret_cast<void*>(sgImage); } else if (type == QPixmapData::FbsBitmap) { diff --git a/src/openvg/qwindowsurface_vgegl.cpp b/src/openvg/qwindowsurface_vgegl.cpp index f46d6c2..9b55fd2 100644 --- a/src/openvg/qwindowsurface_vgegl.cpp +++ b/src/openvg/qwindowsurface_vgegl.cpp @@ -230,9 +230,9 @@ static QEglContext *createContext(QPaintDevice *device) // Set the swap interval for the display. QByteArray interval = qgetenv("QT_VG_SWAP_INTERVAL"); if (!interval.isEmpty()) - eglSwapInterval(QEglContext::display(), interval.toInt()); + eglSwapInterval(QEgl::display(), interval.toInt()); else - eglSwapInterval(QEglContext::display(), 1); + eglSwapInterval(QEgl::display(), 1); #ifdef EGL_RENDERABLE_TYPE // Has the user specified an explicit EGL configuration to use? @@ -246,16 +246,16 @@ static QEglContext *createContext(QPaintDevice *device) EGLint matching = 0; EGLConfig cfg; if (eglChooseConfig - (QEglContext::display(), properties, &cfg, 1, &matching) && + (QEgl::display(), properties, &cfg, 1, &matching) && matching > 0) { // Check that the selected configuration actually supports OpenVG // and then create the context with it. EGLint id = 0; EGLint type = 0; eglGetConfigAttrib - (QEglContext::display(), cfg, EGL_CONFIG_ID, &id); + (QEgl::display(), cfg, EGL_CONFIG_ID, &id); eglGetConfigAttrib - (QEglContext::display(), cfg, EGL_RENDERABLE_TYPE, &type); + (QEgl::display(), cfg, EGL_RENDERABLE_TYPE, &type); if (cfgId == id && (type & EGL_OPENVG_BIT) != 0) { context->setConfig(cfg); if (!context->createContext()) { @@ -334,7 +334,7 @@ static void qt_vg_destroy_shared_context(QVGSharedContext *shared) shared->engine = 0; shared->context->doneCurrent(); if (shared->surface != EGL_NO_SURFACE) { - eglDestroySurface(QEglContext::display(), shared->surface); + eglDestroySurface(QEgl::display(), shared->surface); shared->surface = EGL_NO_SURFACE; } delete shared->context; @@ -412,7 +412,7 @@ EGLSurface qt_vg_shared_surface(void) attribs[4] = EGL_NONE; } shared->surface = eglCreatePbufferSurface - (QEglContext::display(), shared->context->config(), attribs); + (QEgl::display(), shared->context->config(), attribs); } return shared->surface; } @@ -555,7 +555,7 @@ void QVGEGLWindowSurfaceVGImage::beginPaint(QWidget *widget) context->makeCurrent(mainSurface()); recreateBackBuffer = false; if (backBufferSurface != EGL_NO_SURFACE) { - eglDestroySurface(QEglContext::display(), backBufferSurface); + eglDestroySurface(QEgl::display(), backBufferSurface); backBufferSurface = EGL_NO_SURFACE; } if (backBuffer != VG_INVALID_HANDLE) { @@ -568,7 +568,7 @@ void QVGEGLWindowSurfaceVGImage::beginPaint(QWidget *widget) if (backBuffer != VG_INVALID_HANDLE) { // Create an EGL surface for rendering into the VGImage. backBufferSurface = eglCreatePbufferFromClientBuffer - (QEglContext::display(), EGL_OPENVG_IMAGE, + (QEgl::display(), EGL_OPENVG_IMAGE, (EGLClientBuffer)(backBuffer), context->config(), NULL); if (backBufferSurface == EGL_NO_SURFACE) { @@ -704,7 +704,7 @@ QEglContext *QVGEGLWindowSurfaceDirect::ensureContext(QWidget *widget) #if defined(QVG_DIRECT_TO_WINDOW) // Did we get a direct to window rendering surface? EGLint buffer = 0; - if (eglQueryContext(QEglContext::display(), context->context(), + if (eglQueryContext(QEgl::display(), context->context(), EGL_RENDER_BUFFER, &buffer) && buffer == EGL_SINGLE_BUFFER) { needToSwap = false; @@ -714,7 +714,7 @@ QEglContext *QVGEGLWindowSurfaceDirect::ensureContext(QWidget *widget) // Try to force the surface back buffer to preserve its contents. if (needToSwap) { eglGetError(); // Clear error state first. - eglSurfaceAttrib(QEglContext::display(), surface, + eglSurfaceAttrib(QEgl::display(), surface, EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED); if (eglGetError() != EGL_SUCCESS) { qWarning("QVG: could not enable preserved swap"); -- cgit v0.12