diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2011-01-27 10:40:33 (GMT) |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2011-01-27 13:40:35 (GMT) |
commit | 4ec245a3e75470186557d00b2383af3872a720b0 (patch) | |
tree | 41f26e8350cf3755b8e251d8bb4c789a30fedba8 /mkspecs/features | |
parent | 5c91e32a6238fd112a7282443214c8686cda51de (diff) | |
download | Qt-4ec245a3e75470186557d00b2383af3872a720b0.zip Qt-4ec245a3e75470186557d00b2383af3872a720b0.tar.gz Qt-4ec245a3e75470186557d00b2383af3872a720b0.tar.bz2 |
No longer replace dash and dot in TARGET with underscore in Symbian
There is no fundamental reason to not have dash or dot in binary names
in Symbian, so do not replace them with underscore.
One thing that doesn't work with a dot in the filename is launching
an application via resources, so automatic resource generation is
suppressed for applications that have a dot in filename portion of
the TARGET value.
Task-number: QTBUG-16888
Reviewed-by: axis
Diffstat (limited to 'mkspecs/features')
-rw-r--r-- | mkspecs/features/symbian/application_icon.prf | 106 |
1 files changed, 56 insertions, 50 deletions
diff --git a/mkspecs/features/symbian/application_icon.prf b/mkspecs/features/symbian/application_icon.prf index 6e1aa8e..b6be89b 100644 --- a/mkspecs/features/symbian/application_icon.prf +++ b/mkspecs/features/symbian/application_icon.prf @@ -11,68 +11,74 @@ contains(CONFIG, no_icon) { !contains(CONFIG, no_icon) { baseTarget = $$symbianRemoveSpecialCharacters($$basename(TARGET)) - symbian-abld|symbian-sbsv2 { - resourceZDir = $$EPOCROOT$$HW_ZDIR$$APP_RESOURCE_DIR - regZDir = $$EPOCROOT$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR + contains(baseTarget, "^.*\\..*$") { + CONFIG += no_icon + ICON = + warning("Symbian resources do not support '.' character in TARGET, skipping resource generation.") } else { - contains(DESTDIR, "/.*") { - resourceZDir = $$DESTDIR - } else:isEmpty(DESTDIR) { - resourceZDir = $$OUT_PWD + symbian-abld|symbian-sbsv2 { + resourceZDir = $$EPOCROOT$$HW_ZDIR$$APP_RESOURCE_DIR + regZDir = $$EPOCROOT$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR } else { - resourceZDir = $$OUT_PWD/$$DESTDIR + contains(DESTDIR, "/.*") { + resourceZDir = $$DESTDIR + } else:isEmpty(DESTDIR) { + resourceZDir = $$OUT_PWD + } else { + resourceZDir = $$OUT_PWD/$$DESTDIR + } + regZDir = $$resourceZDir } - regZDir = $$resourceZDir - } - default_resource_deployment.sources += $$resourceZDir/$${baseTarget}.rsc - default_resource_deployment.path = $$APP_RESOURCE_DIR - default_reg_deployment.sources += $$regZDir/$${baseTarget}_reg.rsc - default_reg_deployment.path = $$REG_RESOURCE_IMPORT_DIR + default_resource_deployment.sources += $$resourceZDir/$${baseTarget}.rsc + default_resource_deployment.path = $$APP_RESOURCE_DIR + default_reg_deployment.sources += $$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") - } + !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 + # 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 + #Makefile: requires paths with backslash + ICON_backslashed = $$ICON - symbian-abld { - # ${ZDIR} is defined in Makefile - mifIconZDir = ${ZDIR}$$APP_RESOURCE_DIR - } else { - mifIconZDir = $$resourceZDir - } + 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, /, \\) + # 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_DISTCLEAN += $$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 + # 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 - mifconv.depends = $$ICON - PRE_TARGETDEPS += $$mifconv.target - QMAKE_EXTRA_TARGETS += mifconv - QMAKE_DISTCLEAN += $$mifconv.target + default_resource_deployment.sources += $$resourceZDir/$${baseTarget}.mif } - # 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.sources += $$resourceZDir/$${baseTarget}.mif } } |