summaryrefslogtreecommitdiffstats
path: root/mkspecs/features
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2009-11-18 12:47:42 (GMT)
committerJanne Anttila <janne.anttila@digia.com>2009-11-18 12:51:33 (GMT)
commit952f0ca3f371b040bd8b8a007cdf87bf0e4843ad (patch)
tree160a0cebc40e81dab6ef5bf8ed318fca42e7ac5e /mkspecs/features
parent70b121ca310c99269bb08161000215f09b41a84b (diff)
downloadQt-952f0ca3f371b040bd8b8a007cdf87bf0e4843ad.zip
Qt-952f0ca3f371b040bd8b8a007cdf87bf0e4843ad.tar.gz
Qt-952f0ca3f371b040bd8b8a007cdf87bf0e4843ad.tar.bz2
Changed MIF filename from UID to target name in Symbian.
This change makes it possible to define ICON keyword in pro file without UID3. It is safe to use target as an icon name since Symbian devices cannot have two different binaries with the same name as all binaries are located in \sys\bin. This means there cannot be also two mif files with same target name. Also all native S60 apps use target name as an MIF basename. Target name is also much easier to associate with app than UID. Task-number: QTBUG-4677 Reviewed-by: Miikka Heikkinen
Diffstat (limited to 'mkspecs/features')
-rw-r--r--mkspecs/features/symbian/application_icon.prf30
1 files changed, 20 insertions, 10 deletions
diff --git a/mkspecs/features/symbian/application_icon.prf b/mkspecs/features/symbian/application_icon.prf
index b0c1bb1..62fd018 100644
--- a/mkspecs/features/symbian/application_icon.prf
+++ b/mkspecs/features/symbian/application_icon.prf
@@ -3,38 +3,48 @@ load(data_caging_paths)
# If no_icon keyword exist, the S60 UI app is just made hidden. This because S60 app FW
# requires the registration resource file to exist always
contains( CONFIG, no_icon ) {
- symbian:RSS_RULES ="hidden = KAppIsHidden;"
+ symbian:RSS_RULES ="hidden = KAppIsHidden;"
CONFIG -= no_icon
} else {
# There is no point in compiling the MIF icon if no_icon CONFIGS is set
!isEmpty(ICON) {
-
+
!count(ICON, $$size(TRANSLATIONS)):!count(ICON, 1) {
message("ICON keyword must have one or the same amout of items as in TRANSLATIONS keyword")
}
- # MIF files will have UID in their names, if TARGET.UID3 is not set, remind the user
- isEmpty(TARGET.UID3):error("TARGET.UID3 must be explicitly defined for ICON generation")
+ # Try to produce indentical string to fixedTarget in SymbianMakefileGenerator, replaced chars taken
+ # from SymbianMakefileGenerator::removeSpecialCharacters.
+ #
+ # Note: it is not a major problem even baseTarget is not 100% identical to fixedTarget since qmake
+ # only uses filename from RSS_RULES.icon_file when referring to icon file name.
+ baseTarget = $$basename(TARGET)
+ baseTarget = $$replace(baseTarget, /,_)
+ baseTarget = $$replace(baseTarget, \\,_)
+ baseTarget = $$replace(baseTarget, -,_)
+ baseTarget = $$replace(baseTarget, :,_)
+ baseTarget = $$replace(baseTarget, \.,_)
+ baseTarget = $$replace(baseTarget, " ",_)
# Note: symbian-sbsv2 builds can't utilize extra compiler for mifconv, so ICON handling is done in code
- symbian-abld {
- #Makefile: requires paths with backslash
+ symbian-abld {
+ #Makefile: requires paths with backslash
ICON = $$replace( ICON, /, \\)
# Extra compiler rules for mifconv
- mifconv.output = ${ZDIR}$$APP_RESOURCE_DIR/$${TARGET.UID3}.mif
+ mifconv.output = ${ZDIR}$$APP_RESOURCE_DIR/$${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} $$join(ICON, " /c32 ", "/c32 ",)
+ mifconv.commands = mifconv ${QMAKE_FILE_OUT} $$join(ICON, " /c32 ", "/c32 ",)
mifconv.input = ICON
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.icon_file = $$replace( APP_RESOURCE_DIR, /, \\\\ )\\\\$${TARGET.UID3}.mif
+ RSS_RULES.icon_file = $$APP_RESOURCE_DIR/$${baseTarget}.mif
}
}