diff options
author | axis <qt-info@nokia.com> | 2010-10-08 13:49:12 (GMT) |
---|---|---|
committer | Liang Qi <liang.qi@nokia.com> | 2010-10-21 09:12:31 (GMT) |
commit | 36b53b54209244c881217a824fee73b15e471f97 (patch) | |
tree | dd91481e2661e71e5fc5251cc21f0fe6c8faee09 /mkspecs/features/symbian | |
parent | 34fa0516a6ac99be906371a4dd493c4c2abf4a44 (diff) | |
download | Qt-36b53b54209244c881217a824fee73b15e471f97.zip Qt-36b53b54209244c881217a824fee73b15e471f97.tar.gz Qt-36b53b54209244c881217a824fee73b15e471f97.tar.bz2 |
Changed various qmake constructs to support Windows.
RevBy: Thomas Zander
Diffstat (limited to 'mkspecs/features/symbian')
-rw-r--r-- | mkspecs/features/symbian/def_files.prf | 18 | ||||
-rw-r--r-- | mkspecs/features/symbian/symbian_building.prf | 19 |
2 files changed, 28 insertions, 9 deletions
diff --git a/mkspecs/features/symbian/def_files.prf b/mkspecs/features/symbian/def_files.prf index f243878..1c11925 100644 --- a/mkspecs/features/symbian/def_files.prf +++ b/mkspecs/features/symbian/def_files.prf @@ -7,6 +7,18 @@ CONFIG -= def_files_disabled equals(QMAKE_TARGET_PRODUCT, Qt4):clean_TARGET = $$replace(TARGET, "$${QT_LIBINFIX}$", "") else:clean_TARGET = $$TARGET +defineTest(qtTestIfDirExists) { + contains(QMAKE_HOST.os,Windows) { + dirToTest = $$1 + $$dirToTest ~= s,/,\\, + # Windows trick. Test for existence of nul, which every directory has. + retValue = $$system("if exist $$dirToTest\\nul echo true") + contains(retValue, true):return(true)|return(false) + } else { + system("test -d $$1"):return(true)|return(false) + } +} + symbian-abld|symbian-sbsv2 { # Firstly, if the MMP_RULES already contain a defBlock variable, don't generate another one # (this bit is slightly magic, because it depends upon everyone creating their DEFFILE statements @@ -52,9 +64,11 @@ symbian-abld|symbian-sbsv2 { } else { defFile = . } - system("$$QMAKE_CHK_DIR_EXISTS $$_PRO_FILE_PWD_/$$defFile") { + qtTestIfDirExists($$_PRO_FILE_PWD_/$$defFile) { !exists("$$_PRO_FILE_PWD_/$$defFile/eabi") { - system("$$QMAKE_MKDIR $$_PRO_FILE_PWD_/$$defFile/eabi") + dirToCreate = $$_PRO_FILE_PWD_/$$defFile/eabi + contains(QMAKE_HOST.os,Windows):dirToCreate ~= s,/,\\, + system("$$QMAKE_MKDIR $$dirToCreate") } elf2e32FileToAdd = $$_PRO_FILE_PWD_/$$defFile/eabi/$$basename(clean_TARGET)u.def } else { diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf index c4c068f..0ba0de5 100644 --- a/mkspecs/features/symbian/symbian_building.prf +++ b/mkspecs/features/symbian/symbian_building.prf @@ -89,12 +89,13 @@ count(splitVersion, 0) { decVersion = "10.0" } else { count(splitVersion, 3) { - hexVersion = $$system("sh -c 'printf %02x $$member(splitVersion, 0)'") - hexPart2 = $$system("sh -c 'printf %02x $$member(splitVersion, 1)'")" - hexPart2 = $$hexPart2$$system("sh -c 'printf %02x $$member(splitVersion, 2)'")" - decVersion = $$system("sh -c 'printf %1d 0x$$hexVersion'"). + hexVersion = $$system("perl -e \"printf (\\\"%02x\\\", $$member(splitVersion, 0))\"") + hexPart2 = $$system("perl -e \"printf (\\\"%02x\\\", $$member(splitVersion, 1))\"")" + hexPart2 = $$hexPart2$$system("perl -e \"printf (\\\"%02x\\\", $$member(splitVersion, 2))\"")" + decVersion = $$system("perl -e \"printf (\\\"%1d\\\", 0x$$hexVersion)\""). hexVersion = $$hexVersion$$hexPart2 - decVersion = $$decVersion$$system("sh -c 'printf %d 0x$$hexPart2'") + decVersion = $$decVersion$$system("perl -e \"printf (\\\"%d\\\", 0x$$hexPart2)\"") + !contains(hexVersion, "[0-9a-f]{8}"):hexVersion = "00$${hexVersion}" } else { # app code may have different numbering... hexVersion = $$VERSION @@ -117,7 +118,9 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { contains(CONFIG, plugin):QMAKE_ELF2E32_FLAGS += --definput=plugin_commonu.def !isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$escape_expand(\\n\\t)$$QMAKE_POST_LINK - QMAKE_POST_LINK = $$QMAKE_MOVE $$symbianDestdir/$${baseTarget}.dll $$symbianDestdir/$${baseTarget}.sym \ + moveCmd = $$QMAKE_MOVE $$symbianDestdir/$${baseTarget}.dll $$symbianDestdir/$${baseTarget}.sym + contains(QMAKE_HOST.os,Windows):moveCmd = $$replace(moveCmd, /, \\) + QMAKE_POST_LINK = $$moveCmd \ && $$QMAKE_ELF2E32_WRAPPER --version=$$decVersion \ --sid=$$TARGET.SID \ --uid1=0x10000079 \ @@ -167,7 +170,9 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@:.*") { !isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$escape_expand(\\n\\t)$$QMAKE_POST_LINK - QMAKE_POST_LINK = $$QMAKE_MOVE $$symbianDestdir/$${baseTarget} $$symbianDestdir/$${baseTarget}.sym \ + moveCmd = $$QMAKE_MOVE $$symbianDestdir/$${baseTarget} $$symbianDestdir/$${baseTarget}.sym + contains(QMAKE_HOST.os,Windows):moveCmd = $$replace(moveCmd, /, \\) + QMAKE_POST_LINK = $$moveCmd \ && $$QMAKE_ELF2E32_WRAPPER --version $$decVersion \ --sid=$$TARGET.SID \ --uid1=0x1000007a \ |