summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2011-02-18 15:20:00 +0100
committeraxis <qt-info@nokia.com>2011-02-18 15:20:00 +0100
commitc2773ce6b4efb3f8f8d516c29750dd25c802f60b (patch)
treef2aec8051da7068dc0569ebdc830758fb4b286a6 /mkspecs
parent342cd591f5a702b1bff2a72cf6894da191cd0f10 (diff)
Changed various qmake constructs to support Windows.
RevBy: Thomas Zander Conflicts: mkspecs/features/symbian/symbian_building.prf
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/symbian/def_files.prf18
-rw-r--r--mkspecs/features/symbian/symbian_building.prf19
2 files changed, 28 insertions, 9 deletions
diff --git a/mkspecs/features/symbian/def_files.prf b/mkspecs/features/symbian/def_files.prf
index 4a59116e58..746de6a242 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)|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
@@ -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 f5df68b5fe..8a0cc9b17a 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 \
@@ -168,7 +171,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 \