From 5486f14afb34608d16f62a575499712b20073162 Mon Sep 17 00:00:00 2001 From: Simon Hausmann 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 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 + + +// We are hot - unistd.h should have turned on the specific APIs we requested + +//#include +#include +#include +#include +#include +#include +//#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef QT_NO_IPV6IFNAME +#include +#endif +#include + +#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 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 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 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 -#include +#include "qcore_symbian_p.h" #include QT_BEGIN_NAMESPACE -- cgit v0.12 From 7bbb5a34ee39d60d4c72df5ed8bd3ac13b5dc554 Mon Sep 17 00:00:00 2001 From: Simon Hausmann 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 // For CMdaAudioToneUtility +#include // 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 #include #include -#include +#include #include #include #include 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 +#include // pointer cursor #include #include 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 #include -#include +#include 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 #include "qwindowsurface_s60_p.h" #include "qpixmap_s60_p.h" -#include "qt_s60_p.h" +#include #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 #endif #include 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 +#include #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 +#include #include "qendian.h" #include #if defined(QT_NO_FREETYPE) -#include +#include #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 +#include 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 #include #include -#include +#include #include #ifdef Q_WS_S60 -- cgit v0.12 From e3764a552e34c9ac1b853f193e09b02d2631ede4 Mon Sep 17 00:00:00 2001 From: axis 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& 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()); - 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 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 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 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 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& 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 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 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 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 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 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 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 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 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 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 #include #if defined(Q_OS_SYMBIAN) -# include +# include # include # include # 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 #include -- cgit v0.12 From 2b41ee8a959b5c7fcbd6c275e4dac639cd09c25b Mon Sep 17 00:00:00 2001 From: axis 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 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 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 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 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 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 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 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 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 #$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 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 () { + 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 \"##\\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 () { + 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 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 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 () { - 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 \"#\#\\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 #$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 #$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 #$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 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 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 #include +#ifndef QT_NO_EXCEPTIONS +# include +# include +#endif + #if !defined(Q_OS_WINCE) # include # if defined(Q_CC_MSVC) -- cgit v0.12 From 6475ca960a3d04eb591338801073db4d2a38b715 Mon Sep 17 00:00:00 2001 From: axis 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 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::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 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 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 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 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 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=/Epoc32/include + export RVCT22INC=$RVCT22INC,/Epoc32/include/rvct2_2 + export RVCT22INC=$RVCT22INC,/Epoc32/include/variant + export RVCT22INC=$RVCT22INC,/Epoc32/include/stdapis + export RVCT22INC=$RVCT22INC,/Epoc32/include/stdapis/stlport + export RVCT22LIB=/Epoc32/release/armv5/lib + export PATH=$PATH:/Epoc32/tools + export PATH=$PATH:/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 /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 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=/Epoc32/include - export RVCT22INC=$RVCT22INC,/Epoc32/include/rvct2_2 - export RVCT22INC=$RVCT22INC,/Epoc32/include/variant - export RVCT22INC=$RVCT22INC,/Epoc32/include/stdapis - export RVCT22INC=$RVCT22INC,/Epoc32/include/stdapis/stlport - export RVCT22LIB=/Epoc32/release/armv5/lib - export PATH=$PATH:/Epoc32/tools + export RVCT22INC=/epoc32/include + export RVCT22INC=$RVCT22INC,/epoc32/include/rvct2_2 + export RVCT22INC=$RVCT22INC,/epoc32/include/variant + export RVCT22INC=$RVCT22INC,/epoc32/include/stdapis + export RVCT22INC=$RVCT22INC,/epoc32/include/stdapis/stlport + export RVCT22LIB=/epoc32/release/armv5/lib + export PATH=$PATH:/epoc32/tools export PATH=$PATH:/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 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 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 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 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 +#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 #include #include "qwindowsurface_s60_p.h" -#include "qpixmap_s60_p.h" +#include #include #include "private/qdrawhelper_p.h" -- cgit v0.12 From 403a8b1d755b673178d203d5ec9bef64f37ac8d0 Mon Sep 17 00:00:00 2001 From: axis 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 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 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 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 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 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 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 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 ] [-prefix-install] [-bindir ] [-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 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& 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 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 () { - 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 \"##\\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 () { - 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 \"#\#\\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 #$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 #$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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 +#include #include #endif -- cgit v0.12 From 87709391a71173b1faa70b9ee379132b7ae0e279 Mon Sep 17 00:00:00 2001 From: axis 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 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=/epoc32/include - export RVCT22INC=$RVCT22INC,/epoc32/include/rvct2_2 - export RVCT22INC=$RVCT22INC,/epoc32/include/variant - export RVCT22INC=$RVCT22INC,/epoc32/include/stdapis - export RVCT22INC=$RVCT22INC,/epoc32/include/stdapis/stlport - export RVCT22LIB=/epoc32/release/armv5/lib + export RVCT22LIB=/lib/armlib + export EPOCROOT= export PATH=$PATH:/epoc32/tools export PATH=$PATH:/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 Date: Wed, 13 Jan 2010 11:14:23 +0100 Subject: Updates in docs Signed-off-by: axis --- 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 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 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 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 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 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, QListprofile.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, QListin_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 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, QListprofile.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, QListin_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 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 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 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 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=/lib/armlib export EPOCROOT= - export PATH=$PATH:/epoc32/tools + export PATH=$PATH:/epoc32/tools:/bin export PATH=$PATH:/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 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 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 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 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 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 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 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 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 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 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 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 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 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; } 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 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 +#include +#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 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 sources; QMap systeminclude; QMap library; @@ -76,19 +66,12 @@ protected: QMap makmakeCommands; QStringList overriddenMmpKeywords; - QStringList generatedFiles; - QStringList generatedDirs; QHash 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 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 -#include +#include #include #include #include -- cgit v0.12 From b8705c3dd756243503fd1e469f6ac4907222b321 Mon Sep 17 00:00:00 2001 From: Thomas Zander 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 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 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 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 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 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 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 #include -#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 + +#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 " << 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 " << 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::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 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 #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 " << 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 " << 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::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 makmakeCommands; QStringList overriddenMmpKeywords; - QHash 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 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 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 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 \ + /src/s60installs/selfsigned.cer \ + /src/s60installs/selfsigned.key - cp /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 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 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 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 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 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 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; } 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 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 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 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 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 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 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 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 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 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 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 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 - - -// We are hot - unistd.h should have turned on the specific APIs we requested - -//#include -#include -#include -#include -#include -#include -//#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef QT_NO_IPV6IFNAME -#include -#endif -#include - -#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 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 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 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 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"; $_=