diff options
author | axis <qt-info@nokia.com> | 2010-02-09 09:03:06 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2010-02-09 09:24:40 (GMT) |
commit | 8985620b40e92dae928d6597924eacdf36da020c (patch) | |
tree | 7f7b0c2e8fd1469b78fbb87a25f9a84781acc0b5 /mkspecs | |
parent | 0de1cf57c6ad80776dc4d57a394ea5e0982686a6 (diff) | |
download | Qt-8985620b40e92dae928d6597924eacdf36da020c.zip Qt-8985620b40e92dae928d6597924eacdf36da020c.tar.gz Qt-8985620b40e92dae928d6597924eacdf36da020c.tar.bz2 |
Implemented rss file generator for Linux.
Most code was reused from the Windows generator. Icons don't
currently work due to a problem with the mifconv tool.
In addition backslashes were changed to slashes in all common code,
since qmake seems to prefer this when doing path cleanup and the
like.
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/features/symbian/application_icon.prf | 20 | ||||
-rw-r--r-- | mkspecs/symbian/linux-armcc/features/symbian_building.prf | 40 |
2 files changed, 55 insertions, 5 deletions
diff --git a/mkspecs/features/symbian/application_icon.prf b/mkspecs/features/symbian/application_icon.prf index 1edbe14..069678e 100644 --- a/mkspecs/features/symbian/application_icon.prf +++ b/mkspecs/features/symbian/application_icon.prf @@ -28,23 +28,33 @@ contains( CONFIG, no_icon ) { baseTarget = $$replace(baseTarget, " ",_) # Note: symbian-sbsv2 builds can't utilize extra compiler for mifconv, so ICON handling is done in code - symbian-abld { + !symbian-sbsv2 { #Makefile: requires paths with backslash - ICON = $$replace( ICON, /, \\) + ICON_backslashed = $$replace( ICON, /, \\) + + symbian-abld { + mifIconZDir = ${ZDIR}$$APP_RESOURCE_DIR + } else { + isEmpty(DESTDIR) { + mifIconZDir = . + } else { + mifIconZDir = $$DESTDIR + } + } # Extra compiler rules for mifconv - mifconv.output = ${ZDIR}$$APP_RESOURCE_DIR/$${baseTarget}.mif + mifconv.output = $$mifIconZDir/$${baseTarget}.mif # Based on: http://www.forum.nokia.com/document/Cpp_Developers_Library # svg-t icons should always use /c32 depth mifconv.commands = mifconv ${QMAKE_FILE_OUT} /c32 ${QMAKE_FILE_IN} - mifconv.input = ICON + mifconv.input = ICON_backslashed mifconv.CONFIG = no_link combine # target_predeps together with combine seems not to work correctly, lets define it by ourselves PRE_TARGETDEPS += $$mifconv.output QMAKE_EXTRA_COMPILERS += mifconv } # Rules to use generated MIF file from symbian resources - RSS_RULES.number_of_icons = $$size(ICON) + RSS_RULES.number_of_icons = $$size(ICON_backslashed) RSS_RULES.icon_file = $$APP_RESOURCE_DIR/$${baseTarget}.mif } } diff --git a/mkspecs/symbian/linux-armcc/features/symbian_building.prf b/mkspecs/symbian/linux-armcc/features/symbian_building.prf index 25d6e0b..1106fd9 100644 --- a/mkspecs/symbian/linux-armcc/features/symbian_building.prf +++ b/mkspecs/symbian/linux-armcc/features/symbian_building.prf @@ -133,6 +133,40 @@ symbianresources.CONFIG = no_link QMAKE_EXTRA_COMPILERS += symbianresources +contains(TEMPLATE, "app"):!contains(CONFIG, "no_icon") { + baseTarget = $$basename(TARGET) + baseTarget = $$replace(baseTarget, -,_) + baseTarget = $$replace(baseTarget, :,_) + baseTarget = $$replace(baseTarget, \.,_) + baseTarget = $$replace(baseTarget, " ",_) + + # Make our own extra compiler target in order to get dependencies for generated + # files right. This also avoids the warning about files not found. + symbianGenResource.inputFile = $${baseTarget}.rss + symbianGenResource.input = symbianGenResource.inputFile + # Reuse the command from earlier. + symbianGenResource.commands = $$symbianresources.commands + symbianGenResource.output = $$symbianresources.output + symbianGenResource.CONFIG = no_link target_predeps + + symbianGenRegResource.inputFile = $${baseTarget}_reg.rss + symbianGenRegResource.input = symbianGenRegResource.inputFile + symbianGenRegResource.commands = $$symbianresources.commands + symbianGenRegResource.output = $$symbianresources.output + symbianGenRegResource.CONFIG = no_link target_predeps + symbianGenRegResource.depends = $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg + + QMAKE_EXTRA_COMPILERS += symbianGenResource symbianGenRegResource + + QMAKE_DISTCLEAN += $${TARGET}.rss + QMAKE_DISTCLEAN += $${TARGET}_reg.rss + QMAKE_DISTCLEAN += $${TARGET}.loc +} + +# Generated pkg files + +QMAKE_DISTCLEAN += $${TARGET}_template.pkg + # Pre 2.6.23 Linux kernels have a limit on the environment size that can be passed to # a forked process. We quite easily overstep this boundary when building big projects # on Symbian, and since we depend on running the system() command, this causes the build @@ -142,3 +176,9 @@ execve_sanity_test = $$system("echo testing") !contains(execve_sanity_test, "testing") { error("Running system() failed. Maybe your kernel is too old? (Linux kernels need at least version 2.6.23)") } + +# ### FIXME! TODO! Remove this after icons have been fixed. +QMAKE_EXTRA_COMPILERS -= mifconv +RSS_RULES.number_of_icons = +RSS_RULES.icon_file = +PRE_TARGETDEPS -= $$mifconv.output |