diff options
author | Joerg Bornemann <joerg.bornemann@nokia.com> | 2011-11-04 13:51:20 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-07 13:26:41 +0100 |
commit | 981dd3b3147df213608981d347c998dcf0230fe1 (patch) | |
tree | 1b9ea8de5a01d641444c99b9ef0212341cc1de60 | |
parent | e0dfa4547ec89b69acf20af91587a12cef96cfe4 (diff) |
qmake: remove symbian support
Change-Id: I1db834500921681676a6f46e7750bdd81bf0093d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
65 files changed, 35 insertions, 6813 deletions
diff --git a/mkspecs/features/debug_and_release.prf b/mkspecs/features/debug_and_release.prf index ef33789cab..8b8932184f 100644 --- a/mkspecs/features/debug_and_release.prf +++ b/mkspecs/features/debug_and_release.prf @@ -1 +1 @@ -!macx-xcode:!symbian:addExclusiveBuilds(debug, Debug, release, Release) +!macx-xcode:addExclusiveBuilds(debug, Debug, release, Release) diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf index b16492b324..e058f33683 100644 --- a/mkspecs/features/default_post.prf +++ b/mkspecs/features/default_post.prf @@ -117,12 +117,3 @@ QMAKE_LIBDIR += $$QMAKE_LIBDIR_POST QMAKE_EXTRA_TARGETS += check } -# Add special translation sources for projects that require them. -# Note 1: Since lupdate will not parse regular config scopes right, contains checks are used instead. -# Note 2: Checking for last value of TEMPLATE is used instead of simple contains check because -# lupdate doesn't respect "-=" variable assignments and therefore always finds "app" -# as the first value of TEMPLATE variable. -contains(CONFIG, lupdate_run):contains(CONFIG, localize_deployment) { - equals($$list($$last(TEMPLATE)), app): SOURCES += $$[QT_INSTALL_DATA]/mkspecs/common/symbian/appCaptionForTranslation.cpp - SOURCES += $$[QT_INSTALL_DATA]/mkspecs/common/symbian/packageNameForTranslation.cpp -} diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf index 6468834319..3f155a2d6b 100644 --- a/mkspecs/features/moc.prf +++ b/mkspecs/features/moc.prf @@ -94,7 +94,7 @@ equals(MOC_DIR, .) { } #auto depend on moc -unix:!symbian:!no_mocdepend { +unix:!no_mocdepend { moc_source.depends += $$first(QMAKE_MOC) moc_header.depends += $$first(QMAKE_MOC) !contains(TARGET, moc) { #auto build moc diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf index 5c630aafde..39d7a4b8a8 100644 --- a/mkspecs/features/qt.prf +++ b/mkspecs/features/qt.prf @@ -109,14 +109,6 @@ for(QT_CURRENT_VERIFY, $$list($$QT_PLUGIN_VERIFY)) { DEPLOYMENT *= qt_additional_plugin_$${QTPLUG} } - isEqual(QT_CURRENT_VERIFY, DEPLOYMENT_PLUGIN):shared:symbian: { - QT_ITEM = $${QTPLUG}.dll - - eval(qt_additional_plugin_$${QTPLUG}.files = $${QT_ITEM}) - eval(qt_additional_plugin_$${QTPLUG}.path = $${QT_PLUGINPATH}) - - DEPLOYMENT *= qt_additional_plugin_$${QTPLUG} - } } } diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index ca38f31569..9ea188f0ea 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -45,33 +45,6 @@ defineTest(qtAddLibrary) { } } } - symbian { - isEqual(LIB_NAME, QtCore) { - #workaround for dependency from f32file.h on e32svr.h which has moved location in symbian3 - contains(SYMBIAN_VERSION, Symbian3) { - INCLUDEPATH *= $$OS_LAYER_SYSTEMINCLUDE - } - } else:isEqual(LIB_NAME, QtGui) { - # Needed for #include <QtGui> because qs60mainapplication.h includes aknapp.h - INCLUDEPATH *= $$MW_LAYER_SYSTEMINCLUDE - } else:isEqual(LIB_NAME, QtWebKit) { - # Needed for because relative inclusion problem in toolchain - INCLUDEPATH *= $$QMAKE_INCDIR_QT/QtXmlPatterns - INCLUDEPATH *= $$QMAKE_INCDIR_QT/QtNetwork - isEmpty(TARGET.CAPABILITY): TARGET.CAPABILITY = NetworkServices - isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 - } else:isEqual(LIB_NAME, QtXmlPatterns) { - # Needed for #include <QtXmlPatterns/QtXmlPatterns> because relative inclusion problem in toolchain - INCLUDEPATH *= $$QMAKE_INCDIR_QT/QtNetwork - } else:isEqual(LIB_NAME, QtNetwork) { - isEmpty(TARGET.CAPABILITY): TARGET.CAPABILITY = NetworkServices - } else:isEqual(LIB_NAME, QtDeclarative) { - isEmpty(TARGET.CAPABILITY): TARGET.CAPABILITY = NetworkServices - isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 - } - export(TARGET.EPOCHEAPSIZE) - export(TARGET.CAPABILITY) - } isEmpty(LINKAGE) { if(!debug_and_release|build_pass):CONFIG(debug, debug|release) { win32:LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}d diff --git a/mkspecs/features/qt_module_config.prf b/mkspecs/features/qt_module_config.prf index 9f7a0d096a..d769481a07 100644 --- a/mkspecs/features/qt_module_config.prf +++ b/mkspecs/features/qt_module_config.prf @@ -109,30 +109,6 @@ win32 { INCLUDEPATH += tmp !static: DEFINES+=QT_MAKEDLL } -symbian { - shared { - DEFINES+=QT_MAKEDLL - TARGET.CAPABILITY = All -Tcb - - # When building without autotests, DEF files are used by default. - # This is to maintain binary compatibility with previous releases. - # To explicitly disable DEF files usage, eg. when lots of code churn is - # going on, and functions may be added and removed before shipping, - # configure with -no-usedeffiles - # WARNING - disabling DEF files *will* break BC with previous released versions - # of Qt, and the only compatibility will be between this build of Qt and anything - # built in this exact environment. *Never* use this when building a version - # for release. - contains(CONFIG, def_files) { - DEF_FILE=../s60installs - } - } - load(armcc_warnings) - - # workaround for the fact that some of our required includes in Symbian^3 - # now depend upon files in epoc32/include/platform - INCLUDEPATH += $$OS_LAYER_SYSTEMINCLUDE -} win32-borland:INCLUDEPATH += kernel aix-g++* { @@ -154,7 +130,7 @@ embedded:DEPENDPATH += ;$$EMBEDDED_H #install directives load(qt_installs) -unix:!symbian { +unix { CONFIG += create_libtool create_pc explicitlib QMAKE_LIBTOOL_LIBDIR = $$[QT_INSTALL_LIBS] QMAKE_PRL_LIBDIR = $$[QT_INSTALL_LIBS] @@ -216,25 +192,3 @@ load(qt_targets) win32:DEFINES+=_USE_MATH_DEFINES -symbian { - # Make partial upgrade SIS file for all dll's except webkit and s60main - !contains(TARGET.UID3, 0x200267C2):!contains(TARGET.UID3, 0xE00267C2):!contains(TARGET.UID3, 0x2001E61F):!contains(TARGET.UID3, 0xE001E61F) { - # Partial upgrade SIS file - vendorinfo = \ - "; Localised Vendor name" \ - "%{\"Nokia\"}" \ - " " \ - "; Unique Vendor name" \ - ":\"Nokia, Qt\"" \ - " " - isEmpty(QT_LIBINFIX): PARTIAL_UPGRADE_UID = 0x2001E61C - else: PARTIAL_UPGRADE_UID = 0xE001E61C - - pu_header = "; Partial upgrade package for testing $${TARGET} changes without reinstalling everything" \ - "$${LITERAL_HASH}{\"$${TARGET}\"}, ($$PARTIAL_UPGRADE_UID), $${QT_MAJOR_VERSION},$${QT_MINOR_VERSION},$${QT_PATCH_VERSION}, TYPE=PU" - partial_upgrade.pkg_prerules = pu_header vendorinfo - partial_upgrade.files = $$QMAKE_LIBDIR_QT/$${TARGET}.dll - partial_upgrade.path = c:/sys/bin - DEPLOYMENT += partial_upgrade - } -} diff --git a/mkspecs/features/qt_plugin.prf b/mkspecs/features/qt_plugin.prf index 824729ba52..ce2b1d245b 100644 --- a/mkspecs/features/qt_plugin.prf +++ b/mkspecs/features/qt_plugin.prf @@ -16,28 +16,3 @@ load(qt_targets) wince*:LIBS += $$QMAKE_LIBS_GUI -symbian: { - TARGET.EPOCALLOWDLLDATA=1 - TARGET.CAPABILITY = All -Tcb - TARGET = $${TARGET}$${QT_LIBINFIX} - load(armcc_warnings) - - # Make partial upgrade SIS file for Qt plugin dll's - # Partial upgrade SIS file - vendorinfo = \ - "; Localised Vendor name" \ - "%{\"Nokia\"}" \ - " " \ - "; Unique Vendor name" \ - ":\"Nokia, Qt\"" \ - " " - isEmpty(QT_LIBINFIX): PARTIAL_UPGRADE_UID = 0x2001E61C - else: PARTIAL_UPGRADE_UID = 0xE001E61C - - pu_header = "; Partial upgrade package for testing $${TARGET} changes without reinstalling everything" \ - "$${LITERAL_HASH}{\"$${TARGET}\"}, ($$PARTIAL_UPGRADE_UID), $${QT_MAJOR_VERSION},$${QT_MINOR_VERSION},$${QT_PATCH_VERSION}, TYPE=PU" - partial_upgrade.pkg_prerules = pu_header vendorinfo - partial_upgrade.files = $$QMAKE_LIBDIR_QT/$${TARGET}.dll - partial_upgrade.path = c:/sys/bin - DEPLOYMENT += partial_upgrade -} diff --git a/mkspecs/features/qttest_p4.prf b/mkspecs/features/qttest_p4.prf index 50020586a4..1712e94660 100644 --- a/mkspecs/features/qttest_p4.prf +++ b/mkspecs/features/qttest_p4.prf @@ -3,13 +3,6 @@ CONFIG += qt warn_on console depend_includepath testcase qtAddLibrary(QtTest) -symbian:{ - TARGET.EPOCHEAPSIZE = 0x100000 0x2000000 -# DEFINES += QTEST_NO_SPECIALIZATIONS - TARGET.CAPABILITY="None" - RSS_RULES ="group_name=\"QtTests\";" -} - # prefix test binary with tst_ !contains(TARGET, ^tst_.*):TARGET = $$join(TARGET,,"tst_") diff --git a/mkspecs/features/static_and_shared.prf b/mkspecs/features/static_and_shared.prf index 39a9a1f740..f586bddcc4 100644 --- a/mkspecs/features/static_and_shared.prf +++ b/mkspecs/features/static_and_shared.prf @@ -1,3 +1,3 @@ -!contains(TEMPLATE, subdirs):!macx-xcode:!symbian-abld:!symbian-sbsv2 { +!contains(TEMPLATE, subdirs):!macx-xcode { addExclusiveBuilds(static, Static, shared, Shared) } diff --git a/mkspecs/features/symbian/add_mmp_rules.prf b/mkspecs/features/symbian/add_mmp_rules.prf deleted file mode 100644 index 7f96b811a2..0000000000 --- a/mkspecs/features/symbian/add_mmp_rules.prf +++ /dev/null @@ -1,33 +0,0 @@ -# Arg1: List of conditions to generate block for -# Arg2: List of variables containing rules to add -defineTest(addMMPRules) { - unset(myConditions) - unset(myVariables) - unset(myIfDef) - - myConditions = $$eval($$1) default - myVariables = $$eval($$2) - myIfDef = if - - for(condition, $$list($$myConditions)) { - contains(condition, default) { - libBlock = "$${LITERAL_HASH}else" - } else { - libBlock = "$${LITERAL_HASH}$${myIfDef} defined($${condition})" - myIfDef = elif - } - - for(var, $$list($$myVariables)) { - varVal = $$eval($${var}.$${condition}) - isEmpty(varVal) { - # No value defined for current condition, so use default - varVal = $$eval($${var}.default) - } - !isEmpty(varVal): libBlock += "$$join(varVal,$$escape_expand(\\n))" - } - - MMP_RULES += $$libBlock - } - MMP_RULES += "$${LITERAL_HASH}endif" - export(MMP_RULES) -} diff --git a/mkspecs/features/symbian/application_icon.prf b/mkspecs/features/symbian/application_icon.prf deleted file mode 100644 index d9918bfd5f..0000000000 --- a/mkspecs/features/symbian/application_icon.prf +++ /dev/null @@ -1,87 +0,0 @@ -load(data_caging_paths) - -contains(CONFIG, no_icon) { - # If no_icon keyword exist, the S60 UI app is just made hidden. This because S60 app FW - # requires the registration resource file to exist always - contains(QT, gui):contains(CONFIG, qt) { - symbian:RSS_RULES += "hidden = KAppIsHidden;" - CONFIG -= no_icon - } -} - - -!contains(CONFIG, no_icon) { - baseTarget = $$symbianRemoveSpecialCharacters($$basename(TARGET)) - contains(baseTarget, "^.*\\..*$") { - CONFIG += no_icon - ICON = - warning("Symbian resources do not support '.' character in TARGET, skipping resource generation.") - } else { - symbian-abld|symbian-sbsv2 { - resourceZDir = $$EPOCROOT$$HW_ZDIR$$APP_RESOURCE_DIR - regZDir = $$EPOCROOT$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR - } else { - contains(DESTDIR, "/.*") { - resourceZDir = $$DESTDIR - } else:isEmpty(DESTDIR) { - resourceZDir = $$OUT_PWD - } else { - resourceZDir = $$OUT_PWD/$$DESTDIR - } - regZDir = $$resourceZDir - } - - default_resource_deployment.files += $$resourceZDir/$${baseTarget}.rsc - default_resource_deployment.path = $$APP_RESOURCE_DIR - default_reg_deployment.files += $$regZDir/$${baseTarget}_reg.rsc - default_reg_deployment.path = $$REG_RESOURCE_IMPORT_DIR - - !isEmpty(ICON) { - !count(ICON, 1) { - ICON = $$first(ICON) - warning("Only first icon specified in ICON variable is used: $$ICON") - } - - # Note: symbian-sbsv2 builds can't utilize extra compiler for mifconv, so ICON handling is done in code - !symbian-sbsv2 { - # Absolute path required for shadow builds. - # However, in older Symbian environments abld toolchain can't handle even moderately long - # paths, so don't force absolute there. - !symbian-abld:!contains(ICON, "^(/|\\\\|.:).*"):ICON = $$_PRO_FILE_PWD_/$$ICON - - #Makefile: requires paths with backslash - ICON_backslashed = $$ICON - - symbian-abld { - # ${ZDIR} is defined in Makefile - mifIconZDir = ${ZDIR}$$APP_RESOURCE_DIR - } else { - mifIconZDir = $$resourceZDir - } - - # Extra compiler rules for mifconv - mifconv.target = $$mifIconZDir/$${baseTarget}.mif - contains(QMAKE_HOST.os, "Windows") { - ICON_backslashed = $$replace(ICON_backslashed, /, \\) - mifconv.target = $$replace(mifconv.target, /, \\) - } - # Based on: http://www.forum.nokia.com/document/Cpp_Developers_Library - # svg-t icons should always use /c32 depth - mifconv.commands = mifconv $$mifconv.target /c32 $$ICON_backslashed - - mifconv.depends = $$ICON - PRE_TARGETDEPS += $$mifconv.target - QMAKE_EXTRA_TARGETS += mifconv - QMAKE_CLEAN += $$mifconv.target - } - # Rules to use generated MIF file from symbian resources - RSS_RULES.number_of_icons = $$size(ICON_backslashed) - - RSS_RULES.icon_file = $$APP_RESOURCE_DIR/$${baseTarget}.mif - - default_resource_deployment.files += $$resourceZDir/$${baseTarget}.mif - } - } -} - - diff --git a/mkspecs/features/symbian/armcc_warnings.prf b/mkspecs/features/symbian/armcc_warnings.prf deleted file mode 100644 index 3331bffeef..0000000000 --- a/mkspecs/features/symbian/armcc_warnings.prf +++ /dev/null @@ -1,22 +0,0 @@ -# 68: integer conversion resulted in a change of sign (sounds useful, but it's -# buggy and is reported even in places where it makes no sense) -# 111: Statement is unreachable -# 185: Dynamic initialization in unreachable code -# 187: use of "=" where "==" may have been intended -# 191: Type qualifier is meaningless on cast type -# 368: class "<class>" defines no constructor to initialize the following: <member> -# (Disabled because there are other ways of assigning besides constructors) -# 830: function "xxx" has no corresponding operator delete (to be called if an -# exception is thrown during initialization of an allocated object) (used a -# lot in 3rd party code) -# 997: function "xxx" is hidden by "yyy" -- virtual function override intended? -# (used all over the place in the Symbian SDK) -# 1293: Assignment in condition -# 1294: pre-ANSI C style functions declarations (used a lot in 3rd party code) -# 2874: <variable> may be used before being set (this one sounds useful, but -# it's output also for class instances, making it useless in practice) -QMAKE_CFLAGS.ARMCC += --diag_suppress 68,111,185,187,191,368,830,997,1293,1294,2874 -QMAKE_CXXFLAGS.ARMCC += --diag_suppress 68,111,185,187,191,368,830,997,1293,1294,2874 - -# 6780: <origvis> visibility removed from symbol '<symname>' through <impexp> -QMAKE_LFLAGS.ARMCC += --diag_suppress 6780 diff --git a/mkspecs/features/symbian/data_caging_paths.prf b/mkspecs/features/symbian/data_caging_paths.prf deleted file mode 100644 index 7f5420cc88..0000000000 --- a/mkspecs/features/symbian/data_caging_paths.prf +++ /dev/null @@ -1,80 +0,0 @@ -# -# ============================================================================== -# Name : data_caging_paths.prf -# Part of : -# Interface : Data Caging Path Definitions API for Qt/S60 -# Description : Predefined include paths to be used in the pro-files for the -# paths related to data caging. -# -# Usage examples: -# -# # Load these definitions on pro-file if needed: -# load(data_caging_paths) -# -# # These variables are mostly useful when specifying deployment -# -# myLib.files = myLib.dll -# myLib.path = $$SHARED_LIB_DIR -# DEPLOYMENT += myLib -# -# # Note: Do not use $$PLUGINS_DIR or $$PLUGINS_1_DIR to deploy Qt plugins. -# # $$QT_PUBLIC_PLUGINS_BASE specifies the public base directory for Qt -# # plugin stubs: -# -# myPublicImageFormatPlugin.files = myImageFormat.dll -# myPublicImageFormatPlugin.path = $$QT_PLUGINS_BASE_DIR/imageformats -# DEPLOYMENT += myPublicImageFormatPlugin -# -# ============================================================================== - -exists($${EPOCROOT}epoc32/include/data_caging_paths.prf) { - - # Load platform specific paths - load($${EPOCROOT}epoc32/include/data_caging_paths.prf) - -} else { - # No platform specific paths provided, use default paths - - APPARC_RECOGNISER_RESOURCES_DIR = /resource/apps/registrationresourcefiles - APP_BITMAP_DIR = /resource/apps - APP_RESOURCE_DIR = /resource/apps - BITMAP_DIR = /resource/apps - BIOFILE_DIR = /resource/messaging/bif - CHARCONV_PLUGIN_DIR = /resource/charconv - CONTACTS_RESOURCE_DIR = /resource/cntmodel - CTRL_PANEL_RESOURCE_DIR = /resource/controls - CONVERTER_PLUGIN_RESOURCE_DIR = /resource/convert - ECOM_RESOURCE_DIR = /resource/plugins - ERROR_RESOURCE_DIR = /resource/errors - PROGRAMS_DIR = /sys/bin - FEP_RESOURCES_DIR = /resource/fep - HELP_FILE_DIR = /resource/help - LOG_ENGINE_RESOURCE_DIR = /resource/logengine - MTM_RESOURCE_DIR = /resource/messaging - MTM_INFO_FILE_DIR = /resource/messaging/mtm - PRINTER_DRIVER_DIR = /resource/printers - SHARED_LIB_DIR = /sys/bin - UIKLAF_RESOURCE_DIR = /resource/uiklaf - WAPPUSH_PLUGIN_RESOURCE_DIR = /resource/messaging/wappush - WATCHER_PLUGIN_RESOURCE_DIR = /resource/messaging/watchers - RECOGNISERS_DIR = /sys/bin - PARSERS_DIR = /sys/bin - NOTIFIERS_DIR = /sys/bin - PLUGINS_DIR = /sys/bin - PLUGINS_1_DIR = /sys/bin - RESOURCE_FILES_DIR = /resource - - CA_CERTIFICATES_DIR = /private/101f72a6 - COMMDB_DIR = /private/100012a5 - SS_CONFIG_FILE_DIR = /private/101f7989/esock - TRUSTED_FONTS_DIR = /private/10003a16/fonts - UNTRUSTED_FONT_DIR = /private/10003a16/import/fonts - WINDOW_SERVER_INI_DIR = /private/10003b20 - SKINS_DIR = /private/10207114 - BOOTDATA_DIR = /resource/bootdata -} - -isEmpty(HW_ZDIR): HW_ZDIR = epoc32/data/z -isEmpty(REG_RESOURCE_DIR): REG_RESOURCE_DIR = /private/10003a3f/apps -isEmpty(REG_RESOURCE_IMPORT_DIR): REG_RESOURCE_IMPORT_DIR = /private/10003a3f/import/apps -isEmpty(APP_PRIVATE_DIR_BASE): APP_PRIVATE_DIR_BASE = /private diff --git a/mkspecs/features/symbian/debug.prf b/mkspecs/features/symbian/debug.prf deleted file mode 100644 index b5afeb6ba6..0000000000 --- a/mkspecs/features/symbian/debug.prf +++ /dev/null @@ -1 +0,0 @@ -QMAKE_LIBDIR += $${EPOCROOT}epoc32/release/armv5/udeb diff --git a/mkspecs/features/symbian/def_files.prf b/mkspecs/features/symbian/def_files.prf deleted file mode 100644 index 746de6a242..0000000000 --- a/mkspecs/features/symbian/def_files.prf +++ /dev/null @@ -1,96 +0,0 @@ -# With DEF files enabled, removed exported symbols are treated as errors -# and there is binary compatibility between successive builds. - -CONFIG -= def_files_disabled - -# We need a target name without the INFIX'ed part, since DEF files are not infixed. -equals(QMAKE_TARGET_PRODUCT, Qt4)|equals(QMAKE_TARGET_PRODUCT, QTestLib):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 - # in a defBlock variable; but otherwise we have to expand MMP_RULES then scan for the DEFFILE keyword) - # Similarly, explicit EXPORTUNFROZEN should block adding defBlock - !contains(MMP_RULES, defBlock):!contains(MMP_RULES, EXPORTUNFROZEN) { - # Apps are executables on Symbian, so don't have exports, and therefore don't have DEF files - # Plugins use standard DEF files, which qmake generates, so shouldn't be using these DEFFILE - # statements - they use the qmake generated statements instead - # Static libraries obviously don't have DEF files, as they don't take part in dynamic linkage - !contains(TEMPLATE, app):!contains(CONFIG, plugin):!contains(CONFIG, staticlib): { - !isEmpty(DEF_FILE) { - defBlock = \ - "$${LITERAL_HASH}ifdef WINSCW" \ - "DEFFILE $$DEF_FILE/bwins/$${clean_TARGET}.def" \ - "$${LITERAL_HASH}elif defined EABI" \ - "DEFFILE $$DEF_FILE/eabi/$${clean_TARGET}.def" \ - "$${LITERAL_HASH}endif" - } else:!isEmpty(defFilePath) { - defBlock = \ - "$${LITERAL_HASH}ifdef WINSCW" \ - "DEFFILE $$defFilePath/bwins/$${clean_TARGET}.def" \ - "$${LITERAL_HASH}elif defined EABI" \ - "DEFFILE $$defFilePath/eabi/$${clean_TARGET}.def" \ - "$${LITERAL_HASH}endif" - } else { - # If defFilePath is not defined, then put the folders containing the DEF files at the - # same level as the .pro (and generated MMP) file(s) - defBlock = \ - "$${LITERAL_HASH}ifdef WINSCW" \ - "DEFFILE ./bwins/$${clean_TARGET}.def" \ - "$${LITERAL_HASH}elif defined EABI" \ - "DEFFILE ./eabi/$${clean_TARGET}.def" \ - "$${LITERAL_HASH}endif" - } - MMP_RULES += defBlock - } - } - -} else:contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib):!contains(CONFIG, plugin) { - !isEmpty(DEF_FILE) { - defFile = $$DEF_FILE - } else { - defFile = . - } - qtTestIfDirExists($$_PRO_FILE_PWD_/$$defFile) { - !exists("$$_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 { - elf2e32FileToAdd = $$_PRO_FILE_PWD_/$$defFile - } - QMAKE_ELF2E32_FLAGS += "--definput=$$elf2e32FileToAdd" - - symbianObjdir = $$OBJECTS_DIR - isEmpty(symbianObjdir):symbianObjdir = . - - freeze_target.target = freeze - freeze_target.depends = first - # The perl part is to convert to unix line endings and remove comments, which the s60 tools refuse to do. - freeze_target.commands = $$QMAKE_COPY $$symbianObjdir/$${TARGET}.def $$elf2e32FileToAdd - QMAKE_EXTRA_TARGETS += freeze_target -} else:contains(TEMPLATE, subdirs) { - freeze_target.target = freeze - freeze_target.CONFIG = recursive - freeze_target.recurse = $$SUBDIRS - QMAKE_EXTRA_TARGETS += freeze_target -} else { - freeze_target.target = freeze - freeze_target.commands = - QMAKE_EXTRA_TARGETS += freeze_target -} diff --git a/mkspecs/features/symbian/def_files_disabled.prf b/mkspecs/features/symbian/def_files_disabled.prf deleted file mode 100644 index 0344911f6d..0000000000 --- a/mkspecs/features/symbian/def_files_disabled.prf +++ /dev/null @@ -1,13 +0,0 @@ -# With DEF files disabled, binary compatibility is broken every time you build - -CONFIG -= def_files - -# See def_files.prf for reasoning on the slight nastiness of this -!contains(MMP_RULES, defBlock) { - # See def_files.prf for reasoning for excluding target types and configs below - !contains(TEMPLATE, app):!contains(CONFIG, plugin):!contains(CONFIG, staticlib): { - # with EXPORTUNFROZEN enabled, new exports are included in the dll and dso/lib without - # needing to run abld/sbs freeze - MMP_RULES *= EXPORTUNFROZEN - } -} diff --git a/mkspecs/features/symbian/default_post.prf b/mkspecs/features/symbian/default_post.prf deleted file mode 100644 index 470372eb4a..0000000000 --- a/mkspecs/features/symbian/default_post.prf +++ /dev/null @@ -1,100 +0,0 @@ -load(default_post) - -contains(TEMPLATE, ".*app") { - contains(CONFIG, stdbinary) { - QMAKE_LIBS += - } else:contains(CONFIG,qt) { - QMAKE_LIBS += $$QMAKE_LIBS_QT_ENTRY - } else { - QMAKE_LIBS += $$QMAKE_LIBS_NO_QT_ENTRY - } - - contains(DESTDIR, "/.*") { - default_bin_deployment.files += $$DESTDIR/$$symbianRemoveSpecialCharacters($$basename(TARGET)).exe - } else:isEmpty(DESTDIR) { - default_bin_deployment.files += $$OUT_PWD/$$symbianRemoveSpecialCharacters($$basename(TARGET)).exe - } else { - default_bin_deployment.files += $$OUT_PWD/$$DESTDIR/$$symbianRemoveSpecialCharacters($$basename(TARGET)).exe - } - default_bin_deployment.path += /sys/bin - - load(application_icon.prf) -} -contains(TEMPLATE, lib): { - contains(CONFIG, staticlib)|contains(CONFIG, static): { - # Static libs should not have LIBRARY statements in S60 - QMAKE_LIBS = - # Static libs do not need def files - MMP_RULES -= EXPORTUNFROZEN - } - contains(CONFIG, plugin):!contains(CONFIG, stdbinary): { - # Plugins based on normal libraries have predefined def file - MMP_RULES -= EXPORTUNFROZEN - } -} else { - # Applications don't need this - MMP_RULES -= EXPORTUNFROZEN -} - -isEmpty(TARGET.UID3):TARGET.UID3 = $$generate_uid("$${OUT_PWD}/$${TARGET}") -isEmpty(TARGET.UID2) { - contains(CONFIG, stdbinary) { - TARGET.UID2 = 0x20004C45 - } else { - contains(TEMPLATE, app) { - contains(QT, gui) { - TARGET.UID2 = 0x100039CE - } else { - TARGET.UID2 = 0 - } - } else:contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { - TARGET.UID2 = 0x1000008d - } - } -} - -# Add dependency to Qt package to all other projects besides Qt libs. -# Note: Qt libs package with full capabilities has UID3 of 0x2001E61C, -# while self-signed version typically has temporary UID3 of 0xE001E61C. -contains(CONFIG, qt):!contains(TARGET.UID3, 0x2001E61C):!contains(TARGET.UID3, 0xE001E61C):isEmpty(QT_LIBINFIX) { - qt_pkg_name = Qt - pkg_depends_qt += \ - "; Default dependency to Qt libraries" \ - "(0x2001E61C), $${QT_MAJOR_VERSION}, $${QT_MINOR_VERSION}, $${QT_PATCH_VERSION}, {$$addLanguageDependentPkgItem(qt_pkg_name)}" - - # Projects linking to webkit need dependency to webkit - contains(QT, webkit): { - # these can be overridden by mkspecs/modules/qt_webkit.pri - isEmpty(QT_WEBKIT_MAJOR_VERSION) { - QT_WEBKIT_MAJOR_VERSION = $${QT_MAJOR_VERSION} - QT_WEBKIT_MINOR_VERSION = $${QT_MINOR_VERSION} - QT_WEBKIT_PATCH_VERSION = $${QT_PATCH_VERSION} - } - - webkit_pkg_name = QtWebKit - pkg_depends_webkit += \ - "; Dependency to Qt Webkit" \ - "(0x200267C2), $${QT_WEBKIT_MAJOR_VERSION}, $${QT_WEBKIT_MINOR_VERSION}, $${QT_WEBKIT_PATCH_VERSION}, {$$addLanguageDependentPkgItem(webkit_pkg_name)}" - } else { - default_deployment.pkg_prerules -= pkg_depends_webkit - } -} else { - default_deployment.pkg_prerules -= pkg_depends_webkit pkg_depends_qt -} - -isEmpty(TARGET.EPOCSTACKSIZE):TARGET.EPOCSTACKSIZE = 0x14000 -isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x020000 0x800000 - -# Supports Symbian^3 platforms by default and also S60 3.1, 3.2, and 5.0 if built against any of those. -platform_product_id = S60ProductID -platform_product_id = $$addLanguageDependentPkgItem(platform_product_id) -pkg_platform_dependencies = \ - "; Default HW/platform dependencies" \ - "[0x20022E6D],0,0,0,{$$platform_product_id}" \ - "[0x2003A678],0,0,0,{$$platform_product_id}" -contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) { - pkg_platform_dependencies += \ - "[0x102032BE],0,0,0,{$$platform_product_id}" \ - "[0x102752AE],0,0,0,{$$platform_product_id}" \ - "[0x1028315F],0,0,0,{$$platform_product_id}" -} diff --git a/mkspecs/features/symbian/default_pre.prf b/mkspecs/features/symbian/default_pre.prf deleted file mode 100644 index ddb23b3157..0000000000 --- a/mkspecs/features/symbian/default_pre.prf +++ /dev/null @@ -1,2 +0,0 @@ -CONFIG = stl_off $$CONFIG -load(default_pre) diff --git a/mkspecs/features/symbian/do_not_build_as_thumb.prf b/mkspecs/features/symbian/do_not_build_as_thumb.prf deleted file mode 100644 index 91a63c2263..0000000000 --- a/mkspecs/features/symbian/do_not_build_as_thumb.prf +++ /dev/null @@ -1,13 +0,0 @@ -symbian-abld|symbian-sbsv2 { - MMP_RULES += ALWAYS_BUILD_AS_ARM -} else:symbian-armcc { - QMAKE_CFLAGS -= --thumb - QMAKE_CFLAGS += --arm - QMAKE_CXXFLAGS -= --thumb - QMAKE_CXXFLAGS += --arm -} else:symbian-gcce { - QMAKE_CFLAGS -= --thumb - QMAKE_CFLAGS += -marm -mthumb-interwork -mapcs - QMAKE_CXXFLAGS -= --thumb - QMAKE_CXXFLAGS += -marm -mthumb-interwork -mapcs -} diff --git a/mkspecs/features/symbian/epocallowdlldata.prf b/mkspecs/features/symbian/epocallowdlldata.prf deleted file mode 100644 index b336f488fd..0000000000 --- a/mkspecs/features/symbian/epocallowdlldata.prf +++ /dev/null @@ -1 +0,0 @@ -TARGET.EPOCALLOWDLLDATA=1 diff --git a/mkspecs/features/symbian/localize_deployment.prf b/mkspecs/features/symbian/localize_deployment.prf deleted file mode 100644 index 185c7130c0..0000000000 --- a/mkspecs/features/symbian/localize_deployment.prf +++ /dev/null @@ -1,118 +0,0 @@ -SYMBIAN_LANG.af = 34 #Afrikaans -SYMBIAN_LANG.sq = 35 #Albanian -SYMBIAN_LANG.am = 36 #Amharic -SYMBIAN_LANG.ar = 37 #Arabic -SYMBIAN_LANG.hy = 38 #Armenian -SYMBIAN_LANG.eu = 102 #Basque -SYMBIAN_LANG.bn = 41 #Bengali -SYMBIAN_LANG.bg = 42 #Bulgarian -SYMBIAN_LANG.my = 43 #Burmese -SYMBIAN_LANG.be = 40 #Byelorussian -SYMBIAN_LANG.ca = 44 #Catalan -SYMBIAN_LANG.zh = 31 #Chinese -SYMBIAN_LANG.hr = 45 #Croatian -SYMBIAN_LANG.cs = 25 #Czech -SYMBIAN_LANG.da = 07 #Danish -SYMBIAN_LANG.nl = 18 #Dutch -SYMBIAN_LANG.en = 01 #English(UK) -SYMBIAN_LANG.et = 49 #Estonian -SYMBIAN_LANG.fi = 09 #Finnish -SYMBIAN_LANG.fr = 02 #French -SYMBIAN_LANG.gd = 52 #Gaelic -SYMBIAN_LANG.gl = 103 #Galician -SYMBIAN_LANG.ka = 53 #Georgian -SYMBIAN_LANG.de = 03 #German -SYMBIAN_LANG.el = 54 #Greek -SYMBIAN_LANG.gu = 56 #Gujarati -SYMBIAN_LANG.he = 57 #Hebrew -SYMBIAN_LANG.hi = 58 #Hindi -SYMBIAN_LANG.hu = 17 #Hungarian -SYMBIAN_LANG.is = 15 #Icelandic -SYMBIAN_LANG.id = 59 #Indonesian -SYMBIAN_LANG.ga = 60 #Irish -SYMBIAN_LANG.it = 05 #Italian -SYMBIAN_LANG.ja = 32 #Japanese -SYMBIAN_LANG.kn = 62 #Kannada -SYMBIAN_LANG.kk = 63 #Kazakh -SYMBIAN_LANG.ko = 65 #Korean -SYMBIAN_LANG.lo = 66 #Laothian -SYMBIAN_LANG.lv = 67 #Latvian -SYMBIAN_LANG.lt = 68 #Lithuanian -SYMBIAN_LANG.mk = 69 #Macedonian -SYMBIAN_LANG.ms = 70 #Malay -SYMBIAN_LANG.ml = 71 #Malayalam -SYMBIAN_LANG.mr = 72 #Marathi -SYMBIAN_LANG.mo = 73 #Moldavian -SYMBIAN_LANG.mn = 74 #Mongolian -SYMBIAN_LANG.nb = 08 #Norwegian -SYMBIAN_LANG.nn = 75 #Nynorsk -SYMBIAN_LANG.fa = 50 #Persian -SYMBIAN_LANG.pl = 27 #Polish -SYMBIAN_LANG.pt = 13 #Portuguese -SYMBIAN_LANG.pa = 77 #Punjabi -SYMBIAN_LANG.ro = 78 #Romanian -SYMBIAN_LANG.ru = 16 #Russian -SYMBIAN_LANG.sr = 79 #Serbian -SYMBIAN_LANG.si = 80 #Singhalese -SYMBIAN_LANG.sk = 26 #Slovak -SYMBIAN_LANG.sl = 28 #Slovenian -SYMBIAN_LANG.so = 81 #Somali -SYMBIAN_LANG.st = 101 #South Sotho/Sesotho -SYMBIAN_LANG.es = 04 #Spanish -SYMBIAN_LANG.sw = 84 #Swahili -SYMBIAN_LANG.sv = 06 #Swedish -SYMBIAN_LANG.tl = 39 #Tagalog -SYMBIAN_LANG.ta = 87 #Tamil -SYMBIAN_LANG.te = 88 #Telugu -SYMBIAN_LANG.th = 33 #Thai -SYMBIAN_LANG.bo = 89 #Tibetan -SYMBIAN_LANG.ti = 90 #Tigrinya -SYMBIAN_LANG.tr = 14 #Turkish -SYMBIAN_LANG.tk = 92 #Turkmen -SYMBIAN_LANG.uk = 93 #Ukrainian -SYMBIAN_LANG.ur = 94 #Urdu -SYMBIAN_LANG.vi = 96 #Vietnamese -SYMBIAN_LANG.cy = 97 #Welsh -SYMBIAN_LANG.zu = 98 #Zulu - -# Regional dialects -SYMBIAN_LANG.en_US = 10 #American English -SYMBIAN_LANG.fr_BE = 21 #Belgian French -SYMBIAN_LANG.pt_BR = 76 #Brazilian Portuguese -SYMBIAN_LANG.en_CA = 46 #Canadian English -SYMBIAN_LANG.fr_CA = 51 #Canadian French -SYMBIAN_LANG.el_CY = 55 #Cyprus Greek -SYMBIAN_LANG.tr_CY = 91 #Cyprus Turkish -SYMBIAN_LANG.en_TW = 157 #English as appropriate for use in Taiwan -SYMBIAN_LANG.en_HK = 158 #English as appropriate for use in Hong Kong -SYMBIAN_LANG.en_CN = 159 #English as appropriate for use in the Peoples Republic of China -SYMBIAN_LANG.en_JP = 160 #English as appropriate for use in Japan -SYMBIAN_LANG.en_TH = 161 #English as appropriate for use in Thailand -SYMBIAN_LANG.sv_FI = 85 #Finland Swedish -SYMBIAN_LANG.zh_HK = 30 #HongKong Chinese -SYMBIAN_LANG.es_419 = 83 #Latin American Spanish -SYMBIAN_LANG.en_ZA = 48 #South African English -SYMBIAN_LANG.fr_CH = 11 #Swiss French -SYMBIAN_LANG.de_CH = 12 #Swiss German -SYMBIAN_LANG.it_CH = 61 #Swiss Italian -SYMBIAN_LANG.zh_TW = 29 #Taiwan Chinese - -isEmpty(SYMBIAN_MATCHED_LANGUAGES) { - matchSymbianLanguages() -} - -# If there are translations that do not have Symbian language code defined for that exact -# language + country combination, but have Symbian language code defined for just the language, -# map the language + country combination to the same value as the plain language. -for(language, SYMBIAN_UNMAPPED_LANGUAGES) { - languageVar = SYMBIAN_LANG.$${language} - fallbackLanguageVar = SYMBIAN_LANG.$$eval(SYMBIAN_LANGUAGE_FALLBACK.$$language) - $$languageVar = $$eval($$fallbackLanguageVar) -} - -!isEmpty(SYMBIAN_MATCHED_TRANSLATIONS) { - # Generate dependencies to .ts files for pkg files - template_pkg_target.depends += $$SYMBIAN_MATCHED_TRANSLATIONS - installer_pkg_target.depends += $$SYMBIAN_MATCHED_TRANSLATIONS - stub_pkg_target.depends += $$SYMBIAN_MATCHED_TRANSLATIONS -} diff --git a/mkspecs/features/symbian/moc.prf b/mkspecs/features/symbian/moc.prf deleted file mode 100644 index 6030944c7d..0000000000 --- a/mkspecs/features/symbian/moc.prf +++ /dev/null @@ -1,18 +0,0 @@ -load(moc) - -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(OBJECTS_DIR, "(/|^)\\.[^/]+/?$") - !isEmpty(RET):{ - error("Symbian does not support directories starting with a dot. Please set OBJECTS_DIR to a different value in your profile. OBJECTS_DIR: $$OBJECTS_DIR") - } -} diff --git a/mkspecs/features/symbian/nested_exceptions.prf b/mkspecs/features/symbian/nested_exceptions.prf deleted file mode 100644 index defca94d6f..0000000000 --- a/mkspecs/features/symbian/nested_exceptions.prf +++ /dev/null @@ -1,4 +0,0 @@ -# use nested exceptions runtime support for apps -contains(TEMPLATE, app) { - MMP_RULES *= EPOCNESTEDEXCEPTIONS -} diff --git a/mkspecs/features/symbian/opengl.prf b/mkspecs/features/symbian/opengl.prf deleted file mode 100644 index 9a8ab18433..0000000000 --- a/mkspecs/features/symbian/opengl.prf +++ /dev/null @@ -1,21 +0,0 @@ -contains(QT_CONFIG, opengles1) { - INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES1 - !isEmpty(QMAKE_LIBDIR_OPENGL_ES1):QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES1 - target_qt:LIBS_PRIVATE += $$QMAKE_LIBS_OPENGL_ES1_QT - else:LIBS += $$QMAKE_LIBS_OPENGL_ES1 -} else:contains(QT_CONFIG, opengles2) { - INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES2 - !isEmpty(QMAKE_LIBDIR_OPENGL_ES2):QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES2 - target_qt:LIBS_PRIVATE += $$QMAKE_LIBS_OPENGL_ES2_QT - else:LIBS += $$QMAKE_LIBS_OPENGL_ES2 -} else { - INCLUDEPATH += $$QMAKE_INCDIR_OPENGL - !isEmpty(QMAKE_LIBDIR_OPENGL):QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL - target_qt:LIBS_PRIVATE += $$QMAKE_LIBS_OPENGL_QT - else:LIBS += $$QMAKE_LIBS_OPENGL -} - -contains(QT_CONFIG, egl) { - !isEmpty(QMAKE_LIBS_EGL): LIBS += $$QMAKE_LIBS_EGL -} - diff --git a/mkspecs/features/symbian/platform_paths.prf b/mkspecs/features/symbian/platform_paths.prf deleted file mode 100644 index f19898f188..0000000000 --- a/mkspecs/features/symbian/platform_paths.prf +++ /dev/null @@ -1,496 +0,0 @@ -# -# ============================================================================== -# Name : platform_paths.prf -# Part of : -# Interface : Platform Path Definitions API for Qt/S60 -# Description : Predefined include paths to be used in the pro-files for the -# components in the layered model. There is one definition for -# each layer. The pro-file should use the statement that is -# intended for the same layer as where the pro-file resides. -# -# Usage examples: -# -# Note: this file gets automatically added to all Qt/S60 projects -# -# Variable usages to add the system include paths -# -# The include paths has to be related to the layer in which your SW -# resides. Thus as an example: a component residing in middleware -# layer should use the MW specific macro. -# -# INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE -# INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE -# INCLUDEPATH += $$OS_LAYER_SYSTEMINCLUDE -# -# If there is a need to include public headers of some S60 component, -# various *_EXPORT_PATH macros can be utilized: -# -# INCLUDEPATH += $$OS_LAYER_PUBLIC_EXPORT_PATH(somecomponent) -# -# Variables related to using various parts of stdapis: -# -# To use STLLIB you need to have this in your pro-file: -# -# QMAKE_CXXFLAGS.CW *= $$STLLIB_USAGE_CW_FLAGS -# DEFINES *= $$STLLIB_USAGE_DEFINES -# -# Depending on what module you are using from stdapis you need to have -# one or more of the following variables in your pro-file. -# -# INCLUDEPATH += $$OS_LAYER_LIBC_SYSTEMINCLUDE -# INCLUDEPATH += $$OS_LAYER_GLIB_SYSTEMINCLUDE -# INCLUDEPATH += $$OS_LAYER_SSL_SYSTEMINCLUDE -# INCLUDEPATH += $$OS_LAYER_STDCPP_SYSTEMINCLUDE -# INCLUDEPATH += $$OS_LAYER_BOOST_SYSTEMINCLUDE -# INCLUDEPATH += $$OS_LAYER_DBUS_SYSTEMINCLUDE -# INCLUDEPATH += $$OS_LAYER_LIBUTILITY_SYSTEMINCLUDE -# -# These paths are primarily meant to be used as is in bld.inf and .mmp -# files, so they do not contain epocroot when using official symbian -# toolchains (symbian-abld or symbian-sbsv2). -# For makefile based mkspecs, epocroot is prepended to all paths for -# convenience. -# -# To use paths defined here in other contexts that require epocroot to be -# prepended always, such as exists checks, please use prependEpocroot -# replacement function: -# -# exists($$prependEpocroot($$MW_LAYER_PUBLIC_EXPORT_PATH(foobar.h))) -# -# ============================================================================== - -symbian-abld|symbian-sbsv2 { - epocroot_prefix = / -} else { - epocroot_prefix = $${EPOCROOT} -} - -symbian-abld|symbian-sbsv2:exists($${EPOCROOT}epoc32/include/platform_paths.prf) { - - # Symbian does not provide correct profiles for non-mmp based systems, so - # we only should get in here with abld and sbsv2. - - # Load platform specific paths - load($${EPOCROOT}epoc32/include/platform_paths.prf) - -} else { - - # No platform specific paths provided, use default paths - - exists($${EPOCROOT}epoc32/include/mw) { # New SF structure - - # --------------------------------------- - # Location, where the applications layer specific public headers are exported - # --------------------------------------- - - defineReplace(APP_LAYER_SDK_EXPORT_PATH) { - return ($${epocroot_prefix}epoc32/include/app/$$1) - } - defineReplace(APP_LAYER_PUBLIC_EXPORT_PATH) { - return ($${epocroot_prefix}epoc32/include/app/$$1) - } - - # --------------------------------------- - # Location, where the applications layer specific platform headers are exported - # --------------------------------------- - - defineReplace(APP_LAYER_DOMAIN_EXPORT_PATH) { - return ($${epocroot_prefix}epoc32/include/platform/app/$$1) - } - defineReplace(APP_LAYER_PLATFORM_EXPORT_PATH) { - return ($${epocroot_prefix}epoc32/include/platform/app/$$1) - } - - # --------------------------------------- - # Location, where the middleware layer specific public headers are exported - # --------------------------------------- - - defineReplace(MW_LAYER_SDK_EXPORT_PATH) { - return ($${epocroot_prefix}epoc32/include/mw/$$1) - } - defineReplace(MW_LAYER_PUBLIC_EXPORT_PATH) { - return ($${epocroot_prefix}epoc32/include/mw/$$1) - } - - # --------------------------------------- - # Location, where the middleware layer specific platform headers are exported - # --------------------------------------- - - defineReplace(MW_LAYER_DOMAIN_EXPORT_PATH) { - return ($${epocroot_prefix}epoc32/include/platform/mw/$$1) - } - defineReplace(MW_LAYER_PLATFORM_EXPORT_PATH) { - return ($${epocroot_prefix}epoc32/include/platform/mw/$$1) - } - - # --------------------------------------- - # Location, where the os layer specific public headers are exported - # --------------------------------------- - - defineReplace(OSEXT_LAYER_SDK_EXPORT_PATH) { - 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 ($${epocroot_prefix}epoc32/include/$$1) - } - - # --------------------------------------- - # Location, where the os specific platform headers are exported - # --------------------------------------- - - defineReplace(OSEXT_LAYER_DOMAIN_EXPORT_PATH) { - return ($${epocroot_prefix}epoc32/include/platform/$$1) - } - defineReplace(OS_LAYER_PLATFORM_EXPORT_PATH) { - return ($${epocroot_prefix}epoc32/include/platform/$$1) - } - - # --------------------------------------- - # General comments about the 3 define statements related to include paths: - # 1) the /epoc32/include/oem is now defined there for backward compability. - # Once the directory is empty, the directory will be removed. However this - # enables us to ensure that if you use these define statements => you do - # not have to remove the statements later on, when the directory no longer - # exists. - # 2) These statements should be enough in normal cases. For certain specific - # cases you might need to add some specific directory from /epoc32/include - # (for instance /epoc32/include/ecom). - # In normal cases the include staments in code should be relative to one of - # the system include paths, but in certain cases, the included files requires - # that the subdirectory is also part of the system include paths. - # --------------------------------------- - - # This variable defines the include paths, which are intended to be - # used in the pro-files that are part of the applications-layer. It includes all - # the needed directories from the /epoc32/include, that are valid ones for the - # application-layer components. - # - # Applications layer is the last one in the list, since most likely the most of - # the headers come from middleware or os-layer => thus they are first. - - APP_LAYER_SYSTEMINCLUDE = \ - $${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 - # the needed directories from the /epoc32/include, that are valid ones for the - # middleware-layer components. - - MW_LAYER_SYSTEMINCLUDE = \ - $${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 - # the needed directories from the /epoc32/include, that are valid ones for the - # os-layer components. - - OS_LAYER_SYSTEMINCLUDE = \ - $${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 - # to be only used by those components which need to use in their mmp-file either - # kern_ext.mmh or nkern_ext.mmh. Reason is that those - # 2 files already contain the /epoc32/include as system include path. - - OS_LAYER_KERNEL_SYSTEMINCLUDE = \ - $${epocroot_prefix}epoc32/include/platform - - - # --------------------------------------- - # Definitions that also define the systeminclude paths for various - # part of stdapis. Append to INCLUDEPATH in pro-file. - # --------------------------------------- - - OS_LAYER_LIBC_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis) \ - $$OS_LAYER_PUBLIC_EXPORT_PATH(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) - - OS_LAYER_SSL_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/openssl) - - # stlportv5 is preferred over stlport as it has the throwing version of operator new - exists($${EPOCROOT}epoc32/include/stdapis/stlport) \ - :!exists($${EPOCROOT}epoc32/include/stdapis/stlportv5) { - OS_LAYER_STDCPP_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlport) - } else { - OS_LAYER_STDCPP_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlportv5) - } - - OS_LAYER_BOOST_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(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) - - OS_LAYER_LIBUTILITY_SYSTEMINCLUDE = $$OS_LAYER_PLATFORM_EXPORT_PATH(stdapis/utility) - - } else { # Old pre-SF structure - - # --------------------------------------- - # Location, where the applications layer specific public headers are exported - # --------------------------------------- - - defineReplace(APP_LAYER_SDK_EXPORT_PATH) { - return ($${epocroot_prefix}epoc32/include/applications/$$1) - } - defineReplace(APP_LAYER_PUBLIC_EXPORT_PATH) { - return ($${epocroot_prefix}epoc32/include/applications/$$1) - } - - # --------------------------------------- - # Location, where the applications layer specific platform headers are exported - # --------------------------------------- - - defineReplace(APP_LAYER_DOMAIN_EXPORT_PATH) { - return ($${epocroot_prefix}epoc32/include/domain/applications/$$1) - } - defineReplace(APP_LAYER_PLATFORM_EXPORT_PATH) { - return ($${epocroot_prefix}epoc32/include/domain/applications/$$1) - } - - # --------------------------------------- - # Location, where the middleware layer specific public headers are exported - # --------------------------------------- - - defineReplace(MW_LAYER_SDK_EXPORT_PATH) { - return ($${epocroot_prefix}epoc32/include/middleware/$$1) - } - defineReplace(MW_LAYER_PUBLIC_EXPORT_PATH) { - return ($${epocroot_prefix}epoc32/include/middleware/$$1) - } - - # --------------------------------------- - # Location, where the middleware layer specific platform headers are exported - # --------------------------------------- - - defineReplace(MW_LAYER_DOMAIN_EXPORT_PATH) { - return ($${epocroot_prefix}epoc32/include/domain/middleware/$$1) - } - defineReplace(MW_LAYER_PLATFORM_EXPORT_PATH) { - return ($${epocroot_prefix}epoc32/include/domain/middleware/$$1) - } - - # --------------------------------------- - # Location, where the os layer specific public headers are exported - # --------------------------------------- - - defineReplace(OSEXT_LAYER_SDK_EXPORT_PATH) { - 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 ($${epocroot_prefix}epoc32/include/osextensions/$$1) - } - - # --------------------------------------- - # Location, where the os specific platform headers are exported - # --------------------------------------- - - defineReplace(OSEXT_LAYER_DOMAIN_EXPORT_PATH) { - return ($${epocroot_prefix}epoc32/include/domain/osextensions/$$1) - } - defineReplace(OS_LAYER_PLATFORM_EXPORT_PATH) { - return ($${epocroot_prefix}epoc32/include/domain/osextensions/$$1) - } - - # --------------------------------------- - # General comments about the 3 define statements related to include paths: - # 1) the /epoc32/include/oem is now defined there for backward compability. - # Once the directory is empty, the directory will be removed. However this - # enables us to ensure that if you use these define statements => you do - # not have to remove the statements later on, when the directory no longer - # exists. - # 2) These statements should be enough in normal cases. For certain specific - # cases you might need to add some specific directory from /epoc32/include - # (for instance /epoc32/include/ecom). - # In normal cases the include staments in code should be relative to one of - # the system include paths, but in certain cases, the included files requires - # that the subdirectory is also part of the system include paths. - # --------------------------------------- - - # This variable defines the include paths, which are intended to be - # used in the pro-files that are part of the applications-layer. It includes all - # the needed directories from the /epoc32/include, that are valid ones for the - # application-layer components. - # - # Applications layer is the last one in the list, since most likely the most of - # the headers come from middleware or os-layer => thus they are first. - - APP_LAYER_SYSTEMINCLUDE = \ - $${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 - # the needed directories from the /epoc32/include, that are valid ones for the - # middleware-layer components. - - MW_LAYER_SYSTEMINCLUDE = \ - $${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 - # the needed directories from the /epoc32/include, that are valid ones for the - # os-layer components. - - OS_LAYER_SYSTEMINCLUDE = \ - $${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 - # to be only used by those components which need to use in their mmp-file either - # kern_ext.mmh or nkern_ext.mmh. Reason is that those - # 2 files already contain the /epoc32/include as system include path. - - OS_LAYER_KERNEL_SYSTEMINCLUDE = \ - $${epocroot_prefix}epoc32/include/oem \ - $${epocroot_prefix}epoc32/include/osextensions \ - $${epocroot_prefix}epoc32/include/domain/osextensions - - - # --------------------------------------- - # Definitions that also define the systeminclude paths for various - # part of stdapis. Append to INCLUDEPATH in pro-file. - # --------------------------------------- - - OS_LAYER_LIBC_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis) \ - $$OS_LAYER_PUBLIC_EXPORT_PATH(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) \ - $${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) \ - $${epocroot_prefix}epoc32/include/stdapis/openssl - - # stlportv5 is preferred over stlport as it has the throwing version of operator new - OS_LAYER_STDCPP_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlportv5) \ - $${epocroot_prefix}epoc32/include/stdapis/stlportv5 - exists($${EPOCROOT}epoc32/include/osextensions/stdapis/stlport) \ - |exists($${EPOCROOT}epoc32/include/stdapis/stlport) { - !exists($${EPOCROOT}epoc32/include/osextensions/stdapis/stlportv5) \ - :!exists($${EPOCROOT}epoc32/include/stdapis/stlportv5) { - OS_LAYER_STDCPP_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlport) \ - $${epocroot_prefix}epoc32/include/stdapis/stlport - } - } - - OS_LAYER_BOOST_SYSTEMINCLUDE = $$OS_LAYER_PUBLIC_EXPORT_PATH(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) \ - $${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) \ - $${epocroot_prefix}epoc32/include/stdapis/utility - - } - - # Definitions common to both structures - - # --------------------------------------- - # Definitions to export IBY files to different folders where they will be taken - # to ROM image - # --------------------------------------- - - defineReplace(CORE_APP_LAYER_IBY_EXPORT_PATH) { - return($${epocroot_prefix}epoc32/rom/include/core/app/$$1) - } - defineReplace(CORE_MW_LAYER_IBY_EXPORT_PATH) { - return($${epocroot_prefix}epoc32/rom/include/core/mw/$$1) - } - - defineReplace(LANGUAGE_APP_LAYER_IBY_EXPORT_PATH) { - return($${epocroot_prefix}epoc32/rom/include/language/app/$$1) - } - defineReplace(LANGUAGE_MW_LAYER_IBY_EXPORT_PATH) { - return($${epocroot_prefix}epoc32/rom/include/language/mw/$$1) - } - - defineReplace(CUSTOMER_APP_LAYER_IBY_EXPORT_PATH) { - return($${epocroot_prefix}epoc32/rom/include/customer/app/$$1) - } - defineReplace(CUSTOMER_MW_LAYER_IBY_EXPORT_PATH) { - return($${epocroot_prefix}epoc32/rom/include/customer/mw/$$1) - } - - defineReplace(CUSTOMER_VARIANT_APP_LAYER_IBY_EXPORT_PATH) { - return($${epocroot_prefix}epoc32/rom/include/customervariant/app/$$1) - } - defineReplace(CUSTOMER_VARIANT_MW_LAYER_IBY_EXPORT_PATH) { - return($${epocroot_prefix}epoc32/rom/include/customervariant/mw/$$1) - } - - # You need to define the following in pro-file, if you are using the stllib: - # QMAKE_CXXFLAGS.CW *= $$STLLIB_USAGE_CW_FLAGS - # DEFINES *= $$STLLIB_USAGE_DEFINES - STLLIB_USAGE_CW_FLAGS = "-wchar_t on" - STLLIB_USAGE_DEFINES = _WCHAR_T_DECLARED - - # Smart prepend of EPOCROOT to a string - defineReplace(prependEpocroot) { - contains(1, ^$${EPOCROOT}) { - return($$1) - } else { - return($${EPOCROOT}$$replace(1,"^/",)) - } - } - -} diff --git a/mkspecs/features/symbian/prepend_includepath.prf b/mkspecs/features/symbian/prepend_includepath.prf deleted file mode 100644 index d9fd4fe46e..0000000000 --- a/mkspecs/features/symbian/prepend_includepath.prf +++ /dev/null @@ -1,14 +0,0 @@ -# Allow .pro files to specify include path(s) to be prepended to the list. -# -# This allows the project to override the default ordering, whereby paths -# relative to $$QMAKE_INCDIR_QT always come first. This ordering can cause -# problems when both the epoc32/include tree and a Qt include directory -# contain a header of the same name - in this case, the Qt header is always -# included by virtue of its path appearing first in the SYSTEMINCLUDE -# directives in the generated MMP file. -# -# To work around this situation, the following line can be added to the .pro -# file: -# PREPEND_INCLUDEPATH = /epoc32/include -# -INCLUDEPATH = $$PREPEND_INCLUDEPATH $$INCLUDEPATH diff --git a/mkspecs/features/symbian/qt.prf b/mkspecs/features/symbian/qt.prf deleted file mode 100644 index c376b642d1..0000000000 --- a/mkspecs/features/symbian/qt.prf +++ /dev/null @@ -1,13 +0,0 @@ -contains(DEFINES, QT_MAKEDLL)|contains(DEFINES, QT_DLL) { - CONFIG *= epocallowdlldata -} - -CONFIG += qtmain - -load(qt) - -# Workaround for the fact that Gnupoc and Symbian chose different approaches to -# the letter casing of headers. -contains(CONFIG, is_using_gnupoc) { - INCLUDEPATH += $${PWD}/../../common/symbian/header-wrappers -} diff --git a/mkspecs/features/symbian/qt_config.prf b/mkspecs/features/symbian/qt_config.prf deleted file mode 100644 index 82c18621b7..0000000000 --- a/mkspecs/features/symbian/qt_config.prf +++ /dev/null @@ -1,9 +0,0 @@ -load(qt_config) - -!contains(QMAKE_HOST.os, "Windows") { - # Test for the existence of lower cased headers, a sign of using Gnupoc. - # Note that the qmake "exists" test won't do because it is case insensitive. - system("test -f $${EPOCROOT}epoc32/include/akndoc.h") { - CONFIG += is_using_gnupoc - } -} diff --git a/mkspecs/features/symbian/qt_demo.prf b/mkspecs/features/symbian/qt_demo.prf deleted file mode 100644 index 9c4d96c1da..0000000000 --- a/mkspecs/features/symbian/qt_demo.prf +++ /dev/null @@ -1,17 +0,0 @@ -RSS_RULES ="group_name=\"QtDemos\";" - -nokiaVendor = "Nokia, Qt" -vendorinfo = \ - "; Localised Vendor name" \ - "%{$$addLanguageDependentPkgItem(nokiaVendor)}" \ - " " \ - "; Unique Vendor name" \ - ":\"$$nokiaVendor\"" \ - " " - -demos_deployment.pkg_prerules += vendorinfo -DEPLOYMENT += demos_deployment - -isEmpty(ICON):contains(TEMPLATE, ".*app"):contains(QT, gui):contains(CONFIG, qt):!contains(CONFIG, "no_icon") { - ICON = $$QT_SOURCE_TREE/src/s60installs/qt.svg -} diff --git a/mkspecs/features/symbian/qt_example.prf b/mkspecs/features/symbian/qt_example.prf deleted file mode 100644 index 8c523fb00f..0000000000 --- a/mkspecs/features/symbian/qt_example.prf +++ /dev/null @@ -1,17 +0,0 @@ -RSS_RULES ="group_name=\"QtExamples\";" - -nokiaVendor = "Nokia, Qt" -vendorinfo = \ - "; Localised Vendor name" \ - "%{$$addLanguageDependentPkgItem(nokiaVendor)}" \ - " " \ - "; Unique Vendor name" \ - ":\"$$nokiaVendor\"" \ - " " - -examples_deployment.pkg_prerules += vendorinfo -DEPLOYMENT += examples_deployment - -isEmpty(ICON):contains(TEMPLATE, ".*app"):contains(QT, gui):contains(CONFIG, qt):!contains(CONFIG, "no_icon") { - ICON = $$QT_SOURCE_TREE/src/s60installs/qt.svg -} diff --git a/mkspecs/features/symbian/release.prf b/mkspecs/features/symbian/release.prf deleted file mode 100644 index 8164495c6f..0000000000 --- a/mkspecs/features/symbian/release.prf +++ /dev/null @@ -1 +0,0 @@ -QMAKE_LIBDIR += $${EPOCROOT}epoc32/release/armv5/urel diff --git a/mkspecs/features/symbian/run_on_phone.prf b/mkspecs/features/symbian/run_on_phone.prf deleted file mode 100644 index ba88a662f9..0000000000 --- a/mkspecs/features/symbian/run_on_phone.prf +++ /dev/null @@ -1,40 +0,0 @@ -# make sure we have a sis file and then call 'runonphone' to execute it on the phone - -GENERATE_RUN_TARGETS = false - -contains(TEMPLATE, app): GENERATE_RUN_TARGETS = true -else:!equals(DEPLOYMENT, default_deployment) { - for(dep_item, $$list($$DEPLOYMENT)) { - ### Qt 5: remove .sources, inconsistent with INSTALLS - dep_item_sources = $$eval($${dep_item}.files) $$eval($${dep_item}.sources) - !isEmpty(dep_item_sources): GENERATE_RUN_TARGETS = true - } -} - -equals(GENERATE_RUN_TARGETS, true) { - baseTarget = $$symbianRemoveSpecialCharacters($$basename(TARGET)) - sis_file = $${baseTarget}.sis - symbian-abld|symbian-sbsv2 { - sis_destdir = - } else { - sis_destdir = $$DESTDIR - isEmpty(sis_destdir):sis_destdir = . - !equals(TARGET, "$$baseTarget"):sis_destdir = $$sis_destdir/$$dirname(TARGET) - !isEmpty(sis_destdir):!contains(sis_destdir, "[/\\\\]$"):sis_destdir = $${sis_destdir}/ - contains(QMAKE_HOST.os, "Windows"):sis_destdir = $$replace(sis_destdir, "/", "\\") - } - - contains(SYMBIAN_PLATFORMS, "WINSCW"):contains(TEMPLATE, "app") { - run_target.target = run - run_target.commands = call "$${EPOCROOT}epoc32/release/winscw/udeb/$${baseTarget}.exe" $(QT_RUN_OPTIONS) - - QMAKE_EXTRA_TARGETS += run_target - } - - runonphone_target.target = runonphone - runonphone_target.depends = sis - runonphone_target.commands = runonphone $(QT_RUN_ON_PHONE_OPTIONS) --sis "$${sis_destdir}$${sis_file}" - contains(TEMPLATE, "app"):runonphone_target.commands += "$${baseTarget}.exe" $(QT_RUN_OPTIONS) - - QMAKE_EXTRA_TARGETS += runonphone_target -} diff --git a/mkspecs/features/symbian/sis_targets.prf b/mkspecs/features/symbian/sis_targets.prf deleted file mode 100644 index f3452b7091..0000000000 --- a/mkspecs/features/symbian/sis_targets.prf +++ /dev/null @@ -1,230 +0,0 @@ -# Sis file creation -GENERATE_SIS_TARGETS = false - -contains(TEMPLATE, app): GENERATE_SIS_TARGETS = true -else:!equals(DEPLOYMENT, default_deployment) { - for(dep_item, $$list($$DEPLOYMENT)) { - ### Qt 5: remove .sources, inconsistent with INSTALLS - dep_item_sources = $$eval($${dep_item}.files) $$eval($${dep_item}.sources) - !isEmpty(dep_item_sources): GENERATE_SIS_TARGETS = true - } -} - -equals(GENERATE_SIS_TARGETS, true) { - - baseTarget = $$symbianRemoveSpecialCharacters($$basename(TARGET)) - template_pkg_target.target = $${baseTarget}_template.pkg - template_pkg_target.depends += $$_PRO_FILE_ - template_pkg_target.commands = $(MAKE) -f $(MAKEFILE) qmake - installer_pkg_target.target = $${baseTarget}_installer.pkg - installer_pkg_target.depends += $$_PRO_FILE_ - installer_pkg_target.commands = $(MAKE) -f $(MAKEFILE) qmake - stub_pkg_target.target = $${baseTarget}_stub.pkg - stub_pkg_target.depends += $$_PRO_FILE_ - stub_pkg_target.commands = $(MAKE) -f $(MAKEFILE) qmake - QMAKE_EXTRA_TARGETS += template_pkg_target installer_pkg_target stub_pkg_target - - qtPrepareTool(QMAKE_CREATEPACKAGE, createpackage) - - sis_objects_dir = $$OBJECTS_DIR - isEmpty(sis_objects_dir):sis_objects_dir = . - - CREATEPACKAGE_DIR = $$sis_objects_dir/createpackage_tmp - - QMAKE_CLEAN += $$CREATEPACKAGE_DIR/* - - symbian-abld|symbian-sbsv2 { - symbian-sbsv2 { - CONVERT_GCCE_PARAM = -g - } else { - CONVERT_GCCE_PARAM = - } - - make_cache_name = .make.cache - sis_target.target = sis - sis_target.commands = $(if $(wildcard $$make_cache_name), \ - $(MAKE) -f $(MAKEFILE) ok_sis MAKEFILES=$$make_cache_name \ - , \ - $(if $(QT_SIS_TARGET), \ - $(MAKE) -f $(MAKEFILE) ok_sis \ - , \ - $(MAKE) -f $(MAKEFILE) fail_sis_nocache \ - ) \ - ) - - sis_target.depends += $${baseTarget}_template.pkg - - ok_sis_target.target = ok_sis - ok_sis_target.commands = $$QMAKE_CREATEPACKAGE $$CONVERT_GCCE_PARAM -t $$CREATEPACKAGE_DIR $(QT_SIS_OPTIONS) $${baseTarget}_template.pkg \ - $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) - - unsigned_sis_target.target = unsigned_sis - unsigned_sis_target.commands = $(if $(wildcard $$make_cache_name), \ - $(MAKE) -f $(MAKEFILE) ok_unsigned_sis MAKEFILES=$$make_cache_name \ - , \ - $(if $(QT_SIS_TARGET), \ - $(MAKE) -f $(MAKEFILE) ok_unsigned_sis \ - , \ - $(MAKE) -f $(MAKEFILE) fail_sis_nocache \ - ) \ - ) - - unsigned_sis_target.depends += $${baseTarget}_template.pkg - - ok_unsigned_sis_target.target = ok_unsigned_sis - ok_unsigned_sis_target.commands = $$QMAKE_CREATEPACKAGE $$CONVERT_GCCE_PARAM -t $$CREATEPACKAGE_DIR $(QT_SIS_OPTIONS) -o $${baseTarget}_template.pkg $(QT_SIS_TARGET) - - target_sis_target.target = $${baseTarget}.sis - target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis - - # The installer_sis target has dependency to sis target, so it will regenerate sis package. - # To create smart installer wrapper for for an existing sis package, use ok_installer_sis target directly. - installer_sis_target.target = installer_sis - installer_sis_target.commands = $(MAKE) -f $(MAKEFILE) ok_installer_sis - installer_sis_target.depends = $${baseTarget}_installer.pkg sis - - ok_installer_sis_target.target = ok_installer_sis - ok_installer_sis_target.commands = $$QMAKE_CREATEPACKAGE -t $$CREATEPACKAGE_DIR $(QT_SIS_OPTIONS) $${baseTarget}_installer.pkg - \ - $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) - ok_installer_sis_target.depends = $${baseTarget}_installer.pkg - - unsigned_installer_sis_target.target = unsigned_installer_sis - unsigned_installer_sis_target.commands = $(MAKE) -f $(MAKEFILE) ok_unsigned_installer_sis - unsigned_installer_sis_target.depends = $${baseTarget}_installer.pkg unsigned_sis - - ok_unsigned_installer_sis_target.target = ok_unsigned_installer_sis - ok_unsigned_installer_sis_target.commands = $$QMAKE_CREATEPACKAGE -t $$CREATEPACKAGE_DIR $(QT_SIS_OPTIONS) -o $${baseTarget}_installer.pkg - ok_unsigned_installer_sis_target.depends = $${baseTarget}_installer.pkg - - fail_sis_nocache_target.target = fail_sis_nocache - fail_sis_nocache_target.commands = "$(error Project has to be built or QT_SIS_TARGET environment variable has to be set before calling 'SIS' target)" - - stub_sis_target.target = stub_sis - stub_sis_target.commands = $(if $(wildcard $$make_cache_name), \ - $(MAKE) -f $(MAKEFILE) ok_stub_sis MAKEFILES=$$make_cache_name \ - , \ - $(if $(QT_SIS_TARGET), \ - $(MAKE) -f $(MAKEFILE) ok_stub_sis \ - , \ - $(MAKE) -f $(MAKEFILE) fail_sis_nocache \ - ) \ - ) - - stub_sis_target.depends += $${baseTarget}_stub.pkg - - ok_stub_sis_target.target = ok_stub_sis - ok_stub_sis_target.commands = $$QMAKE_CREATEPACKAGE -t $$CREATEPACKAGE_DIR -s $(QT_SIS_OPTIONS) $${baseTarget}_stub.pkg \ - $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) - - QMAKE_EXTRA_TARGETS += sis_target \ - ok_sis_target \ - unsigned_sis_target \ - ok_unsigned_sis_target \ - target_sis_target \ - installer_sis_target \ - ok_installer_sis_target \ - unsigned_installer_sis_target \ - ok_unsigned_installer_sis_target \ - fail_sis_nocache_target \ - stub_sis_target \ - ok_stub_sis_target - # Sbsv2 has its own store_build target which is using flms. - !symbian-sbsv2 { - contains(QMAKE_HOST.os, "Windows") { - shellFixedHash = $${LITERAL_HASH} - } else { - shellFixedHash = \\$${LITERAL_HASH} - } - store_build_target.target = store_build - store_build_target.commands = \ - @echo $${shellFixedHash} ============================================================================== > $$make_cache_name \ - && echo $${shellFixedHash} This file is generated by make and should not be modified by the user >> $$make_cache_name \ - && echo $${shellFixedHash} Name : $$make_cache_name >> $$make_cache_name \ - && echo $${shellFixedHash} Part of : lineedits >> $$make_cache_name \ - && echo $${shellFixedHash} Description : This file is used to cache last build target for >> $$make_cache_name \ - && echo $${shellFixedHash} make sis target. >> $$make_cache_name \ - && echo $${shellFixedHash} Version : >> $$make_cache_name \ - && echo $${shellFixedHash} >> $$make_cache_name \ - && echo $${shellFixedHash} ============================================================================== >> $$make_cache_name \ - && echo QT_SIS_TARGET ?= $(QT_SIS_TARGET) >> $$make_cache_name - - QMAKE_EXTRA_TARGETS += store_build_target - QMAKE_CLEAN += $$make_cache_name - } - } else { - sis_destdir = $$DESTDIR - isEmpty(sis_destdir):sis_destdir = . - !equals(TARGET, "$$baseTarget"):sis_destdir = $$sis_destdir/$$dirname(TARGET) - - sis_target.target = sis - sis_target.commands = $$QMAKE_CREATEPACKAGE -t $$CREATEPACKAGE_DIR $(QT_SIS_OPTIONS) $${baseTarget}_template.pkg \ - - $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) - sis_target.depends = first $${baseTarget}_template.pkg - - unsigned_sis_target.target = unsigned_sis - unsigned_sis_target.commands = $$QMAKE_CREATEPACKAGE -t $$CREATEPACKAGE_DIR $(QT_SIS_OPTIONS) -o $${baseTarget}_template.pkg - unsigned_sis_target.depends = first $${baseTarget}_template.pkg - - target_sis_target.target = $${sis_destdir}/$${baseTarget}.sis - target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis - - installer_sis_target.target = installer_sis - installer_sis_target.commands = $(MAKE) -f $(MAKEFILE) ok_installer_sis - installer_sis_target.depends = $${baseTarget}_installer.pkg sis - - ok_installer_sis_target.target = ok_installer_sis - ok_installer_sis_target.commands = $$QMAKE_CREATEPACKAGE -t $$CREATEPACKAGE_DIR $(QT_SIS_OPTIONS) $${baseTarget}_installer.pkg - \ - $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) - ok_installer_sis_target.depends = $${baseTarget}_installer.pkg - - unsigned_installer_sis_target.target = unsigned_installer_sis - unsigned_installer_sis_target.commands = $$QMAKE_CREATEPACKAGE -t $$CREATEPACKAGE_DIR $(QT_SIS_OPTIONS) -o $${baseTarget}_installer.pkg - unsigned_installer_sis_target.depends = $${baseTarget}_installer.pkg unsigned_sis - - !isEmpty(sis_destdir):!equals(sis_destdir, "."):!equals(sis_destdir, "./") { - sis_target.commands += && $$QMAKE_MOVE $${baseTarget}.sis $$sis_destdir - unsigned_sis_target.commands += && $$QMAKE_MOVE $${baseTarget}_unsigned.sis $$sis_destdir - installer_sis_target.commands += && $$QMAKE_MOVE $${baseTarget}_installer.sis $$sis_destdir - unsigned_installer_sis_target.commands += && $$QMAKE_MOVE $${baseTarget}_unsigned_installer.sis $$sis_destdir - } - - QMAKE_EXTRA_TARGETS += sis_target \ - unsigned_sis_target \ - target_sis_target \ - installer_sis_target \ - ok_installer_sis_target \ - unsigned_installer_sis_target - - QMAKE_DISTCLEAN += $${sis_destdir}/$${baseTarget}.sis - } - - deploy_target.target = deploy - contains(QMAKE_HOST.os, "Windows") { - deploy_target.depends = sis - deploy_target.commands = call $$target_sis_target.target - } else { - deploy_target.commands = @echo Deployment not supported in this environment - } - QMAKE_EXTRA_TARGETS += deploy_target - -} else { - contains(TEMPLATE, subdirs) { - # Enable recursive sis target. - sis_target.CONFIG = recursive - sis_target.recurse = $$SUBDIRS - } else { - # Make sure we build everything, since other sis targets in a recursive invocation - # may depend on them, even if this one is empty. - # In abld/sbsv2, we assume that subdir has been built already, as all builds are recursive. - !symbian-abld:!symbian-sbsv2: sis_target.depends = first - } - sis_target.commands = - sis_target.target = sis - QMAKE_EXTRA_TARGETS += sis_target - - symbian-abld { - # Create dummy store_build target to avoid errors from .mk callbacks during build - store_build_target.target = store_build - QMAKE_EXTRA_TARGETS += store_build_target - } -} diff --git a/mkspecs/features/symbian/stl.prf b/mkspecs/features/symbian/stl.prf deleted file mode 100644 index 1fd5e16e32..0000000000 --- a/mkspecs/features/symbian/stl.prf +++ /dev/null @@ -1,43 +0,0 @@ -CONFIG -= stl_off - -# STL usage in S60 requires the "OPTION CW -wchar_t on" mmp statement to be used. -# This statement is added via $$STLLIB_USAGE_CW_FLAGS variable below. -# S60 STL documentation instructs to use also "MACRO _WCHAR_T_DECLARED" statement, -# but QtS60 will not compile if that statement is set. - -QMAKE_CXXFLAGS.CW *= $$STLLIB_USAGE_CW_FLAGS - -# Path to stlport headers -INCLUDEPATH += $$OS_LAYER_STDCPP_SYSTEMINCLUDE - -# Remove mkspecs/common/symbian/stl-off from beginning of includepath -# in order to use new and delete operators from STL -INCLUDEPATH -= $$[QT_INSTALL_DATA]/mkspecs/common/symbian/stl-off - -# libstdcppv5 is preferred over libstdcpp as it has/uses the throwing version of operator new -# STDCPP turns on standard C++ new behaviour (ie. throwing new) -use_libstdcppv5 = true - -# Fall back to old implementation if that is the only one that is found -exists($${EPOCROOT}epoc32/release/armv5/lib/libstdcpp.dso)|exists($${EPOCROOT}epoc32/release/winscw/udeb/libstdcpp.dll) { - !exists($${EPOCROOT}epoc32/release/armv5/lib/libstdcppv5.dso):!exists($${EPOCROOT}epoc32/release/winscw/udeb/libstdcppv5.dll) { - use_libstdcppv5 = false - } -} - -equals(use_libstdcppv5, true) { - LIBS *= -llibstdcppv5.dll - symbian-abld|symbian-sbsv2 { - MMP_RULES *= "STDCPP" - } else { - DEFINES *= __SYMBIAN_STDCPP_SUPPORT__ - LIBS *= -lstdnew.dll - } -} else { - LIBS *= -llibstdcpp.dll -} - -# use the runtime support for nested exceptions, if a library is available -exists($${EPOCROOT}epoc32/release/armv5/urel/usrt_nx_*.lib) { - CONFIG += nested_exceptions -} diff --git a/mkspecs/features/symbian/stl_off.prf b/mkspecs/features/symbian/stl_off.prf deleted file mode 100644 index d5d1c7c30f..0000000000 --- a/mkspecs/features/symbian/stl_off.prf +++ /dev/null @@ -1,2 +0,0 @@ -CONFIG -= stl - diff --git a/mkspecs/features/symbian/symbian_appbooster.prf b/mkspecs/features/symbian/symbian_appbooster.prf deleted file mode 100644 index 080f4d0a50..0000000000 --- a/mkspecs/features/symbian/symbian_appbooster.prf +++ /dev/null @@ -1,32 +0,0 @@ -contains(TEMPLATE, ".*app") { - baseTarget = $$symbianRemoveSpecialCharacters($$basename(TARGET)) - - symbian-abld|symbian-sbsv2 { - LITE_REG_TARGET = $$_PRO_FILE_PWD_ - } else { - contains(DESTDIR, "/.*") { - LITE_REG_TARGET = $$DESTDIR - } else:isEmpty(DESTDIR) { - LITE_REG_TARGET = $$OUT_PWD - } else { - LITE_REG_TARGET = $$OUT_PWD/$$DESTDIR - } - } - - LITE_REG_TARGET = $${LITE_REG_TARGET}/$${baseTarget}.applite - LITE_REG_TEMPLATE = $$[QT_INSTALL_DATA]/mkspecs/common/symbian/template.applite - - lite_reg_copy.input = LITE_REG_TEMPLATE - lite_reg_copy.output = $$LITE_REG_TARGET - lite_reg_copy.variable_out = PRE_TARGETDEPS - lite_reg_copy.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} - lite_reg_copy.CONFIG += no_link - QMAKE_EXTRA_COMPILERS += lite_reg_copy - - isEmpty(LITE_IMPORT_DIR): LITE_IMPORT_DIR = /private/20034884/import/apps - lite_deployment.sources += $$LITE_REG_TARGET - lite_deployment.path = $$LITE_IMPORT_DIR - DEPLOYMENT += lite_deployment - - LIBS += -lqDeclarativeBooster.dll -} diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf deleted file mode 100644 index 8c757077d3..0000000000 --- a/mkspecs/features/symbian/symbian_building.prf +++ /dev/null @@ -1,369 +0,0 @@ -symbian-armcc { - QMAKE_CFLAGS += $$QMAKE_CFLAGS.ARMCC - QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS.ARMCC - QMAKE_LFLAGS += $$QMAKE_LFLAGS.ARMCC - # This is to prevent inclusion of the shipped RVCT headers, which are often in the - # environment variable RVCTxxINC by default. -J prevents the searching of that location, - # but needs a path, so just specify somewhere guaranteed not to contain header files. - QMAKE_CFLAGS += -J$${EPOCROOT}epoc32/ignore_this_path - QMAKE_CXXFLAGS += -J$${EPOCROOT}epoc32/ignore_this_path -} else:symbian-gcce { - QMAKE_CFLAGS += $$QMAKE_CFLAGS.GCCE - QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS.GCCE - QMAKE_LFLAGS += $$QMAKE_LFLAGS.GCCE -} - -# We need a target name without the INFIX'ed part, since flags are not infixed. -equals(QMAKE_TARGET_PRODUCT, Qt4):clean_TARGET = $$replace(TARGET, "$${QT_LIBINFIX}$", "") -else:clean_TARGET = $$TARGET - -# we have some module specific options (defined in qt.prf) lets add them -!contains(clean_TARGET, ".*[ -/].*"):eval(TMPVAR = \$\$QMAKE_$${clean_TARGET}_CXXFLAGS) -!isEmpty(TMPVAR):QMAKE_CXXFLAGS += $$TMPVAR -!contains(clean_TARGET, ".*[ -/].*"):eval(TMPVAR = \$\$QMAKE_$${clean_TARGET}_LFLAGS) -!isEmpty(TMPVAR) { - QMAKE_LFLAGS += $$TMPVAR -} else :symbian-gcce { # lets provide a simple default. Without elf2e32 complains - QMAKE_LFLAGS += -Ttext 0x80000 -Tdata 0x400000 -} - -qtPrepareTool(QMAKE_ELF2E32_WRAPPER, elf2e32_qtwrapper) - -isEmpty(TARGET.EPOCSTACKSIZE):TARGET.EPOCSTACKSIZE = 0x14000 -isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x020000 0x800000 -epoc_heap_size = $$split(TARGET.EPOCHEAPSIZE, " ") -epoc_heap_size = $$join(epoc_heap_size, ",") - -symbianObjdir=$$OBJECTS_DIR -isEmpty(symbianObjdir) { - symbianObjdir = . -} -symbianDestdir=$$DESTDIR -isEmpty(symbianDestdir) { - symbianDestdir = . -} -baseTarget = $$symbianRemoveSpecialCharacters($$basename(TARGET)) -!equals(TARGET, "$$baseTarget"):symbianDestdir = $$symbianDestdir/$$dirname(TARGET) - -contains(QMAKE_CFLAGS, "--thumb")|contains(QMAKE_CXXFLAGS, "--thumb")|contains(QMAKE_CFLAGS, "-mthumb")|contains(QMAKE_CXXFLAGS, "-mthumb") { - DEFINES += __MARM_THUMB__ -} - -defineReplace(processSymbianLibrary) { - qt_library = $$replace(1, "\\.dll$", ".dso") - qt_library = $$replace(qt_library, "^-l", "") - isFullName = $$find(qt_library, \\.) - isEmpty(isFullName):qt_library="$${qt_library}.dso" - return($$qt_library) -} - -# This part turn "-llibc" into "libc.dso", and moves -L entries to QMAKE_LIBDIR. -libsToProcess = LIBS LIBS_PRIVATE QMAKE_LIBS -for(libToProcess, libsToProcess) { - qt_libraries = $$split($$libToProcess, " ") - eval($$libToProcess =) - for(qt_library, qt_libraries) { - contains(qt_library, "^-L.*") { - qt_library = $$replace(qt_library, "^-L", "") - QMAKE_LIBDIR += $$qt_library - } else { - 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) - } - } -} - -elf2e32_LIBPATH = -for(libPath, QMAKE_LIBDIR) { - elf2e32_LIBPATH += "--libpath=$$libPath" -} - -isEmpty(VERSION) { - VERSION = $$QT_VERSION -} - -# Check for version validity. -!isEmpty(VERSION):!contains(VERSION, "[0-9]+"):!contains(VERSION, "[0-9]+\\.[0-9]+")!contains(VERSION, "[0-9]+(\\.[0-9]+){2}") { - error("Invalid VERSION for Symbian: $$VERSION") -} - -splitVersion = $$split(VERSION, ".") -count(splitVersion, 0) { - # Default Symbian version if none is specified. - hexVersion = "000a0000" - decVersion = "10.0" -} else { - count(splitVersion, 3) { - hexVersion = $$system("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("perl -e \"printf (\\\"%d\\\", 0x$$hexPart2)\"") - - !contains(hexVersion, "[0-9a-f]{8}"):hexVersion = "00$${hexVersion}" - } else { # app code may have different numbering... - hexVersion = $$VERSION - decVersion = $$VERSION - } -} -#error ("hexVersion: $$hexVersion, decVersion: $$decVersion") - -intUid3 = $$lower($$replace(TARGET.UID3, "^0x", "")) -isEmpty(TARGET.SID):TARGET.SID = $$TARGET.UID3 -isEmpty(TARGET.UID2):TARGET.UID2 = 0x00000000 - -capability = $$replace(TARGET.CAPABILITY, " ", "+") -capability = $$join(capability, "+") -capability = $$replace(capability, "\\+-", "-") -isEmpty(capability): capability = "None" -capability = "--capability=$$capability" - -contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { - contains(CONFIG, plugin):QMAKE_ELF2E32_FLAGS += --definput=plugin_commonu.def - - !isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$escape_expand(\\n\\t)$$QMAKE_POST_LINK - 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 \ - --uid2=$$TARGET.UID2 \ - --uid3=$$TARGET.UID3 \ - --targettype=DLL \ - --elfinput=$${symbianDestdir}/$${baseTarget}.sym \ - --output=$${symbianDestdir}/$${baseTarget}.dll \ - --tmpdso=$${symbianObjdir}/$${baseTarget}.dso \ - --dso=$${symbianDestdir}/$${baseTarget}.dso \ - --defoutput=$$symbianObjdir/$${baseTarget}.def \ - --linkas=\"$${baseTarget}{$${hexVersion}}[$${intUid3}].dll\" \ - --heap=$$epoc_heap_size \ - --stack=$$TARGET.EPOCSTACKSIZE \ - $$elf2e32_LIBPATH \ - $$capability \ - $$QMAKE_ELF2E32_FLAGS \ - $$QMAKE_POST_LINK - silent:QMAKE_POST_LINK = @echo postlinking $@ && $$QMAKE_POST_LINK - QMAKE_DISTCLEAN += $${symbianDestdir}/$${baseTarget}.sym - QMAKE_DISTCLEAN += $${symbianDestdir}/$${baseTarget}.dso - QMAKE_CLEAN += $${symbianObjdir}/$${baseTarget}.dso - QMAKE_CLEAN += $${symbianObjdir}/$${baseTarget}.def - - symbian-armcc: { - 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:edllstub.lib \ - -l:edll.lib \ - -l:usrt2_2.lib \ - -l:dfpaeabi.dso \ - -l:drtaeabi.dso \ - -l:scppnwdl.dso \ - -lsupc++ \ - -lgcc - } - - QMAKE_LFLAGS += --soname \"$${baseTarget}{$${hexVersion}}[$${intUid3}].dll\" - DEFINES += __DLL__ -} - -contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@:.*") { - !isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$escape_expand(\\n\\t)$$QMAKE_POST_LINK - 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 \ - --uid2=$$TARGET.UID2 \ - --uid3=$$TARGET.UID3 \ - --targettype=EXE \ - --elfinput=$${symbianDestdir}/$${baseTarget}.sym \ - --output=$${symbianDestdir}/$${baseTarget}.exe \ - --linkas=\"$${baseTarget}{$${hexVersion}}[$${intUid3}].exe\" \ - --heap=$$epoc_heap_size \ - --stack=$$TARGET.EPOCSTACKSIZE \ - $$elf2e32_LIBPATH \ - $$capability \ - $$QMAKE_ELF2E32_FLAGS \ - && $$QMAKE_COPY "$${symbianDestdir}/$${baseTarget}.exe" "$${symbianDestdir}/$${baseTarget}" \ - $$QMAKE_POST_LINK - silent:QMAKE_POST_LINK = @echo postlinking $@ && $$QMAKE_POST_LINK - QMAKE_DISTCLEAN += $${symbianDestdir}/$${baseTarget}.sym - QMAKE_DISTCLEAN += $${symbianDestdir}/$${baseTarget}.exe - QMAKE_CLEAN += $${symbianDestdir}/$${baseTarget} - - 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") { - QMAKE_LIBS -= $$QMAKE_LIBS_QT_ENTRY - QMAKE_LIBS += $$QMAKE_LIBS_QT_ENTRY - } else { - QMAKE_LIBS -= $$QMAKE_LIBS_NO_QT_ENTRY - QMAKE_LIBS += $$QMAKE_LIBS_NO_QT_ENTRY - } - } else :symbian-gcce { - # notice that we can't merge these as ordering of arguments is important. - QMAKE_LIBS += \ - -l:eexe.lib \ - -l:usrt2_2.lib - contains(CONFIG, "qt") { - modified_entry = $$replace(QMAKE_LIBS_QT_ENTRY, "^-l", "-l:") - QMAKE_LIBS -= $$modified_entry - QMAKE_LIBS += $$modified_entry - } else { - modified_entry = $$replace(QMAKE_LIBS_NO_QT_ENTRY, "^-l", "-l:") - QMAKE_LIBS -= $$modified_entry - modified_entry = $$replace(QMAKE_LIBS_NO_QT_ENTRY_GCCE, "^-l", "-l:") - QMAKE_LIBS -= $$modified_entry - QMAKE_LIBS += $$modified_entry - } - QMAKE_LIBS += \ - -l:dfpaeabi.dso \ - -l:drtaeabi.dso \ - -l:scppnwdl.dso \ - -lsupc++ \ - -lgcc - QMAKE_LFLAGS += --shared - } - - QMAKE_LFLAGS += --soname \"$${baseTarget}{$${hexVersion}}[$${intUid3}].exe\" - DEFINES += __EXE__ -} - -# Symbian resource files -symbian_resources_INCLUDES = $$join(INCLUDEPATH, " -I", "-I") -symbian_resources_DEFINES = $$join(DEFINES, " -D", "-D") -symbian_resources_DEFINES += -D__QT_SYMBIAN_RESOURCE__ -symbian_resources_RCC_DIR = $$replace(RCC_DIR, "/$", "") -symbian_resources_INCLUDES += "-I$$symbian_resources_RCC_DIR" - -for(symbian_resource, SYMBIAN_RESOURCES) { - symbian_resource = $$basename(symbian_resource) - symbian_resource_clean = $$replace(symbian_resource, "\\.rss$", ".rsc") - QMAKE_DISTCLEAN += $${symbianDestdir}/$${symbian_resource_clean} - symbian_resource_clean = $$replace(symbian_resource, "\\.rss$", ".rpp") - QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${symbian_resource_clean} -} - -symbianresources.input = SYMBIAN_RESOURCES -symbianresources.output = $$symbian_resources_RCC_DIR/${QMAKE_FILE_BASE}$${QT_LIBINFIX}.rsg -symbianresources.commands = cpp -nostdinc -undef \ - -include $$QMAKE_SYMBIAN_INCLUDES \ - $$symbian_resources_INCLUDES \ - $$symbian_resources_DEFINES \ - ${QMAKE_FILE_NAME} \ - > $${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 \ - -h$${symbian_resources_RCC_DIR}/${QMAKE_FILE_BASE}$${QT_LIBINFIX}.rsg \ - -i${QMAKE_FILE_NAME} -silent:symbianresources.commands = @echo rcomp $< && $$symbianresources.commands -symbianresources.dependency_type = TYPE_C -symbianresources.CONFIG = no_link target_predeps - -QMAKE_EXTRA_COMPILERS += symbianresources - -# This section generates the rsg and rsc files for symbian. -contains(TEMPLATE, "app"):!contains(CONFIG, "no_icon") { - # Look for extra languages for the resources, and then generate a target for each one. - localize_deployment:symbianGenResourceLanguages = $$SYMBIAN_MATCHED_LANGUAGES default - else:symbianGenResourceLanguages = default - for(language, symbianGenResourceLanguages) { - # Special languages get their language number appended to the filename. - contains(language, default) { - symbianGenResource_DEFINES = $$symbian_resources_DEFINES - rpp = $${symbian_resources_RCC_DIR}/$${baseTarget}.rpp - rsc = $${symbianDestdir}/$${baseTarget}.rsc - rsg = $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg - } else { - languageNo = $$eval(SYMBIAN_LANG.$$language) - symbianGenResource_DEFINES = $$symbian_resources_DEFINES -DLANGUAGE_$${languageNo} - rpp = $${symbian_resources_RCC_DIR}/$${baseTarget}_$${languageNo}.rpp - rsc = $${symbianDestdir}/$${baseTarget}.r$${languageNo} - rsg = $${symbian_resources_RCC_DIR}/$${baseTarget}_$${languageNo}.rsg - } - - # Make our own extra target in order to get dependencies for generated - # files right. This also avoids the warning about files not found. - eval(symbianGenResource_$${language}.target = $$rsg) - eval(symbianGenResource_$${language}.commands = cpp -nostdinc -undef \ - -include $$QMAKE_SYMBIAN_INCLUDES \ - $$symbian_resources_INCLUDES \ - $$symbianGenResource_DEFINES \ - $${baseTarget}.rss \ - > $$rpp \ - && rcomp -u -m045,046,047 \ - -s$$rpp \ - -o$$rsc \ - -h$$rsg \ - -i$${baseTarget}.rss) - silent:eval(symbianGenResource_$${language}.commands = @echo rcomp $${baseTarget}.rss && $$eval(symbianGenResource_$${language}.commands)) - eval(symbianGenResource_$${language}.depends = $${baseTarget}.rss) - PRE_TARGETDEPS += $$rsg - QMAKE_CLEAN += $$rsg $$rpp - QMAKE_DISTCLEAN += $$rsc - - QMAKE_EXTRA_TARGETS += symbianGenResource_$${language} - - # Note that we depend on the base rsg file, even if dealing with a specific language. - # hence we don't use $$rsg on the next line. - eval(symbianGenRegResource_$${language}.depends = $${baseTarget}_reg.rss $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg) - contains(language, default) { - rpp = $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rpp - rsc = $${symbianDestdir}/$${baseTarget}_reg.rsc - rsg = $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rsg - } else { - rpp = $${symbian_resources_RCC_DIR}/$${baseTarget}_reg_$${languageNo}.rpp - rsc = $${symbianDestdir}/$${baseTarget}_reg.r$${languageNo} - rsg = $${symbian_resources_RCC_DIR}/$${baseTarget}_reg_$${languageNo}.rsg - } - eval(symbianGenRegResource_$${language}.target = $$rsg) - eval(symbianGenRegResource_$${language}.commands = cpp -nostdinc -undef \ - -include $$QMAKE_SYMBIAN_INCLUDES \ - $$symbian_resources_INCLUDES \ - $$symbianGenResource_DEFINES \ - $${baseTarget}_reg.rss \ - > $$rpp \ - && rcomp -u -m045,046,047 \ - -s$$rpp \ - -o$$rsc \ - -h$$rsg \ - -i$${baseTarget}_reg.rss) - silent:eval(symbianGenRegResource_$${language}.commands = @echo rcomp $${baseTarget}_reg.rss && $$eval(symbianGenRegResource_$${language}.commands)) - PRE_TARGETDEPS += $$rsg - QMAKE_CLEAN += $$rsg $$rpp - QMAKE_DISTCLEAN += $$rsc - - QMAKE_EXTRA_TARGETS += symbianGenRegResource_$${language} - } - - # Trick to get qmake to create the RCC_DIR for us. - symbianRccDirCreation.input = SOURCES - symbianRccDirCreation.commands = - symbianRccDirCreation.output = $${symbian_resources_RCC_DIR}/symbian_resource_dummy - symbianRccDirCreation.CONFIG = no_link combine - - QMAKE_EXTRA_COMPILERS += symbianRccDirCreation - - QMAKE_DISTCLEAN += $${baseTarget}.rss \ - $${baseTarget}_reg.rss \ - $${baseTarget}.loc -} - -# Generated pkg files - -QMAKE_DISTCLEAN += $${baseTarget}_template.pkg \ - $${baseTarget}_installer.pkg \ - $${baseTarget}_stub.pkg diff --git a/mkspecs/features/symbian/thread.prf b/mkspecs/features/symbian/thread.prf deleted file mode 100644 index 885438ab36..0000000000 --- a/mkspecs/features/symbian/thread.prf +++ /dev/null @@ -1,2 +0,0 @@ -# Symbian behaves like POSIX when it comes to threads. -include(../unix/thread.prf) diff --git a/mkspecs/features/uitools.prf b/mkspecs/features/uitools.prf index 10835d4ab3..50c4c60697 100644 --- a/mkspecs/features/uitools.prf +++ b/mkspecs/features/uitools.prf @@ -2,8 +2,7 @@ QT += xml qt:load(qt) # Include the correct version of the UiLoader library -symbian: QTUITOOLS_LINKAGE = -lQtUiTools.lib -else: QTUITOOLS_LINKAGE = -lQtUiTools$${QT_LIBINFIX} +QTUITOOLS_LINKAGE = -lQtUiTools$${QT_LIBINFIX} CONFIG(debug, debug|release) { mac: QTUITOOLS_LINKAGE = -lQtUiTools$${QT_LIBINFIX}_debug diff --git a/qmake/Makefile.unix b/qmake/Makefile.unix index c522779981..647c78edb9 100644 --- a/qmake/Makefile.unix +++ b/qmake/Makefile.unix @@ -11,8 +11,7 @@ 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_vcproj.o msvc_vcxproj.o msvc_nmake.o msvc_objectmodel.o msbuild_objectmodel.o \ - symmake.o initprojectdeploy_symbian.o symmake_abld.o symmake_sbsv2.o \ - symbiancommon.o registry.o epocroot.o gbuild.o + gbuild.o #qt code QOBJS=qtextcodec.o qutfcodec.o qstring.o qtextstream.o qiodevice.o qmalloc.o qglobal.o \ @@ -35,11 +34,6 @@ DEPEND_SRC=project.cpp property.cpp meta.cpp main.cpp generators/makefile.cpp ge generators/mac/pbuilder_pbx.cpp generators/mac/xmloutput.cpp generators/metamakefile.cpp \ generators/makefiledeps.cpp option.cpp generators/win32/mingw_make.cpp generators/makefile.cpp \ generators/win32/msvc_vcproj.cpp generators/win32/msvc_vcxproj.cpp generators/win32/msvc_objectmodel.cpp generators/win32/msbuild_objectmodel.cpp generators/win32/msbuild_objectmodel.cpp generators/win32/msvc_nmake.cpp generators/win32/borland_bmake.cpp \ - generators/symbian/symmake.cpp generators/symbian/initprojectdeploy_symbian.cpp \ - $(SOURCE_PATH)/tools/shared/windows/registry.cpp \ - $(SOURCE_PATH)/tools/shared/symbian/epocroot.cpp \ - generators/symbian/symmake_abld.cpp generators/symbian/symmake_sbsv2.cpp \ - generaters/symbian/symbiancommon.cpp \ generators/integrity/gbuild.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 \ @@ -75,13 +69,13 @@ DEPEND_SRC=project.cpp property.cpp meta.cpp main.cpp generators/makefile.cpp ge $(QTSRCS) CPPFLAGS = -g -I. -Igenerators -Igenerators/unix -Igenerators/win32 \ - -Igenerators/mac -Igenerators/symbian -Igenerators/integrity \ + -Igenerators/mac -Igenerators/integrity \ -I$(BUILD_PATH)/include -I$(BUILD_PATH)/include/QtCore \ -I$(BUILD_PATH)/include/QtCore/$(QT_VERSION) -I$(BUILD_PATH)/include/QtCore/$(QT_VERSION)/QtCore \ -I$(BUILD_PATH)/src/corelib/global -I$(BUILD_PATH)/src/corelib/xml \ -I$(SOURCE_PATH)/tools/shared \ -DQT_NO_PCRE \ - -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT \ + -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED \ -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL \ -DQT_NO_COMPRESS -I$(QMAKESPEC) -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT \ -DQT_NO_GEOM_VARIANT -DQT_NO_DEPRECATED $(OPENSOURCE_CXXFLAGS) @@ -269,7 +263,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 generators/symbian/symbian_makefile.h +metamakefile.o: generators/metamakefile.cpp $(CXX) -c -o $@ $(CXXFLAGS) generators/metamakefile.cpp xmloutput.o: generators/xmloutput.cpp @@ -311,27 +305,6 @@ msvc_nmake.o: generators/win32/msvc_nmake.cpp pbuilder_pbx.o: generators/mac/pbuilder_pbx.cpp $(CXX) -c -o $@ $(CXXFLAGS) generators/mac/pbuilder_pbx.cpp -symmake.o: generators/symbian/symmake.cpp - $(CXX) -c -o $@ $(CXXFLAGS) generators/symbian/symmake.cpp - -symmake_abld.o: generators/symbian/symmake_abld.cpp - $(CXX) -c -o $@ $(CXXFLAGS) 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 - -registry.o: $(SOURCE_PATH)/tools/shared/windows/registry.cpp - $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/tools/shared/windows/registry.cpp - -epocroot.o: $(SOURCE_PATH)/tools/shared/symbian/epocroot.cpp - $(CXX) -c -o $@ $(CXXFLAGS) $(SOURCE_PATH)/tools/shared/symbian/epocroot.cpp - gbuild.o: generators/integrity/gbuild.cpp $(CXX) -c -o $@ $(CXXFLAGS) generators/integrity/gbuild.cpp diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32 index e1a0b1a0e4..0213a6d70b 100644 --- a/qmake/Makefile.win32 +++ b/qmake/Makefile.win32 @@ -31,7 +31,7 @@ CFLAGS_EXTRA = /MP CFLAGS_BARE = -c -Fo./ \ -W3 -nologo -O2 \ $(CFLAGS_EXTRA) \ - -I. -Igenerators -Igenerators\unix -Igenerators\win32 -Igenerators\mac -Igenerators\symbian -Igenerators\integrity \ + -I. -Igenerators -Igenerators\unix -Igenerators\win32 -Igenerators\mac -Igenerators\integrity \ -I$(BUILD_PATH)\include -I$(BUILD_PATH)\include\QtCore -I$(BUILD_PATH)\include\QtCore\$(QT_VERSION) -I$(BUILD_PATH)\include\QtCore\$(QT_VERSION)\QtCore \ -I$(SOURCE_PATH)\include -I$(SOURCE_PATH)\include\QtCore -I$(SOURCE_PATH)\include\QtCore\$(QT_VERSION) -I$(SOURCE_PATH)\include\QtCore\$(QT_VERSION)\QtCore \ -I$(BUILD_PATH)\src\corelib\global \ @@ -40,8 +40,7 @@ CFLAGS_BARE = -c -Fo./ \ -I$(SOURCE_PATH)\tools\shared \ -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NODLL -DQT_NO_STL \ -DQT_NO_COMPRESS -DUNICODE -DHAVE_QCONFIG_CPP -DQT_BUILD_QMAKE -DQT_NO_THREAD \ - -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_NO_PCRE -DQT_BOOTSTRAPPED \ - -DQLIBRARYINFO_EPOCROOT + -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_NO_PCRE -DQT_BOOTSTRAPPED CFLAGS = -Yuqmake_pch.h -FIqmake_pch.h -Fpqmake_pch.pch $(CFLAGS_BARE) $(CFLAGS) CXXFLAGS_BARE = $(CFLAGS_BARE) @@ -61,8 +60,7 @@ OBJS = project.obj main.obj makefile.obj unixmake.obj unixmake2.obj mingw option.obj winmakefile.obj projectgenerator.obj property.obj meta.obj \ makefiledeps.obj metamakefile.obj xmloutput.obj pbuilder_pbx.obj \ borland_bmake.obj msvc_nmake.obj msvc_vcproj.obj msvc_vcxproj.obj \ - msvc_objectmodel.obj msbuild_objectmodel.obj symmake.obj initprojectdeploy_symbian.obj \ - symmake_abld.obj symmake_sbsv2.obj symbiancommon.obj registry.obj epocroot.obj \ + msvc_objectmodel.obj msbuild_objectmodel.obj registry.obj \ gbuild.obj !IFDEF QMAKE_OPENSOURCE_EDITION @@ -166,9 +164,6 @@ qmake_pch.obj: {$(SOURCE_PATH)\qmake\generators\mac}.cpp{}.obj:: $(CXX) $(CXXFLAGS) $< -{$(SOURCE_PATH)\qmake\generators\symbian}.cpp{}.obj:: - $(CXX) $(CXXFLAGS) $< - {$(SOURCE_PATH)\qmake\generators\integrity}.cpp{}.obj:: $(CXX) $(CXXFLAGS) $< @@ -208,8 +203,5 @@ qmake_pch.obj: {$(SOURCE_PATH)\src\corelib\xml}.cpp{}.obj:: $(CXX) $(CXXFLAGS) $< -{$(SOURCE_PATH)\tools\shared\symbian}.cpp{}.obj:: - $(CXX) $(CXXFLAGS) $< - {$(SOURCE_PATH)\tools\shared\windows}.cpp{}.obj:: - $(CXX) $(CXXFLAGS) $< + $(CXX) $(CXXFLAGS) $< diff --git a/qmake/Makefile.win32-g++ b/qmake/Makefile.win32-g++ index 05d7a154d6..8c8ab55755 100644 --- a/qmake/Makefile.win32-g++ +++ b/qmake/Makefile.win32-g++ @@ -15,7 +15,7 @@ CXX = g++ CFLAGS = -c -o$@ -O \ -I. -Igenerators -Igenerators/unix \ -Igenerators/win32 -Igenerators/mac \ - -Igenerators/symbian -Igenerators/integrity \ + -Igenerators/integrity \ -I$(BUILD_PATH)/include -I$(BUILD_PATH)/include/QtCore -I$(BUILD_PATH)/include/QtCore/$(QT_VERSION) -I$(BUILD_PATH)/include/QtCore/$(QT_VERSION)/QtCore \ -I$(SOURCE_PATH)/include -I$(SOURCE_PATH)/include/QtCore -I$(SOURCE_PATH)/include/QtCore/$(QT_VERSION) -I$(SOURCE_PATH)/include/QtCore/$(QT_VERSION)/QtCore \ -I$(BUILD_PATH)/src/corelib/global \ @@ -25,7 +25,7 @@ CFLAGS = -c -o$@ -O \ -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_PCRE \ -DQT_NODLL -DQT_NO_STL -DQT_NO_COMPRESS -DUNICODE -DHAVE_QCONFIG_CPP \ -DQT_BUILD_QMAKE -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM \ - -DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT + -DQT_BOOTSTRAPPED CXXFLAGS = $(CFLAGS) LFLAGS = -static-libgcc -static-libstdc++ -s LIBS = -lole32 -luuid -ladvapi32 -lkernel32 @@ -38,8 +38,7 @@ OBJS = project.o main.o makefile.o unixmake.o unixmake2.o mingw_make.o \ option.o winmakefile.o projectgenerator.o property.o meta.o \ makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o \ borland_bmake.o msvc_nmake.o msvc_vcproj.o msvc_vcxproj.o \ - msvc_objectmodel.o msbuild_objectmodel.o symmake.o initprojectdeploy_symbian.o \ - symmake_abld.o symmake_sbsv2.o symbiancommon.o registry.o epocroot.o gbuild.o + msvc_objectmodel.o msbuild_objectmodel.o registry.o gbuild.o ifdef QMAKE_OPENSOURCE_EDITION CFLAGS += -DQMAKE_OPENSOURCE_EDITION @@ -298,26 +297,8 @@ msvc_vcxproj.o: $(SOURCE_PATH)/qmake/generators/win32/msvc_vcxproj.cpp msbuild_objectmodel.o: $(SOURCE_PATH)/qmake/generators/win32/msbuild_objectmodel.cpp $(CXX) $(CXXFLAGS) generators/win32/msbuild_objectmodel.cpp -symmake.o: $(SOURCE_PATH)/qmake/generators/symbian/symmake.cpp - $(CXX) $(CXXFLAGS) generators/symbian/symmake.cpp - -symmake_abld.o: $(SOURCE_PATH)/qmake/generators/symbian/symmake_abld.cpp - $(CXX) $(CXXFLAGS) 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 - registry.o: $(SOURCE_PATH)/tools/shared/windows/registry.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/tools/shared/windows/registry.cpp - -epocroot.o: $(SOURCE_PATH)/tools/shared/symbian/epocroot.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/tools/shared/symbian/epocroot.cpp + $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/tools/shared/windows/registry.cpp gbuild.o: $(SOURCE_PATH)/qmake/generators/integrity/gbuild.cpp $(CXX) $(CXXFLAGS) generators/integrity/gbuild.cpp @@ -346,7 +327,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 $(SOURCE_PATH)/qmake/generators/symbian/symbian_makefile.h +metamakefile.o: $(SOURCE_PATH)/qmake/generators/metamakefile.cpp $(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 b691470cca..5a3cbe2d9d 100644 --- a/qmake/Makefile.win32-g++-sh +++ b/qmake/Makefile.win32-g++-sh @@ -15,7 +15,7 @@ CXX = g++ CFLAGS = -c -o$@ -O \ -I. -Igenerators -Igenerators/unix \ -Igenerators/win32 -Igenerators/mac \ - -Igenerators/symbian -Igenerators/integrity \ + -Igenerators/integrity \ -I$(BUILD_PATH)/include -I$(BUILD_PATH)/include/QtCore -I$(BUILD_PATH)/include/QtCore/$(QT_VERSION) -I$(BUILD_PATH)/include/QtCore/$(QT_VERSION)/QtCore \ -I$(SOURCE_PATH)/include -I$(SOURCE_PATH)/include/QtCore -I$(SOURCE_PATH)/include/QtCore/$(QT_VERSION) -I$(SOURCE_PATH)/include/QtCore/$(QT_VERSION)/QtCore \ -I$(BUILD_PATH)/src/corelib/global \ @@ -25,7 +25,7 @@ CFLAGS = -c -o$@ -O \ -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_PCRE \ -DQT_NODLL -DQT_NO_STL -DQT_NO_COMPRESS -DUNICODE -DHAVE_QCONFIG_CPP \ -DQT_BUILD_QMAKE -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM \ - -DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT + -DQT_BOOTSTRAPPED CXXFLAGS = $(CFLAGS) LFLAGS = -static-libgcc -static-libstdc++ -s LIBS = -lole32 -luuid -ladvapi32 -lkernel32 @@ -38,8 +38,7 @@ OBJS = project.o main.o makefile.o unixmake.o unixmake2.o mingw_make.o \ option.o winmakefile.o projectgenerator.o property.o meta.o \ makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o \ borland_bmake.o msvc_nmake.o msvc_vcproj.o msvc_vcxproj.o \ - msvc_objectmodel.o msbuild_objectmodel.o symmake.o initprojectdeploy_symbian.o \ - symmake_abld.o symmake_sbsv2.o symbiancommon.o registry.o epocroot.o gbuild.o + msvc_objectmodel.o msbuild_objectmodel.o registry.o gbuild.o ifdef QMAKE_OPENSOURCE_EDITION CFLAGS += -DQMAKE_OPENSOURCE_EDITION @@ -297,31 +296,12 @@ msvc_vcxproj.o: $(SOURCE_PATH)/qmake/generators/win32/msvc_vcxproj.cpp msbuild_objectmodel.o: $(SOURCE_PATH)/qmake/generators/win32/msbuild_objectmodel.cpp $(CXX) $(CXXFLAGS) generators/win32/msbuild_objectmodel.cpp -symmake.o: $(SOURCE_PATH)/qmake/generators/symbian/symmake.cpp - $(CXX) $(CXXFLAGS) generators/symbian/symmake.cpp - -symmake_abld.o: $(SOURCE_PATH)/qmake/generators/symbian/symmake_abld.cpp - $(CXX) $(CXXFLAGS) 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 - registry.o: $(SOURCE_PATH)/tools/shared/windows/registry.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/tools/shared/windows/registry.cpp - -epocroot.o: $(SOURCE_PATH)/tools/shared/symbian/epocroot.cpp - $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/tools/shared/symbian/epocroot.cpp + $(CXX) $(CXXFLAGS) $(SOURCE_PATH)/tools/shared/windows/registry.cpp gbuild.o: $(SOURCE_PATH)/qmake/generators/integrity/gbuild.cpp $(CXX) $(CXXFLAGS) generators/integrity/gbuild.cpp - project.o: $(SOURCE_PATH)/qmake/project.cpp $(SOURCE_PATH)/qmake/project.h $(SOURCE_PATH)/qmake/option.h $(CXX) $(CXXFLAGS) project.cpp @@ -346,7 +326,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 $(SOURCE_PATH)/qmake/generators/symbian/symbian_makefile.h +metamakefile.o: $(SOURCE_PATH)/qmake/generators/metamakefile.cpp $(CXX) $(CXXFLAGS) generators/metamakefile.cpp xmloutput.o: $(SOURCE_PATH)/qmake/generators/xmloutput.cpp diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 1176ffa0f9..c7ea592cc0 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -1957,16 +1957,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) if (inputs.isEmpty()) continue; - QString cmd; - if (isForSymbianSbsv2()) { - // In sbsv2 the command inputs and outputs need to use absolute paths - cmd = replaceExtraCompilerVariables(tmp_cmd, - fileFixify(escapeFilePaths(inputs), FileFixifyAbsolute), - fileFixify(QStringList(tmp_out), FileFixifyAbsolute)); - } else { - cmd = replaceExtraCompilerVariables(tmp_cmd, escapeFilePaths(inputs), QStringList(tmp_out)); - } - + QString cmd = replaceExtraCompilerVariables(tmp_cmd, escapeFilePaths(inputs), QStringList(tmp_out)); t << escapeDependencyPath(tmp_out) << ":"; project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_TARGETS.") + (*it)) << escapeDependencyPath(tmp_out); // compiler.CONFIG+=explicit_dependencies means that ONLY compiler.depends gets to cause Makefile dependencies @@ -1993,14 +1984,6 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) } QString cmd = replaceExtraCompilerVariables(tmp_cmd, (*input), out); // NOTE: The var -> QMAKE_COMP_var replace feature is unsupported, do not use! - if (isForSymbianSbsv2()) { - // In sbsv2 the command inputs and outputs need to use absolute paths - cmd = replaceExtraCompilerVariables(tmp_cmd, - fileFixify((*input), FileFixifyAbsolute), - fileFixify(out, FileFixifyAbsolute)); - } else { - cmd = replaceExtraCompilerVariables(tmp_cmd, (*input), out); - } for(QStringList::ConstIterator it3 = vars.constBegin(); it3 != vars.constEnd(); ++it3) cmd.replace("$(" + (*it3) + ")", "$(QMAKE_COMP_" + (*it3)+")"); if(!tmp_dep_cmd.isEmpty() && doDepends()) { diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h index 245d95e1cd..df718f9cb4 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h @@ -255,40 +255,6 @@ public: virtual bool mergeBuildProject(MakefileGenerator * /*other*/) { return false; } virtual bool openOutput(QFile &, const QString &build) const; virtual bool isWindowsShell() const { return Option::host_mode == Option::HOST_WIN_MODE; } - virtual bool isForSymbianSbsv2() const { return false; } // FIXME: killme - i'm ugly! - - /* The next one is to avoid having SymbianCommonGenerator as a virtually - inherited class of this class. Instead it is without a base class - (avoiding the virtual inheritance problem), and is allowed to use - functions defined in here. - - To illustrate: - +-------------------+ - | MakefileGenerator | - +-------------------+ - ^ ^ - | | - | X <-- Avoid this inheritance - | | - +------------------------+ +------------------------+ - | UnixMakefileGenerator | | SymbianCommonGenerator | - | or | | | - | NmakeMakefileGenerator | | | - +------------------------+ +------------------------+ - ^ ^ - | | - | | - | | - +-----------------------------+ - | SymbianMakefileTemplate<> | - +-----------------------------+ - - We want to avoid the famous diamond problem, because if we have that, we need - virtual inheritance, which not all compilers like. Therefore, we break the - link as illustrated. Instead, we have a pointer to MakefileGenerator inside - SymbianCommonGenerator, and allows full access by making it a friend here. - */ - friend class SymbianCommonGenerator; }; inline void MakefileGenerator::setNoIO(bool o) diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp index db9e195609..f06a46b821 100644 --- a/qmake/generators/metamakefile.cpp +++ b/qmake/generators/metamakefile.cpp @@ -445,9 +445,6 @@ QT_BEGIN_INCLUDE_NAMESPACE #include "borland_bmake.h" #include "msvc_vcproj.h" #include "msvc_vcxproj.h" -#include "symmake_abld.h" -#include "symmake_sbsv2.h" -#include "symbian_makefile.h" #include "gbuild.h" QT_END_INCLUDE_NAMESPACE @@ -484,14 +481,6 @@ MetaMakefileGenerator::createMakefileGenerator(QMakeProject *proj, bool noIO) mkfile = new NmakeMakefileGenerator; } else if(gen == "BMAKE") { mkfile = new BorlandMakefileGenerator; - } else if(gen == "SYMBIAN_ABLD") { - mkfile = new SymbianAbldMakefileGenerator; - } else if(gen == "SYMBIAN_SBSV2") { - mkfile = new SymbianSbsv2MakefileGenerator; - } else if(gen == "SYMBIAN_UNIX") { - mkfile = new SymbianMakefileTemplate<UnixMakefileGenerator>; - } else if(gen == "SYMBIAN_MINGW") { - mkfile = new SymbianMakefileTemplate<MingwMakefileGenerator>; } else if(gen == "GBUILD") { mkfile = new GBuildMakefileGenerator; } else { @@ -550,15 +539,6 @@ MetaMakefileGenerator::modesForGenerator(const QString &gen, } else if (gen == "PROJECTBUILDER" || gen == "XCODE") { *host_mode = Option::HOST_MACX_MODE; *target_mode = Option::TARG_MACX_MODE; - } else if (gen == "SYMBIAN_ABLD" || gen == "SYMBIAN_SBSV2" || gen == "SYMBIAN_UNIX" || gen == "SYMBIAN_MINGW") { -#if defined(Q_OS_MAC) - *host_mode = Option::HOST_MACX_MODE; -#elif defined(Q_OS_UNIX) - *host_mode = Option::HOST_UNIX_MODE; -#else - *host_mode = Option::HOST_WIN_MODE; -#endif - *target_mode = Option::TARG_SYMBIAN_MODE; } else if (gen == "GBUILD") { *host_mode = Option::HOST_UNIX_MODE; *target_mode = Option::TARG_INTEGRITY_MODE; diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.cpp b/qmake/generators/symbian/initprojectdeploy_symbian.cpp deleted file mode 100644 index 6b7a061a6a..0000000000 --- a/qmake/generators/symbian/initprojectdeploy_symbian.cpp +++ /dev/null @@ -1,379 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 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$ -** GNU Lesser General Public License Usage -** 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. -** -** 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "initprojectdeploy_symbian.h" -#include <QDirIterator> -#include <project.h> -#include <qxmlstream.h> -#include <qsettings.h> -#include <qdebug.h> - -// Included from tools/shared -#include <symbian/epocroot_p.h> - -#define SYSBIN_DIR "/sys/bin" -#define HW_Z_DIR "epoc32/data/z" - -#define SUFFIX_DLL "dll" -#define SUFFIX_EXE "exe" -#define SUFFIX_QTPLUGIN "qtplugin" - -static QString fixPathToEpocOS(const QString &src) -{ - QString ret = Option::fixPathToTargetOS(src); - - bool pathHasDriveLetter = false; - if (ret.size() > 1) - pathHasDriveLetter = (ret.at(1) == QLatin1Char(':')); - - return pathHasDriveLetter ? ret.replace('/', '\\') : QDir::toNativeSeparators(ret); -} - -static bool isPlugin(const QFileInfo& info, const QString& devicePath) -{ - // Libraries are plugins if deployment path is something else than - // SYSBIN_DIR with or without drive letter - if (0 == info.suffix().compare(QLatin1String(SUFFIX_DLL), Qt::CaseInsensitive) - && (devicePath.size() < 8 - || (0 != devicePath.compare(QLatin1String(SYSBIN_DIR), Qt::CaseInsensitive) - && 0 != devicePath.mid(1).compare(QLatin1String(":" SYSBIN_DIR), Qt::CaseInsensitive) - && 0 != devicePath.compare(qt_epocRoot() + QLatin1String(HW_Z_DIR SYSBIN_DIR))))) { - return true; - } else { - return false; - } -} - -static bool isBinary(const QFileInfo& info) -{ - if (0 == info.suffix().compare(QLatin1String(SUFFIX_DLL), Qt::CaseInsensitive) || - 0 == info.suffix().compare(QLatin1String(SUFFIX_EXE), Qt::CaseInsensitive)) { - return true; - } else { - return false; - } -} - -static void createPluginStub(const QFileInfo& info, - const QString& devicePath, - DeploymentList &deploymentList, - QStringList& generatedDirs, - QStringList& generatedFiles) -{ - QString pluginStubDir = Option::output_dir + QLatin1Char('/') + QLatin1String(PLUGIN_STUB_DIR); - QDir().mkpath(pluginStubDir); - if (!generatedDirs.contains(pluginStubDir)) - generatedDirs << pluginStubDir; - // 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(pluginStubDir + QLatin1Char('/') + info.completeBaseName() + QLatin1Char('.') + QLatin1String(SUFFIX_QTPLUGIN)); - if (stubFile.open(QIODevice::WriteOnly)) { - if (!generatedFiles.contains(stubFile.fileName())) - generatedFiles << stubFile.fileName(); - QTextStream t(&stubFile); - // Add note to stub so that people will not wonder what it is. - // Creation date is added to make new stub to deploy always to - // force plugin cache miss when loading plugins. - t << "This file is a Qt plugin stub file. The real Qt plugin is located in " SYSBIN_DIR ". Created:" << QDateTime::currentDateTime().toString(Qt::ISODate) << "\n"; - } else { - fprintf(stderr, "cannot deploy \"%s\" because of plugin stub file creation failed\n", info.fileName().toLatin1().constData()); - } - QFileInfo stubInfo(stubFile); - deploymentList.append(CopyItem(Option::fixPathToLocalOS(stubInfo.absoluteFilePath()), - fixPathToEpocOS(devicePath + "/" + stubInfo.fileName()))); -} - -QString generate_uid(const QString& target) -{ - static QMap<QString, QString> targetToUid; - - QString tmp = targetToUid[target]; - - if (!tmp.isEmpty()) { - return tmp; - } - - quint32 hash = 5381; - int c; - - for (int i = 0; i < target.size(); ++i) { - c = target.at(i).toAscii(); - hash ^= c + ((c - i) << i % 20) + ((c + i) << (i + 5) % 20) + ((c - 2 * i) << (i + 10) % 20) + ((c + 2 * i) << (i + 15) % 20); - } - - tmp.setNum(hash, 16); - for (int i = tmp.size(); i < 8; ++i) - tmp.prepend("0"); - - targetToUid[target] = tmp; - - return tmp; -} - -// UIDs starting with 0xE are test UIDs in symbian -QString generate_test_uid(const QString& target) -{ - QString tmp = generate_uid(target); - tmp.replace(0, 1, "E"); - tmp.prepend("0x"); - - return tmp; -} - - -void initProjectDeploySymbian(QMakeProject* project, - DeploymentList &deploymentList, - const QString &testPath, - bool deployBinaries, - bool epocBuild, - const QString &platform, - const QString &build, - QStringList& generatedDirs, - QStringList& generatedFiles) -{ - QString targetPath = testPath; - if (targetPath.endsWith("/") || targetPath.endsWith("\\")) - targetPath = targetPath.mid(0, targetPath.size() - 1); - - bool targetPathHasDriveLetter = false; - if (targetPath.size() > 1) { - targetPathHasDriveLetter = targetPath.at(1) == QLatin1Char(':'); - } - - QString deploymentDrive; - if (0 == platform.compare(QLatin1String(ROM_DEPLOYMENT_PLATFORM))) { - deploymentDrive = qt_epocRoot() + HW_Z_DIR; - } else { - deploymentDrive = targetPathHasDriveLetter ? targetPath.left(2) : QLatin1String("c:"); - } - - foreach(QString item, project->values("DEPLOYMENT")) { - QString devicePath = project->first(item + ".path"); - QString devicePathWithoutDrive = devicePath; - - bool devicePathHasDriveLetter = false; - if (devicePath.size() > 1) { - devicePathHasDriveLetter = devicePath.at(1) == QLatin1Char(':'); - } - - // Sometimes devicePath can contain disk but APP_RESOURCE_DIR does not, - // so remove the drive letter for comparison purposes. - if (devicePathHasDriveLetter) - { - devicePathWithoutDrive.remove(0,2); - } - if (!deployBinaries - && 0 != platform.compare(QLatin1String(ROM_DEPLOYMENT_PLATFORM)) - && !devicePathWithoutDrive.isEmpty() - && (0 == devicePathWithoutDrive.compare(project->values("APP_RESOURCE_DIR").join(""), Qt::CaseInsensitive) - || 0 == devicePathWithoutDrive.compare(project->values("REG_RESOURCE_IMPORT_DIR").join(""), Qt::CaseInsensitive))) { - // Do not deploy resources in emulator builds, as that seems to cause conflicts - // If there is ever a real need to deploy pre-built resources for emulator, - // BLD_INF_RULES.prj_exports can be used as a workaround. - continue; - } - - if (devicePath.isEmpty() || devicePath == QLatin1String(".")) { - devicePath = targetPath; - } - // check if item.path is relative (! either / or \) - else if (!(devicePath.at(0) == QLatin1Char('/') - || devicePath.at(0) == QLatin1Char('\\') - || devicePathHasDriveLetter)) { - // Create output path - devicePath = Option::fixPathToLocalOS(QDir::cleanPath(targetPath + QLatin1Char('/') + devicePath)); - } else { - if (0 == platform.compare(QLatin1String(EMULATOR_DEPLOYMENT_PLATFORM))) { - if (devicePathHasDriveLetter) { - if (devicePath.startsWith("!")) - devicePath = qt_epocRoot() + "epoc32/winscw/c" + devicePath.remove(0, 2); - else - devicePath = qt_epocRoot() + "epoc32/winscw/" + devicePath.remove(1, 1); - } else { - devicePath = qt_epocRoot() + "epoc32/winscw/c" + devicePath; - } - } else { - if (devicePathHasDriveLetter - && 0 == platform.compare(QLatin1String(ROM_DEPLOYMENT_PLATFORM))) { - devicePath.remove(0,2); - } - if (0 == platform.compare(QLatin1String(ROM_DEPLOYMENT_PLATFORM)) - || (!devicePathHasDriveLetter && targetPathHasDriveLetter)) { - devicePath = deploymentDrive + devicePath; - } - } - } - - devicePath.replace(QLatin1String("\\"), QLatin1String("/")); - - if (!deployBinaries - && 0 == devicePath.right(8).compare(QLatin1String(SYSBIN_DIR), Qt::CaseInsensitive) - && 0 != platform.compare(QLatin1String(ROM_DEPLOYMENT_PLATFORM))) { - // Skip deploying to SYSBIN_DIR for anything but binary deployments - // Note: Deploying pre-built binaries also follow this rule, so emulator builds - // will not get those deployed. Since there is no way to differentiate currently - // between pre-built binaries for emulator and HW anyway, this is not a major issue. - continue; - } - - QStringList flags = project->values(item + ".flags"); - - // ### Qt 5: remove .sources, inconsistent with INSTALLS - foreach(QString source, project->values(item + ".sources") + project->values(item + ".files")) { - source = Option::fixPathToLocalOS(source); - QString nameFilter; - QFileInfo info(source); - QString searchPath; - bool dirSearch = false; - - if (info.isDir()) { - nameFilter = QLatin1String("*"); - searchPath = info.absoluteFilePath(); - dirSearch = true; - } else { - if (info.exists() || source.indexOf('*') != -1) { - 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. - // Dlls need to be processed even when not deploying binaries for the stubs - if (isBinary(info)) { - if (deployBinaries) { - // Executables and libraries are deployed to \sys\bin - QFileInfo targetPath; - if (epocBuild) - targetPath.setFile(qt_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), - fixPathToEpocOS(devicePath.left(2) + QLatin1String(SYSBIN_DIR "/") - + info.fileName()), - flags)); - } else { - deploymentList.append(CopyItem( - Option::fixPathToLocalOS(targetPath.absolutePath() + "/" + info.fileName(), - false, true), - fixPathToEpocOS(deploymentDrive + QLatin1String("/" SYSBIN_DIR "/") - + info.fileName()), - flags)); - } - } - if (isPlugin(info, devicePath)) { - createPluginStub(info, devicePath, deploymentList, generatedDirs, generatedFiles); - continue; - } - } else { - // 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()), - fixPathToEpocOS(devicePath + "/" + info.fileName()), - flags)); - continue; - } - } - } - - int pathSize = info.absolutePath().size(); - QDirIterator iterator(searchPath, QStringList() << nameFilter - , QDir::Files | QDir::NoDotAndDotDot | QDir::NoSymLinks - , dirSearch ? QDirIterator::Subdirectories : QDirIterator::NoIteratorFlags); - - while (iterator.hasNext()) { - iterator.next(); - QFileInfo iteratorInfo(iterator.filePath()); - QString absoluteItemPath = Option::fixPathToLocalOS(iteratorInfo.absolutePath()); - int diffSize = absoluteItemPath.size() - pathSize; - - if (!iteratorInfo.isDir()) { - if (isPlugin(iterator.fileInfo(), devicePath)) { - // This deploys pre-built plugins. Other pre-built binaries will deploy normally, - // as they have SYSBIN_DIR target path. - if (deployBinaries - || (0 == platform.compare(QLatin1String(ROM_DEPLOYMENT_PLATFORM)))) { - if (devicePathHasDriveLetter) { - deploymentList.append(CopyItem( - Option::fixPathToLocalOS(absoluteItemPath + "/" + iterator.fileName()), - fixPathToEpocOS(devicePath.left(2) + QLatin1String(SYSBIN_DIR "/") - + iterator.fileName()), - flags)); - } else { - deploymentList.append(CopyItem( - Option::fixPathToLocalOS(absoluteItemPath + "/" + iterator.fileName()), - fixPathToEpocOS(deploymentDrive + QLatin1String("/" SYSBIN_DIR "/") - + iterator.fileName()), - flags)); - } - } - createPluginStub(info, devicePath + "/" + absoluteItemPath.right(diffSize), - deploymentList, generatedDirs, generatedFiles); - continue; - } else { - deploymentList.append(CopyItem( - Option::fixPathToLocalOS(absoluteItemPath + "/" + iterator.fileName()), - fixPathToEpocOS(devicePath + "/" + absoluteItemPath.right(diffSize) - + "/" + iterator.fileName()), - flags)); - } - } - } - } - } - - // Remove deployments that do not actually do anything - if (0 == platform.compare(QLatin1String(EMULATOR_DEPLOYMENT_PLATFORM)) - || 0 == platform.compare(QLatin1String(ROM_DEPLOYMENT_PLATFORM))) { - QMutableListIterator<CopyItem> i(deploymentList); - while(i.hasNext()) { - CopyItem &item = i.next(); - QFileInfo fromItem(item.from); - QFileInfo toItem(item.to); -#if defined(Q_OS_WIN) - if (0 == fromItem.absoluteFilePath().compare(toItem.absoluteFilePath(), Qt::CaseInsensitive)) -#else - if (0 == fromItem.absoluteFilePath().compare(toItem.absoluteFilePath())) -#endif - i.remove(); - } - } -} diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.h b/qmake/generators/symbian/initprojectdeploy_symbian.h deleted file mode 100644 index eed1e4d736..0000000000 --- a/qmake/generators/symbian/initprojectdeploy_symbian.h +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 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$ -** GNU Lesser General Public License Usage -** 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. -** -** 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef INITPROJECTDEPLOYSYMBIAN_H -#define INITPROJECTDEPLOYSYMBIAN_H - -#include <qstring.h> -#include <qstringlist.h> -#include <qdatetime.h> -#include <option.h> -#include <qdir.h> -#include <qfile.h> -#include <stdlib.h> - -#define PLUGIN_STUB_DIR "qmakepluginstubs" -#define ROM_DEPLOYMENT_PLATFORM "rom" -#define EMULATOR_DEPLOYMENT_PLATFORM "emulator" - -struct CopyItem -{ - CopyItem(const QString& f, const QString& t) - : from(f) , to(t) { } - CopyItem(const QString& f, const QString& t, const QStringList& l) - : from(f) , to(t), flags(l) { } - QString from; - QString to; - QStringList flags; -}; -typedef QList<CopyItem> DeploymentList; - -extern QString generate_uid(const QString& target); -extern QString generate_test_uid(const QString& target); - -extern void initProjectDeploySymbian(QMakeProject* project, - DeploymentList &deploymentList, - const QString &testPath, - bool deployBinaries, - bool epocBuild, - const QString &platform, - const QString &build, - QStringList& generatedDirs, - QStringList& generatedFiles); - -#endif // INITPROJECTDEPLOYSYMBIAN_H diff --git a/qmake/generators/symbian/symbian_makefile.h b/qmake/generators/symbian/symbian_makefile.h deleted file mode 100644 index 90044e04a2..0000000000 --- a/qmake/generators/symbian/symbian_makefile.h +++ /dev/null @@ -1,105 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 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$ -** GNU Lesser General Public License Usage -** 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. -** -** 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef SYMBIAN_MAKEFILE_H -#define SYMBIAN_MAKEFILE_H - -#include "symbiancommon.h" - -// This allows us to reuse the code for both win32 and unix makefile generators. -template <class T> -class SymbianMakefileTemplate : public T, public SymbianCommonGenerator -{ -public: - SymbianMakefileTemplate() : SymbianCommonGenerator(this) {} - - void init() - { - T::init(); - SymbianCommonGenerator::init(); - } - - bool writeMakefile(QTextStream &t) - { - QString numberOfIcons; - QString iconFile; - QMap<QString, QStringList> userRssRules; - readRssRules(numberOfIcons, iconFile, userRssRules); - - // Generate pkg files if there are any actual files to deploy - bool generatePkg = false; - - if (targetType == TypeExe) { - generatePkg = true; - } else { - const QStringList deployments = this->project->values("DEPLOYMENT"); - for (int i = 0; i < deployments.count(); ++i) { - // ### Qt 5: remove .sources, inconsistent with INSTALLS - if (!this->project->values(deployments.at(i) + ".sources").isEmpty() || - !this->project->values(deployments.at(i) + ".files").isEmpty()) { - generatePkg = true; - break; - } - } - } - - SymbianLocalizationList symbianLocalizationList; - parseTsFiles(&symbianLocalizationList); - - if (generatePkg) { - generatePkgFile(iconFile, false, symbianLocalizationList); - } - - if (targetType == TypeExe) { - if (!this->project->values("CONFIG").contains("no_icon", Qt::CaseInsensitive)) { - writeRegRssFile(userRssRules); - writeRssFile(numberOfIcons, iconFile); - writeLocFile(symbianLocalizationList); - } - } - - writeCustomDefFile(); - - return T::writeMakefile(t); - } -}; - -#endif // SYMBIAN_MAKEFILE_H diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp deleted file mode 100644 index a0a8eea871..0000000000 --- a/qmake/generators/symbian/symbiancommon.cpp +++ /dev/null @@ -1,1117 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 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$ -** GNU Lesser General Public License Usage -** 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. -** -** 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "symbiancommon.h" -#include <qdebug.h> -#include <qxmlstream.h> - -// Included from tools/shared -#include <symbian/epocroot_p.h> - -#define RESOURCE_DIRECTORY_RESOURCE "\\\\resource\\\\apps\\\\" - -#define RSS_RULES "RSS_RULES" -#define RSS_RULES_BASE "RSS_RULES." -#define RSS_TAG_NBROFICONS "number_of_icons" -#define RSS_TAG_ICONFILE "icon_file" -#define RSS_TAG_HEADER "header" -#define RSS_TAG_SERVICE_LIST "service_list" -#define RSS_TAG_FILE_OWNERSHIP_LIST "file_ownership_list" -#define RSS_TAG_DATATYPE_LIST "datatype_list" -#define RSS_TAG_FOOTER "footer" -#define RSS_TAG_DEFAULT "default_rules" // Same as just giving rules without tag - -#define PLUGIN_COMMON_DEF_FILE_ACTUAL "plugin_commonu.def" - -#define MANUFACTURER_NOTE_FILE "manufacturer_note.txt" -#define DEFAULT_MANUFACTURER_NOTE \ - "The package is not supported for devices from this manufacturer. Please try the selfsigned " \ - "version of the package instead." - -SymbianCommonGenerator::SymbianCommonGenerator(MakefileGenerator *generator) - : generator(generator) -{ -} - -void SymbianCommonGenerator::init() -{ - QMakeProject *project = generator->project; - fixedTarget = project->first("QMAKE_ORIG_TARGET"); - if (fixedTarget.isEmpty()) - fixedTarget = project->first("TARGET"); - fixedTarget = generator->unescapeFilePath(fixedTarget); - fixedTarget = removePathSeparators(fixedTarget); - removeSpecialCharacters(fixedTarget); - - // This should not be empty since the mkspecs are supposed to set it if missing. - uid3 = project->first("TARGET.UID3").trimmed(); - - if ((project->values("TEMPLATE")).contains("app")) - targetType = TypeExe; - else if ((project->values("TEMPLATE")).contains("lib")) { - // Check CONFIG to see if we are to build staticlib or dll - if (project->isActiveConfig("staticlib") || project->isActiveConfig("static")) - targetType = TypeLib; - else if (project->isActiveConfig("plugin")) - targetType = TypePlugin; - else - targetType = TypeDll; - } else { - targetType = TypeSubdirs; - } - - // UID is valid as either hex or decimal, so just convert it to number and back to hex - // to get proper string for private dir - bool conversionOk = false; - uint uidNum = uid3.toUInt(&conversionOk, 0); - - if (!conversionOk) { - fprintf(stderr, "Error: Invalid UID \"%s\".\n", uid3.toUtf8().constData()); - } else { - privateDirUid.setNum(uidNum, 16); - while (privateDirUid.length() < 8) - privateDirUid.insert(0, QLatin1Char('0')); - } -} - -bool SymbianCommonGenerator::containsStartWithItem(const QChar &c, const QStringList& src) -{ - bool result = false; - foreach(QString str, src) { - if (str.startsWith(c)) { - result = true; - break; - } - } - return result; -} - -void SymbianCommonGenerator::removeSpecialCharacters(QString& str) -{ - // When modifying this method check also symbianRemoveSpecialCharacters in symbian.conf - QString underscore = QLatin1String("_"); - str.replace(QLatin1String("/"), underscore); - str.replace(QLatin1String("\\"), underscore); - str.replace(QLatin1String(" "), underscore); - str.replace(QLatin1String(":"), underscore); -} - -QString romPath(const QString& path) -{ - if(path.length() > 2 && path[1] == ':') - return QLatin1String("z:") + path.mid(2); - return QLatin1String("z:") + path; -} - -void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, - bool epocBuild, - const SymbianLocalizationList &symbianLocalizationList) -{ - QMakeProject *project = generator->project; - QString pkgFilename = Option::output_dir + QLatin1Char('/') + - QString("%1_template.pkg").arg(fixedTarget); - - QFile pkgFile(pkgFilename); - if (!pkgFile.open(QIODevice::WriteOnly | QIODevice::Text)) { - PRINT_FILE_CREATE_ERROR(pkgFilename); - return; - } - - QString stubPkgFileName = Option::output_dir + QLatin1Char('/') + - QString("%1_stub.pkg").arg(fixedTarget); - - QFile stubPkgFile(stubPkgFileName); - if (!stubPkgFile.open(QIODevice::WriteOnly | QIODevice::Text)) { - PRINT_FILE_CREATE_ERROR(stubPkgFileName); - return; - } - - generatedFiles << pkgFile.fileName(); - QTextStream t(&pkgFile); - generatedFiles << stubPkgFile.fileName(); - QTextStream ts(&stubPkgFile); - - QString installerSisHeader = project->values("DEPLOYMENT.installer_header").join("\n"); - if (installerSisHeader.isEmpty()) { - // Use correct protected UID for publishing if application UID is in protected range, - // otherwise use self-signable test UID. - QRegExp protUidMatcher("0[xX][0-7].*"); - if (protUidMatcher.exactMatch(uid3)) - installerSisHeader = QLatin1String("0x2002CCCF"); - else - installerSisHeader = QLatin1String("0xA000D7CE"); // Use default self-signable UID - } - - QString wrapperStreamBuffer; - QTextStream tw(&wrapperStreamBuffer); - - QString dateStr = QDateTime::currentDateTime().toString(Qt::ISODate); - - // Header info - QString wrapperPkgFilename = Option::output_dir + QLatin1Char('/') + QString("%1_installer.%2") - .arg(fixedTarget).arg("pkg"); - - QString headerComment = "; %1 generated by qmake at %2\n" - "; This file is generated by qmake and should not be modified by the user\n" - ";\n\n"; - t << headerComment.arg(pkgFilename).arg(dateStr); - tw << headerComment.arg(wrapperPkgFilename).arg(dateStr); - ts << headerComment.arg(stubPkgFileName).arg(dateStr); - - QStringList commonRawPreRules; - QStringList mainRawPreRules; - QStringList instRawPreRules; - QStringList stubRawPreRules; - - // Though there can't be more than one language or header line, use stringlists - // in case user wants comments to go with the rules. - // Note that it makes no sense to have file specific language or header rules, - // except what is provided for installer header via "DEPLOYMENT.installer_header" variable, - // because stub and main headers should always match. Vendor rules are similarly limited to - // make code cleaner as it is unlikely anyone will want different vendor in different files. - QStringList languageRules; - QStringList headerRules; - QStringList vendorRules; - - QStringList commonRawPostRules; - QStringList mainRawPostRules; - QStringList instRawPostRules; - QStringList stubRawPostRules; - - QStringList failList; // Used for detecting incorrect usage - - QString emptySuffix; - QString mainSuffix(".main"); - QString instSuffix(".installer"); - QString stubSuffix(".stub"); - - foreach(QString item, project->values("DEPLOYMENT")) { - parsePreRules(item, emptySuffix, &commonRawPreRules, &languageRules, &headerRules, &vendorRules); - parsePreRules(item, mainSuffix, &mainRawPreRules, &failList, &failList, &failList); - parsePreRules(item, instSuffix, &instRawPreRules, &failList, &failList, &failList); - parsePreRules(item, stubSuffix, &stubRawPreRules, &failList, &failList, &failList); - - parsePostRules(item, emptySuffix, &commonRawPostRules); - parsePostRules(item, mainSuffix, &mainRawPostRules); - parsePostRules(item, instSuffix, &instRawPostRules); - parsePostRules(item, stubSuffix, &stubRawPostRules); - } - - if (!failList.isEmpty()) { - fprintf(stderr, "Warning: Custom language, header, or vendor definitions are not " - "supported by file specific pkg_prerules.* variables.\n" - "Use plain pkg_prerules and/or DEPLOYMENT.installer_header for customizing " - "these items.\n"); - } - - foreach(QString item, commonRawPreRules) { - if (item.startsWith("(")) { - // Only regular pkg file should have package dependencies - mainRawPreRules << item; - } else if (item.startsWith("[")) { - // stub pkg file should not have platform dependencies - mainRawPreRules << item; - instRawPreRules << item; - } else { - mainRawPreRules << item; - instRawPreRules << item; - stubRawPreRules << item; - } - } - - // Currently common postrules only go to main - mainRawPostRules << commonRawPostRules; - - // Apply some defaults if specific data does not exist in PKG pre-rules - if (languageRules.isEmpty()) { - if (symbianLocalizationList.isEmpty()) { - languageRules << "; Language\n&EN\n\n"; - } else { - QStringList langCodes; - SymbianLocalizationListIterator iter(symbianLocalizationList); - while (iter.hasNext()) { - const SymbianLocalization &loc = iter.next(); - langCodes << loc.symbianLanguageCode; - } - languageRules << QString("; Languages\n&%1\n\n").arg(langCodes.join(",")); - } - } else if (headerRules.isEmpty()) { - // In case user defines langs, he must take care also about SIS header - fprintf(stderr, "Warning: If language is defined with DEPLOYMENT pkg_prerules, also the SIS header must be defined\n"); - } - - t << languageRules.join("\n") << endl; - tw << languageRules.join("\n") << endl; - ts << languageRules.join("\n") << endl; - - // Determine application version. If version has missing component values, - // those will default to zero. - // If VERSION is missing altogether or is invalid, use "1,0,0" - QStringList verNumList = project->first("VERSION").split('.'); - uint major = 0; - uint minor = 0; - uint patch = 0; - bool success = false; - - if (verNumList.size() > 0) { - major = verNumList[0].toUInt(&success); - if (success && verNumList.size() > 1) { - minor = verNumList[1].toUInt(&success); - if (success && verNumList.size() > 2) { - patch = verNumList[2].toUInt(&success); - } - } - } - - QString applicationVersion("1,0,0"); - if (success) - applicationVersion = QString("%1,%2,%3").arg(major).arg(minor).arg(patch); - - // Append package build version number if it is set - QString pkgBuildVersion = project->first("DEPLOYMENT.pkg_build_version"); - if (!pkgBuildVersion.isEmpty()) { - success = false; - uint build = pkgBuildVersion.toUInt(&success); - if (success && build < 100) { - if (pkgBuildVersion.size() == 1) - pkgBuildVersion.prepend(QLatin1Char('0')); - applicationVersion.append(pkgBuildVersion); - } else { - fprintf(stderr, "Warning: Invalid DEPLOYMENT.pkg_build_version (%s), must be a number between 0 - 99\n", qPrintable(pkgBuildVersion)); - } - } - - // Package header - QString sisHeader = "; SIS header: name, uid, version\n#{\"%1\"},(%2),%3\n\n"; - - QString defaultVisualTarget = project->values("DEPLOYMENT.display_name").join(" "); - if (defaultVisualTarget.isEmpty()) - defaultVisualTarget = generator->escapeFilePath(project->first("TARGET")); - defaultVisualTarget = removePathSeparators(defaultVisualTarget); - - QString visualTarget = generatePkgNameForHeader(symbianLocalizationList, defaultVisualTarget, false); - QString wrapperTarget = generatePkgNameForHeader(symbianLocalizationList, defaultVisualTarget, true); - - if (installerSisHeader.startsWith("0x", Qt::CaseInsensitive)) { - tw << sisHeader.arg(wrapperTarget).arg(installerSisHeader).arg(applicationVersion); - } else { - tw << installerSisHeader << endl; - } - - if (headerRules.isEmpty()) { - t << sisHeader.arg(visualTarget).arg(uid3).arg(applicationVersion); - ts << sisHeader.arg(visualTarget).arg(uid3).arg(applicationVersion); - } - else { - t << headerRules.join("\n") << endl; - ts << headerRules.join("\n") << endl; - } - - // Vendor name - if (!containsStartWithItem('%', vendorRules)) { - QString vendorStr = QLatin1String("\"Vendor\","); - QString locVendors = vendorStr; - for (int i = 1; i < symbianLocalizationList.size(); i++) { - locVendors.append(vendorStr); - } - locVendors.chop(1); - vendorRules << QString("; Default localized vendor name\n%{%1}\n\n").arg(locVendors); - } - if (!containsStartWithItem(':', vendorRules)) { - vendorRules << "; Default unique vendor name\n:\"Vendor\"\n\n"; - } - - t << vendorRules.join("\n") << endl; - tw << vendorRules.join("\n") << endl; - ts << vendorRules.join("\n") << endl; - - // PKG pre-rules - these are added before actual file installations i.e. SIS package body - QString comment = "\n; Manual PKG pre-rules from PRO files\n"; - - if (mainRawPreRules.size()) { - t << comment; - t << mainRawPreRules.join("\n") << endl; - } - if (instRawPreRules.size()) { - tw << comment; - tw << instRawPreRules.join("\n") << endl; - } - if (stubRawPreRules.size()) { - ts << comment; - ts << stubRawPreRules.join("\n") << endl; - } - - t << endl; - tw << endl; - ts << endl; - - // Begin Manufacturer block - if (!project->values("DEPLOYMENT.manufacturers").isEmpty()) { - QString manufacturerStr("IF "); - foreach(QString manufacturer, project->values("DEPLOYMENT.manufacturers")) { - manufacturerStr.append(QString("(MANUFACTURER)=(%1) OR \n ").arg(manufacturer)); - } - // Remove the final OR - manufacturerStr.chop(8); - t << manufacturerStr << endl; - } - - if (symbianLocalizationList.size()) { - // Add localized resources to DEPLOYMENT if default resource deployment is done - addLocalizedResourcesToDeployment("default_resource_deployment.files", symbianLocalizationList); - addLocalizedResourcesToDeployment("default_reg_deployment.files", symbianLocalizationList); - } - - // deploy files specified by DEPLOYMENT variable - QString remoteTestPath; - QString zDir; - remoteTestPath = QString("!:\\private\\%1").arg(privateDirUid); - if (epocBuild) - zDir = qt_epocRoot() + QLatin1String("epoc32/data/z"); - - DeploymentList depList; - initProjectDeploySymbian(project, depList, remoteTestPath, true, epocBuild, "$(PLATFORM)", "$(TARGET)", generatedDirs, generatedFiles); - if (depList.size()) - t << "; DEPLOYMENT" << endl; - for (int i = 0; i < depList.size(); ++i) { - QString from = depList.at(i).from; - QString to = depList.at(i).to; - QString flags; - bool showOnlyFile = false; - foreach(QString flag, depList.at(i).flags) { - if (flag == QLatin1String("FT") - || flag == QLatin1String("FILETEXT")) { - showOnlyFile = true; - } - flags.append(QLatin1Char(',')).append(flag); - } - - if (epocBuild) { - // Deploy anything not already deployed from under epoc32 instead from under - // \epoc32\data\z\ to enable using pkg file without rebuilding - // the project, which can be useful for some binary only distributions. - if (!from.contains(QLatin1String("epoc32"), Qt::CaseInsensitive)) { - from = to; - if (from.size() > 1 && from.at(1) == QLatin1Char(':')) - from = from.mid(2); - from.prepend(zDir); - } - } - - // Files with "FILETEXT"/"FT" flag are meant for showing only at installation time - // and therefore do not belong to the stub package and will not install the file into phone. - if (showOnlyFile) - to.clear(); - else - ts << QString("\"\" - \"%1\"").arg(romPath(to)) << endl; - - t << QString("\"%1\" - \"%2\"%3").arg(from.replace('\\','/')).arg(to).arg(flags) << endl; - - } - t << endl; - ts << endl; - - // PKG post-rules - these are added after actual file installations i.e. SIS package body - comment = "; Manual PKG post-rules from PRO files\n"; - - if (mainRawPostRules.size()) { - t << comment; - t << mainRawPostRules.join("\n") << endl; - } - if (instRawPostRules.size()) { - tw << comment; - tw << instRawPostRules.join("\n") << endl; - } - if (stubRawPostRules.size()) { - ts << comment; - ts << stubRawPostRules.join("\n") << endl; - } - - // Close Manufacturer block - if (!project->values("DEPLOYMENT.manufacturers").isEmpty()) { - QString manufacturerFailNoteFile; - if (project->values("DEPLOYMENT.manufacturers.fail_note").isEmpty()) { - manufacturerFailNoteFile = QString("%1_" MANUFACTURER_NOTE_FILE).arg(uid3); - QFile ft(manufacturerFailNoteFile); - if (ft.open(QIODevice::WriteOnly)) { - generatedFiles << ft.fileName(); - QTextStream t2(&ft); - - t2 << QString(DEFAULT_MANUFACTURER_NOTE) << endl; - } else { - PRINT_FILE_CREATE_ERROR(manufacturerFailNoteFile) - } - } else { - manufacturerFailNoteFile = project->values("DEPLOYMENT.manufacturers.fail_note").join(""); - } - - t << "ELSEIF NOT(0) ; MANUFACTURER" << endl - << "\"" << generator->fileInfo(manufacturerFailNoteFile).absoluteFilePath() << "\"" - << " - \"\", FILETEXT, TEXTEXIT" << endl - << "ENDIF ; MANUFACTURER" << endl; - } - - // Write wrapper pkg - if (!installerSisHeader.isEmpty()) { - QFile wrapperPkgFile(wrapperPkgFilename); - if (!wrapperPkgFile.open(QIODevice::WriteOnly | QIODevice::Text)) { - PRINT_FILE_CREATE_ERROR(wrapperPkgFilename); - return; - } - - generatedFiles << wrapperPkgFile.fileName(); - QTextStream twf(&wrapperPkgFile); - - twf << wrapperStreamBuffer << endl; - - // Wrapped files deployment - QString currentPath = qmake_getpwd(); - QString sisName = QString("%1.sis").arg(fixedTarget); - twf << "\"" << currentPath << "/" << sisName << "\" - \"!:\\private\\2002CCCE\\import\\" << sisName << "\"" << endl; - - QString bootStrapPath = QLibraryInfo::location(QLibraryInfo::PrefixPath); - bootStrapPath.append("/smartinstaller.sis"); - QFileInfo fi(generator->fileInfo(bootStrapPath)); - twf << "@\"" << fi.absoluteFilePath() << "\",(0x2002CCCD)" << endl; - } -} - -QString SymbianCommonGenerator::removePathSeparators(QString &file) -{ - QString ret = file; - - if (QDir::separator().unicode() != '/') - ret.replace(QDir::separator(), QLatin1Char('/')); - - if (ret.indexOf(QLatin1Char('/')) >= 0) - ret.remove(0, ret.lastIndexOf(QLatin1Char('/')) + 1); - - return ret; -} - -void SymbianCommonGenerator::writeRegRssFile(QMap<QString, QStringList> &userItems) -{ - QString filename(fixedTarget); - filename.append("_reg.rss"); - if (!Option::output_dir.isEmpty()) - filename = Option::output_dir + '/' + filename; - QFile ft(filename); - if (ft.open(QIODevice::WriteOnly)) { - generatedFiles << ft.fileName(); - QTextStream t(&ft); - t << "// ============================================================================" << endl; - t << "// * Generated by qmake (" << qmake_version() << ") (Qt " QT_VERSION_STR ") on: "; - t << QDateTime::currentDateTime().toString(Qt::ISODate) << endl; - t << "// * This file is generated by qmake and should not be modified by the" << endl; - t << "// * user." << endl; - t << "// ============================================================================" << endl; - t << endl; - t << "#include <" << fixedTarget << ".rsg>" << endl; - t << "#include <appinfo.rh>" << endl; - foreach(QString item, userItems[RSS_TAG_HEADER]) - t << item << 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; - - writeRegRssList(t, userItems[RSS_TAG_SERVICE_LIST], - QLatin1String(RSS_TAG_SERVICE_LIST), - QLatin1String("SERVICE_INFO")); - writeRegRssList(t, userItems[RSS_TAG_FILE_OWNERSHIP_LIST], - QLatin1String(RSS_TAG_FILE_OWNERSHIP_LIST), - QLatin1String("FILE_OWNERSHIP_INFO")); - writeRegRssList(t, userItems[RSS_TAG_DATATYPE_LIST], - QLatin1String(RSS_TAG_DATATYPE_LIST), - QLatin1String("DATATYPE")); - t << endl; - - foreach(QString item, userItems[RSS_TAG_DEFAULT]) - t << "\t" << item.replace("\n","\n\t") << endl; - t << "\t}" << endl; - - foreach(QString item, userItems[RSS_TAG_FOOTER]) - t << item << endl; - } else { - PRINT_FILE_CREATE_ERROR(filename) - } -} - -void SymbianCommonGenerator::writeRegRssList(QTextStream &t, - QStringList &userList, - const QString &listTag, - const QString &listItem) -{ - int itemCount = userList.count(); - if (itemCount) { - t << "\t" << listTag << " ="<< endl; - t << "\t\t{" << endl; - foreach(QString item, userList) { - t << "\t\t" << listItem << endl; - t << "\t\t\t{" << endl; - t << "\t\t\t" << item.replace("\n","\n\t\t\t") << endl; - t << "\t\t\t}"; - if (--itemCount) - t << ","; - t << endl; - } - t << "\t\t}; "<< endl; - } -} - -void SymbianCommonGenerator::writeRssFile(QString &numberOfIcons, QString &iconFile) -{ - QString filename(fixedTarget); - if (!Option::output_dir.isEmpty()) - filename = Option::output_dir + '/' + filename; - filename.append(".rss"); - QFile ft(filename); - if (ft.open(QIODevice::WriteOnly)) { - generatedFiles << ft.fileName(); - QTextStream t(&ft); - t << "// ============================================================================" << endl; - t << "// * Generated by qmake (" << qmake_version() << ") (Qt " QT_VERSION_STR ") on: "; - t << QDateTime::currentDateTime().toString(Qt::ISODate) << endl; - t << "// * This file is generated by qmake and should not be modified by the" << endl; - t << "// * user." << endl; - t << "// ============================================================================" << endl; - t << endl; - t << "CHARACTER_SET UTF8" << endl; - t << "#include <appinfo.rh>" << endl; - t << "#include \"" << fixedTarget << ".loc\"" << endl; - t << endl; - t << "RESOURCE LOCALISABLE_APP_INFO r_localisable_app_info" << endl; - t << "\t{" << endl; - t << "\tshort_caption = STRING_r_short_caption;" << endl; - t << "\tcaption_and_icon =" << endl; - t << "\tCAPTION_AND_ICON_INFO" << endl; - t << "\t\t{" << endl; - t << "\t\tcaption = STRING_r_caption;" << endl; - - QString rssIconFile = iconFile; - rssIconFile = rssIconFile.replace("/", "\\\\"); - - if (numberOfIcons.isEmpty() || rssIconFile.isEmpty()) { - // There can be maximum one item in this tag, validated when parsed - t << "\t\tnumber_of_icons = 0;" << endl; - t << "\t\ticon_file = \"\";" << endl; - } else { - // There can be maximum one item in this tag, validated when parsed - t << "\t\tnumber_of_icons = " << numberOfIcons << ";" << endl; - t << "\t\ticon_file = \"" << rssIconFile << "\";" << endl; - } - t << "\t\t};" << endl; - t << "\t}" << endl; - t << endl; - } else { - PRINT_FILE_CREATE_ERROR(filename); - } -} - -void SymbianCommonGenerator::writeLocFile(const SymbianLocalizationList &symbianLocalizationList) -{ - QString filename = generateLocFileName(); - QFile ft(filename); - if (ft.open(QIODevice::WriteOnly)) { - generatedFiles << ft.fileName(); - QTextStream t(&ft); - - QString displayName = generator->project->values("DEPLOYMENT.display_name").join(" "); - if (displayName.isEmpty()) - displayName = generator->escapeFilePath(generator->project->first("TARGET")); - - 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 \"" << displayName << "\"" << endl; - t << "#define STRING_r_caption \"" << displayName << "\"" << endl; - - SymbianLocalizationListIterator iter(symbianLocalizationList); - while (iter.hasNext()) { - const SymbianLocalization &loc = iter.next(); - QString shortCaption = loc.shortCaption; - QString longCaption = loc.longCaption; - if (shortCaption.isEmpty()) - shortCaption = displayName; - if (longCaption.isEmpty()) - longCaption = displayName; - - t << "#elif defined LANGUAGE_" << loc.symbianLanguageCode << endl; - t << "#define STRING_r_short_caption \"" << shortCaption << "\"" << endl; - t << "#define STRING_r_caption \"" << longCaption << "\"" << endl; - } - - t << "#else" << endl; - t << "#define STRING_r_short_caption \"" << displayName << "\"" << endl; - t << "#define STRING_r_caption \"" << displayName << "\"" << endl; - t << "#endif" << endl; - } else { - PRINT_FILE_CREATE_ERROR(filename); - } -} - -void SymbianCommonGenerator::readRssRules(QString &numberOfIcons, - QString &iconFile, QMap<QString, - QStringList> &userRssRules) -{ - QMakeProject *project = generator->project; - for (QMap<QString, QStringList>::iterator it = project->variables().begin(); it != project->variables().end(); ++it) { - if (it.key().startsWith(RSS_RULES_BASE)) { - QString newKey = it.key().mid(sizeof(RSS_RULES_BASE) - 1); - if (newKey.isEmpty()) { - fprintf(stderr, "Warning: Empty RSS_RULES_BASE key encountered\n"); - continue; - } - QStringList newValues; - QStringList values = it.value(); - foreach(QString item, values) { - // If there is no stringlist defined for a rule, use rule value directly - // This is convenience for defining single line statements - if (project->values(item).isEmpty()) { - newValues << item; - } else { - QStringList itemList; - foreach(QString itemRow, project->values(item)) { - itemList << itemRow; - } - newValues << itemList.join("\n"); - } - } - // Verify that 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 that 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 if (newKey == RSS_TAG_HEADER - || newKey == RSS_TAG_SERVICE_LIST - || newKey == RSS_TAG_FILE_OWNERSHIP_LIST - || newKey == RSS_TAG_DATATYPE_LIST - || newKey == RSS_TAG_FOOTER - || newKey == RSS_TAG_DEFAULT) { - userRssRules[newKey] = newValues; - continue; - } else { - fprintf(stderr, "Warning: Unsupported key:'%s%s'\n", - RSS_RULES_BASE, newKey.toLatin1().constData()); - continue; - } - } - } - - QStringList newValues; - foreach(QString item, project->values(RSS_RULES)) { - // If there is no stringlist defined for a rule, use rule value directly - // This is convenience for defining single line statements - if (project->values(item).isEmpty()) { - newValues << item; - } else { - newValues << project->values(item); - } - } - userRssRules[RSS_TAG_DEFAULT] << newValues; - - // Validate that either both RSS_TAG_NBROFICONS and RSS_TAG_ICONFILE keys exist - // or neither of them exist - if (!((numberOfIcons.isEmpty() && iconFile.isEmpty()) || - (!numberOfIcons.isEmpty() && !iconFile.isEmpty()))) { - numberOfIcons.clear(); - iconFile.clear(); - fprintf(stderr, "Warning: Both or neither of '%s%s' and '%s%s' keys must exist.\n", - RSS_RULES_BASE, RSS_TAG_NBROFICONS, RSS_RULES_BASE, RSS_TAG_ICONFILE); - } - - // Validate that RSS_TAG_NBROFICONS contains only numbers - if (!numberOfIcons.isEmpty()) { - bool ok; - numberOfIcons = numberOfIcons.simplified(); - numberOfIcons.toInt(&ok); - if (!ok) { - numberOfIcons.clear(); - iconFile.clear(); - fprintf(stderr, "Warning: '%s%s' must be integer in decimal format.\n", - RSS_RULES_BASE, RSS_TAG_NBROFICONS); - } - } -} - -void SymbianCommonGenerator::writeCustomDefFile() -{ - if (targetType == TypePlugin && !generator->project->isActiveConfig("stdbinary")) { - // Create custom def file for plugin - QFile ft(Option::output_dir + QLatin1Char('/') + QLatin1String(PLUGIN_COMMON_DEF_FILE_ACTUAL)); - - 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 << "; Name : " PLUGIN_COMMON_DEF_FILE_ACTUAL << endl; - t << "; Part of : " << generator->project->values("TARGET").join(" ") << endl; - t << "; Description : Fixes common plugin symbols to known ordinals" << endl; - t << "; Version : " << endl; - t << ";" << endl; - t << "; ==============================================================================" << "\n" << endl; - - t << endl; - - t << "EXPORTS" << endl; - t << "\tqt_plugin_query_verification_data @ 1 NONAME" << endl; - t << "\tqt_plugin_instance @ 2 NONAME" << endl; - t << endl; - } else { - PRINT_FILE_CREATE_ERROR(QString(PLUGIN_COMMON_DEF_FILE_ACTUAL)) - } - } -} - -void SymbianCommonGenerator::parseTsFiles(SymbianLocalizationList *symbianLocalizationList) -{ - if (!generator->project->isActiveConfig("localize_deployment")) { - return; - } - - QStringList symbianTsFiles; - - symbianTsFiles << generator->project->values("SYMBIAN_MATCHED_TRANSLATIONS"); - - if (!symbianTsFiles.isEmpty()) { - fillQt2SymbianLocalizationList(symbianLocalizationList); - - QMutableListIterator<SymbianLocalization> iter(*symbianLocalizationList); - while (iter.hasNext()) { - SymbianLocalization &loc = iter.next(); - static QString matchStrTemplate = QLatin1String(".*_%1\\.ts"); - QString matchStr = matchStrTemplate.arg(loc.qtLanguageCode); - - foreach (QString file, symbianTsFiles) { - QRegExp matcher(matchStr); - if (matcher.exactMatch(file) && parseTsContent(file, &loc)) - break; - } - } - } -} - -void SymbianCommonGenerator::fillQt2SymbianLocalizationList(SymbianLocalizationList *symbianLocalizationList) -{ - static QString symbianCodePrefix = QLatin1String("SYMBIAN_LANG."); - - QStringList symbianLanguages = generator->project->values("SYMBIAN_MATCHED_LANGUAGES"); - - foreach (QString qtCode, symbianLanguages) { - SymbianLocalization newLoc; - QString symbianCodeVariable = symbianCodePrefix + qtCode; - newLoc.symbianLanguageCode = generator->project->first(symbianCodeVariable); - if (!newLoc.symbianLanguageCode.isEmpty()) { - newLoc.qtLanguageCode = qtCode; - symbianLocalizationList->append(newLoc); - } - } -} - -void SymbianCommonGenerator::parsePreRules(const QString &deploymentVariable, - const QString &variableSuffix, - QStringList *rawRuleList, - QStringList *languageRuleList, - QStringList *headerRuleList, - QStringList *vendorRuleList) -{ - QMakeProject *project = generator->project; - foreach(QString pkgrulesItem, project->values(deploymentVariable + ".pkg_prerules" + variableSuffix)) { - 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()) { - if (pkgrulesItem.startsWith("&")) - *languageRuleList << pkgrulesItem; - else if (pkgrulesItem.startsWith("#")) - *headerRuleList << pkgrulesItem; - else if (pkgrulesItem.startsWith("%") || pkgrulesItem.startsWith(":")) - *vendorRuleList << pkgrulesItem; - else - *rawRuleList << pkgrulesItem; - } else { - if (containsStartWithItem('&', pkgrulesValue)) { - foreach(QString pkgrule, pkgrulesValue) { - *languageRuleList << pkgrule; - } - } else if (containsStartWithItem('#', pkgrulesValue)) { - foreach(QString pkgrule, pkgrulesValue) { - *headerRuleList << pkgrule; - } - } else if (containsStartWithItem('%', pkgrulesValue) - || containsStartWithItem(':', pkgrulesValue)) { - foreach(QString pkgrule, pkgrulesValue) { - *vendorRuleList << pkgrule; - } - } else { - foreach(QString pkgrule, pkgrulesValue) { - *rawRuleList << pkgrule; - } - } - } - } -} - -void SymbianCommonGenerator::parsePostRules(const QString &deploymentVariable, - const QString &variableSuffix, - QStringList *rawRuleList) -{ - QMakeProject *project = generator->project; - foreach(QString pkgrulesItem, project->values(deploymentVariable + ".pkg_postrules" + variableSuffix)) { - 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()) { - *rawRuleList << pkgrulesItem; - } else { - foreach(QString pkgrule, pkgrulesValue) { - *rawRuleList << pkgrule; - } - } - } -} - -bool SymbianCommonGenerator::parseTsContent(const QString &tsFilename, SymbianLocalization *loc) -{ - bool retval = true; - QMakeProject *project = generator->project; - QFile tsFile(tsFilename); - - if (tsFile.exists()) { - if (tsFile.open(QIODevice::ReadOnly)) { - static QString applicationCaptionsContext = QLatin1String("QtApplicationCaptions"); - static QString pkgNameContext = QLatin1String("QtPackageNames"); - static QString tsElement = QLatin1String("TS"); - static QString contextElement = QLatin1String("context"); - static QString nameElement = QLatin1String("name"); - static QString messageElement = QLatin1String("message"); - static QString sourceElement = QLatin1String("source"); - static QString translationElement = QLatin1String("translation"); - static QString shortCaptionId = QLatin1String("Application short caption"); - static QString longCaptionId = QLatin1String("Application long caption"); - static QString pkgDisplayNameId = QLatin1String("Package name"); - static QString installerPkgDisplayNameId = QLatin1String("Smart installer package name"); - static QString languageAttribute = QLatin1String("language"); - static QChar underscoreChar = QLatin1Char('_'); - - enum CurrentContext { - ContextUnknown, - ContextUninteresting, - ContextInteresting - }; - - QXmlStreamReader xml(&tsFile); - - while (!xml.atEnd() && xml.name() != tsElement) - xml.readNextStartElement(); - - while (xml.readNextStartElement()) { - if (xml.name() == contextElement) { - CurrentContext currentContext = ContextUnknown; - while (xml.readNextStartElement()) { - if (currentContext == ContextUnknown) { - // Expect name element before message elements - if (xml.name() == nameElement) { - QString nameText = xml.readElementText(); - if (nameText == applicationCaptionsContext || nameText == pkgNameContext) { - currentContext = ContextInteresting; - } else { - currentContext = ContextUninteresting; - } - } else { - xml.skipCurrentElement(); - } - } else if (currentContext == ContextInteresting) { - if (xml.name() == messageElement) { - QString source; - QString translation; - while (xml.readNextStartElement()) { - if (xml.name() == sourceElement) { - source = xml.readElementText(); - } else if (xml.name() == translationElement) { - translation = xml.readElementText(); - } else { - xml.skipCurrentElement(); - } - } - - if (source == shortCaptionId) { - if (loc->shortCaption.isEmpty()) { - loc->shortCaption = translation; - } else { - fprintf(stderr, "Warning: Duplicate application short caption defined in (%s).\n", - qPrintable(tsFilename)); - } - } else if (source == longCaptionId) { - if (loc->longCaption.isEmpty()) { - loc->longCaption = translation; - } else { - fprintf(stderr, "Warning: Duplicate application long caption defined in (%s).\n", - qPrintable(tsFilename)); - } - } else if (source == pkgDisplayNameId) { - if (loc->pkgDisplayName.isEmpty()) { - loc->pkgDisplayName = translation; - } else { - fprintf(stderr, "Warning: Duplicate package display name defined in (%s).\n", - qPrintable(tsFilename)); - } - } else if (source == installerPkgDisplayNameId) { - if (loc->installerPkgDisplayName.isEmpty()) { - loc->installerPkgDisplayName = translation; - } else { - fprintf(stderr, "Warning: Duplicate smart installer package display name defined in (%s).\n", - qPrintable(tsFilename)); - } - } - } else { - xml.skipCurrentElement(); - } - } else { - xml.skipCurrentElement(); - } - } - } else { - xml.skipCurrentElement(); - } - } - if (xml.hasError()) { - retval = false; - fprintf(stderr, "ERROR: Encountered error \"%s\" when parsing ts file (%s).\n", - qPrintable(xml.errorString()), qPrintable(tsFilename)); - } - } else { - retval = false; - fprintf(stderr, "Warning: Could not open ts file (%s).\n", qPrintable(tsFilename)); - } - } else { - retval = false; - fprintf(stderr, "Warning: ts file does not exist: (%s), unable to parse it.\n", - qPrintable(tsFilename)); - } - - return retval; -} - -QString SymbianCommonGenerator::generatePkgNameForHeader(const SymbianLocalizationList &symbianLocalizationList, - const QString &defaultName, - bool isForSmartInstaller) -{ - QStringList allNames; - QString noTranslation = defaultName; - - if (isForSmartInstaller) - noTranslation += QLatin1String(" installer"); - - SymbianLocalizationListIterator iter(symbianLocalizationList); - while (iter.hasNext()) { - const SymbianLocalization &loc = iter.next(); - QString currentName; - if (isForSmartInstaller) { - currentName = loc.installerPkgDisplayName; - } else { - currentName = loc.pkgDisplayName; - } - - if (currentName.isEmpty()) - currentName = noTranslation; - - allNames << currentName; - } - - if (!allNames.size()) - allNames << noTranslation; - - return allNames.join("\",\""); - -} - -void SymbianCommonGenerator::addLocalizedResourcesToDeployment(const QString &deploymentFilesVar, - const SymbianLocalizationList &symbianLocalizationList) -{ - QStringList locResources; - foreach (QString defaultResource, generator->project->values(deploymentFilesVar)) { - if (defaultResource.endsWith(".rsc")) { - defaultResource.chop(2); - SymbianLocalizationListIterator iter(symbianLocalizationList); - while (iter.hasNext()) { - const SymbianLocalization &loc = iter.next(); - locResources << QString(defaultResource + loc.symbianLanguageCode); - } - } - } - generator->project->values(deploymentFilesVar) << locResources; -} - -QString SymbianCommonGenerator::generateLocFileName() -{ - QString fileName(fixedTarget); - if (!Option::output_dir.isEmpty()) - fileName = Option::output_dir + QLatin1Char('/') + fileName; - fileName.append(".loc"); - return fileName; -} diff --git a/qmake/generators/symbian/symbiancommon.h b/qmake/generators/symbian/symbiancommon.h deleted file mode 100644 index 8402e13647..0000000000 --- a/qmake/generators/symbian/symbiancommon.h +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 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$ -** GNU Lesser General Public License Usage -** 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. -** -** 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef SYMBIANCOMMON_H -#define SYMBIANCOMMON_H - -#include <project.h> -#include <makefile.h> -#include "initprojectdeploy_symbian.h" - -#define PRINT_FILE_CREATE_ERROR(filename) fprintf(stderr, "Error: Could not create '%s'\n", qPrintable(filename)); - -class SymbianLocalization -{ -public: - QString qtLanguageCode; - QString symbianLanguageCode; - QString shortCaption; - QString longCaption; - QString pkgDisplayName; - QString installerPkgDisplayName; -}; - -typedef QList<SymbianLocalization> SymbianLocalizationList; -typedef QListIterator<SymbianLocalization> SymbianLocalizationListIterator; - -class SymbianCommonGenerator -{ -public: - enum TargetType { - TypeExe, - TypeDll, - TypeLib, - TypePlugin, - TypeSubdirs - }; - - - SymbianCommonGenerator(MakefileGenerator *generator); - - virtual void init(); - -protected: - - QString removePathSeparators(QString &file); - void removeSpecialCharacters(QString& str); - void generatePkgFile(const QString &iconFile, - bool epocBuild, - const SymbianLocalizationList &symbianLocalizationList); - bool containsStartWithItem(const QChar &c, const QStringList& src); - - void writeRegRssFile(QMap<QString, QStringList> &useritems); - void writeRegRssList(QTextStream &t, QStringList &userList, - const QString &listTag, - const QString &listItem); - void writeRssFile(QString &numberOfIcons, QString &iconfile); - void writeLocFile(const SymbianLocalizationList &symbianLocalizationList); - void readRssRules(QString &numberOfIcons, - QString &iconFile, - QMap<QString, QStringList> &userRssRules); - - void writeCustomDefFile(); - - void parseTsFiles(SymbianLocalizationList *symbianLocalizationList); - void fillQt2SymbianLocalizationList(SymbianLocalizationList *symbianLocalizationList); - - void parsePreRules(const QString &deploymentVariable, - const QString &variableSuffix, - QStringList *rawRuleList, - QStringList *languageRuleList, - QStringList *headerRuleList, - QStringList *vendorRuleList); - void parsePostRules(const QString &deploymentVariable, - const QString &variableSuffix, - QStringList *rawRuleList); - bool parseTsContent(const QString &tsFilename, SymbianLocalization *loc); - QString generatePkgNameForHeader(const SymbianLocalizationList &symbianLocalizationList, - const QString &defaultName, - bool isForSmartInstaller); - void addLocalizedResourcesToDeployment(const QString &deploymentFilesVar, - const SymbianLocalizationList &symbianLocalizationList); - QString generateLocFileName(); - - -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 deleted file mode 100644 index 8bf217616c..0000000000 --- a/qmake/generators/symbian/symmake.cpp +++ /dev/null @@ -1,1136 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 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$ -** GNU Lesser General Public License Usage -** 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. -** -** 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "symmake.h" - -#include <qstring.h> -#include <qhash.h> -#include <qstringlist.h> -#include <qdir.h> -#include <qdatetime.h> -#include <stdlib.h> -#include <qdebug.h> - -// Included from tools/shared -#include <symbian/epocroot_p.h> - -#define RESOURCE_DIRECTORY_MMP "/resource/apps" -#define REGISTRATION_RESOURCE_DIRECTORY_HW "/private/10003a3f/import/apps" -#define PLUGIN_COMMON_DEF_FILE_FOR_MMP "./plugin_common.def" -#define BLD_INF_FILENAME_LEN (sizeof(BLD_INF_FILENAME) - 1) - -#define BLD_INF_RULES_BASE "BLD_INF_RULES." -#define BLD_INF_TAG_PLATFORMS "prj_platforms" -#define BLD_INF_TAG_MMPFILES "prj_mmpfiles" -#define BLD_INF_TAG_TESTMMPFILES "prj_testmmpfiles" -#define BLD_INF_TAG_EXTENSIONS "prj_extensions" -#define BLD_INF_TAG_TESTEXTENSIONS "prj_testextensions" - -#define MMP_TARGET "TARGET" -#define MMP_TARGETTYPE "TARGETTYPE" -#define MMP_SECUREID "SECUREID" -#define MMP_OPTION "OPTION" -#define MMP_LINKEROPTION "LINKEROPTION" -#define MMP_CAPABILITY "CAPABILITY" -#define MMP_EPOCALLOWDLLDATA "EPOCALLOWDLLDATA" -#define MMP_EPOCHEAPSIZE "EPOCHEAPSIZE" -#define MMP_EPOCSTACKSIZE "EPOCSTACKSIZE" -#define MMP_UID "UID" -#define MMP_VENDORID "VENDORID" -#define MMP_VERSION "VERSION" -#define MMP_START_RESOURCE "START RESOURCE" -#define MMP_END_RESOURCE "END" - -#define VAR_CXXFLAGS "QMAKE_CXXFLAGS" -#define VAR_CFLAGS "QMAKE_CFLAGS" -#define VAR_LFLAGS "QMAKE_LFLAGS" - -#define DEFINE_REPLACE_REGEXP "[^A-Z0-9_]" - -QString SymbianMakefileGenerator::fixPathForMmp(const QString& origPath, const QDir& parentDir) -{ - static QString epocRootStr; - if (epocRootStr.isEmpty()) { - epocRootStr = qt_epocRoot(); - QFileInfo efi(epocRootStr); - if (!efi.exists() || epocRootStr.isEmpty()) { - fprintf(stderr, "Unable to resolve epocRoot '%s' to real dir on current drive, defaulting to '/' for mmp paths\n", qPrintable(qt_epocRoot())); - epocRootStr = "/"; - } else { - epocRootStr = efi.absoluteFilePath(); - } - if (!epocRootStr.endsWith("/")) - epocRootStr += "/"; - - epocRootStr += "epoc32/"; - } - - QString resultPath = origPath; - - // Make it relative, unless it starts with "%epocroot%/epoc32/" - if (resultPath.startsWith(epocRootStr, Qt::CaseInsensitive)) { - resultPath.replace(epocRootStr, "/epoc32/", Qt::CaseInsensitive); - } else { - resultPath = parentDir.relativeFilePath(resultPath); - } - resultPath = QDir::cleanPath(resultPath); - - if (resultPath.isEmpty()) - resultPath = "."; - - return resultPath; -} - -QString SymbianMakefileGenerator::absolutizePath(const QString& origPath) -{ - // Prepend epocroot to any paths beginning with "/epoc32/" - QString resultPath = QDir::fromNativeSeparators(origPath); - if (resultPath.startsWith("/epoc32/", Qt::CaseInsensitive)) - resultPath = QDir::fromNativeSeparators(qt_epocRoot()) + resultPath.mid(1); - - QFileInfo fi(fileInfo(resultPath)); - - // Since origPath can be something given in HEADERS, we need to check if we are dealing - // with a file or a directory. In case the origPath doesn't yet exist, isFile() returns - // false and we default to assuming it is a dir. - if (fi.isFile()) { - resultPath = fi.absolutePath(); - } else { - resultPath = fi.absoluteFilePath(); - } - - resultPath = QDir::cleanPath(resultPath); - - return resultPath; -} - -SymbianMakefileGenerator::SymbianMakefileGenerator() : MakefileGenerator(), SymbianCommonGenerator(this) { } -SymbianMakefileGenerator::~SymbianMakefileGenerator() { } - -void SymbianMakefileGenerator::writeHeader(QTextStream &t) -{ - t << "// ============================================================================" << endl; - t << "// * Makefile for building: " << escapeFilePath(var("TARGET")) << 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 << "// * Project: " << fileFixify(project->projectFile()) << endl; - t << "// * Template: " << var("TEMPLATE") << endl; - t << "// ============================================================================" << endl; - t << endl; - - // Defining define for bld.inf - - QString shortProFilename = project->projectFile(); - shortProFilename.replace(0, shortProFilename.lastIndexOf("/") + 1, QString("")); - shortProFilename.replace(Option::pro_ext, QString("")); - - QString bldinfDefine = shortProFilename; - bldinfDefine.append("_"); - bldinfDefine.append(generate_uid(project->projectFile())); - bldinfDefine = bldinfDefine.toUpper(); - - // replace anything not alphanumeric with underscore - QRegExp replacementMask(DEFINE_REPLACE_REGEXP); - bldinfDefine.replace(replacementMask, QLatin1String("_")); - - bldinfDefine.prepend("BLD_INF_"); - - t << "#define " << bldinfDefine << endl << endl; -} - -bool SymbianMakefileGenerator::writeMakefile(QTextStream &t) -{ - if(!project->values("QMAKE_FAILED_REQUIREMENTS").isEmpty()) { - fprintf(stderr, "Project files not generated because all requirements are not met:\n\t%s\n", - qPrintable(var("QMAKE_FAILED_REQUIREMENTS"))); - return false; - } - - writeHeader(t); - - QString numberOfIcons; - QString iconFile; - QMap<QString, QStringList> userRssRules; - readRssRules(numberOfIcons, iconFile, userRssRules); - - SymbianLocalizationList symbianLocalizationList; - parseTsFiles(&symbianLocalizationList); - - // Generate pkg files if there are any actual files to deploy - bool generatePkg = false; - - if (targetType == TypeExe) { - generatePkg = true; - } else { - foreach(QString item, project->values("DEPLOYMENT")) { - // ### Qt 5: remove .sources, inconsistent with INSTALLS - if (!project->values(item + ".sources").isEmpty() || - !project->values(item + ".files").isEmpty()) { - generatePkg = true; - break; - } - } - } - - if (generatePkg) { - generatePkgFile(iconFile, true, symbianLocalizationList); - } - - writeBldInfContent(t, generatePkg, iconFile); - - // Generate empty wrapper makefile here, because wrapper makefile must exist before writeMkFile, - // but all required data is not yet available. - bool isPrimaryMakefile = true; - QString wrapperFileName = Option::output_dir + QLatin1Char('/') + QLatin1String("Makefile"); - QString outputFileName = fileInfo(Option::output.fileName()).fileName(); - if (outputFileName != BLD_INF_FILENAME) { - wrapperFileName.append(".").append(outputFileName.startsWith(BLD_INF_FILENAME) - ? outputFileName.mid(sizeof(BLD_INF_FILENAME)) - : outputFileName); - isPrimaryMakefile = false; - } - - QFile wrapperMakefile(wrapperFileName); - if (wrapperMakefile.open(QIODevice::WriteOnly)) { - generatedFiles << wrapperFileName; - } else { - PRINT_FILE_CREATE_ERROR(wrapperFileName); - return false; - } - - if (targetType == TypeSubdirs) { - // If we have something to deploy, generate extension makefile for just that, since - // normal extension makefile is not getting generated and we need emulator deployment to be done. - if (generatePkg) - writeMkFile(wrapperFileName, true); - writeWrapperMakefile(wrapperMakefile, isPrimaryMakefile); - return true; - } - - writeMkFile(wrapperFileName, false); - - QString absoluteMmpFileName = Option::output_dir + QLatin1Char('/') + mmpFileName; - writeMmpFile(absoluteMmpFileName, symbianLocalizationList); - - if (targetType == TypeExe) { - if (!project->isActiveConfig("no_icon")) { - writeRegRssFile(userRssRules); - writeRssFile(numberOfIcons, iconFile); - writeLocFile(symbianLocalizationList); - } - } - - writeCustomDefFile(); - writeWrapperMakefile(wrapperMakefile, isPrimaryMakefile); - - return true; -} - -void SymbianMakefileGenerator::init() -{ - MakefileGenerator::init(); - SymbianCommonGenerator::init(); - - if (0 != project->values("QMAKE_PLATFORM").size()) - platform = varGlue("QMAKE_PLATFORM", "", " ", ""); - - if (0 == project->values("QMAKESPEC").size()) - project->values("QMAKESPEC").append(qgetenv("QMAKESPEC")); - - project->values("QMAKE_LIBS") += escapeFilePaths(project->values("LIBS")); - project->values("QMAKE_LIBS_PRIVATE") += escapeFilePaths(project->values("LIBS_PRIVATE")); - - // Disallow renaming of bld.inf. - project->values("MAKEFILE").clear(); - project->values("MAKEFILE") += BLD_INF_FILENAME; - - // .mmp - mmpFileName = fixedTarget; - if (targetType == TypeExe) - mmpFileName.append("_exe"); - else if (targetType == TypeDll || targetType == TypePlugin) - mmpFileName.append("_dll"); - else if (targetType == TypeLib) - mmpFileName.append("_lib"); - mmpFileName.append(Option::mmp_ext); - - initMmpVariables(); - - uid2 = project->first("TARGET.UID2"); - - uid2 = uid2.trimmed(); -} - -QString SymbianMakefileGenerator::getTargetExtension() -{ - QString ret; - if (targetType == TypeExe) { - ret.append("exe"); - } else if (targetType == TypeLib) { - ret.append("lib"); - } else if (targetType == TypeDll || targetType == TypePlugin) { - ret.append("dll"); - } else if (targetType == TypeSubdirs) { - // Not actually usable, so return empty - } else { - // If nothing else set, default to exe - ret.append("exe"); - } - - return ret; -} - -QString SymbianMakefileGenerator::generateUID3() -{ - QString target = project->first("TARGET"); - QString currPath = qmake_getpwd(); - target.prepend("/").prepend(currPath); - return generate_test_uid(target); -} - -void SymbianMakefileGenerator::initMmpVariables() -{ - QStringList sysincspaths; - QStringList srcincpaths; - QStringList srcpaths; - - srcpaths << project->values("SOURCES") << project->values("GENERATED_SOURCES"); - srcpaths << project->values("UNUSED_SOURCES") << project->values("UI_SOURCES_DIR"); - srcpaths << project->values("UI_DIR"); - - QDir current = QDir::current(); - QString absolutizedCurrent = absolutizePath("."); - - for (int j = 0; j < srcpaths.size(); ++j) { - QFileInfo fi(fileInfo(srcpaths.at(j))); - // Sometimes sources have other than *.c* files (e.g. *.moc); prune them. - if (fi.suffix().startsWith("c")) { - if (fi.filePath().length() > fi.fileName().length()) { - appendIfnotExist(srcincpaths, fi.path()); - sources[absolutizePath(fi.path())] += fi.fileName(); - } else { - sources[absolutizedCurrent] += fi.fileName(); - appendIfnotExist(srcincpaths, absolutizedCurrent); - } - } - } - - QStringList incpaths; - incpaths << project->values("INCLUDEPATH"); - incpaths << QLibraryInfo::location(QLibraryInfo::HeadersPath); - incpaths << project->values("HEADERS"); - incpaths << srcincpaths; - incpaths << project->values("UI_HEADERS_DIR"); - incpaths << project->values("UI_DIR"); - - for (int j = 0; j < incpaths.size(); ++j) { - QString includepath = absolutizePath(incpaths.at(j)); - appendIfnotExist(sysincspaths, includepath); - appendAbldTempDirs(sysincspaths, includepath); - } - - // Remove duplicate include path entries - QStringList temporary; - for (int i = 0; i < sysincspaths.size(); ++i) { - QString origPath = sysincspaths.at(i); - QFileInfo origPathInfo(fileInfo(origPath)); - bool bFound = false; - - for (int j = 0; j < temporary.size(); ++j) { - QString tmpPath = temporary.at(j); - QFileInfo tmpPathInfo(fileInfo(tmpPath)); - - if (origPathInfo.absoluteFilePath() == tmpPathInfo.absoluteFilePath()) { - bFound = true; - if (!tmpPathInfo.isRelative() && origPathInfo.isRelative()) { - // We keep the relative notation - temporary.removeOne(tmpPath); - temporary << origPath; - } - } - } - - if (!bFound) - temporary << origPath; - - } - - sysincspaths.clear(); - sysincspaths << temporary; - - systeminclude.insert("SYSTEMINCLUDE", sysincspaths); - - // Check MMP_RULES for singleton keywords that are overridden - QStringList overridableMmpKeywords; - QStringList restrictableMmpKeywords; - QStringList restrictedMmpKeywords; - bool inResourceBlock = false; - - overridableMmpKeywords << QLatin1String(MMP_TARGETTYPE) << QLatin1String(MMP_EPOCHEAPSIZE); - restrictableMmpKeywords << QLatin1String(MMP_TARGET) << QLatin1String(MMP_SECUREID) - << QLatin1String(MMP_OPTION) << QLatin1String(MMP_LINKEROPTION) - << QLatin1String(MMP_CAPABILITY) << QLatin1String(MMP_EPOCALLOWDLLDATA) - << QLatin1String(MMP_EPOCSTACKSIZE) << QLatin1String(MMP_UID) - << QLatin1String(MMP_VENDORID) << QLatin1String(MMP_VERSION); - - foreach (QString item, project->values("MMP_RULES")) { - if (project->values(item).isEmpty()) { - handleMmpRulesOverrides(item, inResourceBlock, restrictedMmpKeywords, - restrictableMmpKeywords, overridableMmpKeywords); - } else { - foreach (QString itemRow, project->values(item)) { - handleMmpRulesOverrides(itemRow, inResourceBlock, restrictedMmpKeywords, - restrictableMmpKeywords, overridableMmpKeywords); - } - } - } - - if (restrictedMmpKeywords.size()) { - fprintf(stderr, "Warning: Restricted statements detected in MMP_RULES:\n" - " (%s)\n" - " Use corresponding qmake variable(s) instead.\n", - qPrintable(restrictedMmpKeywords.join(", "))); - } -} - -void SymbianMakefileGenerator::handleMmpRulesOverrides(QString &checkString, - bool &inResourceBlock, - QStringList &restrictedMmpKeywords, - const QStringList &restrictableMmpKeywords, - const QStringList &overridableMmpKeywords) -{ - QString simplifiedString = checkString.simplified(); - - if (!inResourceBlock && simplifiedString.startsWith(MMP_START_RESOURCE, Qt::CaseInsensitive)) - inResourceBlock = true; - else if (inResourceBlock && simplifiedString.startsWith(MMP_END_RESOURCE, Qt::CaseInsensitive)) - inResourceBlock = false; - - // Allow restricted and overridable items in RESOURCE blocks as those do not actually - // override anything. - if (!inResourceBlock) { - appendKeywordIfMatchFound(overriddenMmpKeywords, overridableMmpKeywords, simplifiedString); - appendKeywordIfMatchFound(restrictedMmpKeywords, restrictableMmpKeywords, simplifiedString); - } -} - -void SymbianMakefileGenerator::appendKeywordIfMatchFound(QStringList &list, - const QStringList &keywordList, - QString &checkString) -{ - // Check if checkString starts with any supplied keyword and - // add the found keyword to list if it does. - foreach (QString item, keywordList) { - if (checkString.startsWith(QString(item).append(" "), Qt::CaseInsensitive) - || checkString.compare(item, Qt::CaseInsensitive) == 0) { - appendIfnotExist(list, item); - } - } -} - - -bool SymbianMakefileGenerator::removeDuplicatedStrings(QStringList &stringList) -{ - QStringList tmpStringList; - - for (int i = 0; i < stringList.size(); ++i) { - QString string = stringList.at(i); - if (tmpStringList.contains(string)) - continue; - else - tmpStringList.append(string); - } - - stringList.clear(); - stringList = tmpStringList; - return true; -} - -void SymbianMakefileGenerator::writeMmpFileHeader(QTextStream &t) -{ - 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 << "// Name : " << mmpFileName << endl; - t << "// ==============================================================================" << endl << endl; -} - -void SymbianMakefileGenerator::writeMmpFile(QString &filename, const SymbianLocalizationList &symbianLocalizationList) -{ - QFile ft(filename); - if (ft.open(QIODevice::WriteOnly)) { - generatedFiles << ft.fileName(); - - QTextStream t(&ft); - - writeMmpFileHeader(t); - - writeMmpFileTargetPart(t); - - writeMmpFileResourcePart(t, symbianLocalizationList); - - writeMmpFileMacrosPart(t); - - writeMmpFileIncludePart(t); - - QDir current = QDir::current(); - - for (QMap<QString, QStringList>::iterator it = sources.begin(); it != sources.end(); ++it) { - QStringList values = it.value(); - QString currentSourcePath = it.key(); - - if (values.size()) - t << "SOURCEPATH \t" << fixPathForMmp(currentSourcePath, current) << endl; - - for (int i = 0; i < values.size(); ++i) { - QString sourceFileName = values.at(i); - t << "SOURCE\t\t" << sourceFileName << endl; - } - t << endl; - } - t << endl; - - if (!project->isActiveConfig("static") && !project->isActiveConfig("staticlib")) { - writeMmpFileLibraryPart(t); - } - - writeMmpFileCapabilityPart(t); - - writeMmpFileCompilerOptionPart(t); - - writeMmpFileBinaryVersionPart(t); - - writeMmpFileRulesPart(t); - } else { - PRINT_FILE_CREATE_ERROR(filename) - } -} - -void SymbianMakefileGenerator::writeMmpFileMacrosPart(QTextStream& t) -{ - t << endl; - - QStringList &defines = project->values("DEFINES"); - if (defines.size()) - t << "// Qt Macros" << endl; - for (int i = 0; i < defines.size(); ++i) { - QString def = defines.at(i); - addMacro(t, def); - } - - // These are required in order that all methods will be correctly exported e.g from qtestlib - QStringList &exp_defines = project->values("PRL_EXPORT_DEFINES"); - if (exp_defines.size()) - t << endl << "// Qt Export Defines" << endl; - for (int i = 0; i < exp_defines.size(); ++i) { - QString def = exp_defines.at(i); - addMacro(t, def); - } - - t << endl; -} - -void SymbianMakefileGenerator::addMacro(QTextStream& t, const QString& value) -{ - t << "MACRO\t\t" << value << endl; -} - - -void SymbianMakefileGenerator::writeMmpFileTargetPart(QTextStream& t) -{ - bool skipTargetType = overriddenMmpKeywords.contains(MMP_TARGETTYPE); - bool skipEpocHeapSize = overriddenMmpKeywords.contains(MMP_EPOCHEAPSIZE); - - if (targetType == TypeExe) { - t << MMP_TARGET "\t\t" << fixedTarget << ".exe" << endl; - if (!skipTargetType) { - if (project->isActiveConfig("stdbinary")) - t << MMP_TARGETTYPE "\t\tSTDEXE" << endl; - else - t << MMP_TARGETTYPE "\t\tEXE" << endl; - } - } else if (targetType == TypeDll || targetType == TypePlugin) { - t << MMP_TARGET "\t\t" << fixedTarget << ".dll" << endl; - if (!skipTargetType) { - if (project->isActiveConfig("stdbinary")) - t << MMP_TARGETTYPE "\t\tSTDDLL" << endl; - else - t << MMP_TARGETTYPE "\t\tDLL" << endl; - } - } else if (targetType == TypeLib) { - t << MMP_TARGET "\t\t" << fixedTarget << ".lib" << endl; - if (!skipTargetType) { - if (project->isActiveConfig("stdbinary")) - t << MMP_TARGETTYPE "\t\tSTDLIB" << endl; - else - t << MMP_TARGETTYPE "\t\tLIB" << endl; - } - } else { - fprintf(stderr, "Error: Unexpected targettype (%d) in SymbianMakefileGenerator::writeMmpFileTargetPart\n", targetType); - } - - t << endl; - - t << MMP_UID "\t\t" << uid2 << " " << uid3 << endl; - - if (0 != project->values("TARGET.SID").size()) { - t << MMP_SECUREID "\t\t" << project->values("TARGET.SID").join(" ") << endl; - } else { - if (0 == uid3.size()) - t << MMP_SECUREID "\t\t0" << endl; - else - t << MMP_SECUREID "\t\t" << uid3 << endl; - } - - // default value used from mkspecs is 0 - if (0 != project->values("TARGET.VID").size()) { - t << MMP_VENDORID "\t\t" << project->values("TARGET.VID").join(" ") << endl; - } - - t << endl; - - if (0 != project->first("TARGET.EPOCSTACKSIZE").size()) - t << MMP_EPOCSTACKSIZE "\t\t" << project->first("TARGET.EPOCSTACKSIZE") << endl; - if (!skipEpocHeapSize && 0 != project->values("TARGET.EPOCHEAPSIZE").size()) - t << MMP_EPOCHEAPSIZE "\t\t" << project->values("TARGET.EPOCHEAPSIZE").join(" ") << endl; - if (0 != project->values("TARGET.EPOCALLOWDLLDATA").size()) - t << MMP_EPOCALLOWDLLDATA << endl; - - if (targetType == TypePlugin && !project->isActiveConfig("stdbinary")) { - // Use custom def file for Qt plugins - t << "DEFFILE " PLUGIN_COMMON_DEF_FILE_FOR_MMP << endl; - } - - t << endl; -} - - -/* - Application registration resource files should be installed to the - \private\10003a3f\import\apps directory. -*/ -void SymbianMakefileGenerator::writeMmpFileResourcePart(QTextStream& t, const SymbianLocalizationList &symbianLocalizationList) -{ - if ((targetType == TypeExe) && - !project->isActiveConfig("no_icon")) { - - QString locTarget = fixedTarget; - locTarget.append(".rss"); - - t << "SOURCEPATH\t\t\t. " << endl; - t << "LANG SC "; // no endl - SymbianLocalizationListIterator iter(symbianLocalizationList); - while (iter.hasNext()) { - const SymbianLocalization &loc = iter.next(); - t << loc.symbianLanguageCode << " "; // no endl - } - t << endl; - t << MMP_START_RESOURCE "\t\t" << locTarget << endl; - t << "HEADER" << endl; - t << "TARGETPATH\t\t\t" RESOURCE_DIRECTORY_MMP << endl; - t << MMP_END_RESOURCE << endl << endl; - - QString regTarget = fixedTarget; - regTarget.append("_reg.rss"); - - t << "SOURCEPATH\t\t\t." << endl; - t << MMP_START_RESOURCE "\t\t" << regTarget << endl; - if (isForSymbianSbsv2()) - t << "DEPENDS " << fixedTarget << ".rsg" << endl; - t << "TARGETPATH\t\t" REGISTRATION_RESOURCE_DIRECTORY_HW << endl; - t << MMP_END_RESOURCE << endl << endl; - } -} - -void SymbianMakefileGenerator::writeMmpFileSystemIncludePart(QTextStream& t) -{ - QDir current = QDir::current(); - - for (QMap<QString, QStringList>::iterator it = systeminclude.begin(); it != systeminclude.end(); ++it) { - QStringList values = it.value(); - for (int i = 0; i < values.size(); ++i) { - QString handledPath = values.at(i); - t << "SYSTEMINCLUDE\t\t" << fixPathForMmp(handledPath, current) << endl; - } - } - - t << endl; -} - -void SymbianMakefileGenerator::writeMmpFileIncludePart(QTextStream& t) -{ - writeMmpFileSystemIncludePart(t); -} - -void SymbianMakefileGenerator::writeMmpFileLibraryPart(QTextStream& t) -{ - QStringList &libs = project->values("LIBS"); - libs << project->values("QMAKE_LIBS") << project->values("QMAKE_LIBS_PRIVATE"); - - removeDuplicatedStrings(libs); - - for (int i = 0; i < libs.size(); ++i) { - QString lib = libs.at(i); - // The -L flag is uninteresting, since all symbian libraries exist in the same directory. - if (lib.startsWith("-l")) { - lib.remove(0, 2); - QString mmpStatement; - if (lib.endsWith(".lib")) { - lib.chop(4); - mmpStatement = "STATICLIBRARY\t"; - } else { - if (lib.endsWith(".dll")) - lib.chop(4); - mmpStatement = "LIBRARY\t\t"; - } - t << mmpStatement << lib << ".lib" << endl; - } - } - - t << endl; -} - -void SymbianMakefileGenerator::writeMmpFileCapabilityPart(QTextStream& t) -{ - if (0 != project->first("TARGET.CAPABILITY").size()) { - QStringList &capabilities = project->values("TARGET.CAPABILITY"); - t << MMP_CAPABILITY "\t\t"; - - for (int i = 0; i < capabilities.size(); ++i) { - QString cap = capabilities.at(i); - t << cap << " "; - } - } else { - t << MMP_CAPABILITY "\t\tNone"; - } - t << endl << endl; -} - -void SymbianMakefileGenerator::writeMmpFileConditionalOptions(QTextStream& t, - const QString &optionType, - const QString &optionTag, - const QString &variableBase) -{ - foreach(QString compilerVersion, project->values("VERSION_FLAGS." + optionTag)) { - QStringList currentValues = project->values(variableBase + "." + compilerVersion); - if (currentValues.size()) { - t << "#if defined(" << compilerVersion << ")" << endl; - t << optionType << " " << optionTag << " " << currentValues.join(" ") << endl; - t << "#endif" << endl; - } - } -} - -void SymbianMakefileGenerator::writeMmpFileSimpleOption(QTextStream& t, - const QString &optionType, - const QString &optionTag, - const QString &options) -{ - QString trimmedOptions = options.trimmed(); - if (!trimmedOptions.isEmpty()) - t << optionType << " " << optionTag << " " << trimmedOptions << endl; -} - -void SymbianMakefileGenerator::appendMmpFileOptions(QString &options, const QStringList &list) -{ - if (list.size()) { - options.append(list.join(" ")); - options.append(" "); - } -} - -void SymbianMakefileGenerator::writeMmpFileCompilerOptionPart(QTextStream& t) -{ - QStringList keywords = project->values("MMP_OPTION_KEYWORDS"); - QStringList commonCxxFlags = project->values(VAR_CXXFLAGS); - QStringList commonCFlags = project->values(VAR_CFLAGS); - QStringList commonLFlags = project->values(VAR_LFLAGS); - - foreach(QString item, keywords) { - QString compilerOption; - QString linkerOption; - - appendMmpFileOptions(compilerOption, project->values(VAR_CXXFLAGS "." + item)); - appendMmpFileOptions(compilerOption, project->values(VAR_CFLAGS "." + item)); - appendMmpFileOptions(compilerOption, commonCxxFlags); - appendMmpFileOptions(compilerOption, commonCFlags); - - appendMmpFileOptions(linkerOption, project->values(VAR_LFLAGS "." + item)); - appendMmpFileOptions(linkerOption, commonLFlags); - - writeMmpFileSimpleOption(t, MMP_OPTION, item, compilerOption); - writeMmpFileSimpleOption(t, MMP_LINKEROPTION, item, linkerOption); - - writeMmpFileConditionalOptions(t, MMP_OPTION, item, VAR_CXXFLAGS); - writeMmpFileConditionalOptions(t, MMP_LINKEROPTION, item, VAR_LFLAGS); - } - - t << endl; -} - -void SymbianMakefileGenerator::writeMmpFileBinaryVersionPart(QTextStream& t) -{ - QString applicationVersion = project->first("VERSION"); - QStringList verNumList = applicationVersion.split('.'); - uint major = 0; - uint minor = 0; - uint patch = 0; - bool success = false; - - if (verNumList.size() > 0) { - major = verNumList[0].toUInt(&success); - if (success && verNumList.size() > 1) { - minor = verNumList[1].toUInt(&success); - if (success && verNumList.size() > 2) { - patch = verNumList[2].toUInt(&success); - } - } - } - - QString mmpVersion; - if (success && major <= 0xFFFF && minor <= 0xFF && patch <= 0xFF) { - // Symbian binary version only has major and minor components, so compress - // Qt's minor and patch values into the minor component. Since Symbian's minor - // component is a 16 bit value, only allow 8 bits for each to avoid overflow. - mmpVersion.append(QString::number(major)) - .append('.') - .append(QString::number((minor << 8) + patch)); - } else { - if (!applicationVersion.isEmpty()) - fprintf(stderr, "Invalid VERSION string: %s\n", qPrintable(applicationVersion)); - mmpVersion = "10.0"; // Default binary version for symbian is 10.0 - } - - t << MMP_VERSION " " << mmpVersion << endl; -} - -void SymbianMakefileGenerator::writeMmpFileRulesPart(QTextStream& t) -{ - foreach(QString item, project->values("MMP_RULES")) { - t << endl; - // 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()) { - t << item << endl; - } else { - foreach(QString itemRow, project->values(item)) { - t << itemRow << endl; - } - } - } -} - -void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploymentExtension, const QString &iconFile) -{ - // Read user defined bld inf rules - - QMap<QString, QStringList> userBldInfRules; - for (QMap<QString, QStringList>::iterator it = project->variables().begin(); it != project->variables().end(); ++it) { - if (it.key().startsWith(BLD_INF_RULES_BASE)) { - QString newKey = it.key().mid(sizeof(BLD_INF_RULES_BASE) - 1); - if (newKey.isEmpty()) { - fprintf(stderr, "Warning: Empty BLD_INF_RULES 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; - } - } - } - userBldInfRules.insert(newKey, newValues); - } - } - - // Add includes of subdirs bld.inf files - - QString currentPath = qmake_getpwd(); - QDir directory(currentPath); - - const QStringList &subdirs = project->values("SUBDIRS"); - foreach(QString item, subdirs) { - bool fromFile = false; - QString fixedItem; - if (!project->isEmpty(item + ".file")) { - fixedItem = project->first(item + ".file"); - fromFile = true; - } else if (!project->isEmpty(item + ".subdir")) { - fixedItem = project->first(item + ".subdir"); - fromFile = false; - } else { - fixedItem = item; - fromFile = item.endsWith(Option::pro_ext); - } - - QString condition; - if (!project->isEmpty(item + ".condition")) - condition = project->first(item + ".condition"); - - QFileInfo subdir(fileInfo(fixedItem)); - QString relativePath = directory.relativeFilePath(fixedItem); - QString fullProName = subdir.absoluteFilePath(); - QString bldinfFilename; - QString subdirFileName; - - if (fromFile) { - subdirFileName = subdir.completeBaseName(); - } else { - subdirFileName = subdir.fileName(); - } - - if (subdir.isDir()) { - // Subdir is a regular project - bldinfFilename = relativePath + QString("/") + QString(BLD_INF_FILENAME); - fullProName += QString("/") + subdirFileName + Option::pro_ext; - } else { - // Subdir is actually a .pro file - if (relativePath.contains("/")) { - // .pro not in same directory as parent .pro - relativePath.remove(relativePath.lastIndexOf("/") + 1, relativePath.length()); - bldinfFilename = relativePath; - } else { - // .pro and parent .pro in same directory - bldinfFilename = QString("./"); - } - bldinfFilename += QString(BLD_INF_FILENAME ".") + subdirFileName; - } - - QString uid = generate_uid(fullProName); - QString bldinfDefine = QString("BLD_INF_") + subdirFileName + QString("_") + uid; - bldinfDefine = bldinfDefine.toUpper(); - - // replace anything not alphanumeric with underscore - QRegExp replacementMask(DEFINE_REPLACE_REGEXP); - bldinfDefine.replace(replacementMask, QLatin1String("_")); - - if (!condition.isEmpty()) - t << "#if defined(" << condition << ")" << endl; - - t << "#ifndef " << bldinfDefine << endl; - t << "\t#include \"" << bldinfFilename << "\"" << endl; - t << "#endif" << endl; - - if (!condition.isEmpty()) - t << "#endif" << endl; - - } - - // Add supported project platforms - - t << endl << BLD_INF_TAG_PLATFORMS << endl << endl; - if (0 != project->values("SYMBIAN_PLATFORMS").size()) - t << project->values("SYMBIAN_PLATFORMS").join(" ") << endl; - - QStringList userItems = userBldInfRules.value(BLD_INF_TAG_PLATFORMS); - foreach(QString item, userItems) - t << item << endl; - userBldInfRules.remove(BLD_INF_TAG_PLATFORMS); - t << endl; - - // Add project mmps and old style extension makefiles - - QString mmpTag; - if (project->isActiveConfig(SYMBIAN_TEST_CONFIG)) - mmpTag = QLatin1String(BLD_INF_TAG_TESTMMPFILES); - else - mmpTag = QLatin1String(BLD_INF_TAG_MMPFILES); - - t << endl << mmpTag << endl << endl; - - writeBldInfMkFilePart(t, addDeploymentExtension); - if (targetType != TypeSubdirs) - t << mmpFileName << endl; - - userItems = userBldInfRules.value(mmpTag); - foreach(QString item, userItems) - t << item << endl; - userBldInfRules.remove(mmpTag); - - QString extensionTag; - if (project->isActiveConfig(SYMBIAN_TEST_CONFIG)) - extensionTag = QLatin1String(BLD_INF_TAG_TESTEXTENSIONS); - else - extensionTag = QLatin1String(BLD_INF_TAG_EXTENSIONS); - - t << endl << extensionTag << endl << endl; - - // Generate extension rules - - writeBldInfExtensionRulesPart(t, iconFile); - - userItems = userBldInfRules.value(extensionTag); - foreach(QString item, userItems) - t << item << endl; - userBldInfRules.remove(extensionTag); - - // Add rest of the user defined content - - for (QMap<QString, QStringList>::iterator it = userBldInfRules.begin(); it != userBldInfRules.end(); ++it) { - t << endl << endl << it.key() << endl << endl; - userItems = it.value(); - foreach(QString item, userItems) - t << item << endl; - } -} - -void SymbianMakefileGenerator::appendIfnotExist(QStringList &list, QString value) -{ - if (!list.contains(value)) - list += value; -} - -void SymbianMakefileGenerator::appendIfnotExist(QStringList &list, QStringList values) -{ - foreach(QString item, values) - appendIfnotExist(list, item); -} - - -QString SymbianMakefileGenerator::removeTrailingPathSeparators(QString &file) -{ - QString ret = file; - if (ret.endsWith(QDir::separator())) { - ret.remove(ret.length() - 1, 1); - } - - return ret; -} - -void SymbianMakefileGenerator::generateCleanCommands(QTextStream& t, - const QStringList& toClean, - const QString& cmd, - const QString& cmdOptions, - const QString& itemPrefix, - const QString& itemSuffix) -{ - for (int i = 0; i < toClean.size(); ++i) { - QString item = toClean.at(i); - item.prepend(itemPrefix).append(itemSuffix); -#if defined(Q_OS_WIN) - t << "\t-@ if EXIST \"" << QDir::toNativeSeparators(item) << "\" "; - t << cmd << " " << cmdOptions << " \"" << QDir::toNativeSeparators(item) << "\"" << endl; -#else - t << "\t-if test -e " << QDir::toNativeSeparators(item) << "; then "; - t << cmd << " " << cmdOptions << " " << QDir::toNativeSeparators(item) << "; fi" << endl; -#endif - } -} - -void SymbianMakefileGenerator::generateDistcleanTargets(QTextStream& t) -{ - t << "dodistclean:" << endl; - const QStringList &subdirs = project->values("SUBDIRS"); - foreach(QString item, subdirs) { - bool fromFile = false; - QString fixedItem; - if (!project->isEmpty(item + ".file")) { - fixedItem = project->first(item + ".file"); - fromFile = true; - } else if (!project->isEmpty(item + ".subdir")) { - fixedItem = project->first(item + ".subdir"); - fromFile = false; - } else { - fromFile = item.endsWith(Option::pro_ext); - fixedItem = item; - } - QFileInfo fi(fileInfo(fixedItem)); - if (!fromFile) { - t << "\t-$(MAKE) -f \"" << Option::fixPathToTargetOS(fi.absoluteFilePath() + "/Makefile") << "\" dodistclean" << endl; - } else { - QString itemName = fi.fileName(); - int extIndex = itemName.lastIndexOf(Option::pro_ext); - if (extIndex) - fixedItem = fi.absolutePath() + "/" + QString("Makefile.") + itemName.mid(0, extIndex); - t << "\t-$(MAKE) -f \"" << Option::fixPathToTargetOS(fixedItem) << "\" dodistclean" << endl; - } - - } - - generatedFiles << Option::fixPathToTargetOS(fileInfo(Option::output.fileName()).absoluteFilePath()); // bld.inf - generatedFiles << project->values("QMAKE_INTERNAL_PRL_FILE"); // Add generated prl files for cleanup - generatedFiles << project->values("QMAKE_DISTCLEAN"); // Add any additional files marked for distclean - QStringList fixedFiles; - QStringList fixedDirs; - foreach(QString item, generatedFiles) { - QString fixedItem = Option::fixPathToTargetOS(fileInfo(item).absoluteFilePath()); - if (!fixedFiles.contains(fixedItem)) { - fixedFiles << fixedItem; - } - } - foreach(QString item, generatedDirs) { - QString fixedItem = Option::fixPathToTargetOS(fileInfo(item).absoluteFilePath()); - if (!fixedDirs.contains(fixedItem)) { - fixedDirs << fixedItem; - } - } - generateCleanCommands(t, fixedFiles, "$(DEL_FILE)", "", "", ""); - generateCleanCommands(t, fixedDirs, "$(DEL_DIR)", "", "", ""); - t << endl; - - t << "distclean: clean dodistclean" << endl; - t << endl; -} - -// Returns a string that can be used as a dependency to loc file on other targets -QString SymbianMakefileGenerator::generateLocFileTarget(QTextStream& t, const QString& locCmd) -{ - QString locFile; - if (targetType == TypeExe && !project->isActiveConfig("no_icon")) { - locFile = Option::fixPathToLocalOS(generateLocFileName()); - t << locFile << QLatin1String(": ") << project->values("SYMBIAN_MATCHED_TRANSLATIONS").join(" ") << endl; - t << locCmd << endl; - t << endl; - locFile += QLatin1Char(' '); - } - - return locFile; -} diff --git a/qmake/generators/symbian/symmake.h b/qmake/generators/symbian/symmake.h deleted file mode 100644 index 053b2752e4..0000000000 --- a/qmake/generators/symbian/symmake.h +++ /dev/null @@ -1,149 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 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$ -** GNU Lesser General Public License Usage -** 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. -** -** 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef SYMMAKEFILE_H -#define SYMMAKEFILE_H - -#include "initprojectdeploy_symbian.h" -#include "symbiancommon.h" -#include <makefile.h> - -QT_BEGIN_NAMESPACE - -#define BLD_INF_FILENAME "bld.inf" -#define MAKEFILE_DEPENDENCY_SEPARATOR " \\\n\t" -#define QT_EXTRA_INCLUDE_DIR "tmp" -#define MAKE_CACHE_NAME ".make.cache" -#define SYMBIAN_TEST_CONFIG "symbian_test" - -class SymbianMakefileGenerator : public MakefileGenerator, public SymbianCommonGenerator -{ -protected: - QString platform; - QString uid2; - QString mmpFileName; - QMap<QString, QStringList> sources; - QMap<QString, QStringList> systeminclude; - QMap<QString, QStringList> library; - // (output file) (source , command) - QMap<QString, QStringList> makmakeCommands; - QStringList overriddenMmpKeywords; - - QString fixPathForMmp(const QString& origPath, const QDir& parentDir); - QString absolutizePath(const QString& origPath); - - virtual bool writeMakefile(QTextStream &t); - - virtual void init(); - - QString getTargetExtension(); - - QString generateUID3(); - - void initMmpVariables(); - void generateMmpFileName(); - void handleMmpRulesOverrides(QString &checkString, - bool &inResourceBlock, - QStringList &restrictedMmpKeywords, - const QStringList &restrictableMmpKeywords, - const QStringList &overridableMmpKeywords); - void appendKeywordIfMatchFound(QStringList &list, - const QStringList &keywordList, - QString &checkString); - - void writeHeader(QTextStream &t); - void writeBldInfContent(QTextStream& t, - bool addDeploymentExtension, - const QString &iconFile); - - static bool removeDuplicatedStrings(QStringList& stringList); - - void writeMmpFileHeader(QTextStream &t); - void writeMmpFile(QString &filename, const SymbianLocalizationList &symbianLocalizationList); - void writeMmpFileMacrosPart(QTextStream& t); - void addMacro(QTextStream& t, const QString& value); - void writeMmpFileTargetPart(QTextStream& t); - void writeMmpFileResourcePart(QTextStream& t, const SymbianLocalizationList &symbianLocalizationList); - void writeMmpFileSystemIncludePart(QTextStream& t); - void writeMmpFileIncludePart(QTextStream& t); - void writeMmpFileLibraryPart(QTextStream& t); - void writeMmpFileCapabilityPart(QTextStream& t); - void writeMmpFileConditionalOptions(QTextStream& t, - const QString &optionType, - const QString &optionTag, - const QString &variableBase); - void writeMmpFileSimpleOption(QTextStream& t, - const QString &optionType, - const QString &optionTag, - const QString &options); - void appendMmpFileOptions(QString &options, const QStringList &list); - void writeMmpFileCompilerOptionPart(QTextStream& t); - void writeMmpFileBinaryVersionPart(QTextStream& t); - void writeMmpFileRulesPart(QTextStream& t); - - void appendIfnotExist(QStringList &list, QString value); - void appendIfnotExist(QStringList &list, QStringList values); - - QString removeTrailingPathSeparators(QString &file); - void generateCleanCommands(QTextStream& t, - const QStringList& toClean, - const QString& cmd, - const QString& cmdOptions, - const QString& itemPrefix, - const QString& itemSuffix); - - void generateDistcleanTargets(QTextStream& t); - QString generateLocFileTarget(QTextStream& t, const QString& locCmd); - - // Subclass implements - virtual void writeBldInfExtensionRulesPart(QTextStream& t, const QString &iconTargetFile) = 0; - virtual void writeBldInfMkFilePart(QTextStream& t, bool addDeploymentExtension) = 0; - virtual void writeMkFile(const QString& wrapperFileName, bool deploymentOnly) = 0; - virtual void writeWrapperMakefile(QFile& wrapperFile, bool isPrimaryMakefile) = 0; - virtual void appendAbldTempDirs(QStringList& sysincspaths, QString includepath) = 0; - -public: - - SymbianMakefileGenerator(); - ~SymbianMakefileGenerator(); -}; - -#endif // SYMMAKEFILE_H diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp deleted file mode 100644 index 7863dca731..0000000000 --- a/qmake/generators/symbian/symmake_abld.cpp +++ /dev/null @@ -1,523 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 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$ -** GNU Lesser General Public License Usage -** 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. -** -** 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "symmake_abld.h" -#include "initprojectdeploy_symbian.h" - -#include <qstring.h> -#include <qstringlist.h> -#include <qdir.h> -#include <qdatetime.h> -#include <qdebug.h> - -// Included from tools/shared -#include <symbian/epocroot_p.h> - -#define DO_NOTHING_TARGET "do_nothing" -#define CREATE_TEMPS_TARGET "create_temps" -#define EXTENSION_CLEAN "extension_clean" -#define PRE_TARGETDEPS_TARGET "pre_targetdeps" -#define COMPILER_CLEAN_TARGET "compiler_clean" -#define FINALIZE_TARGET "finalize" -#define GENERATED_SOURCES_TARGET "generated_sources" -#define ALL_SOURCE_DEPS_TARGET "all_source_deps" -#define DEPLOYMENT_TARGET "deployment" -#define DEPLOYMENT_CLEAN_TARGET "deployment_clean" -#define WINSCW_DEPLOYMENT_TARGET "winscw_deployment" -#define WINSCW_DEPLOYMENT_CLEAN_TARGET "winscw_deployment_clean" -#define STORE_BUILD_TARGET "store_build" - -SymbianAbldMakefileGenerator::SymbianAbldMakefileGenerator() : SymbianMakefileGenerator() { } -SymbianAbldMakefileGenerator::~SymbianAbldMakefileGenerator() { } - -void SymbianAbldMakefileGenerator::writeMkFile(const QString& wrapperFileName, bool deploymentOnly) -{ - QFile ft(gnuMakefileName); - 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() << endl; - t << "# This file is generated by qmake and should not be modified by the" << endl; - t << "# user." << endl; - t << "# Name : " << gnuMakefileName << endl; - t << "# Part of : " << project->values("TARGET").join(" ") << endl; - t << "# Description : This file is used to call necessary targets on wrapper makefile" << endl; - t << "# during normal Symbian build process." << endl; - t << "# Version : " << endl; - t << "#" << endl; - t << "# ==============================================================================" << "\n" << endl; - - t << endl << endl; - - t << "MAKE = make" << endl; - t << endl; - - t << "VISUAL_CFG = RELEASE" << endl; - t << "ifeq \"$(CFG)\" \"UDEB\"" << endl; - t << "VISUAL_CFG = DEBUG" << endl; - t << "endif" << endl; - t << endl; - - t << DO_NOTHING_TARGET " :" << endl; - t << "\t" << "@rem " DO_NOTHING_TARGET << endl << endl; - - QString buildDeps; - QString cleanDeps; - QString finalDeps; - QString cleanDepsWinscw; - QString finalDepsWinscw; - QStringList wrapperTargets; - if (deploymentOnly) { - buildDeps.append(STORE_BUILD_TARGET); - cleanDeps.append(DEPLOYMENT_CLEAN_TARGET); - cleanDepsWinscw.append(WINSCW_DEPLOYMENT_CLEAN_TARGET " " DEPLOYMENT_CLEAN_TARGET); - finalDeps.append(DEPLOYMENT_TARGET); - finalDepsWinscw.append(WINSCW_DEPLOYMENT_TARGET " " DEPLOYMENT_TARGET); - wrapperTargets << WINSCW_DEPLOYMENT_TARGET - << WINSCW_DEPLOYMENT_CLEAN_TARGET - << DEPLOYMENT_TARGET - << DEPLOYMENT_CLEAN_TARGET - << STORE_BUILD_TARGET; - } else { - buildDeps.append(CREATE_TEMPS_TARGET " " PRE_TARGETDEPS_TARGET " " STORE_BUILD_TARGET); - cleanDeps.append(EXTENSION_CLEAN " " DEPLOYMENT_CLEAN_TARGET); - cleanDepsWinscw.append(EXTENSION_CLEAN " " WINSCW_DEPLOYMENT_CLEAN_TARGET " " DEPLOYMENT_CLEAN_TARGET); - finalDeps.append(FINALIZE_TARGET " " DEPLOYMENT_TARGET); - finalDepsWinscw.append(FINALIZE_TARGET " " WINSCW_DEPLOYMENT_TARGET " " DEPLOYMENT_TARGET); - wrapperTargets << PRE_TARGETDEPS_TARGET - << CREATE_TEMPS_TARGET - << EXTENSION_CLEAN - << FINALIZE_TARGET - << WINSCW_DEPLOYMENT_CLEAN_TARGET - << WINSCW_DEPLOYMENT_TARGET - << DEPLOYMENT_CLEAN_TARGET - << DEPLOYMENT_TARGET - << STORE_BUILD_TARGET; - } - - t << "MAKMAKE: " << buildDeps << endl << endl; - t << "LIB: " << buildDeps << endl << endl; - t << "BLD: " << buildDeps << endl << endl; - t << "ifeq \"$(PLATFORM)\" \"WINSCW\"" << endl; - t << "CLEAN: " << cleanDepsWinscw << endl; - t << "else" << endl; - t << "CLEAN: " << cleanDeps << endl; - t << "endif" << endl << endl; - t << "CLEANLIB: " DO_NOTHING_TARGET << endl << endl; - t << "RESOURCE: " DO_NOTHING_TARGET << endl << endl; - t << "FREEZE: " DO_NOTHING_TARGET << endl << endl; - t << "SAVESPACE: " DO_NOTHING_TARGET << endl << endl; - t << "RELEASABLES: " DO_NOTHING_TARGET << endl << endl; - t << "ifeq \"$(PLATFORM)\" \"WINSCW\"" << endl; - t << "FINAL: " << finalDepsWinscw << endl; - t << "else" << endl; - t << "FINAL: " << finalDeps << endl; - t << "endif" << endl << endl; - - QString makefile(Option::fixPathToTargetOS(fileInfo(wrapperFileName).canonicalFilePath())); - foreach(QString target, wrapperTargets) { - t << target << " : " << makefile << endl; - t << "\t-$(MAKE) -f \"" << makefile << "\" " << target << " QT_SIS_TARGET=$(VISUAL_CFG)-$(PLATFORM)" << endl << endl; - } - - t << endl; - } // if(ft.open(QIODevice::WriteOnly)) -} - -void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool isPrimaryMakefile) -{ - QStringList allPlatforms; - foreach(QString platform, project->values("SYMBIAN_PLATFORMS")) { - allPlatforms << platform.toLower(); - } - - QStringList debugPlatforms = allPlatforms; - QStringList releasePlatforms = allPlatforms; - releasePlatforms.removeAll("winscw"); // No release for emulator - - QString testClause; - if (project->isActiveConfig(SYMBIAN_TEST_CONFIG)) - testClause = QLatin1String(" test"); - else - testClause = QLatin1String(""); - - QTextStream t(&wrapperFile); - - MakefileGenerator::writeHeader(t); - - t << "MAKEFILE = " << fileInfo(wrapperFile.fileName()).fileName() << endl; - t << "QMAKE = " << var("QMAKE_QMAKE") << endl; - t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; - t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; - t << "DEL_TREE = " << var("QMAKE_DEL_TREE") << endl; - t << "MOVE = " << var("QMAKE_MOVE") << endl; - t << "CHK_DIR_EXISTS = " << var("QMAKE_CHK_DIR_EXISTS") << endl; - t << "MKDIR = " << var("QMAKE_MKDIR") << endl; -#ifdef Q_OS_WIN32 - t << "XCOPY = xcopy /d /f /h /r /y /i" << endl; - t << "ABLD = ABLD.BAT" << endl; -#elif defined(Q_OS_MAC) - t << "XCOPY = cp -R -v" << endl; - t << "ABLD = abld" << endl; -#else - t << "XCOPY = cp -R -u -v" << endl; - t << "ABLD = abld" << endl; -#endif - t << "DEBUG_PLATFORMS = " << debugPlatforms.join(" ") << endl; - t << "RELEASE_PLATFORMS = " << releasePlatforms.join(" ") << endl; - t << "MAKE = make" << endl; - t << endl; - t << "ifeq (WINS,$(findstring WINS, $(PLATFORM)))" << endl; - t << "ZDIR=$(EPOCROOT)" << QDir::toNativeSeparators("epoc32/release/$(PLATFORM)/$(CFG)/z") << endl; - t << "else" << endl; - t << "ZDIR=$(EPOCROOT)" << QDir::toNativeSeparators("epoc32/data/z") << endl; - t << "endif" << endl; - t << endl; - t << "DEFINES" << '\t' << " = " - << varGlue("PRL_EXPORT_DEFINES","-D"," -D"," ") - << varGlue("QMAKE_COMPILER_DEFINES", "-D", "-D", " ") - << varGlue("DEFINES","-D"," -D","") << endl; - - t << "INCPATH" << '\t' << " = "; - - for (QMap<QString, QStringList>::iterator it = systeminclude.begin(); it != systeminclude.end(); ++it) { - QStringList values = it.value(); - for (int i = 0; i < values.size(); ++i) { - t << " -I\"" << values.at(i) << "\""; - } - } - t << endl; - t << "first: default" << endl; - if (debugPlatforms.contains("winscw")) - t << "default: debug-winscw"; - else if (debugPlatforms.contains("armv5")) - t << "default: debug-armv5"; - else if (debugPlatforms.size()) - t << "default: debug-" << debugPlatforms.first(); - else - t << "default: all"; - - t << endl; - if (!isPrimaryMakefile) { - t << "all:" << endl; - } else { - t << "all: debug release" << endl; - t << endl; - - QString qmakeCmd = "\t$(QMAKE) \"" + project->projectFile() + "\" " + buildArgs(); - - t << "qmake:" << endl; - t << qmakeCmd << endl; - t << endl; - - t << BLD_INF_FILENAME ": " << project->projectFile() << endl; - t << qmakeCmd << endl; - t << endl; - - t << "$(ABLD): " BLD_INF_FILENAME << endl; - t << "\tbldmake bldfiles" << endl; - t << endl; - - QString locFileDep = generateLocFileTarget(t, qmakeCmd); - - t << "debug: " << locFileDep << "$(ABLD)" << endl; - foreach(QString item, debugPlatforms) { - t << "\t$(ABLD)" << testClause << " build " << item << " udeb" << endl; - } - t << endl; - t << "release: " << locFileDep << "$(ABLD)" << endl; - foreach(QString item, releasePlatforms) { - t << "\t$(ABLD)" << testClause << " build " << item << " urel" << endl; - } - t << endl; - - // For more specific builds, targets are in this form: build-platform, e.g. release-armv5 - foreach(QString item, debugPlatforms) { - t << "debug-" << item << ": " << locFileDep << "$(ABLD)" << endl; - t << "\t$(ABLD)" << testClause << " build " << item << " udeb" << endl; - } - - foreach(QString item, releasePlatforms) { - t << "release-" << item << ": " << locFileDep << "$(ABLD)" << endl; - t << "\t$(ABLD)" << testClause << " build " << item << " urel" << endl; - } - - t << endl; - t << "export: $(ABLD)" << endl; - t << "\t$(ABLD)" << testClause << " export" << endl; - t << endl; - - t << "cleanexport: $(ABLD)" << endl; - t << "\t$(ABLD)" << testClause << " cleanexport" << endl; - t << endl; - - } - - // pre_targetdeps target depends on: - // - all targets specified in PRE_TARGETDEPS - // - the GENERATED_SOURCES sources (so that they get generated) - // - all dependencies of sources targeted for compilation - // (mainly to ensure that any included UNUSED_SOURCES that need to be generated get generated) - // - // Unfortunately, Symbian build chain doesn't support linking generated objects to target, - // so supporting generating sources is the best we can do. This is enough for mocs. - - if (targetType != TypeSubdirs) { - writeExtraTargets(t); - writeExtraCompilerTargets(t); - - t << CREATE_TEMPS_TARGET ":" << endl; - // generate command lines like this ... - // -@ if NOT EXIST ".\somedir" mkdir ".\somedir" - QStringList dirsToClean; - QString dirExists = var("QMAKE_CHK_DIR_EXISTS"); - QString mkdir = var("QMAKE_MKDIR"); - for (QMap<QString, QStringList>::iterator it = systeminclude.begin(); it != systeminclude.end(); ++it) { - QStringList values = it.value(); - for (int i = 0; i < values.size(); ++i) { - if (values.at(i).endsWith("/" QT_EXTRA_INCLUDE_DIR)) { - QString fixedValue(QDir::toNativeSeparators(values.at(i))); - dirsToClean << fixedValue; - t << "\t-@ " << dirExists << " \"" << fixedValue << "\" " - << (isWindowsShell() ? "" : "|| ") - << mkdir << " \"" << fixedValue << "\"" << endl; - } - } - } - t << endl; - - // Note: EXTENSION_CLEAN will get called many times when doing reallyclean - // This is why the "2> NUL" gets appended to generated clean targets in makefile.cpp. - t << EXTENSION_CLEAN ": " COMPILER_CLEAN_TARGET << endl; - generateCleanCommands(t, dirsToClean, "$(DEL_TREE)", "", "", ""); - generateCleanCommands(t, project->values("QMAKE_CLEAN"), "$(DEL_FILE)", "", "", ""); - t << endl; - - t << PRE_TARGETDEPS_TARGET ":" - << MAKEFILE_DEPENDENCY_SEPARATOR GENERATED_SOURCES_TARGET - << MAKEFILE_DEPENDENCY_SEPARATOR ALL_SOURCE_DEPS_TARGET; - if (project->values("PRE_TARGETDEPS").size()) - t << MAKEFILE_DEPENDENCY_SEPARATOR << project->values("PRE_TARGETDEPS").join(MAKEFILE_DEPENDENCY_SEPARATOR); - t << endl << endl; - t << GENERATED_SOURCES_TARGET ":"; - if (project->values("GENERATED_SOURCES").size()) - t << MAKEFILE_DEPENDENCY_SEPARATOR << project->values("GENERATED_SOURCES").join(MAKEFILE_DEPENDENCY_SEPARATOR); - t << endl << endl; - t << ALL_SOURCE_DEPS_TARGET ":"; - - QStringList allDeps; - for (QMap<QString, QStringList>::iterator it = sources.begin(); it != sources.end(); ++it) { - QString currentSourcePath = it.key(); - QStringList values = it.value(); - for (int i = 0; i < values.size(); ++i) { - // we need additional check - QString sourceFile = currentSourcePath + "/" + values.at(i); - QStringList deps = findDependencies(QDir::toNativeSeparators(sourceFile)); - appendIfnotExist(allDeps, deps); - } - } - - foreach(QString item, allDeps) { - t << MAKEFILE_DEPENDENCY_SEPARATOR << item; - } - t << endl << endl; - - // Post link operations - t << FINALIZE_TARGET ":" << endl; - if (!project->isEmpty("QMAKE_POST_LINK")) { - t << '\t' << var("QMAKE_POST_LINK"); - t << endl; - } - t << endl; - } else { - QList<MakefileGenerator::SubTarget*> subtargets = findSubDirsSubTargets(); - writeSubTargets(t, subtargets, SubTargetSkipDefaultVariables | SubTargetSkipDefaultTargets); - qDeleteAll(subtargets); - } - - // Deploymend targets for both emulator and rom deployment - writeDeploymentTargets(t, false); - writeDeploymentTargets(t, true); - - generateDistcleanTargets(t); - - t << "clean: $(ABLD)" << endl; - t << "\t-$(ABLD)" << testClause << " reallyclean" << endl; - t << "\t-bldmake clean" << endl; - t << endl; - - t << "clean-debug: $(ABLD)" << endl; - foreach(QString item, debugPlatforms) { - t << "\t$(ABLD)" << testClause << " reallyclean " << item << " udeb" << endl; - } - t << endl; - t << "clean-release: $(ABLD)" << endl; - foreach(QString item, releasePlatforms) { - t << "\t$(ABLD)" << testClause << " reallyclean " << item << " urel" << endl; - } - t << endl; - - // For more specific builds, targets are in this form: clean-build-platform, e.g. clean-release-armv5 - foreach(QString item, debugPlatforms) { - t << "clean-debug-" << item << ": $(ABLD)" << endl; - t << "\t$(ABLD)" << testClause << " reallyclean " << item << " udeb" << endl; - } - foreach(QString item, releasePlatforms) { - t << "clean-release-" << item << ": $(ABLD)" << endl; - t << "\t$(ABLD)" << testClause << " reallyclean " << item << " urel" << endl; - } - t << endl; - - t << "freeze: $(ABLD)" << endl; - t << "\t$(ABLD)" << testClause << " freeze" << endl; - t << endl; - - // Abld toolchain doesn't differentiate between freezing release or debug - t << "freeze-debug: freeze" << endl << endl; - t << "freeze-release: freeze" << endl << endl; - - // For more specific builds, targets are in this form: freeze-build-platform, e.g. freeze-release-armv5, - // though note that debug and release targets of each platform are identical in symbian-abld. - foreach(QString item, debugPlatforms) { - t << "freeze-debug-" << item << ": $(ABLD)" << endl; - t << "\t$(ABLD)" << testClause << " freeze " << item << endl; - } - foreach(QString item, releasePlatforms) { - t << "freeze-release-" << item << ": $(ABLD)" << endl; - t << "\t$(ABLD)" << testClause << " freeze " << item << endl; - } - - t << endl; -} - -void SymbianAbldMakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t, const QString &iconTargetFile) -{ - // We don't use extensions for anything in abld - Q_UNUSED(t); - Q_UNUSED(iconTargetFile); -} - -bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t, bool isRom) -{ - if (isRom) - t << DEPLOYMENT_TARGET ":" << endl; - else - t << WINSCW_DEPLOYMENT_TARGET ":" << endl; - - QString remoteTestPath = qt_epocRoot() - + QDir::toNativeSeparators(QLatin1String(isRom ? "epoc32/data/z/private/" - : "epoc32/winscw/c/private/")) - + privateDirUid; - DeploymentList depList; - - initProjectDeploySymbian(project, depList, remoteTestPath, false, true, - QLatin1String(isRom ? ROM_DEPLOYMENT_PLATFORM : EMULATOR_DEPLOYMENT_PLATFORM), - QString(), generatedDirs, generatedFiles); - - if (depList.size()) - t << "\t-echo Deploying changed files..." << endl; - - for (int i = 0; i < depList.size(); ++i) { -#ifdef Q_OS_WIN32 - // Xcopy prompts for selecting file or directory if target doesn't exist, - // and doesn't provide switch to force file selection. It does provide dir forcing, though, - // so strip the last part of the destination. - t << "\t-$(XCOPY) \"" << depList.at(i).from << "\" \"" - << depList.at(i).to.left(depList.at(i).to.lastIndexOf("\\") + 1) << "\"" << endl; -#else - QString dirExists = var("QMAKE_CHK_DIR_EXISTS"); - QString mkdir = var("QMAKE_MKDIR"); - QString dir = QFileInfo(depList.at(i).to).dir().path(); - t << "\t-@ " << dirExists << " \"" << dir << "\" || " - << mkdir << " \"" << dir << "\"" << endl; - t << "\t-$(XCOPY) \"" << QDir::toNativeSeparators(depList.at(i).from) << "\" \"" - << QDir::toNativeSeparators(depList.at(i).to) << "\"" << endl; -#endif - } - - t << endl; - - if (isRom) - t << DEPLOYMENT_CLEAN_TARGET ":" << endl; - else - t << WINSCW_DEPLOYMENT_CLEAN_TARGET ":" << endl; - - QStringList cleanList; - for (int i = 0; i < depList.size(); ++i) { - cleanList.append(QDir::toNativeSeparators(depList.at(i).to)); - } - generateCleanCommands(t, cleanList, "$(DEL_FILE)", "", "", ""); - - // Note: If deployment creates any directories, they will not get deleted after cleanup. - // To do this in robust fashion could be quite complex. - - t << endl; - - return true; -} - -void SymbianAbldMakefileGenerator::writeBldInfMkFilePart(QTextStream& t, bool addDeploymentExtension) -{ - // Normally emulator deployment gets done via regular makefile, but since subdirs - // do not get that, special deployment only makefile is generated for them if needed. - if (targetType != TypeSubdirs || addDeploymentExtension) { - gnuMakefileName = QLatin1String("Makefile_") + fileInfo(mmpFileName).completeBaseName() - + QLatin1String(".mk"); - t << "gnumakefile " << gnuMakefileName << endl; - } -} - -void SymbianAbldMakefileGenerator::appendAbldTempDirs(QStringList& sysincspaths, QString includepath) -{ - // As a workaround for Symbian toolchain insistence to treat include - // statements as relative to source file rather than the file they appear in, - // we generate extra temporary include directories to make - // relative include paths used in various headers to work properly. - // Note that this is not a fix-all solution; it's just a stop-gap measure - // to make Qt itself build until toolchain can support relative includes in - // a way that Qt expects. - QString epocPath("epoc32"); - if (!includepath.contains(epocPath)) // No temp dirs for epoc includes - appendIfnotExist(sysincspaths, includepath + QString("/" QT_EXTRA_INCLUDE_DIR)); -} diff --git a/qmake/generators/symbian/symmake_abld.h b/qmake/generators/symbian/symmake_abld.h deleted file mode 100644 index 91bfb12b88..0000000000 --- a/qmake/generators/symbian/symmake_abld.h +++ /dev/null @@ -1,68 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 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$ -** GNU Lesser General Public License Usage -** 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. -** -** 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef SYMMAKE_ABLD_H -#define SYMMAKE_ABLD_H - -#include <symmake.h> - -QT_BEGIN_NAMESPACE - -class SymbianAbldMakefileGenerator : public SymbianMakefileGenerator -{ -protected: - - // Inherited from parent - virtual void writeBldInfExtensionRulesPart(QTextStream& t, const QString &iconTargetFile); - virtual void writeBldInfMkFilePart(QTextStream& t, bool addDeploymentExtension); - virtual void writeMkFile(const QString& wrapperFileName, bool deploymentOnly); - virtual void writeWrapperMakefile(QFile& wrapperFile, bool isPrimaryMakefile); - virtual void appendAbldTempDirs(QStringList& sysincspaths, QString includepath); - - bool writeDeploymentTargets(QTextStream &t, bool isRom); - QString gnuMakefileName; -public: - - SymbianAbldMakefileGenerator(); - ~SymbianAbldMakefileGenerator(); -}; - -#endif // SYMMAKE_ABLD_H diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp deleted file mode 100644 index 84236f124a..0000000000 --- a/qmake/generators/symbian/symmake_sbsv2.cpp +++ /dev/null @@ -1,760 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 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$ -** GNU Lesser General Public License Usage -** 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. -** -** 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "symmake_sbsv2.h" -#include "initprojectdeploy_symbian.h" - -#include <qstring.h> -#include <qstringlist.h> -#include <qdir.h> -#include <qdatetime.h> -#include <qdebug.h> - -// Included from tools/shared -#include <symbian/epocroot_p.h> - -SymbianSbsv2MakefileGenerator::SymbianSbsv2MakefileGenerator() : SymbianMakefileGenerator() { } -SymbianSbsv2MakefileGenerator::~SymbianSbsv2MakefileGenerator() { } - -#define FLM_DEST_DIR "epoc32/tools/makefile_templates/qt" -#define FLM_SOURCE_DIR "/mkspecs/symbian-sbsv2/flm/qt" -#define PLATFORM_GCCE "gcce" -#define PLATFORM_WINSCW "winscw" -#define PLATFORM_ARM_PREFIX "arm" -#define BUILD_DEBUG "udeb" -#define BUILD_RELEASE "urel" -#define SBS_RVCT_PREFIX "rvct" - -static QString winscwPlatform; -static QString armPlatformPrefix; -static QString gccePlatform; -static QString sbsRvctPrefix; - -#if defined(Q_OS_UNIX) - extern char **environ; -#endif - -static void fixFlmCmd(QString *cmdLine, const QMap<QString, QString> &commandsToReplace) -{ - // If commandItem starts with any $$QMAKE_* commands, do a replace for SBS equivalent. - // Command replacement is done only for the start of the command or right after - // concatenation operators (&& and ||), as otherwise unwanted replacements might occur. - static QString cmdFind(QLatin1String("(^|&&\\s*|\\|\\|\\s*)%1")); - static QString cmdReplace(QLatin1String("\\1%1")); - - // $$escape_expand(\\n\\t) doesn't work for bld.inf files, but is often used as command - // separator, so replace it with "&&" command concatenator. - cmdLine->replace("\n\t", "&&"); - - // Strip output suppression, as sbsv2 can't handle it in FLMs. Cannot be done by simply - // adding "@" to commandsToReplace, as it'd get handled last due to alphabetical ordering, - // potentially masking other commands that need replacing. - if (cmdLine->contains("@")) - cmdLine->replace(QRegExp(cmdFind.arg("@")), cmdReplace.arg("")); - - // Iterate command replacements in reverse alphabetical order of keys so - // that keys which are starts of other longer keys are iterated after longer keys. - QMapIterator<QString, QString> cmdIter(commandsToReplace); - cmdIter.toBack(); - while (cmdIter.hasPrevious()) { - cmdIter.previous(); - if (cmdLine->contains(cmdIter.key())) - cmdLine->replace(QRegExp(cmdFind.arg(cmdIter.key())), cmdReplace.arg(cmdIter.value())); - } - - // Sbsv2 toolchain strips all backslashes (even double ones) from option parameters, so just - // assume all backslashes are directory separators and replace them with slashes. - // Problem: If some command actually needs backslashes for something else than dir separator, - // we are out of luck. - cmdLine->replace("\\", "/"); -} - -// Copies Qt FLMs to correct location under epocroot. -// This is not done by configure as it is possible to change epocroot after configure. -void SymbianSbsv2MakefileGenerator::exportFlm() -{ - static bool flmExportDone = false; - - if (!flmExportDone) { - QDir sourceDir = QDir(QLibraryInfo::location(QLibraryInfo::PrefixPath) + FLM_SOURCE_DIR); - QFileInfoList sourceInfos = sourceDir.entryInfoList(QDir::Files); - - QDir destDir(qt_epocRoot() + FLM_DEST_DIR); - if (!destDir.exists()) { - if (destDir.mkpath(destDir.absolutePath())) - generatedDirs << destDir.absolutePath(); - } - - foreach(QFileInfo item, sourceInfos) { - QFileInfo destInfo = QFileInfo(destDir.absolutePath() + "/" + item.fileName()); - if (!destInfo.exists() || destInfo.lastModified() != item.lastModified()) { - if (destInfo.exists()) - QFile::remove(destInfo.absoluteFilePath()); - if (QFile::copy(item.absoluteFilePath(), destInfo.absoluteFilePath())) - generatedFiles << destInfo.absoluteFilePath(); - else - fprintf(stderr, "Error: Could not copy '%s' -> '%s'\n", - qPrintable(item.absoluteFilePath()), - qPrintable(destInfo.absoluteFilePath())); - } - } - flmExportDone = true; - } -} - -void SymbianSbsv2MakefileGenerator::findInstalledCompilerVersions(const QString &matchExpression, - const QString &versionPrefix, - QStringList *versionList) -{ - // No need to be able to find env variables on other operating systems, - // as only linux and windows have support for symbian-sbsv2 toolchain -#if defined(Q_OS_UNIX) || defined(Q_OS_WIN) - char *entry = 0; - int count = 0; - QRegExp matcher(matchExpression); - while ((entry = environ[count++])) { - if (matcher.exactMatch(QString::fromLocal8Bit(entry)) - && fileInfo(matcher.cap(matcher.captureCount())).exists()) { - // First capture (index 0) is the whole match, which is skipped. - // Next n captures are version numbers, which are interesting. - // Final capture is the env var value, which we already used, so that is skipped, too. - int capture = 1; - int finalCapture = matcher.captureCount() - 1; - QString version = versionPrefix; - while (capture <= finalCapture) { - version.append(matcher.cap(capture)); - if (capture != finalCapture) - version.append(QLatin1Char('.')); - capture++; - } - *versionList << version; - } - } -#endif -} - -void SymbianSbsv2MakefileGenerator::findGcceVersions(QStringList *gcceVersionList, - QString *defaultVersion) -{ - QString matchStr = QLatin1String("SBS_GCCE(\\d)(\\d)(\\d)BIN=(.*)"); - findInstalledCompilerVersions(matchStr, gccePlatform, gcceVersionList); - - QString qtGcceVersion = QString::fromLocal8Bit(qgetenv("QT_GCCE_VERSION")); - - if (!qtGcceVersion.isEmpty()) { - if (QRegExp("\\d+\\.\\d+\\.\\d+").exactMatch(qtGcceVersion)) { - *defaultVersion = gccePlatform + qtGcceVersion; - } else { - fprintf(stderr, "Warning: Variable QT_GCCE_VERSION ('%s') is in incorrect " - "format, expected format is: 'x.y.z'. Attempting to autodetect GCCE version.\n", - qPrintable(qtGcceVersion)); - } - } - - if (defaultVersion->isEmpty() && gcceVersionList->size()) { - gcceVersionList->sort(); - *defaultVersion = gcceVersionList->last(); - } -} - -void SymbianSbsv2MakefileGenerator::findRvctVersions(QStringList *rvctVersionList, - QString *defaultVersion) -{ - QString matchStr = QLatin1String("RVCT(\\d)(\\d)BIN=(.*)"); - findInstalledCompilerVersions(matchStr, sbsRvctPrefix, rvctVersionList); - - QString qtRvctVersion = QString::fromLocal8Bit(qgetenv("QT_RVCT_VERSION")); - - if (!qtRvctVersion.isEmpty()) { - if (QRegExp("\\d+\\.\\d+").exactMatch(qtRvctVersion)) { - *defaultVersion = sbsRvctPrefix + qtRvctVersion; - } else { - fprintf(stderr, "Warning: Variable QT_RVCT_VERSION ('%s') is in incorrect " - "format, expected format is: 'x.y'.\n", - qPrintable(qtRvctVersion)); - } - } -} - -QString SymbianSbsv2MakefileGenerator::configClause(const QString &platform, - const QString &build, - const QString &compilerVersion, - const QString &clauseTemplate) -{ - QString retval; - if (QString::compare(platform, winscwPlatform) == 0) { - retval = clauseTemplate.arg(build); - } else if (platform.startsWith(armPlatformPrefix)) { - QString fixedCompilerVersion = compilerVersion; - fixedCompilerVersion.replace(".","_"); - retval = clauseTemplate.arg(platform.mid(sizeof(PLATFORM_ARM_PREFIX)-1)) - .arg(build) - .arg(fixedCompilerVersion); - } // else - Unsupported platform for makefile target, return empty clause - return retval; -} - -void SymbianSbsv2MakefileGenerator::writeSbsDeploymentList(const DeploymentList& depList, QTextStream& t) -{ - for (int i = 0; i < depList.size(); ++i) { - t << "START EXTENSION qt/qmake_emulator_deployment" << endl; - QString fromItem = depList.at(i).from; - QString toItem = depList.at(i).to; - fromItem.replace("\\", "/"); - toItem.replace("\\", "/"); -#if defined(Q_OS_WIN) - // add drive if it doesn't have one yet - if (toItem.size() > 1 && toItem[1] != QLatin1Char(':')) - toItem.prepend(QDir::current().absolutePath().left(2)); -#endif - t << "OPTION DEPLOY_SOURCE " << fromItem << endl; - t << "OPTION DEPLOY_TARGET " << toItem << endl; - t << "END" << endl; - } -} - -void SymbianSbsv2MakefileGenerator::writeMkFile(const QString& wrapperFileName, bool deploymentOnly) -{ - // Can't use extension makefile with sbsv2 - Q_UNUSED(wrapperFileName); - Q_UNUSED(deploymentOnly); -} - -void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool isPrimaryMakefile) -{ - static QString debugBuild; - static QString releaseBuild; - static QString defaultGcceCompilerVersion; - static QString defaultRvctCompilerVersion; - static QStringList rvctVersions; - static QStringList gcceVersions; - static QStringList allArmCompilerVersions; - - // Initialize static variables used in makefile creation - if (debugBuild.isEmpty()) { - debugBuild.append(QLatin1String(BUILD_DEBUG)); - releaseBuild.append(QLatin1String(BUILD_RELEASE)); - winscwPlatform.append(QLatin1String(PLATFORM_WINSCW)); - gccePlatform.append(QLatin1String(PLATFORM_GCCE)); - armPlatformPrefix.append(QLatin1String(PLATFORM_ARM_PREFIX)); - sbsRvctPrefix.append(QLatin1String(SBS_RVCT_PREFIX)); - - findGcceVersions(&gcceVersions, &defaultGcceCompilerVersion); - findRvctVersions(&rvctVersions, &defaultRvctCompilerVersion); - - allArmCompilerVersions << rvctVersions << gcceVersions; - - if (!allArmCompilerVersions.size()) { - fprintf(stderr, "Warning: No HW compilers detected. " - "Please install either GCCE or RVCT compiler to enable release builds.\n"); - } - } - - QStringList allPlatforms; - foreach(QString platform, project->values("SYMBIAN_PLATFORMS")) { - allPlatforms << platform.toLower(); - } - - if (!gcceVersions.size()) - allPlatforms.removeAll(gccePlatform); - - QString testClause; - if (project->isActiveConfig(SYMBIAN_TEST_CONFIG)) - testClause = QLatin1String(".test"); - else - testClause = QLatin1String(""); - - // Note: armClause is used for gcce, too, which has a side effect - // of requiring armv* platform(s) in SYMBIAN_PLATFORMS in order - // to get any compiler version specific targets. - QString armClause = " -c " PLATFORM_ARM_PREFIX ".%1.%2.%3" + testClause; - QString genericArmClause; - if (defaultRvctCompilerVersion.isEmpty()) { - // Note: Argument %3 needs to be empty string in this version of clause - genericArmClause = " -c " PLATFORM_ARM_PREFIX "%1_%2%3" + testClause; - } else { - // If defaultRvctCompilerVersion is defined, use specific sbs clause for "generic" clause - genericArmClause = armClause; - } - QString winscwClause = " -c " PLATFORM_WINSCW "_%1.mwccinc" + testClause;; - - QStringList armPlatforms = allPlatforms.filter(QRegExp("^" PLATFORM_ARM_PREFIX)); - - if (!allArmCompilerVersions.size()) { - foreach (QString item, armPlatforms) { - allPlatforms.removeAll(item); - } - armPlatforms.clear(); - } - - QStringList allClauses; - QStringList debugClauses; - QStringList releaseClauses; - - // Only winscw and arm platforms are supported - QStringList debugPlatforms = allPlatforms; - QStringList releasePlatforms = allPlatforms; - releasePlatforms.removeAll(winscwPlatform); // No release for emulator - - if (!releasePlatforms.size()) { - fprintf(stderr, "Warning: No valid release platforms in SYMBIAN_PLATFORMS (%s)\n" - "Most likely required compiler(s) are not properly installed.\n", - qPrintable(project->values("SYMBIAN_PLATFORMS").join(" "))); - } - - if (debugPlatforms.contains(winscwPlatform)) - debugClauses << configClause(winscwPlatform, debugBuild, QString(), winscwClause); - - foreach(QString item, armPlatforms) { - // Only use single clause per arm platform even if multiple compiler versions were found, - // otherwise we get makefile target collisions from sbsv2 toolchain. - if (rvctVersions.size()) { - debugClauses << configClause(item, debugBuild, defaultRvctCompilerVersion, genericArmClause); - releaseClauses << configClause(item, releaseBuild, defaultRvctCompilerVersion, genericArmClause); - } else { - debugClauses << configClause(item, debugBuild, defaultGcceCompilerVersion, armClause); - releaseClauses << configClause(item, releaseBuild, defaultGcceCompilerVersion, armClause); - } - } - - allClauses << debugClauses << releaseClauses; - - QTextStream t(&wrapperFile); - - MakefileGenerator::writeHeader(t); - - t << "MAKEFILE = " << fileInfo(wrapperFile.fileName()).fileName() << endl; - t << "QMAKE = " << var("QMAKE_QMAKE") << endl; - t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; - t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; - t << "CHK_DIR_EXISTS = " << var("QMAKE_CHK_DIR_EXISTS") << endl; - t << "MKDIR = " << var("QMAKE_MKDIR") << endl; - t << "MOVE = " << var("QMAKE_MOVE") << endl; - t << "DEBUG_PLATFORMS = " << debugPlatforms.join(" ") << endl; - t << "RELEASE_PLATFORMS = " << releasePlatforms.join(" ") << endl; - t << "MAKE = make" << endl; - t << "SBS = sbs" << endl; - t << endl; - t << "DEFINES" << '\t' << " = " - << varGlue("PRL_EXPORT_DEFINES","-D"," -D"," ") - << varGlue("QMAKE_COMPILER_DEFINES", "-D", "-D", " ") - << varGlue("DEFINES","-D"," -D","") << endl; - - t << "INCPATH" << '\t' << " = "; - - for (QMap<QString, QStringList>::iterator it = systeminclude.begin(); it != systeminclude.end(); ++it) { - QStringList values = it.value(); - for (int i = 0; i < values.size(); ++i) { - t << " -I\"" << values.at(i) << "\" "; - } - } - - t << endl; - t << "first: default" << endl << endl; - if (!isPrimaryMakefile) { - t << "all:" << endl << endl; - t << "default: all" << endl << endl; - } else { - t << "all: debug release" << endl << endl; - if (debugPlatforms.contains(winscwPlatform)) - t << "default: debug-winscw"; - else if (debugPlatforms.size()) - t << "default: debug-" << debugPlatforms.first(); - else - t << "default: all"; - t << endl; - - QString qmakeCmd = "\t$(QMAKE) \"" + project->projectFile() + "\" " + buildArgs(); - - t << "qmake:" << endl; - t << qmakeCmd << endl; - t << endl; - - t << BLD_INF_FILENAME ": " << project->projectFile() << endl; - t << qmakeCmd << endl; - t << endl; - - QString locFileDep = generateLocFileTarget(t, qmakeCmd); - - t << "debug: " << locFileDep << BLD_INF_FILENAME << endl; - t << "\t$(SBS)"; - foreach(QString clause, debugClauses) { - t << clause; - } - t << endl; - t << "clean-debug: " << BLD_INF_FILENAME << endl; - t << "\t$(SBS) reallyclean --toolcheck=off"; - foreach(QString clause, debugClauses) { - t << clause; - } - t << endl; - - t << "freeze-debug: " << BLD_INF_FILENAME << endl; - t << "\t$(SBS) freeze"; - foreach(QString clause, debugClauses) { - t << clause; - } - t << endl; - - t << "release: " << locFileDep << BLD_INF_FILENAME << endl; - t << "\t$(SBS)"; - foreach(QString clause, releaseClauses) { - t << clause; - } - t << endl; - t << "clean-release: " << BLD_INF_FILENAME << endl; - t << "\t$(SBS) reallyclean --toolcheck=off"; - foreach(QString clause, releaseClauses) { - t << clause; - } - t << endl; - - t << "freeze-release: " << BLD_INF_FILENAME << endl; - t << "\t$(SBS) freeze"; - foreach(QString clause, releaseClauses) { - t << clause; - } - t << endl << endl; - - QString defaultGcceArmVersion; - if (armPlatforms.size()) { - defaultGcceArmVersion = armPlatforms.first(); - } else { - defaultGcceArmVersion = QLatin1String("armv5"); - } - - // For more specific builds, targets are in this form: - // release-armv5 - generic target, compiler version determined by toolchain or autodetection - // release-armv5-rvct4.0 - compiler version specific target - foreach(QString item, debugPlatforms) { - QString clause; - if (item.compare(winscwPlatform) == 0) - clause = configClause(item, debugBuild, QString(), winscwClause); - else if (item.compare(gccePlatform) == 0 ) - clause = configClause(defaultGcceArmVersion, debugBuild, defaultGcceCompilerVersion, armClause); - else // use generic arm clause - clause = configClause(item, debugBuild, defaultRvctCompilerVersion, genericArmClause); - - t << "debug-" << item << ": " << locFileDep << BLD_INF_FILENAME << endl; - t << "\t$(SBS)" << clause << endl; - t << "clean-debug-" << item << ": " << BLD_INF_FILENAME << endl; - t << "\t$(SBS) reallyclean" << clause << endl; - t << "freeze-debug-" << item << ": " << BLD_INF_FILENAME << endl; - t << "\t$(SBS) freeze" << clause << endl; - } - - foreach(QString item, releasePlatforms) { - QString clause; - if (item.compare(gccePlatform) == 0 ) - clause = configClause(defaultGcceArmVersion, releaseBuild, defaultGcceCompilerVersion, armClause); - else // use generic arm clause - clause = configClause(item, releaseBuild, defaultRvctCompilerVersion, genericArmClause); - - t << "release-" << item << ": " << locFileDep << BLD_INF_FILENAME << endl; - t << "\t$(SBS)" << clause << endl; - t << "clean-release-" << item << ": " << BLD_INF_FILENAME << endl; - t << "\t$(SBS) reallyclean" << clause << endl; - t << "freeze-release-" << item << ": " << BLD_INF_FILENAME << endl; - t << "\t$(SBS) freeze" << clause << endl; - } - - foreach(QString item, armPlatforms) { - foreach(QString compilerVersion, allArmCompilerVersions) { - QString debugClause = configClause(item, debugBuild, compilerVersion, armClause); - QString releaseClause = configClause(item, releaseBuild, compilerVersion, armClause); - t << "debug-" << item << "-" << compilerVersion << ": " << locFileDep << BLD_INF_FILENAME << endl; - t << "\t$(SBS)" << debugClause << endl; - t << "clean-debug-" << item << "-" << compilerVersion << ": " << BLD_INF_FILENAME << endl; - t << "\t$(SBS) reallyclean" << debugClause << endl; - t << "freeze-debug-" << item << "-" << compilerVersion << ": " << BLD_INF_FILENAME << endl; - t << "\t$(SBS) freeze" << debugClause << endl; - t << "release-" << item << "-" << compilerVersion << ": " << locFileDep << BLD_INF_FILENAME << endl; - t << "\t$(SBS)" << releaseClause << endl; - t << "clean-release-" << item << "-" << compilerVersion << ": " << BLD_INF_FILENAME << endl; - t << "\t$(SBS) reallyclean" << releaseClause << endl; - t << "freeze-release-" << item << "-" << compilerVersion << ": " << BLD_INF_FILENAME << endl; - t << "\t$(SBS) freeze" << releaseClause << endl; - } - } - - t << endl; - t << "export: " << BLD_INF_FILENAME << endl; - t << "\t$(SBS) export"; - foreach(QString clause, allClauses) { - t << clause; - } - t << endl << endl; - - t << "cleanexport: " << BLD_INF_FILENAME << endl; - t << "\t$(SBS) cleanexport"; - foreach(QString clause, allClauses) { - t << clause; - } - t << endl << endl; - - // Typically one wants to freeze release binaries, so make plain freeze target equal to - // freeze-release. If freezing of debug binaries is needed for some reason, then - // freeze-debug target should be used. There is no point to try freezing both with one - // target as both produce the same def file. - t << "freeze: freeze-release" << endl << endl; - } - - // Add all extra targets including extra compiler targets also to wrapper makefile, - // even though many of them may have already been added to bld.inf as FLMs. - // This is to enable use of targets like 'mocables', which call targets generated by extra compilers. - if (targetType != TypeSubdirs) { - t << extraTargetsCache; - t << extraCompilersCache; - } else { - QList<MakefileGenerator::SubTarget*> subtargets = findSubDirsSubTargets(); - writeSubTargets(t, subtargets, SubTargetSkipDefaultVariables|SubTargetSkipDefaultTargets); - qDeleteAll(subtargets); - } - - generateDistcleanTargets(t); - - // Do not check for tools when doing generic clean, as most tools are not actually needed for - // cleaning. Mainly this is relevant for environments that do not have winscw compiler. - t << "clean: " << BLD_INF_FILENAME << endl; - t << "\t-$(SBS) reallyclean --toolcheck=off"; - foreach(QString clause, allClauses) { - t << clause; - } - t << endl << endl; - - t << endl; -} - -void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t, const QString &iconTargetFile) -{ - // Makes sure we have needed FLMs in place. - exportFlm(); - - // Parse extra compilers data - QStringList defines; - QStringList incPath; - - defines << varGlue("PRL_EXPORT_DEFINES","-D"," -D"," ") - << varGlue("QMAKE_COMPILER_DEFINES", "-D", "-D", " ") - << varGlue("DEFINES","-D"," -D",""); - for (QMap<QString, QStringList>::iterator it = systeminclude.begin(); it != systeminclude.end(); ++it) { - QStringList values = it.value(); - for (int i = 0; i < values.size(); ++i) { - incPath << QLatin1String(" -I\"") + values.at(i) + "\""; - } - } - - QMap<QString, QString> commandsToReplace; - commandsToReplace.insert(project->values("QMAKE_COPY").join(" "), - project->values("QMAKE_SBSV2_COPY").join(" ")); - commandsToReplace.insert(project->values("QMAKE_COPY_DIR").join(" "), - project->values("QMAKE_SBSV2_COPY_DIR").join(" ")); - commandsToReplace.insert(project->values("QMAKE_MOVE").join(" "), - project->values("QMAKE_SBSV2_MOVE").join(" ")); - commandsToReplace.insert(project->values("QMAKE_DEL_FILE").join(" "), - project->values("QMAKE_SBSV2_DEL_FILE").join(" ")); - commandsToReplace.insert(project->values("QMAKE_MKDIR").join(" "), - project->values("QMAKE_SBSV2_MKDIR").join(" ")); - commandsToReplace.insert(project->values("QMAKE_DEL_DIR").join(" "), - project->values("QMAKE_SBSV2_DEL_DIR").join(" ")); - commandsToReplace.insert(project->values("QMAKE_DEL_TREE").join(" "), - project->values("QMAKE_SBSV2_DEL_TREE").join(" ")); - - // Write extra compilers and targets to initialize QMAKE_ET_* variables - // Cache results to avoid duplicate calls when creating wrapper makefile - QTextStream extraCompilerStream(&extraCompilersCache); - QTextStream extraTargetStream(&extraTargetsCache); - writeExtraCompilerTargets(extraCompilerStream); - writeExtraTargets(extraTargetStream); - - // Figure out everything the target depends on as we don't want to run extra targets that - // are not necessary. - QStringList allPreDeps; - foreach(QString item, project->values("PRE_TARGETDEPS")) { - allPreDeps.append(fileInfo(item).absoluteFilePath()); - } - - foreach (QString item, project->values("GENERATED_SOURCES")) { - allPreDeps.append(fileInfo(item).absoluteFilePath()); - } - - for (QMap<QString, QStringList>::iterator it = sources.begin(); it != sources.end(); ++it) { - QString currentSourcePath = it.key(); - QStringList values = it.value(); - for (int i = 0; i < values.size(); ++i) { - QString sourceFile = currentSourcePath + "/" + values.at(i); - QStringList deps = findDependencies(QDir::toNativeSeparators(sourceFile)); - foreach(QString depItem, deps) { - appendIfnotExist(allPreDeps, fileInfo(depItem).absoluteFilePath()); - } - } - } - - // Write FLM rules for all extra targets and compilers that we depend on to build the target. - QStringList extraTargets; - extraTargets << project->values("QMAKE_EXTRA_TARGETS") << project->values("QMAKE_EXTRA_COMPILERS"); - foreach(QString item, extraTargets) { - foreach(QString targetItem, project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_TARGETS.") + item)) { - // Make sure targetpath is absolute - QString absoluteTarget = fileInfo(targetItem).absoluteFilePath(); - if (allPreDeps.contains(absoluteTarget)) { - QStringList deps = project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_DEPS.") + item + targetItem); - QString commandItem = project->values(QLatin1String("QMAKE_INTERNAL_ET_PARSED_CMD.") + item + targetItem).join(" "); - - // Make sure all deps paths are absolute - QString absoluteDeps; - foreach (QString depItem, deps) { - if (!depItem.isEmpty()) { - absoluteDeps.append(fileInfo(depItem).absoluteFilePath()); - absoluteDeps.append(" "); - } - } - - t << "START EXTENSION qt/qmake_extra_pre_targetdep.export" << endl; - t << "OPTION PREDEP_TARGET " << absoluteTarget << endl; - t << "OPTION DEPS " << absoluteDeps << endl; - - if (commandItem.indexOf("$(INCPATH)") != -1) - commandItem.replace("$(INCPATH)", incPath.join(" ")); - if (commandItem.indexOf("$(DEFINES)") != -1) - commandItem.replace("$(DEFINES)", defines.join(" ")); - - fixFlmCmd(&commandItem, commandsToReplace); - - t << "OPTION COMMAND " << commandItem << endl; - t << "END" << endl; - } - } - } - - t << endl; - - // Write deployment rules - QString remoteTestPath = qt_epocRoot() + QLatin1String("epoc32/winscw/c/private/") + privateDirUid; - DeploymentList depList; - - //write emulator deployment - t << "#if defined(WINSCW)" << endl; - initProjectDeploySymbian(project, depList, remoteTestPath, false, true, - QLatin1String(EMULATOR_DEPLOYMENT_PLATFORM), QString(), generatedDirs, generatedFiles); - writeSbsDeploymentList(depList, t); - t << "#endif" << endl; - - //write ROM deployment - remoteTestPath = qt_epocRoot() + QLatin1String("epoc32/data/z/private/") + privateDirUid; - depList.clear(); - initProjectDeploySymbian(project, depList, remoteTestPath, false, true, - QLatin1String(ROM_DEPLOYMENT_PLATFORM), QString(), generatedDirs, generatedFiles); - writeSbsDeploymentList(depList, t); - t << endl; - - // Write post link rules - if (!project->isEmpty("QMAKE_POST_LINK")) { - QString postLinkCmd = var("QMAKE_POST_LINK"); - fixFlmCmd(&postLinkCmd, commandsToReplace); - t << "START EXTENSION qt/qmake_post_link" << endl; - t << "OPTION POST_LINK_CMD " << postLinkCmd << endl; - t << "OPTION LINK_TARGET " << fixedTarget << QLatin1String(".") << getTargetExtension() << endl; - t << "END" << endl; - t << endl; - } - - // Application icon generation - QStringList icons = project->values("ICON"); - if (icons.size()) { - QString icon = icons.first(); - if (icons.size() > 1) - fprintf(stderr, "Warning: Only first icon specified in ICON variable is used: '%s'.", qPrintable(icon)); - - t << "START EXTENSION s60/mifconv" << endl; - - QFileInfo iconInfo = fileInfo(icon); - - QFileInfo bldinf(project->values("MAKEFILE").first()); - QString iconPath = bldinf.dir().relativeFilePath(iconInfo.path()); - - QString iconFile = iconInfo.baseName(); - - QFileInfo iconTargetInfo = fileInfo(iconTargetFile); - QString iconTarget = iconTargetInfo.fileName(); - - t << "OPTION SOURCES -c32 " << iconFile << endl; - t << "OPTION SOURCEDIR " << iconPath << endl; - t << "OPTION TARGETFILE " << iconTarget << endl; - t << "OPTION SVGENCODINGVERSION 3" << endl; // Compatibility with S60 3.1 devices and up - t << "END" << endl; - } - - t << "START EXTENSION qt/qmake_store_build" << endl; - t << "END" << endl; - t << endl; - - // Handle QMAKE_CLEAN - QStringList cleanFiles = project->values("QMAKE_CLEAN"); - if (!cleanFiles.isEmpty()) { - QStringList absoluteCleanFiles; - foreach (QString cleanFile, cleanFiles) { - QFileInfo fi(cleanFile); - QString fileName = QLatin1String("\""); - fileName.append(fi.absoluteFilePath()); - fileName.append(QLatin1String("\"")); - absoluteCleanFiles << fileName; - } - t << "START EXTENSION qt/qmake_clean" << endl; - t << "OPTION CLEAN_FILES " << absoluteCleanFiles.join(" ") << endl; - t << "END" << endl; - } - t << endl; -} - -void SymbianSbsv2MakefileGenerator::writeBldInfMkFilePart(QTextStream& t, bool addDeploymentExtension) -{ - // We don't generate extension makefile in sbsb2 - Q_UNUSED(t); - Q_UNUSED(addDeploymentExtension); -} - -void SymbianSbsv2MakefileGenerator::appendAbldTempDirs(QStringList& sysincspaths, QString includepath) -{ - //Do nothing - Q_UNUSED(sysincspaths); - Q_UNUSED(includepath); -} diff --git a/qmake/generators/symbian/symmake_sbsv2.h b/qmake/generators/symbian/symmake_sbsv2.h deleted file mode 100644 index fce25e1bdb..0000000000 --- a/qmake/generators/symbian/symmake_sbsv2.h +++ /dev/null @@ -1,84 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 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$ -** GNU Lesser General Public License Usage -** 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. -** -** 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. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef SYMMAKE_SBSV2_H -#define SYMMAKE_SBSV2_H - -#include <symmake.h> - -QT_BEGIN_NAMESPACE - -class SymbianSbsv2MakefileGenerator : public SymbianMakefileGenerator -{ -protected: - - // Inherited from parent - virtual void writeBldInfExtensionRulesPart(QTextStream& t, const QString &iconTargetFile); - virtual void writeBldInfMkFilePart(QTextStream& t, bool addDeploymentExtension); - virtual void writeMkFile(const QString& wrapperFileName, bool deploymentOnly); - virtual void writeWrapperMakefile(QFile& wrapperFile, bool isPrimaryMakefile); - virtual void appendAbldTempDirs(QStringList& sysincspaths, QString includepath); - virtual bool isForSymbianSbsv2() const { return true; } // FIXME: killme - i'm ugly! - -public: - - SymbianSbsv2MakefileGenerator(); - ~SymbianSbsv2MakefileGenerator(); - -private: - void exportFlm(); - void findGcceVersions(QStringList *gcceVersionList, QString *defaultVersion); - void findRvctVersions(QStringList *rvctVersionList, QString *defaultVersion); - void findInstalledCompilerVersions(const QString &matchExpression, - const QString &versionPrefix, - QStringList *versionList); - QString configClause(const QString &platform, - const QString &build, - const QString &compilerVersion, - const QString &clauseTemplate); - - void writeSbsDeploymentList(const DeploymentList& depList, QTextStream& t); - - QString extraTargetsCache; - QString extraCompilersCache; -}; - -#endif // SYMMAKE_SBSV2_H diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index 272f5652d3..cb4e67e8ca 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -528,9 +528,6 @@ 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) { diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index d6bb87e7e1..3582ef1776 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -176,11 +176,6 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << "CHK_DIR_EXISTS= " << var("QMAKE_CHK_DIR_EXISTS") << endl; t << "MKDIR = " << var("QMAKE_MKDIR") << endl; - if (!project->isEmpty("QMAKE_SYMBIAN_SHLIB")) { - t << "vpath %.dso " << project->values("QMAKE_LIBDIR").join(":") << endl; - t << "vpath %.lib " << project->values("QMAKE_LIBDIR").join(":") << endl; - } - t << endl; t << "####### Output directory" << endl << endl; @@ -237,8 +232,6 @@ 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; @@ -566,17 +559,6 @@ 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" @@ -923,9 +905,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) } else if(!project->isActiveConfig("staticlib") && project->values("QMAKE_APP_FLAG").isEmpty() && !project->isActiveConfig("plugin")) { 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; + t << "\t-$(DEL_FILE) " << destdir << "$(TARGET0) " << destdir << "$(TARGET1) " + << destdir << "$(TARGET2) $(TARGETA)" << endl; } else { t << "\t-$(DEL_FILE) " << "$(TARGET)" << " " << endl; } @@ -1130,10 +1111,6 @@ void UnixMakefileGenerator::init2() project->first("VER_PAT")); } project->values("TARGET") = project->values("TARGET_x.y.z"); - } else if (!project->isEmpty("QMAKE_SYMBIAN_SHLIB")) { - project->values("TARGET_").append(project->first("TARGET") + "." + - project->first("QMAKE_EXTENSION_SHLIB")); - project->values("TARGET") = project->values("TARGET_"); } else { project->values("TARGET_").append("lib" + project->first("TARGET") + "." + project->first("QMAKE_EXTENSION_SHLIB")); diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp index 1b5a90c186..29381eb7f4 100644 --- a/qmake/generators/win32/mingw_make.cpp +++ b/qmake/generators/win32/mingw_make.cpp @@ -222,12 +222,6 @@ void createRvctObjectScriptFile(const QString &fileName, const QStringList &objL void MingwMakefileGenerator::writeMingwParts(QTextStream &t) { - if (!project->isEmpty("QMAKE_SYMBIAN_SHLIB")) { - t << "vpath %.dso " << project->values("QMAKE_LIBDIR").join(";") << endl; - t << "vpath %.lib " << project->values("QMAKE_LIBDIR").join(";") << endl; - t << "\n\n"; - } - writeStandardParts(t); if (!preCompHeaderOut.isEmpty()) { @@ -294,7 +288,7 @@ void MingwMakefileGenerator::init() if(configs.indexOf("qt") == -1) configs.append("qt"); - if(project->isActiveConfig("dll") && project->values("QMAKE_SYMBIAN_SHLIB").isEmpty()) { + if (project->isActiveConfig("dll")) { QString destDir = ""; if(!project->first("DESTDIR").isEmpty()) destDir = Option::fixPathToTargetOS(project->first("DESTDIR") + Option::dir_sep, false, false); @@ -303,7 +297,7 @@ void MingwMakefileGenerator::init() project->values("QMAKE_LFLAGS").append(QString("-Wl,--out-implib,") + project->first("MINGW_IMPORT_LIB")); } - if(!project->values("DEF_FILE").isEmpty() && project->values("QMAKE_SYMBIAN_SHLIB").isEmpty()) { + if (!project->values("DEF_FILE").isEmpty()) { QString defFileName = fileFixify(project->values("DEF_FILE")).first(); project->values("QMAKE_LFLAGS").append(QString("-Wl,") + escapeFilePath(defFileName)); } diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index 0283cd4ad1..62466e203d 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -314,8 +314,7 @@ void Win32MakefileGenerator::processVars() // TARGET_VERSION_EXT will be used to add a version number onto the target name if (project->values("TARGET_VERSION_EXT").isEmpty() - && !project->values("VER_MAJ").isEmpty() - && project->values("QMAKE_SYMBIAN_SHLIB").isEmpty()) + && !project->values("VER_MAJ").isEmpty()) project->values("TARGET_VERSION_EXT").append(project->values("VER_MAJ").first()); if(project->isEmpty("QMAKE_COPY_FILE")) diff --git a/qmake/option.h b/qmake/option.h index 73a3e807aa..7d57a56543 100644 --- a/qmake/option.h +++ b/qmake/option.h @@ -165,7 +165,7 @@ struct Option enum HOST_MODE { HOST_UNKNOWN_MODE, HOST_UNIX_MODE, HOST_WIN_MODE, HOST_MACX_MODE }; static HOST_MODE host_mode; enum TARG_MODE { TARG_UNKNOWN_MODE, TARG_UNIX_MODE, TARG_WIN_MODE, TARG_MACX_MODE, - TARG_SYMBIAN_MODE, TARG_INTEGRITY_MODE }; + TARG_INTEGRITY_MODE }; static TARG_MODE target_mode; static bool target_mode_overridden; static QString user_template, user_template_prefix; diff --git a/qmake/project.cpp b/qmake/project.cpp index bbfd9005c6..f1d000f05e 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -63,9 +63,6 @@ #include <stdio.h> #include <stdlib.h> -// Included from tools/shared -#include <symbian/epocroot_p.h> - #ifdef Q_OS_WIN32 #define QT_POPEN _popen #define QT_PCLOSE _pclose @@ -81,7 +78,7 @@ enum ExpandFunc { E_MEMBER=1, E_FIRST, E_LAST, E_CAT, E_FROMFILE, E_EVAL, E_LIST E_SPRINTF, E_JOIN, E_SPLIT, E_BASENAME, E_DIRNAME, E_SECTION, E_FIND, E_SYSTEM, E_UNIQUE, E_QUOTE, E_ESCAPE_EXPAND, E_UPPER, E_LOWER, E_FILES, E_PROMPT, E_RE_ESCAPE, E_REPLACE, - E_SIZE, E_GENERATE_UID, E_SORT_DEPENDS, E_RESOLVE_DEPENDS }; + E_SIZE, E_SORT_DEPENDS, E_RESOLVE_DEPENDS }; QMap<QString, ExpandFunc> qmake_expandFunctions() { static QMap<QString, ExpandFunc> *qmake_expand_functions = 0; @@ -113,7 +110,6 @@ QMap<QString, ExpandFunc> qmake_expandFunctions() qmake_expand_functions->insert("prompt", E_PROMPT); qmake_expand_functions->insert("replace", E_REPLACE); qmake_expand_functions->insert("size", E_SIZE); - qmake_expand_functions->insert("generate_uid", E_GENERATE_UID); qmake_expand_functions->insert("sort_depends", E_SORT_DEPENDS); qmake_expand_functions->insert("resolve_depends", E_RESOLVE_DEPENDS); } @@ -551,9 +547,6 @@ QStringList qmake_feature_paths(QMakeProperty *prop=0) case Option::TARG_WIN_MODE: concat << base_concat + QDir::separator() + "win32"; break; - case Option::TARG_SYMBIAN_MODE: - concat << base_concat + QDir::separator() + "symbian"; - break; } concat << base_concat; } @@ -1513,8 +1506,6 @@ void QMakeProject::validateModes() Option::target_mode = Option::TARG_UNIX_MODE; else if (os == "macx") Option::target_mode = Option::TARG_MACX_MODE; - else if (os == "symbian") - Option::target_mode = Option::TARG_SYMBIAN_MODE; else if (os == "win32") Option::target_mode = Option::TARG_WIN_MODE; else @@ -1543,14 +1534,10 @@ QMakeProject::isActiveConfig(const QString &x, bool regex, QMap<QString, QString if (x == "unix") { validateModes(); return Option::target_mode == Option::TARG_UNIX_MODE - || Option::target_mode == Option::TARG_MACX_MODE - || Option::target_mode == Option::TARG_SYMBIAN_MODE; + || Option::target_mode == Option::TARG_MACX_MODE; } else if (x == "macx" || x == "mac") { validateModes(); return Option::target_mode == Option::TARG_MACX_MODE; - } else if (x == "symbian") { - validateModes(); - return Option::target_mode == Option::TARG_SYMBIAN_MODE; } else if (x == "win32") { validateModes(); return Option::target_mode == Option::TARG_WIN_MODE; @@ -1798,9 +1785,6 @@ QMakeProject::doProjectExpand(QString func, QStringList args, return doProjectExpand(func, args_list, place); } -// defined in symbian generator -extern QString generate_test_uid(const QString& target); - static void populateDeps(const QStringList &deps, const QString &prefix, QHash<QString, QSet<QString> > &dependencies, QHash<QString, QStringList> &dependees, @@ -2260,14 +2244,6 @@ QMakeProject::doProjectExpand(QString func, QList<QStringList> args_list, ret += QString::number(size); } break; } - case E_GENERATE_UID: - if (args.count() != 1) { - fprintf(stderr, "%s:%d: generate_uid(var) requires one argument.\n", - parser.file.toLatin1().constData(), parser.line_no); - } else { - ret += generate_test_uid(args.first()); - } - break; case E_SORT_DEPENDS: case E_RESOLVE_DEPENDS: { if(args.count() < 1 || args.count() > 2) { @@ -3187,9 +3163,6 @@ QStringList &QMakeProject::values(const QString &_var, QMap<QString, QStringList ? Option::qmake_abslocation : QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmake", false)); - } else if (var == QLatin1String("EPOCROOT")) { - if (place[var].isEmpty()) - place[var] = QStringList(qt_epocRoot()); } #if defined(Q_OS_WIN32) && defined(Q_CC_MSVC) else if(var.startsWith(QLatin1String("QMAKE_TARGET."))) { diff --git a/qmake/qmake.pri b/qmake/qmake.pri index cd55355750..1f59531c42 100644 --- a/qmake/qmake.pri +++ b/qmake/qmake.pri @@ -3,7 +3,7 @@ CONFIG += depend_includepath QMAKE_INCREMENTAL = SKIP_DEPENDS += qconfig.h qmodules.h DEFINES += QT_NO_TEXTCODEC QT_NO_LIBRARY QT_NO_STL QT_NO_COMPRESS QT_NO_UNICODETABLES \ - QT_NO_GEOM_VARIANT QT_NO_DATASTREAM QLIBRARYINFO_EPOCROOT + QT_NO_GEOM_VARIANT QT_NO_DATASTREAM #qmake code SOURCES += project.cpp property.cpp main.cpp generators/makefile.cpp \ @@ -15,14 +15,7 @@ SOURCES += project.cpp property.cpp main.cpp generators/makefile.cpp \ generators/win32/msvc_vcproj.cpp \ generators/win32/msvc_vcxproj.cpp \ generators/win32/msvc_objectmodel.cpp generators/win32/msbuild_objectmodel.cpp \ - generators/symbian/symbiancommon.cpp \ - generators/symbian/symmake.cpp \ - generators/symbian/symmake_abld.cpp \ - generators/symbian/symmake_sbsv2.cpp \ - generators/symbian/initprojectdeploy_symbian.cpp \ - generators/integrity/gbuild.cpp \ - windows/registry.cpp \ - symbian/epocroot.cpp + generators/integrity/gbuild.cpp HEADERS += project.h property.h generators/makefile.h \ generators/unix/unixmake.h meta.h option.h cachekeys.h \ @@ -32,14 +25,7 @@ HEADERS += project.h property.h generators/makefile.h \ generators/win32/msvc_vcproj.h \ generators/win32/msvc_vcxproj.h \ generators/win32/msvc_objectmodel.h generators/win32/msbuild_objectmodel.h \ - generators/symbian/symbiancommon.h \ - generators/symbian/symmake.h \ - generators/symbian/symmake_abld.h \ - generators/symbian/symmake_sbsv2.h \ - generators/symbian/initprojectdeploy_symbian.h \ - generators/integrity/gbuild.h \ - windows/registry_p.h \ - symbian/epocroot_p.h + generators/integrity/gbuild.h contains(QT_EDITION, OpenSource) { DEFINES += QMAKE_OPENSOURCE_EDITION diff --git a/qmake/qmake.pro b/qmake/qmake.pro index 6c7d0d2f19..5a5010ff6a 100644 --- a/qmake/qmake.pro +++ b/qmake/qmake.pro @@ -24,7 +24,6 @@ INCLUDEPATH += . \ generators/unix \ generators/win32 \ generators/mac \ - generators/symbian \ generators/integrity \ $$QT_SOURCE_TREE/include \ $$QT_SOURCE_TREE/include/QtCore \ @@ -32,8 +31,4 @@ INCLUDEPATH += . \ $$QT_SOURCE_TREE/include/QtCore/$$QT_VERSION/QtCore \ $$QT_SOURCE_TREE/qmake -VPATH += $$QT_SOURCE_TREE/tools/shared -INCLUDEPATH += $$QT_SOURCE_TREE/tools/shared - include(qmake.pri) - |