summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-12-11 18:00:38 (GMT)
committeraxis <qt-info@nokia.com>2009-12-11 18:00:38 (GMT)
commit77f4173f191ac946af1cab50610ef99d8b03a618 (patch)
treeaf67ae243293c6b46b67bcc33cb900ec2723e297 /mkspecs
parent206446d3020d77577d6d86d9313f4d40ebb29105 (diff)
downloadQt-77f4173f191ac946af1cab50610ef99d8b03a618.zip
Qt-77f4173f191ac946af1cab50610ef99d8b03a618.tar.gz
Qt-77f4173f191ac946af1cab50610ef99d8b03a618.tar.bz2
Fixed a lot of small bugs in the version and UID handling.
This patch introduces a dependency on a Unix shell to parse the values. This naturally has to go away if we port to Windows later, but it's good enough for now.
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/symbian/linux-armcc/features/qt.prf41
1 files changed, 34 insertions, 7 deletions
diff --git a/mkspecs/symbian/linux-armcc/features/qt.prf b/mkspecs/symbian/linux-armcc/features/qt.prf
index e5d8893..348839a 100644
--- a/mkspecs/symbian/linux-armcc/features/qt.prf
+++ b/mkspecs/symbian/linux-armcc/features/qt.prf
@@ -32,39 +32,66 @@ for(libPath, QMAKE_LIBDIR) {
elf2e32_LIBPATH += "--libpath=$$libPath"
}
+# Check for version validity.
+!isEmpty(VERSION):!contains(VERSION, "[0-9]+"):!contains(VERSION, "[0-9]+\.[0-9]+")!contains(VERSION, "[0-9]+(\.[0-9]+){2}") {
+ error("Invalid VERSION for Symbian: $$VERSION")
+}
+
splitVersion = $$split(VERSION, ".")
-intVersion = "00"
+# Default Symbian version if none is specified.
+isEmpty(splitVersion):splitVersion = 10
+hexVersion = "00"
+versionPart = 1
+versionPart1 = 10
+versionPart2 = 0
+versionPart3 = 0
for(verNumber, splitVersion) {
# Poor man's printf
- !contains(verNumber, "[0-9][0-9]"):intVersion = "$${intVersion}0"
- intVersion = "$${intVersion}$${verNumber}"
+ hexVersion = $$hexVersion$$system("sh -c 'printf %02x $$verNumber'")
+ contains(versionPart, 3) {
+ versionPart3 = $$verNumber
+ versionPart = 4
+ }
+ contains(versionPart, 2) {
+ versionPart2 = $$verNumber
+ versionPart = 3
+ }
+ contains(versionPart, 1) {
+ versionPart1 = $$verNumber
+ versionPart = 2
+ }
}
+!contains(hexVersion, "[0-9a-z]{8}"):hexVersion = "$${hexVersion}00"
+!contains(hexVersion, "[0-9a-z]{8}"):hexVersion = "$${hexVersion}00"
+decVersion = $$sprintf("%1.%2", $$versionPart1, $$system("sh -c 'echo \$[$$versionPart2 * 256 + $$versionPart3]'"))
intUid3 = $$lower($$replace(TARGET.UID3, "^0x", ""))
+isEmpty(TARGET.SID):TARGET.SID = $$TARGET.UID3
+isEmpty(TARGET.UID2):TARGET.UID2 = 0x00000000
contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) {
!isEmpty($$QMAKE_POST_LINK):QMAKE_POST_LINK += &&
QMAKE_POST_LINK += $$QMAKE_MOVE $$DESTDIR/$${TARGET}.dll $$DESTDIR/$${TARGET}.sym
- QMAKE_POST_LINK += && elf2e32 --version 4.1536 --sid 0xe001b2dc --uid1 0x10000079 --uid2 0x1000008d --uid3 0xe001b2dc --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --capability=None --fpu=softvfp --targettype=DLL --elfinput=$${DESTDIR}/$${TARGET}.sym --output=$${DESTDIR}/$${TARGET}.dll --dso=$$DESTDIR/$${TARGET}.dso --defoutput=$$OBJECTS_DIR/$${TARGET}.def --unfrozen --linkas=$${TARGET}\\{$${intVersion}\\}\\[$${intUid3}\\].dll --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged
+ QMAKE_POST_LINK += && elf2e32 --version=$$decVersion --sid=$$TARGET.SID --uid1=0x10000079 --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --capability=None --fpu=softvfp --targettype=DLL --elfinput=$${DESTDIR}/$${TARGET}.sym --output=$${DESTDIR}/$${TARGET}.dll --dso=$$DESTDIR/$${TARGET}.dso --defoutput=$$OBJECTS_DIR/$${TARGET}.def --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged
QMAKE_DISTCLEAN += $${DESTDIR}/$${TARGET}.sym
QMAKE_DISTCLEAN += $${DESTDIR}/$${TARGET}.dso
QMAKE_CLEAN += $${OBJECTS_DIR}/$${TARGET}.def
QMAKE_LIBS += -ledllstub.lib -ledll.lib\\(uc_dll_.o\\)
- QMAKE_LFLAGS += --symver_soname --soname $${TARGET}\\{$${intVersion}\\}\\[$${intUid3}\\].dll
+ QMAKE_LFLAGS += --symver_soname --soname $${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll
}
contains(TEMPLATE, app) {
!isEmpty($$QMAKE_POST_LINK):QMAKE_POST_LINK += &&
QMAKE_POST_LINK += $$QMAKE_MOVE $$DESTDIR/$${TARGET} $$DESTDIR/$${TARGET}.sym
- QMAKE_POST_LINK += && elf2e32 --version 4.1536 --sid 0xe001b2dc --uid1 0x1000007a --uid2 0x1000008d --uid3 $$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --capability=None --fpu=softvfp --targettype=EXE --elfinput=$${DESTDIR}/$${TARGET}.sym --output=$${DESTDIR}/$${TARGET}.exe --unfrozen --linkas=$${TARGET}\\{$${intVersion}\\}\\[$${intUid3}\\].exe --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged
+ QMAKE_POST_LINK += && elf2e32 --version $$decVersion --sid=$$TARGET.SID --uid1=0x1000007a --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 --stack=0x00014000 --capability=None --fpu=softvfp --targettype=EXE --elfinput=$${DESTDIR}/$${TARGET}.sym --output=$${DESTDIR}/$${TARGET}.exe --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged
QMAKE_DISTCLEAN += $${DESTDIR}/$${TARGET}.exe
QMAKE_LIBS += -leexe.lib\\(uc_exe_.o\\)
- QMAKE_LFLAGS += --symver_soname --soname $${TARGET}\\{$${intVersion}\\}\\[$${intUid3}\\].exe
+ QMAKE_LFLAGS += --symver_soname --soname $${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe
}
# Symbian resource files