From c4988eda033ce8b081e2301e80b344be20844e14 Mon Sep 17 00:00:00 2001 From: axis Date: Mon, 4 Oct 2010 10:46:14 +0200 Subject: Fixed library ordering when linking to qtmain. Done-with: Liang Qi Reviewed-by: Trust me --- mkspecs/features/symbian/symbian_building.prf | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf index 539609d..614fb65 100644 --- a/mkspecs/features/symbian/symbian_building.prf +++ b/mkspecs/features/symbian/symbian_building.prf @@ -187,9 +187,11 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@:.*") { linux-armcc: { QMAKE_LIBS += usrt2_2.lib dfpaeabi.dso dfprvct2_2.dso drtaeabi.dso scppnwdl.dso drtrvct2_2.dso h_t__uf.l\\(switch8.o\\) QMAKE_LIBS += -leexe.lib\\(uc_exe_.o\\) - contains(CONFIG, "qt"):contains(QT, "core") { #if linking with QtCore + contains(CONFIG, "qt"):contains(QT, "gui") { #if linking with QtCore + QMAKE_LIBS -= -lqtmain$${QT_LIBINFIX}.lib QMAKE_LIBS += -lqtmain$${QT_LIBINFIX}.lib } else { + QMAKE_LIBS -= -llibcrt0.lib QMAKE_LIBS += -llibcrt0.lib } } else :linux-gcce { @@ -197,9 +199,12 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@:.*") { QMAKE_LIBS += \ -l:eexe.lib \ -l:usrt2_2.lib - contains(CONFIG, "qt"):contains(QT, "core") { #if linking with QtCore + contains(CONFIG, "qt"):contains(QT, "gui") { #if linking with QtCore + QMAKE_LIBS -= -l:qtmain$${QT_LIBINFIX}.lib QMAKE_LIBS += -l:qtmain$${QT_LIBINFIX}.lib } else { + QMAKE_LIBS -= -l:libcrt0.lib + QMAKE_LIBS -= -l:libcrt0_gcce.lib QMAKE_LIBS += -l:libcrt0_gcce.lib } QMAKE_LIBS += \ -- cgit v0.12 From 185abbd1dcaf2d882f2225a874bafafb9815a8eb Mon Sep 17 00:00:00 2001 From: axis Date: Tue, 27 Jul 2010 11:12:46 +0200 Subject: Renamed the symbian/linux-* mkspecs to symbian-*. This was done for a number of reasons: - In order to get better consistency with the other mkspecs, which have the target system name followed by a hyphen and the compiler name. - There is no real reason why we should have specific mkspecs for compiling Symbian under Linux, when it is equally likely to work under other operating systems. RevBy: Thomas Zander --- configure | 2 +- doc/src/snippets/code/doc_src_installation.qdoc | 4 +- mkspecs/features/symbian/do_not_build_as_thumb.prf | 2 +- mkspecs/features/symbian/symbian_building.prf | 18 ++-- mkspecs/symbian-armcc/features/default_post.prf | 5 ++ mkspecs/symbian-armcc/qmake.conf | 62 ++++++++++++++ mkspecs/symbian-armcc/qplatformdefs.h | 42 ++++++++++ mkspecs/symbian-gcce/features/default_post.prf | 5 ++ mkspecs/symbian-gcce/qmake.conf | 95 ++++++++++++++++++++++ mkspecs/symbian-gcce/qplatformdefs.h | 43 ++++++++++ .../symbian/linux-armcc/features/default_post.prf | 5 -- mkspecs/symbian/linux-armcc/qmake.conf | 62 -------------- mkspecs/symbian/linux-armcc/qplatformdefs.h | 42 ---------- .../symbian/linux-gcce/features/default_post.prf | 5 -- mkspecs/symbian/linux-gcce/qmake.conf | 95 ---------------------- mkspecs/symbian/linux-gcce/qplatformdefs.h | 43 ---------- src/corelib/global/global.pri | 2 +- src/s60main/s60main.pro | 2 +- 18 files changed, 267 insertions(+), 267 deletions(-) create mode 100644 mkspecs/symbian-armcc/features/default_post.prf create mode 100644 mkspecs/symbian-armcc/qmake.conf create mode 100644 mkspecs/symbian-armcc/qplatformdefs.h create mode 100644 mkspecs/symbian-gcce/features/default_post.prf create mode 100644 mkspecs/symbian-gcce/qmake.conf create mode 100644 mkspecs/symbian-gcce/qplatformdefs.h delete mode 100644 mkspecs/symbian/linux-armcc/features/default_post.prf delete mode 100644 mkspecs/symbian/linux-armcc/qmake.conf delete mode 100644 mkspecs/symbian/linux-armcc/qplatformdefs.h delete mode 100644 mkspecs/symbian/linux-gcce/features/default_post.prf delete mode 100644 mkspecs/symbian/linux-gcce/qmake.conf delete mode 100644 mkspecs/symbian/linux-gcce/qplatformdefs.h diff --git a/configure b/configure index 5b8d46e..bea757a 100755 --- a/configure +++ b/configure @@ -784,7 +784,7 @@ L_FLAGS= RPATH_FLAGS= l_FLAGS= QCONFIG_FLAGS= -XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++" or "symbian/linux-gcce" +XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++" or "symbian-gcce" XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*) PLATFORM=$QMAKESPEC QT_CROSS_COMPILE=no diff --git a/doc/src/snippets/code/doc_src_installation.qdoc b/doc/src/snippets/code/doc_src_installation.qdoc index 0593567..432d08f 100644 --- a/doc/src/snippets/code/doc_src_installation.qdoc +++ b/doc/src/snippets/code/doc_src_installation.qdoc @@ -250,12 +250,12 @@ export PATH //! [38] cd /home/user/qt/%VERSION% -./configure -platform linux-g++ -xplatform symbian/linux-armcc +./configure -platform linux-g++ -xplatform symbian-armcc //! [38] //! [39] cd /home/user/qt/%VERSION% -./configure -platform linux-g++ -xplatform symbian/linux-gcce -no-webkit +./configure -platform linux-g++ -xplatform symbian-gcce -no-webkit //! [39] //! [40] diff --git a/mkspecs/features/symbian/do_not_build_as_thumb.prf b/mkspecs/features/symbian/do_not_build_as_thumb.prf index 60d9382..0f1fd9f 100644 --- a/mkspecs/features/symbian/do_not_build_as_thumb.prf +++ b/mkspecs/features/symbian/do_not_build_as_thumb.prf @@ -1,6 +1,6 @@ symbian-abld|symbian-sbsv2 { MMP_RULES += ALWAYS_BUILD_AS_ARM -} else:linux-armcc { +} else:symbian-armcc { QMAKE_CFLAGS -= --thumb QMAKE_CFLAGS += --arm QMAKE_CXXFLAGS -= --thumb diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf index 614fb65..9eb1825 100644 --- a/mkspecs/features/symbian/symbian_building.prf +++ b/mkspecs/features/symbian/symbian_building.prf @@ -1,7 +1,7 @@ -linux-armcc { +symbian-armcc { QMAKE_CFLAGS += $$QMAKE_CFLAGS.ARMCC QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS.ARMCC -} else:linux-gcce { +} else:symbian-gcce { QMAKE_CFLAGS += $$QMAKE_CFLAGS.GCCE QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS.GCCE } @@ -16,7 +16,7 @@ else:clean_TARGET = $$TARGET !contains(clean_TARGET, ".*[ -/].*"):eval(TMPVAR = \$\$QMAKE_$${clean_TARGET}_LFLAGS) !isEmpty(TMPVAR) { QMAKE_LFLAGS += $$TMPVAR -} else :linux-gcce { # lets provide a simple default. Without elf2e32 complains +} else :symbian-gcce { # lets provide a simple default. Without elf2e32 complains QMAKE_LFLAGS += -Ttext 0x80000 -Tdata 0x400000 } @@ -62,7 +62,7 @@ for(libToProcess, libsToProcess) { } else { qt_newLib = $$processSymbianLibrary($$qt_library) contains(qt_newLib, ".*\\.dso$")|contains(qt_newLib, ".*\\.lib$"):PRE_TARGETDEPS += $$qt_newLib - linux-gcce:qt_newLib = "-l:$$qt_newLib" + symbian-gcce:qt_newLib = "-l:$$qt_newLib" eval($$libToProcess += \$\$qt_newLib) } } @@ -142,10 +142,10 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { QMAKE_CLEAN += $${symbianObjdir}/$${baseTarget}.dso QMAKE_CLEAN += $${symbianObjdir}/$${baseTarget}.def - linux-armcc: { + symbian-armcc: { LIBS += usrt2_2.lib dfpaeabi.dso dfprvct2_2.dso drtaeabi.dso scppnwdl.dso drtrvct2_2.dso h_t__uf.l\\(switch8.o\\) LIBS += -ledllstub.lib -ledll.lib\\(uc_dll_.o\\) - } else :linux-gcce { + } else :symbian-gcce { LIBS += \ -l:edll.lib \ -l:usrt2_2.lib \ @@ -184,7 +184,7 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@:.*") { QMAKE_DISTCLEAN += $${symbianDestdir}/$${baseTarget}.exe QMAKE_CLEAN += $${symbianDestdir}/$${baseTarget} - linux-armcc: { + symbian-armcc: { QMAKE_LIBS += usrt2_2.lib dfpaeabi.dso dfprvct2_2.dso drtaeabi.dso scppnwdl.dso drtrvct2_2.dso h_t__uf.l\\(switch8.o\\) QMAKE_LIBS += -leexe.lib\\(uc_exe_.o\\) contains(CONFIG, "qt"):contains(QT, "gui") { #if linking with QtCore @@ -194,7 +194,7 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@:.*") { QMAKE_LIBS -= -llibcrt0.lib QMAKE_LIBS += -llibcrt0.lib } - } else :linux-gcce { + } else :symbian-gcce { # notice that we can't merge these as ordering of arguments is important. QMAKE_LIBS += \ -l:eexe.lib \ @@ -221,7 +221,7 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@:.*") { } # Symbian resource files -linux-armcc: { +symbian-armcc: { SYMBIAN_RVCT22INC=$$(RVCT22INC) !isEmpty(SYMBIAN_RVCT22INC):symbian_resources_INCLUDES = -I$${SYMBIAN_RVCT22INC} } diff --git a/mkspecs/symbian-armcc/features/default_post.prf b/mkspecs/symbian-armcc/features/default_post.prf new file mode 100644 index 0000000..7aa1f4d --- /dev/null +++ b/mkspecs/symbian-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-armcc/qmake.conf b/mkspecs/symbian-armcc/qmake.conf new file mode 100644 index 0000000..be6af39 --- /dev/null +++ b/mkspecs/symbian-armcc/qmake.conf @@ -0,0 +1,62 @@ +# +# qmake configuration for symbian-armcc +# + +include(../common/symbian/symbian-makefile.conf) + +include(../common/armcc.conf) + +QMAKE_RVCT_LINKSTYLE = 1 + +# notice that the middle part of the following set of vars matches the TARGET content of the libs + +#QMAKE_qtmain_CXXFLAGS = --arm +#QMAKE_QtCore_CXXFLAGS = +QMAKE_QtGui_LFLAGS = "--rw-base 0x800000" +#QMAKE_QtDBus_CXXFLAGS = +#QMAKE_QtDeclarative_CXXFLAGS = +#QMAKE_QtMultimedia_CXXFLAGS = +#QMAKE_QtNetwork_CXXFLAGS = +#QMAKE_QtOpenGL_CXXFLAGS = +#QMAKE_QtOpenVG_CXXFLAGS = +#QMAKE_phonon_CXXFLAGS = +#QMAKE_QtScript_CXXFLAGS = +#QMAKE_QtScriptTools_CXXFLAGS = +#QMAKE_QtSql_CXXFLAGS = +#QMAKE_QtSvg_CXXFLAGS = +#QMAKE_QtTest_CXXFLAGS = +#QMAKE_QtXmlPatterns_CXXFLAGS = +#QMAKE_QtXml_CXXFLAGS = +QMAKE_QtWebKit_CXXFLAGS = --arm +# Move RW-section base address to start from 0xE00000 instead of the toolchain default 0x400000. +QMAKE_QtWebKit_LFLAGS = --rw-base 0xE00000 + +QMAKE_CFLAGS += --dllimport_runtime --diag_suppress 186,611,654,1300 --thumb --fpu softvfp --cpu 5T --enum_is_int -Ono_known_library --fpmode ieee_no_fenv --no_vfe --apcs /inter +QMAKE_CXXFLAGS += $$QMAKE_CFLAGS +QMAKE_LFLAGS += --symver_soname --diag_suppress 6331,6780 --bpabi --reloc --datacompressor=off --split --dll --no_scanlib +QMAKE_LFLAGS_APP += --entry _E32Startup +QMAKE_LFLAGS_SHLIB += --entry _E32Dll +QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB + +DEFINES += EKA2 \ + __ARMCC__ \ + __ARMcc_2__ \ + __ARMCC_2_2__ + +QMAKE_LIBDIR += $${EPOCROOT}epoc32/release/armv5/lib +QMAKE_LIBDIR *= $$(RVCT22LIB) + +INCLUDEPATH = $${EPOCROOT}epoc32/include \ + $${EPOCROOT}epoc32/include/variant \ + $${EPOCROOT}epoc32/include/stdapis \ + $$INCLUDEPATH + +exists($${EPOCROOT}epoc32/include/rvct2_2) { + INCLUDEPATH += $${EPOCROOT}epoc32/include/rvct2_2 + QMAKE_CFLAGS += --preinclude rvct2_2.h + QMAKE_CXXFLAGS += --preinclude rvct2_2.h +} else { + INCLUDEPATH += $${EPOCROOT}epoc32/include/rvct + QMAKE_CFLAGS += --preinclude rvct.h + QMAKE_CXXFLAGS += --preinclude rvct.h +} diff --git a/mkspecs/symbian-armcc/qplatformdefs.h b/mkspecs/symbian-armcc/qplatformdefs.h new file mode 100644 index 0000000..6f084d3 --- /dev/null +++ b/mkspecs/symbian-armcc/qplatformdefs.h @@ -0,0 +1,42 @@ +/**************************************************************************** +** +** 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 mkspecs 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 "../common/symbian/qplatformdefs.h" diff --git a/mkspecs/symbian-gcce/features/default_post.prf b/mkspecs/symbian-gcce/features/default_post.prf new file mode 100644 index 0000000..7aa1f4d --- /dev/null +++ b/mkspecs/symbian-gcce/features/default_post.prf @@ -0,0 +1,5 @@ +load(default_post.prf) + +# It is important that this config be executed last, +# and qmake does them in reverse order. +CONFIG = symbian_building $$CONFIG diff --git a/mkspecs/symbian-gcce/qmake.conf b/mkspecs/symbian-gcce/qmake.conf new file mode 100644 index 0000000..f012217 --- /dev/null +++ b/mkspecs/symbian-gcce/qmake.conf @@ -0,0 +1,95 @@ +# +# qmake configuration for symbian-gcce +# + +include(../common/symbian/symbian-makefile.conf) + +include(../common/g++.conf) + +QMAKE_CC = arm-none-symbianelf-gcc +QMAKE_CXX = arm-none-symbianelf-g++ +QMAKE_LINK = arm-none-symbianelf-ld +QMAKE_LINK_SHLIB = arm-none-symbianelf-ld +QMAKE_LINK_C = arm-none-symbianelf-ld +QMAKE_LINK_C_SHLIB = arm-none-symbianelf-ld +QMAKE_AR = arm-none-symbianelf-ar cqs + +# gcce defaults to 'arm' instruction set. Lets use the better 'thumb' if possible +# notice that the middle part of the following set of vars matches the TARGET content of the libs + +QMAKE_qtmain_CXXFLAGS = -mthumb +QMAKE_QtCore_CXXFLAGS = -mthumb +QMAKE_QtGui_LFLAGS = -Ttext 0x8000 -Tdata 0xE00000 +QMAKE_QtDBus_CXXFLAGS = -mthumb +QMAKE_QtDeclarative_CXXFLAGS = -mthumb +QMAKE_QtMultimedia_CXXFLAGS = -mthumb +QMAKE_QtNetwork_CXXFLAGS = -mthumb +QMAKE_QtOpenGL_CXXFLAGS = -mthumb +QMAKE_QtOpenVG_CXXFLAGS = -mthumb +QMAKE_phonon_CXXFLAGS = -mthumb +QMAKE_QtScript_CXXFLAGS = -mthumb +QMAKE_QtScriptTools_CXXFLAGS = -mthumb +QMAKE_QtSql_CXXFLAGS = -mthumb +QMAKE_QtSvg_CXXFLAGS = -mthumb +QMAKE_QtTest_CXXFLAGS = -mthumb +QMAKE_QtXmlPatterns_CXXFLAGS = -mthumb +QMAKE_QtXml_CXXFLAGS = -mthumb +#TODO fails with; arm-none-symbianelf-ld: section .data loaded at [00e00000,00e05973] overlaps section .text loaded at [00008000,00fe748b] +QMAKE_QtWebKit_LFLAGS = -Ttext 0x8000 -Tdata 0xE00000 + +# never use -fPIC, gcce-linker doesn't like it. +# g++ conf above adds it if the host platform is 64 bit, so we remove it again +QMAKE_CFLAGS_SHLIB -= -fPIC +QMAKE_CFLAGS_STATIC_LIB -= -fPIC +QMAKE_CXXFLAGS_SHLIB -= -fPIC +QMAKE_CXXFLAGS_STATIC_LIB -= -fPIC + +QMAKE_LFLAGS_SONAME = +#QMAKE_LFLAGS_THREAD += +#QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined +QMAKE_LFLAGS_RPATH = --rpath= + +DEFINES += __GCCE__ \ + UNICODE \ + _STLP_NO_EXCEPTION_HEADER + +QMAKE_LFLAGS_APP += --entry=_E32Startup -u _E32Startup +QMAKE_LFLAGS_SHLIB += --default-symver --entry _E32Dll +QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB + +gcceExtraFlags = --include=${EPOCROOT}/epoc32/include/gcce/gcce.h -march=armv5t -mapcs -mthumb-interwork -nostdinc -c -msoft-float -T script +QMAKE_CFLAGS += $${gcceExtraFlags} +QMAKE_CXXFLAGS += $${gcceExtraFlags} -x c++ -fexceptions -fno-unit-at-a-time -fvisibility-inlines-hidden +#If we are not going to link to Qt or qtmain.lib, we need to include this at least once. +isEmpty(QT):contains(TEMPLATE, app) { + QMAKE_CXXFLAGS += --include=${EPOCROOT}/epoc32/include/stdapis/staticlibinit_gcce.h +} + +QMAKE_LFLAGS += --target1-abs \ + --no-undefined \ + --nostdlib + +QMAKE_LIBDIR += ${EPOCROOT}/epoc32/release/armv5/udeb/ + +# g++ knows the path to the gcc-shipped-libs, ld doesn't. So cache the full path in the generate Makefile +QMAKE_GCC_SEARCH_DIRS =$$system($$QMAKE_CXX -print-search-dirs) +for(line, QMAKE_GCC_SEARCH_DIRS) { + contains(line, "libraries:") { + foundIt="1" + } else { + contains(foundIt, "1") { + QMAKE_LFLAGS += $$replace(line, "[=:]", " -L") + } + } +} + +QMAKE_LIBDIR += $${EPOCROOT}/epoc32/release/armv5/lib + +INCLUDEPATH = ${EPOCROOT}/epoc32/include/ \ + $${EPOCROOT}/epoc32/include/variant \ + $${EPOCROOT}/epoc32/include/stdapis \ + $${EPOCROOT}/epoc32/include/gcce \ + ${EPOCROOT}/epoc32/include/stdapis/sys \ + ${EPOCROOT}/epoc32/include/stdapis/stlport \ + $$INCLUDEPATH + diff --git a/mkspecs/symbian-gcce/qplatformdefs.h b/mkspecs/symbian-gcce/qplatformdefs.h new file mode 100644 index 0000000..8549347 --- /dev/null +++ b/mkspecs/symbian-gcce/qplatformdefs.h @@ -0,0 +1,43 @@ +/**************************************************************************** +** +** 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 mkspecs 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 "../common/symbian/qplatformdefs.h" + 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 7aa1f4d..0000000 --- a/mkspecs/symbian/linux-armcc/features/default_post.prf +++ /dev/null @@ -1,5 +0,0 @@ -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/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf deleted file mode 100644 index f058421..0000000 --- a/mkspecs/symbian/linux-armcc/qmake.conf +++ /dev/null @@ -1,62 +0,0 @@ -# -# qmake configuration for symbian/linux-armcc -# - -include(../../common/symbian/symbian-makefile.conf) - -include(../../common/armcc.conf) - -QMAKE_RVCT_LINKSTYLE = 1 - -# notice that the middle part of the following set of vars matches the TARGET content of the libs - -#QMAKE_qtmain_CXXFLAGS = --arm -#QMAKE_QtCore_CXXFLAGS = -QMAKE_QtGui_LFLAGS = "--rw-base 0x800000" -#QMAKE_QtDBus_CXXFLAGS = -#QMAKE_QtDeclarative_CXXFLAGS = -#QMAKE_QtMultimedia_CXXFLAGS = -#QMAKE_QtNetwork_CXXFLAGS = -#QMAKE_QtOpenGL_CXXFLAGS = -#QMAKE_QtOpenVG_CXXFLAGS = -#QMAKE_phonon_CXXFLAGS = -#QMAKE_QtScript_CXXFLAGS = -#QMAKE_QtScriptTools_CXXFLAGS = -#QMAKE_QtSql_CXXFLAGS = -#QMAKE_QtSvg_CXXFLAGS = -#QMAKE_QtTest_CXXFLAGS = -#QMAKE_QtXmlPatterns_CXXFLAGS = -#QMAKE_QtXml_CXXFLAGS = -QMAKE_QtWebKit_CXXFLAGS = --arm -# Move RW-section base address to start from 0xE00000 instead of the toolchain default 0x400000. -QMAKE_QtWebKit_LFLAGS = --rw-base 0xE00000 - -QMAKE_CFLAGS += --dllimport_runtime --diag_suppress 186,611,654,1300 --thumb --fpu softvfp --cpu 5T --enum_is_int -Ono_known_library --fpmode ieee_no_fenv --no_vfe --apcs /inter -QMAKE_CXXFLAGS += $$QMAKE_CFLAGS -QMAKE_LFLAGS += --symver_soname --diag_suppress 6331,6780 --bpabi --reloc --datacompressor=off --split --dll --no_scanlib -QMAKE_LFLAGS_APP += --entry _E32Startup -QMAKE_LFLAGS_SHLIB += --entry _E32Dll -QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB - -DEFINES += EKA2 \ - __ARMCC__ \ - __ARMcc_2__ \ - __ARMCC_2_2__ - -QMAKE_LIBDIR += $${EPOCROOT}epoc32/release/armv5/lib -QMAKE_LIBDIR *= $$(RVCT22LIB) - -INCLUDEPATH = $${EPOCROOT}epoc32/include \ - $${EPOCROOT}epoc32/include/variant \ - $${EPOCROOT}epoc32/include/stdapis \ - $$INCLUDEPATH - -exists($${EPOCROOT}epoc32/include/rvct2_2) { - INCLUDEPATH += $${EPOCROOT}epoc32/include/rvct2_2 - QMAKE_CFLAGS += --preinclude rvct2_2.h - QMAKE_CXXFLAGS += --preinclude rvct2_2.h -} else { - INCLUDEPATH += $${EPOCROOT}epoc32/include/rvct - QMAKE_CFLAGS += --preinclude rvct.h - QMAKE_CXXFLAGS += --preinclude rvct.h -} diff --git a/mkspecs/symbian/linux-armcc/qplatformdefs.h b/mkspecs/symbian/linux-armcc/qplatformdefs.h deleted file mode 100644 index 3b7d023..0000000 --- a/mkspecs/symbian/linux-armcc/qplatformdefs.h +++ /dev/null @@ -1,42 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the mkspecs 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 "../../common/symbian/qplatformdefs.h" diff --git a/mkspecs/symbian/linux-gcce/features/default_post.prf b/mkspecs/symbian/linux-gcce/features/default_post.prf deleted file mode 100644 index 7aa1f4d..0000000 --- a/mkspecs/symbian/linux-gcce/features/default_post.prf +++ /dev/null @@ -1,5 +0,0 @@ -load(default_post.prf) - -# It is important that this config be executed last, -# and qmake does them in reverse order. -CONFIG = symbian_building $$CONFIG diff --git a/mkspecs/symbian/linux-gcce/qmake.conf b/mkspecs/symbian/linux-gcce/qmake.conf deleted file mode 100644 index faac2f1..0000000 --- a/mkspecs/symbian/linux-gcce/qmake.conf +++ /dev/null @@ -1,95 +0,0 @@ -# -# qmake configuration for symbian/linux-gcce -# - -include(../../common/symbian/symbian-makefile.conf) - -include(../../common/g++.conf) - -QMAKE_CC = arm-none-symbianelf-gcc -QMAKE_CXX = arm-none-symbianelf-g++ -QMAKE_LINK = arm-none-symbianelf-ld -QMAKE_LINK_SHLIB = arm-none-symbianelf-ld -QMAKE_LINK_C = arm-none-symbianelf-ld -QMAKE_LINK_C_SHLIB = arm-none-symbianelf-ld -QMAKE_AR = arm-none-symbianelf-ar cqs - -# gcce defaults to 'arm' instruction set. Lets use the better 'thumb' if possible -# notice that the middle part of the following set of vars matches the TARGET content of the libs - -QMAKE_qtmain_CXXFLAGS = -mthumb -QMAKE_QtCore_CXXFLAGS = -mthumb -QMAKE_QtGui_LFLAGS = -Ttext 0x8000 -Tdata 0xE00000 -QMAKE_QtDBus_CXXFLAGS = -mthumb -QMAKE_QtDeclarative_CXXFLAGS = -mthumb -QMAKE_QtMultimedia_CXXFLAGS = -mthumb -QMAKE_QtNetwork_CXXFLAGS = -mthumb -QMAKE_QtOpenGL_CXXFLAGS = -mthumb -QMAKE_QtOpenVG_CXXFLAGS = -mthumb -QMAKE_phonon_CXXFLAGS = -mthumb -QMAKE_QtScript_CXXFLAGS = -mthumb -QMAKE_QtScriptTools_CXXFLAGS = -mthumb -QMAKE_QtSql_CXXFLAGS = -mthumb -QMAKE_QtSvg_CXXFLAGS = -mthumb -QMAKE_QtTest_CXXFLAGS = -mthumb -QMAKE_QtXmlPatterns_CXXFLAGS = -mthumb -QMAKE_QtXml_CXXFLAGS = -mthumb -#TODO fails with; arm-none-symbianelf-ld: section .data loaded at [00e00000,00e05973] overlaps section .text loaded at [00008000,00fe748b] -QMAKE_QtWebKit_LFLAGS = -Ttext 0x8000 -Tdata 0xE00000 - -# never use -fPIC, gcce-linker doesn't like it. -# g++ conf above adds it if the host platform is 64 bit, so we remove it again -QMAKE_CFLAGS_SHLIB -= -fPIC -QMAKE_CFLAGS_STATIC_LIB -= -fPIC -QMAKE_CXXFLAGS_SHLIB -= -fPIC -QMAKE_CXXFLAGS_STATIC_LIB -= -fPIC - -QMAKE_LFLAGS_SONAME = -#QMAKE_LFLAGS_THREAD += -#QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined -QMAKE_LFLAGS_RPATH = --rpath= - -DEFINES += __GCCE__ \ - UNICODE \ - _STLP_NO_EXCEPTION_HEADER - -QMAKE_LFLAGS_APP += --entry=_E32Startup -u _E32Startup -QMAKE_LFLAGS_SHLIB += --default-symver --entry _E32Dll -QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB - -gcceExtraFlags = --include=${EPOCROOT}/epoc32/include/gcce/gcce.h -march=armv5t -mapcs -mthumb-interwork -nostdinc -c -msoft-float -T script -QMAKE_CFLAGS += $${gcceExtraFlags} -QMAKE_CXXFLAGS += $${gcceExtraFlags} -x c++ -fexceptions -fno-unit-at-a-time -fvisibility-inlines-hidden -#If we are not going to link to Qt or qtmain.lib, we need to include this at least once. -isEmpty(QT):contains(TEMPLATE, app) { - QMAKE_CXXFLAGS += --include=${EPOCROOT}/epoc32/include/stdapis/staticlibinit_gcce.h -} - -QMAKE_LFLAGS += --target1-abs \ - --no-undefined \ - --nostdlib - -QMAKE_LIBDIR += ${EPOCROOT}/epoc32/release/armv5/udeb/ - -# g++ knows the path to the gcc-shipped-libs, ld doesn't. So cache the full path in the generate Makefile -QMAKE_GCC_SEARCH_DIRS =$$system($$QMAKE_CXX -print-search-dirs) -for(line, QMAKE_GCC_SEARCH_DIRS) { - contains(line, "libraries:") { - foundIt="1" - } else { - contains(foundIt, "1") { - QMAKE_LFLAGS += $$replace(line, "[=:]", " -L") - } - } -} - -QMAKE_LIBDIR += $${EPOCROOT}/epoc32/release/armv5/lib - -INCLUDEPATH = ${EPOCROOT}/epoc32/include/ \ - $${EPOCROOT}/epoc32/include/variant \ - $${EPOCROOT}/epoc32/include/stdapis \ - $${EPOCROOT}/epoc32/include/gcce \ - ${EPOCROOT}/epoc32/include/stdapis/sys \ - ${EPOCROOT}/epoc32/include/stdapis/stlport \ - $$INCLUDEPATH - diff --git a/mkspecs/symbian/linux-gcce/qplatformdefs.h b/mkspecs/symbian/linux-gcce/qplatformdefs.h deleted file mode 100644 index fcbd9ea..0000000 --- a/mkspecs/symbian/linux-gcce/qplatformdefs.h +++ /dev/null @@ -1,43 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the mkspecs 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 "../../common/symbian/qplatformdefs.h" - diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri index 4800716..ad386a8 100644 --- a/src/corelib/global/global.pri +++ b/src/corelib/global/global.pri @@ -19,7 +19,7 @@ INCLUDEPATH += $$QT_BUILD_TREE/src/corelib/global # Only used on platforms with CONFIG += precompile_header PRECOMPILED_HEADER = global/qt_pch.h -linux*:!static:!linux-armcc:!linux-gcce { +linux*:!static:!symbian-armcc:!symbian-gcce { QMAKE_LFLAGS += -Wl,-e,qt_core_boilerplate prog=$$quote(if (/program interpreter: (.*)]/) { print $1; }) DEFINES += ELF_INTERPRETER=\\\"$$system(readelf -l /bin/ls | perl -n -e \'$$prog\')\\\" diff --git a/src/s60main/s60main.pro b/src/s60main/s60main.pro index a273897..c1d3672 100644 --- a/src/s60main/s60main.pro +++ b/src/s60main/s60main.pro @@ -29,7 +29,7 @@ symbian { # Having MMP_RULES_DONT_EXPORT_ALL_CLASS_IMPEDIMENTA will cause s60main.lib be unlinkable # against GCCE apps, so remove it MMP_RULES -= $$MMP_RULES_DONT_EXPORT_ALL_CLASS_IMPEDIMENTA - linux-armcc:QMAKE_CXXFLAGS *= --export_all_vtbl + symbian-armcc:QMAKE_CXXFLAGS *= --export_all_vtbl } else { error("$$_FILE_ is intended only for Symbian!") } -- cgit v0.12 From ac439ba6a12b2d5029783d73e1c879db7dc269a5 Mon Sep 17 00:00:00 2001 From: axis Date: Tue, 5 Oct 2010 13:36:49 +0200 Subject: Added detection of bat files to the qtPrepareTool function. Not all tools end with .exe. Some also end in .bat. RevBy: Oswald Buddenhagen --- mkspecs/features/qt_functions.prf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index afc708a..e5ef5a1 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -87,6 +87,12 @@ defineTest(qtPrepareTool) { else:$$1 = $$[QT_INSTALL_BINS]/$$2 } $$1 ~= s,[/\\\\],$$QMAKE_DIR_SEP, - contains(QMAKE_HOST.os, Windows):!contains($$1, .*\\.exe$):$$1 = $$eval($$1).exe + contains(QMAKE_HOST.os, Windows):!contains($$1, .*\\.(exe|bat)$) { + exists($$eval($$1).bat) { + $$1 = $$eval($$1).bat + } else { + $$1 = $$eval($$1).exe + } + } export($$1) } -- cgit v0.12 From 05f11382495187ee3c140503794fe263dc1612fd Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Thu, 7 Oct 2010 12:41:03 +0300 Subject: Removed the need for S60main.rsc resource file in Symbian. Qt upgrade was failing since the s60main.rsc is being locked by S60 application framework. And when installer detects that old version of Qt has already been installed it first tries to uninstall the old one and then install the new one. The uninstallion failed since the file was locked by the running Qt application. It should be noted that this patch fixes the Qt upgradibility only for Qt versions where patch is included. I.e. the versions before 4.7.2 need a different mechanism to be upgradable. This different mechanism is based on partial upgrade SIS packages as described in QT-4052. Task-number: QT-3471 Reviewed-by: Axis --- src/gui/kernel/qt_s60_p.h | 9 ++++++++- src/gui/kernel/qwidget_s60.cpp | 25 ++++++++++++++++++++++--- src/gui/s60framework/qs60mainapplication.cpp | 5 ----- src/gui/s60framework/qs60mainappui.cpp | 28 ++++++++++++++-------------- src/gui/s60framework/s60framework.pri | 18 ------------------ src/s60installs/s60installs.pro | 17 ++++------------- src/s60main/s60main.rsg | 3 --- 7 files changed, 48 insertions(+), 57 deletions(-) delete mode 100644 src/s60main/s60main.rsg diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h index 7fd2baa..93f64f6 100644 --- a/src/gui/kernel/qt_s60_p.h +++ b/src/gui/kernel/qt_s60_p.h @@ -142,6 +142,7 @@ public: int avkonComponentsSupportTransparency : 1; int menuBeingConstructed : 1; QApplication::QS60MainApplicationFactory s60ApplicationFactory; // typedef'ed pointer type + static CEikButtonGroupContainer *cba; enum ScanCodeState { Unpressed, @@ -162,6 +163,7 @@ public: static inline CAknTitlePane* titlePane(); static inline CAknContextPane* contextPane(); static inline CEikButtonGroupContainer* buttonGroupContainer(); + static inline void setButtonGroupContainer(CEikButtonGroupContainer* newCba); static void setStatusPaneAndButtonGroupVisibility(bool statusPaneVisible, bool buttonGroupVisible); #endif static void controlVisibilityChanged(CCoeControl *control, bool visible); @@ -383,7 +385,12 @@ inline CAknContextPane* QS60Data::contextPane() inline CEikButtonGroupContainer* QS60Data::buttonGroupContainer() { - return CEikonEnv::Static()->AppUiFactory()->Cba(); + return QS60Data::cba; +} + +inline void QS60Data::setButtonGroupContainer(CEikButtonGroupContainer *newCba) +{ + QS60Data::cba = newCba; } #endif // Q_WS_S60 diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 91e74b5..6e92850 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -69,6 +69,7 @@ extern bool qt_nograb(); QWidget *QWidgetPrivate::mouseGrabber = 0; QWidget *QWidgetPrivate::keyboardGrabber = 0; +CEikButtonGroupContainer *QS60Data::cba = 0; static bool isEqual(const QList& a, const QList& b) { @@ -498,9 +499,27 @@ void QWidgetPrivate::show_sys() // Create the status pane and CBA here CEikAppUi *ui = static_cast(S60->appUi()); MEikAppUiFactory *factory = CEikonEnv::Static()->AppUiFactory(); - TRAP_IGNORE(factory->ReadAppInfoResourceL(0, ui)); - if (S60->buttonGroupContainer()) - S60->buttonGroupContainer()->SetCommandSetL(R_AVKON_SOFTKEYS_EMPTY_WITH_IDS); + + QT_TRAP_THROWING( + factory->CreateResourceIndependentFurnitureL(ui); + + TRect boundingRect = static_cast(S60->appUi())->ClientRect(); + + CEikButtonGroupContainer *cba = CEikButtonGroupContainer::NewL(CEikButtonGroupContainer::ECba, + CEikButtonGroupContainer::EHorizontal,ui,R_AVKON_SOFTKEYS_EMPTY_WITH_IDS); + + CEikButtonGroupContainer *oldCba = CEikonEnv::Static()->AppUiFactory()->SwapButtonGroup(cba); + Q_ASSERT(!oldCba); + S60->setButtonGroupContainer(cba); + + CEikMenuBar *menuBar = new(ELeave) CEikMenuBar; + menuBar->ConstructL(ui, 0, R_AVKON_MENUPANE_EMPTY); + menuBar->SetMenuType(CEikMenuBar::EMenuOptions); + S60->appUi()->AddToStackL(menuBar,ECoeStackPriorityMenu,ECoeStackFlagRefusesFocus); + + CEikMenuBar *oldMenu = CEikonEnv::Static()->AppUiFactory()->SwapMenuBar(menuBar); + Q_ASSERT(!oldMenu); + ) if (S60->statusPane()) { // Use QDesktopWidget as the status pane observer to proxy for the AppUi. diff --git a/src/gui/s60framework/qs60mainapplication.cpp b/src/gui/s60framework/qs60mainapplication.cpp index 5d4c54e..74432af 100644 --- a/src/gui/s60framework/qs60mainapplication.cpp +++ b/src/gui/s60framework/qs60mainapplication.cpp @@ -58,7 +58,6 @@ CApaApplication *newS60Application() return new QS60MainApplication; } -_LIT(KQtWrapperResourceFile, "\\resource\\apps\\s60main" QT_LIBINFIX_UNICODE L".rsc"); /*! \class QS60MainApplication @@ -129,10 +128,6 @@ TUid QS60MainApplication::AppDllUid() const */ TFileName QS60MainApplication::ResourceFileName() const { - TFindFile finder(iCoeEnv->FsSession()); - TInt err = finder.FindByDir(KQtWrapperResourceFile, KNullDesC); - if (err == KErrNone) - return finder.File(); return KNullDesC(); } diff --git a/src/gui/s60framework/qs60mainappui.cpp b/src/gui/s60framework/qs60mainappui.cpp index ea9dbb3..92b3b55 100644 --- a/src/gui/s60framework/qs60mainappui.cpp +++ b/src/gui/s60framework/qs60mainappui.cpp @@ -50,16 +50,6 @@ #endif #include #include -#ifdef Q_WS_S60 -# if defined(QT_LIBINFIX_UNQUOTED) -// Two level macro needed for proper expansion of libinfix -# define QT_S60MAIN_RSG_2(x) -# define QT_S60MAIN_RSG(x) QT_S60MAIN_RSG_2(x) -# include QT_S60MAIN_RSG(QT_LIBINFIX_UNQUOTED) -# else -# include -# endif -#endif #include "qs60mainappui.h" #include @@ -125,8 +115,8 @@ void QS60MainAppUi::ConstructL() #ifdef Q_WS_S60 flags |= CAknAppUi::EAknEnableSkin; // After 5th Edition S60, native side supports animated wallpapers. - // However, there is no support for that feature on Qt side, so indicate to - // native UI framework that this application will not support background animations. + // However, there is no support for that feature on Qt side, so indicate to + // native UI framework that this application will not support background animations. if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0) flags |= KAknDisableAnimationBackground; #endif @@ -244,7 +234,7 @@ void QS60MainAppUi::DynInitMenuBarL(TInt /* resourceId */, CEikMenuBar * /* menu void QS60MainAppUi::DynInitMenuPaneL(TInt resourceId, CEikMenuPane *menuPane) { #ifdef Q_WS_S60 - if (resourceId == R_QT_WRAPPERAPP_MENU) { + if (resourceId == R_AVKON_MENUPANE_EMPTY) { if (menuPane->NumberOfItemsInPane() <= 1) QT_TRYCATCH_LEAVING(qt_symbian_show_toplevel(menuPane)); @@ -274,7 +264,17 @@ void QS60MainAppUi::RestoreMenuL(CCoeControl *menuWindow, TInt resourceId, TMenu DynInitMenuPaneL(resourceId, (CEikMenuPane*)menuWindow); else DynInitMenuBarL(resourceId, (CEikMenuBar*)menuWindow); - } else + } else if(resourceId == R_AVKON_MENUPANE_EMPTY) { + CEikMenuBarTitle *title = new(ELeave) CEikMenuBarTitle; + CleanupStack::PushL(title); + + title->iData.iMenuPaneResourceId = R_AVKON_MENUPANE_EMPTY; + title->iTitleFlags = 0; + + S60->menuBar()->TitleArray()->AddTitleL(title); + CleanupStack::Pop( title ); + } + else #endif { QS60MainAppUiBase::RestoreMenuL(menuWindow, resourceId, menuType); diff --git a/src/gui/s60framework/s60framework.pri b/src/gui/s60framework/s60framework.pri index edbacc0..19525b7 100644 --- a/src/gui/s60framework/s60framework.pri +++ b/src/gui/s60framework/s60framework.pri @@ -1,21 +1,3 @@ -contains(QT_CONFIG, s60) { -# This block serves the minimalistic resource file for S60 3.1 platforms. -# Note there is no way to ifdef S60 version in mmp file, that is why the resource -# file is always compiled for WINSCW - - minimalAppResource31 = \ - "SOURCEPATH s60framework" \ - "START RESOURCE s60main.rss" \ - "TARGET s60main$${QT_LIBINFIX}" \ - "HEADER" \ - "TARGETPATH /resource/apps" \ - "END" - - MMP_RULES += minimalAppResource31 - - SYMBIAN_RESOURCES += s60framework/s60main.rss -} - SOURCES += s60framework/qs60mainapplication.cpp \ s60framework/qs60mainappui.cpp \ s60framework/qs60maindocument.cpp diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index 1f622c0..c73ed06 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -11,10 +11,10 @@ symbian: { isEmpty(QT_LIBINFIX) { TARGET.UID3 = 0x2001E61C - + # Sqlite3 is expected to be already found on phone if infixed configuration is built. # It is also expected that devices newer than those based on S60 5.0 all have sqlite3.dll. - contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) { + contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) { BLD_INF_RULES.prj_exports += \ "sqlite3.sis /epoc32/data/qt/sis/sqlite3.sis" \ "sqlite3_selfsigned.sis /epoc32/data/qt/sis/sqlite3_selfsigned.sis" @@ -35,15 +35,6 @@ symbian: { } VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION} - symbian-abld|symbian-sbsv2 { - qtresources.sources = $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/s60main$${QT_LIBINFIX}.rsc - } else { - qtresources.sources = $$QMAKE_LIBDIR_QT/s60main$${QT_LIBINFIX}.rsc - DESTDIR = $$QMAKE_LIBDIR_QT - } - qtresources.path = c:$$APP_RESOURCE_DIR - DEPLOYMENT += qtresources - qtlibraries.sources = \ $$QMAKE_LIBDIR_QT/QtCore$${QT_LIBINFIX}.dll \ $$QMAKE_LIBDIR_QT/QtXml$${QT_LIBINFIX}.dll \ @@ -109,9 +100,9 @@ symbian: { qtlibraries.pkg_prerules = vendorinfo qtlibraries.pkg_prerules += "; Dependencies of Qt libraries" - + # It is expected that Symbian^3 and newer phones will have sufficiently new OpenC already installed - contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) { + contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) { qtlibraries.pkg_prerules += "(0x20013851), 1, 5, 1, {\"PIPS Installer\"}" contains(QT_CONFIG, openssl) | contains(QT_CONFIG, openssl-linked) { qtlibraries.pkg_prerules += "(0x200110CB), 1, 5, 1, {\"Open C LIBSSL Common\"}" diff --git a/src/s60main/s60main.rsg b/src/s60main/s60main.rsg deleted file mode 100644 index 8cdf3ba..0000000 --- a/src/s60main/s60main.rsg +++ /dev/null @@ -1,3 +0,0 @@ -#define R_DEFAULT_DOCUMENT_NAME 0x55567002 -#define R_QT_WRAPPERAPP_MENUBAR 0x55567004 -#define R_QT_WRAPPERAPP_MENU 0x55567005 -- cgit v0.12 From d76590abe0b9267ffeab4e64e536b38c484261a1 Mon Sep 17 00:00:00 2001 From: axis Date: Fri, 8 Oct 2010 14:58:44 +0200 Subject: Fixed some preprocessor parameters for Mac support. RevBy: Liang Qi --- mkspecs/features/symbian/symbian_building.prf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf index 9eb1825..cf8a37b 100644 --- a/mkspecs/features/symbian/symbian_building.prf +++ b/mkspecs/features/symbian/symbian_building.prf @@ -229,7 +229,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" +symbian_resources_INCLUDES += "-I$$symbian_resources_RCC_DIR" for(symbian_resource, SYMBIAN_RESOURCES) { symbian_resource = $$basename(symbian_resource) @@ -245,7 +245,7 @@ symbianresources.commands = cpp -nostdinc -undef \ $$symbian_resources_INCLUDES \ $$symbian_resources_DEFINES \ ${QMAKE_FILE_NAME} \ - -o $${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rpp \ + > $${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rpp \ && rcomp -u -m045,046,047 \ -s$${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}.rpp \ -o$${symbianDestdir}/${QMAKE_FILE_BASE}$${QT_LIBINFIX}.rsc \ @@ -265,7 +265,7 @@ contains(TEMPLATE, "app"):!contains(CONFIG, "no_icon") { $$symbian_resources_INCLUDES \ $$symbian_resources_DEFINES \ $${baseTarget}.rss \ - -o $${symbian_resources_RCC_DIR}/$${baseTarget}.rpp \ + > $${symbian_resources_RCC_DIR}/$${baseTarget}.rpp \ && rcomp -u -m045,046,047 \ -s$${symbian_resources_RCC_DIR}/$${baseTarget}.rpp \ -o$${symbianDestdir}/$${baseTarget}.rsc \ @@ -284,7 +284,7 @@ contains(TEMPLATE, "app"):!contains(CONFIG, "no_icon") { $$symbian_resources_INCLUDES \ $$symbian_resources_DEFINES \ $${baseTarget}_reg.rss \ - -o $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rpp \ + > $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rpp \ && rcomp -u -m045,046,047 \ -s$${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rpp \ -o$${symbianDestdir}/$${baseTarget}_reg.rsc \ -- cgit v0.12 From 34fa0516a6ac99be906371a4dd493c4c2abf4a44 Mon Sep 17 00:00:00 2001 From: axis Date: Fri, 8 Oct 2010 15:38:10 +0200 Subject: Fixed various quotation problems when porting to Windows. These should work for both Windows and UNIX platforms. RevBy: Thomas Zander --- mkspecs/common/symbian/symbian-makefile.conf | 4 ++-- mkspecs/features/symbian/symbian_building.prf | 17 +++++++++++------ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/mkspecs/common/symbian/symbian-makefile.conf b/mkspecs/common/symbian/symbian-makefile.conf index 364e91b..9dc3674 100644 --- a/mkspecs/common/symbian/symbian-makefile.conf +++ b/mkspecs/common/symbian/symbian-makefile.conf @@ -30,9 +30,9 @@ QMAKE_EXTENSION_STATICLIB = lib QMAKE_SYMBIAN_SHLIB = 1 is_using_gnupoc { - DEFINES *= __PRODUCT_INCLUDE__=\\<$${EPOCROOT}epoc32/include/variant/symbian_os.hrh\\> + DEFINES *= __PRODUCT_INCLUDE__=\"<$${EPOCROOT}epoc32/include/variant/symbian_os.hrh>\" } else { - DEFINES *= __PRODUCT_INCLUDE__=\\<$${EPOCROOT}epoc32/include/variant/Symbian_OS.hrh\\> + DEFINES *= __PRODUCT_INCLUDE__=\"<$${EPOCROOT}epoc32/include/variant/Symbian_OS.hrh>\" } DEFINES *= \ __SYMBIAN32__ \ diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf index cf8a37b..c4c068f 100644 --- a/mkspecs/features/symbian/symbian_building.prf +++ b/mkspecs/features/symbian/symbian_building.prf @@ -129,7 +129,7 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { --tmpdso=$${symbianObjdir}/$${baseTarget}.dso \ --dso=$${symbianDestdir}/$${baseTarget}.dso \ --defoutput=$$symbianObjdir/$${baseTarget}.def \ - --linkas=$${baseTarget}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll \ + --linkas=\"$${baseTarget}{$${hexVersion}}[$${intUid3}].dll\" \ --heap=$$epoc_heap_size \ --stack=$$TARGET.EPOCSTACKSIZE \ $$elf2e32_LIBPATH \ @@ -143,8 +143,13 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { QMAKE_CLEAN += $${symbianObjdir}/$${baseTarget}.def symbian-armcc: { - LIBS += usrt2_2.lib dfpaeabi.dso dfprvct2_2.dso drtaeabi.dso scppnwdl.dso drtrvct2_2.dso h_t__uf.l\\(switch8.o\\) - LIBS += -ledllstub.lib -ledll.lib\\(uc_dll_.o\\) + LIBS += usrt2_2.lib dfpaeabi.dso dfprvct2_2.dso drtaeabi.dso scppnwdl.dso drtrvct2_2.dso + # Quotation unfortunately is different on Windows and unix. + contains(QMAKE_HOST.os, Windows) { + LIBS += \"h_t__uf.l(switch8.o)\" edllstub.lib \"edll.lib(uc_dll_.o)\" + } else { + LIBS += h_t__uf.l\\(switch8.o\\) edllstub.lib edll.lib\\(uc_dll_.o\\) + } } else :symbian-gcce { LIBS += \ -l:edll.lib \ @@ -156,7 +161,7 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { -lgcc } - QMAKE_LFLAGS += --soname $${baseTarget}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll + QMAKE_LFLAGS += --soname \"$${baseTarget}{$${hexVersion}}[$${intUid3}].dll\" DEFINES += __DLL__ } @@ -171,7 +176,7 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@:.*") { --targettype=EXE \ --elfinput=$${symbianDestdir}/$${baseTarget}.sym \ --output=$${symbianDestdir}/$${baseTarget}.exe \ - --linkas=$${baseTarget}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe \ + --linkas=\"$${baseTarget}{$${hexVersion}}[$${intUid3}].exe\" \ --heap=$$epoc_heap_size \ --stack=$$TARGET.EPOCSTACKSIZE \ $$elf2e32_LIBPATH \ @@ -216,7 +221,7 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@:.*") { QMAKE_LFLAGS += --shared } - QMAKE_LFLAGS += --soname $${baseTarget}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe + QMAKE_LFLAGS += --soname \"$${baseTarget}{$${hexVersion}}[$${intUid3}].exe\" DEFINES += __EXE__ } -- cgit v0.12 From 36b53b54209244c881217a824fee73b15e471f97 Mon Sep 17 00:00:00 2001 From: axis Date: Fri, 8 Oct 2010 15:49:12 +0200 Subject: Changed various qmake constructs to support Windows. RevBy: Thomas Zander --- mkspecs/features/symbian/def_files.prf | 18 ++++++++++++++++-- mkspecs/features/symbian/symbian_building.prf | 19 ++++++++++++------- .../sqldrivers/sqlite_symbian/sqlite_symbian.pri | 10 ++++++++-- 3 files changed, 36 insertions(+), 11 deletions(-) diff --git a/mkspecs/features/symbian/def_files.prf b/mkspecs/features/symbian/def_files.prf index f243878..1c11925 100644 --- a/mkspecs/features/symbian/def_files.prf +++ b/mkspecs/features/symbian/def_files.prf @@ -7,6 +7,18 @@ CONFIG -= def_files_disabled equals(QMAKE_TARGET_PRODUCT, Qt4):clean_TARGET = $$replace(TARGET, "$${QT_LIBINFIX}$", "") else:clean_TARGET = $$TARGET +defineTest(qtTestIfDirExists) { + contains(QMAKE_HOST.os,Windows) { + dirToTest = $$1 + $$dirToTest ~= s,/,\\, + # Windows trick. Test for existence of nul, which every directory has. + retValue = $$system("if exist $$dirToTest\\nul echo true") + contains(retValue, true):return(true)|return(false) + } else { + system("test -d $$1"):return(true)|return(false) + } +} + symbian-abld|symbian-sbsv2 { # Firstly, if the MMP_RULES already contain a defBlock variable, don't generate another one # (this bit is slightly magic, because it depends upon everyone creating their DEFFILE statements @@ -52,9 +64,11 @@ symbian-abld|symbian-sbsv2 { } else { defFile = . } - system("$$QMAKE_CHK_DIR_EXISTS $$_PRO_FILE_PWD_/$$defFile") { + qtTestIfDirExists($$_PRO_FILE_PWD_/$$defFile) { !exists("$$_PRO_FILE_PWD_/$$defFile/eabi") { - system("$$QMAKE_MKDIR $$_PRO_FILE_PWD_/$$defFile/eabi") + dirToCreate = $$_PRO_FILE_PWD_/$$defFile/eabi + contains(QMAKE_HOST.os,Windows):dirToCreate ~= s,/,\\, + system("$$QMAKE_MKDIR $$dirToCreate") } elf2e32FileToAdd = $$_PRO_FILE_PWD_/$$defFile/eabi/$$basename(clean_TARGET)u.def } else { diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf index c4c068f..0ba0de5 100644 --- a/mkspecs/features/symbian/symbian_building.prf +++ b/mkspecs/features/symbian/symbian_building.prf @@ -89,12 +89,13 @@ count(splitVersion, 0) { 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 = $$system("perl -e \"printf (\\\"%02x\\\", $$member(splitVersion, 0))\"") + hexPart2 = $$system("perl -e \"printf (\\\"%02x\\\", $$member(splitVersion, 1))\"")" + hexPart2 = $$hexPart2$$system("perl -e \"printf (\\\"%02x\\\", $$member(splitVersion, 2))\"")" + decVersion = $$system("perl -e \"printf (\\\"%1d\\\", 0x$$hexVersion)\""). hexVersion = $$hexVersion$$hexPart2 - decVersion = $$decVersion$$system("sh -c 'printf %d 0x$$hexPart2'") + decVersion = $$decVersion$$system("perl -e \"printf (\\\"%d\\\", 0x$$hexPart2)\"") + !contains(hexVersion, "[0-9a-f]{8}"):hexVersion = "00$${hexVersion}" } else { # app code may have different numbering... hexVersion = $$VERSION @@ -117,7 +118,9 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { contains(CONFIG, plugin):QMAKE_ELF2E32_FLAGS += --definput=plugin_commonu.def !isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$escape_expand(\\n\\t)$$QMAKE_POST_LINK - QMAKE_POST_LINK = $$QMAKE_MOVE $$symbianDestdir/$${baseTarget}.dll $$symbianDestdir/$${baseTarget}.sym \ + moveCmd = $$QMAKE_MOVE $$symbianDestdir/$${baseTarget}.dll $$symbianDestdir/$${baseTarget}.sym + contains(QMAKE_HOST.os,Windows):moveCmd = $$replace(moveCmd, /, \\) + QMAKE_POST_LINK = $$moveCmd \ && $$QMAKE_ELF2E32_WRAPPER --version=$$decVersion \ --sid=$$TARGET.SID \ --uid1=0x10000079 \ @@ -167,7 +170,9 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@:.*") { !isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$escape_expand(\\n\\t)$$QMAKE_POST_LINK - QMAKE_POST_LINK = $$QMAKE_MOVE $$symbianDestdir/$${baseTarget} $$symbianDestdir/$${baseTarget}.sym \ + moveCmd = $$QMAKE_MOVE $$symbianDestdir/$${baseTarget} $$symbianDestdir/$${baseTarget}.sym + contains(QMAKE_HOST.os,Windows):moveCmd = $$replace(moveCmd, /, \\) + QMAKE_POST_LINK = $$moveCmd \ && $$QMAKE_ELF2E32_WRAPPER --version $$decVersion \ --sid=$$TARGET.SID \ --uid1=0x1000007a \ diff --git a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri index 494c64c..ebeccc9 100644 --- a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri +++ b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri @@ -1,6 +1,12 @@ # We just want to include the sqlite3 binaries for Symbian for platforms that do not have them. !symbian-abld:!symbian-sbsv2 { !symbian_no_export_sqlite:!exists($${EPOCROOT}epoc32/release/armv5/lib/sqlite3.dso) { + contains(QMAKE_HOST.os,Windows) { + # Trick on Windows to do a touch on the file, since copy keeps the timestamp. + copyWithTouch = copy /y /b NUL+ + } else { + copyWithTouch = "$$QMAKE_COPY " + } symbian_sqlite3_zip_file = $$PWD/SQLite3_v9.2.zip # The QMAKE_COPY section is to update timestamp on the file. @@ -10,7 +16,7 @@ symbian_sqlite3_header.CONFIG = combine no_link symbian_sqlite3_header.dependency_type = TYPE_C symbian_sqlite3_header.commands = $$QMAKE_UNZIP -j ${QMAKE_FILE_NAME} epoc32/include/stdapis/${QMAKE_FILE_OUT_BASE}.h \ - && $$QMAKE_COPY ${QMAKE_FILE_OUT_BASE}.h ${QMAKE_FILE_OUT}.tmp \ + && $${copyWithTouch}${QMAKE_FILE_OUT_BASE}.h ${QMAKE_FILE_OUT}.tmp \ && $$QMAKE_DEL_FILE ${QMAKE_FILE_OUT_BASE}.h \ && $$QMAKE_MOVE ${QMAKE_FILE_OUT}.tmp ${QMAKE_FILE_OUT} silent:symbian_sqlite3_header.commands = @echo unzipping $@ && $$symbian_sqlite3_header.commands @@ -22,7 +28,7 @@ !isEmpty(OBJECTS_DIR):symbian_sqlite3_dso.output = $$OBJECTS_DIR/$$symbian_sqlite3_dso.output symbian_sqlite3_dso.CONFIG = combine no_link target_predeps symbian_sqlite3_dso.commands = $$QMAKE_UNZIP -j ${QMAKE_FILE_NAME} epoc32/release/armv5/lib/${QMAKE_FILE_OUT_BASE}.dso \ - && $$QMAKE_COPY ${QMAKE_FILE_OUT_BASE}.dso ${QMAKE_FILE_OUT}.tmp \ + && $${copyWithTouch}${QMAKE_FILE_OUT_BASE}.dso ${QMAKE_FILE_OUT}.tmp \ && $$QMAKE_DEL_FILE ${QMAKE_FILE_OUT_BASE}.dso \ && $$QMAKE_MOVE ${QMAKE_FILE_OUT}.tmp ${QMAKE_FILE_OUT} silent:symbian_sqlite3_dso.commands = @echo unzipping $@ && $$symbian_sqlite3_dso.commands -- cgit v0.12 From c5a7273afc28e38ddd80958c1292d45dff580294 Mon Sep 17 00:00:00 2001 From: axis Date: Fri, 8 Oct 2010 15:57:30 +0200 Subject: Added wrapper for the elf2e32_qtwrapper script. This is needed to call the script on Windows. RevBy: Trust me --- bin/elf2e32_qtwrapper | 148 +--------------------------------------------- bin/elf2e32_qtwrapper.bat | 3 + bin/elf2e32_qtwrapper.pl | 145 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 151 insertions(+), 145 deletions(-) create mode 100644 bin/elf2e32_qtwrapper.bat create mode 100644 bin/elf2e32_qtwrapper.pl diff --git a/bin/elf2e32_qtwrapper b/bin/elf2e32_qtwrapper index 694d54a..a3a4065 100755 --- a/bin/elf2e32_qtwrapper +++ b/bin/elf2e32_qtwrapper @@ -1,145 +1,3 @@ -#!/usr/bin/perl -w - -# A script to get around some shortcomings in elf2e32, namely: -# - Returning 0 even when there are errors. -# - Excluding symbols from the dso file even when they are present in the ELF file. -# - Including symbols in the the dso file even when they are not present in the ELF file. -# - Overwriting the old dso file even when there are no changes (increases build time). - -use File::Copy; - -my @args = (); -my @definput; -my @defoutput; -my @dso; -my @tmpdso; -foreach (@ARGV) { - if (/^--definput/o) { - @definput = split('=', $_); - } elsif (/^--defoutput/o) { - @defoutput = split('=', $_); - } elsif (/^--dso/o) { - @dso = split('=', $_); - } elsif (/^--tmpdso/o) { - @tmpdso = split('=', $_); - $tmpdso[0] = "--dso"; - } else { - push(@args, $_); - } -} - -@definput = () if (!@definput || ! -e $definput[1]); - -if (@dso && !@tmpdso || !@dso && @tmpdso) { - print("--dso and --tmpdso must be used together.\n"); - exit 1; -} - -my $buildingLibrary = (@defoutput && @dso) ? 1 : 0; - -my $fixupFile = ""; -my $runCount = 0; -my $returnCode = 0; - -while (1) { - if (++$runCount > 2) { - print("Internal error in $0, link succeeded, but exports may be wrong.\n"); - last; - } - - my $elf2e32Pipe; - my $elf2e32Cmd = "elf2e32 @args" - . " " . join("=", @definput) - . " " . join("=", @defoutput) - . " " . join("=", @tmpdso); - open($elf2e32Pipe, "$elf2e32Cmd 2>&1 |") or die ("Could not run elf2e32"); - - my %fixupSymbols; - my $foundBrokenSymbols = 0; - my $errors = 0; - while (<$elf2e32Pipe>) { - print; - if (/Error:/io) { - $errors = 1; - } elsif (/symbol ([a-z0-9_]+) absent in the DEF file, but present in the ELF file/io) { - $fixupSymbols{$1} = 1; - $foundBrokenSymbols = 1; - } elsif (/[0-9]+ Frozen Export\(s\) missing from the ELF file/io) { - $foundBrokenSymbols = 1; - } - } - close($elf2e32Pipe); - - if ($errors) { - $returnCode = 1; - last; - } - - if ($buildingLibrary) { - my $tmpDefFile; - my $defFile; - open($defFile, "< $defoutput[1]") or die("Could not open $defoutput[1]"); - open($tmpDefFile, "> $defoutput[1].tmp") or die("Could not open $defoutput[1].tmp"); - $fixupFile = "$defoutput[1].tmp"; - while (<$defFile>) { - s/\r//; - s/\n//; - next if (/; NEW:/); - if (/([a-z0-9_]+) @/i) { - if (exists($fixupSymbols{$1})) { - s/ ABSENT//; - } elsif (s/; MISSING://) { - s/$/ ABSENT/; - } - } - print($tmpDefFile "$_\n"); - } - close($defFile); - close($tmpDefFile); - - $definput[1] = "$defoutput[1].tmp"; - - if (!$foundBrokenSymbols || $errors) { - last; - } - - print("Rerunning elf2e32 due to DEF file / ELF file mismatch\n"); - } else { - last; - } -}; - -if ($fixupFile) { - unlink($defoutput[1]); - move($fixupFile, $defoutput[1]); -} - -exit $returnCode if ($returnCode != 0); - -if ($buildingLibrary) { - my $differenceFound = 0; - - if (-e $dso[1]) { - my $dsoFile; - my $tmpdsoFile; - my $dsoBuf; - my $tmpdsoBuf; - open($dsoFile, "< $dso[1]") or die("Could not open $dso[1]"); - open($tmpdsoFile, "< $tmpdso[1]") or die("Could not open $tmpdso[1]"); - binmode($dsoFile); - binmode($tmpdsoFile); - while(read($dsoFile, $dsoBuf, 4096) && read($tmpdsoFile, $tmpdsoBuf, 4096)) { - if ($dsoBuf ne $tmpdsoBuf) { - $differenceFound = 1; - } - } - close($tmpdsoFile); - close($dsoFile); - } else { - $differenceFound = 1; - } - - if ($differenceFound) { - copy($tmpdso[1], $dso[1]); - } -} +#!/bin/sh +scriptpath=`dirname $0` +perl $scriptpath/elf2e32_qtwrapper.pl "$@" diff --git a/bin/elf2e32_qtwrapper.bat b/bin/elf2e32_qtwrapper.bat new file mode 100644 index 0000000..52910df --- /dev/null +++ b/bin/elf2e32_qtwrapper.bat @@ -0,0 +1,3 @@ +@echo off +set scriptpath=%~dp0 +perl %scriptpath%elf2e32_qtwrapper.pl %* diff --git a/bin/elf2e32_qtwrapper.pl b/bin/elf2e32_qtwrapper.pl new file mode 100644 index 0000000..694d54a --- /dev/null +++ b/bin/elf2e32_qtwrapper.pl @@ -0,0 +1,145 @@ +#!/usr/bin/perl -w + +# A script to get around some shortcomings in elf2e32, namely: +# - Returning 0 even when there are errors. +# - Excluding symbols from the dso file even when they are present in the ELF file. +# - Including symbols in the the dso file even when they are not present in the ELF file. +# - Overwriting the old dso file even when there are no changes (increases build time). + +use File::Copy; + +my @args = (); +my @definput; +my @defoutput; +my @dso; +my @tmpdso; +foreach (@ARGV) { + if (/^--definput/o) { + @definput = split('=', $_); + } elsif (/^--defoutput/o) { + @defoutput = split('=', $_); + } elsif (/^--dso/o) { + @dso = split('=', $_); + } elsif (/^--tmpdso/o) { + @tmpdso = split('=', $_); + $tmpdso[0] = "--dso"; + } else { + push(@args, $_); + } +} + +@definput = () if (!@definput || ! -e $definput[1]); + +if (@dso && !@tmpdso || !@dso && @tmpdso) { + print("--dso and --tmpdso must be used together.\n"); + exit 1; +} + +my $buildingLibrary = (@defoutput && @dso) ? 1 : 0; + +my $fixupFile = ""; +my $runCount = 0; +my $returnCode = 0; + +while (1) { + if (++$runCount > 2) { + print("Internal error in $0, link succeeded, but exports may be wrong.\n"); + last; + } + + my $elf2e32Pipe; + my $elf2e32Cmd = "elf2e32 @args" + . " " . join("=", @definput) + . " " . join("=", @defoutput) + . " " . join("=", @tmpdso); + open($elf2e32Pipe, "$elf2e32Cmd 2>&1 |") or die ("Could not run elf2e32"); + + my %fixupSymbols; + my $foundBrokenSymbols = 0; + my $errors = 0; + while (<$elf2e32Pipe>) { + print; + if (/Error:/io) { + $errors = 1; + } elsif (/symbol ([a-z0-9_]+) absent in the DEF file, but present in the ELF file/io) { + $fixupSymbols{$1} = 1; + $foundBrokenSymbols = 1; + } elsif (/[0-9]+ Frozen Export\(s\) missing from the ELF file/io) { + $foundBrokenSymbols = 1; + } + } + close($elf2e32Pipe); + + if ($errors) { + $returnCode = 1; + last; + } + + if ($buildingLibrary) { + my $tmpDefFile; + my $defFile; + open($defFile, "< $defoutput[1]") or die("Could not open $defoutput[1]"); + open($tmpDefFile, "> $defoutput[1].tmp") or die("Could not open $defoutput[1].tmp"); + $fixupFile = "$defoutput[1].tmp"; + while (<$defFile>) { + s/\r//; + s/\n//; + next if (/; NEW:/); + if (/([a-z0-9_]+) @/i) { + if (exists($fixupSymbols{$1})) { + s/ ABSENT//; + } elsif (s/; MISSING://) { + s/$/ ABSENT/; + } + } + print($tmpDefFile "$_\n"); + } + close($defFile); + close($tmpDefFile); + + $definput[1] = "$defoutput[1].tmp"; + + if (!$foundBrokenSymbols || $errors) { + last; + } + + print("Rerunning elf2e32 due to DEF file / ELF file mismatch\n"); + } else { + last; + } +}; + +if ($fixupFile) { + unlink($defoutput[1]); + move($fixupFile, $defoutput[1]); +} + +exit $returnCode if ($returnCode != 0); + +if ($buildingLibrary) { + my $differenceFound = 0; + + if (-e $dso[1]) { + my $dsoFile; + my $tmpdsoFile; + my $dsoBuf; + my $tmpdsoBuf; + open($dsoFile, "< $dso[1]") or die("Could not open $dso[1]"); + open($tmpdsoFile, "< $tmpdso[1]") or die("Could not open $tmpdso[1]"); + binmode($dsoFile); + binmode($tmpdsoFile); + while(read($dsoFile, $dsoBuf, 4096) && read($tmpdsoFile, $tmpdsoBuf, 4096)) { + if ($dsoBuf ne $tmpdsoBuf) { + $differenceFound = 1; + } + } + close($tmpdsoFile); + close($dsoFile); + } else { + $differenceFound = 1; + } + + if ($differenceFound) { + copy($tmpdso[1], $dso[1]); + } +} -- cgit v0.12 From 7cfc17153ba7e2b9fa5647ecb673e5446eedf19d Mon Sep 17 00:00:00 2001 From: axis Date: Fri, 8 Oct 2010 16:08:09 +0200 Subject: Got rid of some "duplicate library" warnings. RevBy: Trust me --- mkspecs/features/symbian/symbian_building.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf index 0ba0de5..a2791a1 100644 --- a/mkspecs/features/symbian/symbian_building.prf +++ b/mkspecs/features/symbian/symbian_building.prf @@ -63,7 +63,7 @@ for(libToProcess, libsToProcess) { qt_newLib = $$processSymbianLibrary($$qt_library) contains(qt_newLib, ".*\\.dso$")|contains(qt_newLib, ".*\\.lib$"):PRE_TARGETDEPS += $$qt_newLib symbian-gcce:qt_newLib = "-l:$$qt_newLib" - eval($$libToProcess += \$\$qt_newLib) + eval($$libToProcess *= \$\$qt_newLib) } } } -- cgit v0.12 From c8fca7cac03ab381bb5a69da67c1f477dc0a6bf8 Mon Sep 17 00:00:00 2001 From: axis Date: Fri, 8 Oct 2010 16:10:43 +0200 Subject: Fixed library and header definitions for Symbian builds on Linux. RevBy: Gareth Stockwell ...who was right to point out that the is_using_gnupoc scheme is terrible, so now we have a task for getting rid of that, QTBUG-14361. --- src/multimedia/audio/audio.pri | 4 ++-- src/plugins/phonon/mmf/mmf.pro | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/multimedia/audio/audio.pri b/src/multimedia/audio/audio.pri index ae28a26..f03d0ac 100644 --- a/src/multimedia/audio/audio.pri +++ b/src/multimedia/audio/audio.pri @@ -42,8 +42,8 @@ mac { wince*:LIBS += -lcoredll } else:symbian { - INCLUDEPATH += /epoc32/include/mmf/common - INCLUDEPATH += /epoc32/include/mmf/server + INCLUDEPATH += $${EPOCROOT}/epoc32/include/mmf/common + INCLUDEPATH += $${EPOCROOT}/epoc32/include/mmf/server HEADERS += $$PWD/qaudio_symbian_p.h \ $$PWD/qaudiodeviceinfo_symbian_p.h \ diff --git a/src/plugins/phonon/mmf/mmf.pro b/src/plugins/phonon/mmf/mmf.pro index 7a6fdf8..a8a6c55 100644 --- a/src/plugins/phonon/mmf/mmf.pro +++ b/src/plugins/phonon/mmf/mmf.pro @@ -18,7 +18,7 @@ symbian { # This is necessary because both epoc32/include and Phonon contain videoplayer.h. # By making /epoc32/include the first SYSTEMINCLUDE, we ensure that # '#include ' picks up the Symbian header, as intended. - PREPEND_INCLUDEPATH = /epoc32/include + PREPEND_INCLUDEPATH = $$EPOCROOT/epoc32/include PREPEND_INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty @@ -113,7 +113,11 @@ symbian { LIBS += -lmediaclientaudiostream # For CMdaAudioOutputStream # These are for effects. - LIBS += -lAudioEqualizerEffect -lBassBoostEffect -lDistanceAttenuationEffect -lDopplerBase -lEffectBase -lEnvironmentalReverbEffect -lListenerDopplerEffect -lListenerLocationEffect -lListenerOrientationEffect -lLocationBase -lLoudnessEffect -lOrientationBase -lSourceDopplerEffect -lSourceLocationEffect -lSourceOrientationEffect -lStereoWideningEffect + is_using_gnupoc { + LIBS += -laudioequalizereffect -lbassboosteffect -ldistanceattenuationeffect -ldopplerbase -leffectbase -lenvironmentalreverbeffect -llistenerdopplereffect -llistenerlocationeffect -llistenerorientationeffect -llocationbase -lloudnesseffect -lorientationbase -lsourcedopplereffect -lsourcelocationeffect -lsourceorientationeffect -lstereowideningeffect + } else { + LIBS += -lAudioEqualizerEffect -lBassBoostEffect -lDistanceAttenuationEffect -lDopplerBase -lEffectBase -lEnvironmentalReverbEffect -lListenerDopplerEffect -lListenerLocationEffect -lListenerOrientationEffect -lLocationBase -lLoudnessEffect -lOrientationBase -lSourceDopplerEffect -lSourceLocationEffect -lSourceOrientationEffect -lStereoWideningEffect + } # This is needed for having the .qtplugin file properly created on Symbian. QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/phonon_backend -- cgit v0.12 From f12bb81ff7dc88861b68fa5f218c1e5d0767257b Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Tue, 26 Oct 2010 13:44:07 +0200 Subject: Support to build Qt for Symbian on Mac OS X with gcce compiler. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RevBy: axis RevBy: Morten Johan Sørvig --- configure | 158 +++++++++++++++++++++---------------------- src/corelib/global/qglobal.h | 2 +- 2 files changed, 77 insertions(+), 83 deletions(-) diff --git a/configure b/configure index bea757a..a083ff8 100755 --- a/configure +++ b/configure @@ -786,6 +786,8 @@ l_FLAGS= QCONFIG_FLAGS= XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++" or "symbian-gcce" XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*) +XPLATFORM_SYMBIAN=no # Whether target platform is SYMBIAN (*symbian*) +XPLATFORM_SYMBIAN_SBSV2=no # Whether target platform is SYMBIAN_SBSV2 (symbian-sbsv2) PLATFORM=$QMAKESPEC QT_CROSS_COMPILE=no OPT_CONFIRM_LICENSE=no @@ -1478,6 +1480,8 @@ while [ "$#" -gt 0 ]; do xplatform) XPLATFORM="$VAL" case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac + case "$XPLATFORM" in *symbian*) XPLATFORM_SYMBIAN=yes;; esac + case "$XPLATFORM" in symbian-sbsv2) XPLATFORM_SYMBIAN_SBSV2=yes;; esac ;; debug-and-release) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then @@ -2750,6 +2754,8 @@ fi [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM" case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac +case "$XPLATFORM" in *symbian*) XPLATFORM_SYMBIAN=yes;; esac +case "$XPLATFORM" in symbian-sbsv2) XPLATFORM_SYMBIAN_SBSV2=yes;; esac if [ -d "$PLATFORM" ]; then QMAKESPEC="$PLATFORM" @@ -3028,7 +3034,7 @@ if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then esac elif [ "$XPLATFORM_MINGW" = "yes" ]; then [ -z "$CFG_ARCH" ] && CFG_ARCH="windows" -elif echo "$XPLATFORM" | grep symbian > /dev/null; then +elif [ "$XPLATFORM_SYMBIAN" = "yes" ]; then CFG_ARCH=symbian elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then CFG_ARCH=$CFG_HOST_ARCH @@ -3166,7 +3172,7 @@ QMAKE_CONF_COMPILER=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_CXX[^_A-Z0-9]" | TEST_COMPILER="$CXX" [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER -if [ "$XPLATFORM" != "symbian-sbsv2" ]; then +if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then #for Symbian we don't need this checking if [ -z "$TEST_COMPILER" ]; then echo "ERROR: Cannot set the compiler for the configuration tests" @@ -3334,18 +3340,17 @@ if [ -z "$QT_INSTALL_PREFIX" ]; then QT_INSTALL_PREFIX="${QT_INSTALL_PREFIX}-${CFG_ARCH}" fi elif [ -d "$EPOCROOT" ]; then - case "$XPLATFORM" in *symbian*) + if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then QT_INSTALL_PREFIX="$EPOCROOT/epoc32/" QT_INSTALL_LIBS="$EPOCROOT/epoc32/release/armv5/lib/" - ;; - esac + fi else QT_INSTALL_PREFIX="/usr/local/Trolltech/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Trolltech/Qt-$QT_VERSION fi fi QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"` -if echo $XPLATFORM | grep symbian > /dev/null; then +if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then [ -z "$QT_HOST_PREFIX" ] && QT_HOST_PREFIX="$QT_INSTALL_PREFIX" [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS= [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS= @@ -4204,7 +4209,7 @@ if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_X11" = "yes" ]; then EOF fi -case "$XPLATFORM" in *symbian*) +if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then cat << EOF Qt for Symbian only: @@ -4216,9 +4221,7 @@ Qt for Symbian only: -no-usedeffiles .... Disable the usage of DEF files. * -usedeffiles ....... Enable the usage of DEF files. EOF -;; -esac - +fi [ "x$ERROR" = "xyes" ] && exit 1 exit 0 fi # Help @@ -4230,10 +4233,10 @@ fi # Help if [ "$PLATFORM_QWS" = "yes" ]; then Platform="Qt for Embedded Linux" +elif [ "$XPLATFORM_SYMBIAN" = "yes" ]; then + Platform="Qt for Symbian" elif [ "$PLATFORM_MAC" = "yes" ]; then Platform="Qt for Mac OS X" -elif echo "$XPLATFORM" | grep "symbian" > /dev/null ; then - Platform="Qt for Symbian" elif [ "$XPLATFORM_MINGW" = "yes" ]; then Platform="Qt for Windows" elif [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ]; then @@ -4618,7 +4621,7 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ]; #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured rm -rf mkspecs/default - if echo "$XPLATFORM" | grep "symbian-sbsv2" > /dev/null ; then + if [ "$XPLATFORM_SYMBIAN_SBSV2" = "yes" ]; then #Link is not supported for Symbian build system cp -a mkspecs/`echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default else @@ -4870,33 +4873,12 @@ if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then fi fi -# detect zlib -if [ "$CFG_ZLIB" = "no" ]; then - # Note: Qt no longer support builds without zlib - # So we force a "no" to be "auto" here. - # If you REALLY really need no zlib support, you can still disable - # it by doing the following: - # add "no-zlib" to mkspecs/qconfig.pri - # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h) - # - # There's no guarantee that Qt will build under those conditions - - CFG_ZLIB=auto - ZLIB_FORCED=yes -fi -if [ "$CFG_ZLIB" = "auto" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/zlib "zlib" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then - CFG_ZLIB=system - else - CFG_ZLIB=yes - fi -fi - [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista" -case "$XPLATFORM" in *symbian*) +if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then QMakeVar set styles "windows s60" #overwrite previous default CFG_LIBFREETYPE=no + CFG_ZLIB=yes if [ "$CFG_LARGEFILE" = auto ]; then CFG_LARGEFILE=no @@ -4911,7 +4893,7 @@ case "$XPLATFORM" in *symbian*) exit 1 fi - if ! echo $XPLATFORM | grep symbian-sbsv2 > /dev/null; then + if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then # Raptor does not support configure tests. # the main commands needed to compile; @@ -4936,8 +4918,29 @@ case "$XPLATFORM" in *symbian*) exit 1; fi fi - ;; -esac +fi + +# detect zlib +if [ "$CFG_ZLIB" = "no" ]; then + # Note: Qt no longer support builds without zlib + # So we force a "no" to be "auto" here. + # If you REALLY really need no zlib support, you can still disable + # it by doing the following: + # add "no-zlib" to mkspecs/qconfig.pri + # #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h) + # + # There's no guarantee that Qt will build under those conditions + + CFG_ZLIB=auto + ZLIB_FORCED=yes +fi +if [ "$CFG_ZLIB" = "auto" ]; then + if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/zlib "zlib" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then + CFG_ZLIB=system + else + CFG_ZLIB=yes + fi +fi if [ "$CFG_LARGEFILE" = "auto" ]; then #Large files should be enabled for all Linux systems @@ -4946,7 +4949,7 @@ fi if [ "$CFG_S60" = "auto" ]; then - if echo "$XPLATFORM" | grep symbian > /dev/null; then + if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then CFG_S60=yes else CFG_S60=no @@ -4954,7 +4957,7 @@ if [ "$CFG_S60" = "auto" ]; then fi if [ "$CFG_QS60STYLE" = "auto" ]; then - if echo "$XPLATFORM" | grep symbian > /dev/null; then + if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then CFG_QS60STYLE=qt else CFG_QS60STYLE=no @@ -4962,7 +4965,7 @@ if [ "$CFG_QS60STYLE" = "auto" ]; then fi if [ "$CFG_SYMBIAN_DEFFILES" = "auto" ]; then - if echo "$XPLATFORM" | grep symbian > /dev/null && [ "$CFG_DEV" = "no" ]; then + if [ "$XPLATFORM_SYMBIAN" = "yes" ] && [ "$CFG_DEV" = "no" ]; then CFG_SYMBIAN_DEFFILES=yes else CFG_SYMBIAN_DEFFILES=no @@ -5041,14 +5044,12 @@ fi # detect accessibility if [ "$CFG_ACCESSIBILITY" = "auto" ]; then - case "$XPLATFORM" in - symbian*) + if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then # accessibility is currently unsupported CFG_ACCESSIBILITY=no - ;; - *) + else CFG_ACCESSIBILITY=yes - esac + fi fi # auto-detect SQL-modules support @@ -5260,15 +5261,13 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do ;; sqlite) if [ "$CFG_SQL_sqlite" = "auto" ]; then # the default - case "$XPLATFORM" in - symbian*) + if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then # sqlite on symbian is typically not build in Qt but deployed as a pre-existing sis file and should be marked as driver. # Configuration parameters should be set CFG_SQL_sqlite=qt QT_LFLAGS_SQLITE=-lsqlite3 QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite" - ;; - esac + fi fi if [ "$CFG_SQL_sqlite" != "no" ]; then SQLITE_AUTODETECT_FAILED="no" @@ -6133,10 +6132,10 @@ fi if [ "$CFG_ENDIAN" = "auto" ]; then if [ "$XPLATFORM_MINGW" = "yes" ]; then CFG_ENDIAN="Q_LITTLE_ENDIAN" - elif [ "$PLATFORM_MAC" = "yes" ]; then - true #leave as auto - elif [ "$XPLATFORM" = "symbian-sbsv2" ]; then + elif [ "$XPLATFORM_SYMBIAN_SBSV2" = "yes" ]; then CFG_ENDIAN="Q_LITTLE_ENDIAN" + elif [ "$PLATFORM_MAC" = "yes" ] && [ "$XPLATFORM_SYMBIAN" = "no" ]; then + true #leave as auto else "$unixtests/endian.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" F="$?" @@ -6222,7 +6221,7 @@ if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then fi HAVE_STL=no -if echo "$XPLATFORM" | 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 +if [ "$XPLATFORM_SYMBIAN" = "yes" ] || "$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 @@ -6249,7 +6248,7 @@ if [ "$CFG_IPV6" != "no" ]; then # Therefore for 4.7.1 and following we disable it until OpenC either supports it or we have the native Qt # symbian socket engine. # - if echo "$XPLATFORM" | grep symbian > /dev/null; then + if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then CFG_IPV6=no elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ipv6 "IPv6" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then CFG_IPV6=yes @@ -6364,7 +6363,7 @@ if [ "$CFG_GETIFADDRS" != "no" ]; then fi # detect OpenSSL -if [ "$CFG_OPENSSL" != "no" ] && [ "$XPLATFORM" != "symbian-sbsv2" ]; then +if [ "$CFG_OPENSSL" != "no" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/openssl "OpenSSL" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then if [ "$CFG_OPENSSL" = "auto" ]; then CFG_OPENSSL=yes @@ -6381,14 +6380,14 @@ if [ "$CFG_OPENSSL" != "no" ] && [ "$XPLATFORM" != "symbian-sbsv2" ]; then fi fi else - if [ "$CFG_OPENSSL" = "auto" ] && [ "$XPLATFORM" = "symbian-sbsv2" ]; then + if [ "$CFG_OPENSSL" = "auto" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "yes" ]; then #OpenSSl should be enabled for Symbian release CFG_OPENSSL=yes fi fi # detect OpenVG support -if [ "$CFG_OPENVG" != "no" ] && [ "$XPLATFORM" != "symbian-sbsv2" ]; then +if [ "$CFG_OPENVG" != "no" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then if [ "$CFG_OPENVG" = "auto" ]; then CFG_OPENVG=yes @@ -6445,13 +6444,13 @@ if [ "$CFG_PTMALLOC" != "no" ]; then QMakeVar add QMAKE_LFLAGS "$outpath/lib/libptmalloc3.a" fi -if [ "$CFG_ALSA" = "auto" ] && [ "$XPLATFORM" != "symbian-sbsv2" ]; then +if [ "$CFG_ALSA" = "auto" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then CFG_ALSA=yes else CFG_ALSA=no fi -elif [ "$XPLATFORM" = "symbian-sbsv2" ]; then +elif [ "$XPLATFORM_SYMBIAN_SBSV2" = "yes" ]; then # Disabled for Symbian release CFG_ALSA=no fi @@ -6472,7 +6471,7 @@ elif [ "$CFG_JAVASCRIPTCORE_JIT" = "no" ]; then fi if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then - if echo "$XPLATFORM" | grep symbian > /dev/null 2>&1; then + if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then if "$symbiantests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/symbian/audio "audio" $L_FLAGS $I_FLAGS $l_FLAGS ; then CFG_AUDIO_BACKEND=yes fi @@ -6484,7 +6483,7 @@ fi if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then echo "Warning: largefile support cannot be disabled for win32." CFG_LARGEFILE="yes" -elif [ "$CFG_LARGEFILE" != "no" ] && echo "$XPLATFORM" | grep "symbian" > /dev/null; then +elif [ "$CFG_LARGEFILE" != "no" ] && [ "$XPLATFORM_SYMBIAN" = "yes" ]; then echo "Warning: largefile support cannot be enabled for symbian." CFG_LARGEFILE="no" fi @@ -6591,8 +6590,9 @@ if [ "$PLATFORM_MAC" = "yes" ]; then fi fi -# but disable Cocoa if cross-building for mingw +# but disable Cocoa if cross-building for mingw and symbian [ "$XPLATFORM_MINGW" = "yes" ] && CFG_MAC_COCOA="no" +[ "$XPLATFORM_SYMBIAN" = "yes" ] && CFG_MAC_COCOA="no" # set the global Mac deployment target. This is overridden on an arch-by-arch basis # in some cases, see code further down @@ -6670,11 +6670,9 @@ else fi # Disable OpenGL on Symbian. -case "$XPLATFORM" in - symbian*) +if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then CFG_OPENGL="no" - ;; -esac +fi # enable opengl if [ "$CFG_OPENGL" = "no" ]; then @@ -6858,7 +6856,7 @@ else fi -if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then +if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ] && [ "$XPLATFORM_SYMBIAN" != "yes" ]; then #On Mac we implicitly link against libz, so we #never use the 3rdparty stuff. [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system" @@ -7490,14 +7488,11 @@ rm -f .options BUILD_OPTIONS="$BUILD_CONFIG $BUILD_OPTIONS" # extract the operating system from the XPLATFORM TARGET_OPERATING_SYSTEM=`echo $XPLATFORM | cut -f 2- -d/ | cut -f -1 -d-` -case "$XPLATFORM" in -symbian*) +if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then QT_BUILD_KEY_SYSTEM_PART="Symbian" - ;; -*) +else QT_BUILD_KEY_SYSTEM_PART="$CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER" - ;; -esac +fi # when cross-compiling, don't include build-host information (build key is target specific) QT_BUILD_KEY="$CFG_USER_BUILD_KEY $QT_BUILD_KEY_SYSTEM_PART $BUILD_OPTIONS" @@ -7844,8 +7839,7 @@ 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 [ "$XPLATFORM_SYMBIAN" = "yes" ]; 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" @@ -7925,7 +7919,7 @@ else mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h" chmod -w "$outpath/src/corelib/global/qconfig.h" for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do - if echo "$XPLATFORM" | grep "symbian-sbsv2" > /dev/null 2>&1 ; then + if [ "$XPLATFORM_SYMBIAN_SBSV2" = "yes" ]; then [ -e "$conf" ] && rm -rf "$conf" cp -a "$outpath/src/corelib/global/qconfig.h" "$conf" elif [ '!' -f "$conf" ]; then @@ -8002,7 +7996,7 @@ if [ -n "$QT_GCC_MAJOR_VERSION" ]; then echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION" >> "$QTCONFIG.tmp" echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION" >> "$QTCONFIG.tmp" fi -if echo "$XPLATFORM" | grep "symbian-sbsv2" > /dev/null 2>&1; then +if [ "$XPLATFORM_SYMBIAN_SBSV2" = "yes" ]; then echo "#Qt for symbian FPU settings" >> "$QTCONFIG.tmp" echo "MMP_RULES += \"ARMFPU softvfp\"" >> "$QTCONFIG.tmp" fi @@ -8590,9 +8584,9 @@ for file in .projects .projects.3; do *winmain/winmain.pro) [ "$XPLATFORM_MINGW" = "yes" ] || continue SPEC=$XQMAKESPEC ;; - *s60main/s60main.pro) if [ -z "`echo "$XPLATFORM" | grep "symbian" >/dev/null`" ]; then - continue - fi;; + *s60main/s60main.pro) + [ "$XPLATFORM_SYMBIAN" = "yes" ] || continue + ;; *examples/activeqt/*) continue ;; */qmake/qmake.pro) continue ;; *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*linguist/lrelease*) SPEC=$QMAKESPEC ;; diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 378b7bc..e4590d9 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -284,7 +284,7 @@ namespace QT_NAMESPACE {} # endif #endif -#if defined(Q_OS_MAC64) && !defined(QT_MAC_USE_COCOA) && !defined(QT_BUILD_QMAKE) +#if defined(Q_OS_MAC64) && !defined(QT_MAC_USE_COCOA) && !defined(QT_BUILD_QMAKE) && !defined(QT_BOOTSTRAPPED) #error "You are building a 64-bit application, but using a 32-bit version of Qt. Check your build configuration." #endif -- cgit v0.12