Changeset 846 for trunk/mkspecs/features/symbian/application_icon.prf
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/mkspecs/features/symbian/application_icon.prf
r769 r846 1 1 load(data_caging_paths) 2 2 3 # If no_icon keyword exist, the S60 UI app is just made hidden. This because S60 app FW 4 # requires the registration resource file to exist always 5 contains( CONFIG, no_icon ) { 6 symbian:RSS_RULES += "hidden = KAppIsHidden;" 7 CONFIG -= no_icon 8 } else { 9 # There is no point in compiling the MIF icon if no_icon CONFIGS is set 10 !isEmpty(ICON) { 11 12 !count(ICON, 1) { 13 ICON = $$first(ICON) 14 warning("Only first icon specified in ICON variable is used: $$ICON") 15 } 16 17 # Try to produce indentical string to fixedTarget in SymbianMakefileGenerator, replaced chars taken 18 # from SymbianMakefileGenerator::removeSpecialCharacters. 19 # 20 # Note: it is not a major problem even baseTarget is not 100% identical to fixedTarget since qmake 21 # only uses filename from RSS_RULES.icon_file when referring to icon file name. 22 baseTarget = $$basename(TARGET) 23 baseTarget = $$replace(baseTarget, /,_) 24 baseTarget = $$replace(baseTarget, \\,_) 25 baseTarget = $$replace(baseTarget, -,_) 26 baseTarget = $$replace(baseTarget, :,_) 27 baseTarget = $$replace(baseTarget, \.,_) 28 baseTarget = $$replace(baseTarget, " ",_) 29 30 # Note: symbian-sbsv2 builds can't utilize extra compiler for mifconv, so ICON handling is done in code 31 symbian-abld { 32 #Makefile: requires paths with backslash 33 ICON = $$replace( ICON, /, \\) 34 35 # Extra compiler rules for mifconv 36 mifconv.output = ${ZDIR}$$APP_RESOURCE_DIR/$${baseTarget}.mif 37 # Based on: http://www.forum.nokia.com/document/Cpp_Developers_Library 38 # svg-t icons should always use /c32 depth 39 mifconv.commands = mifconv ${QMAKE_FILE_OUT} /c32 ${QMAKE_FILE_IN} 40 mifconv.input = ICON 41 mifconv.CONFIG = no_link combine 42 # target_predeps together with combine seems not to work correctly, lets define it by ourselves 43 PRE_TARGETDEPS += $$mifconv.output 44 QMAKE_EXTRA_COMPILERS += mifconv 45 } 46 # Rules to use generated MIF file from symbian resources 47 RSS_RULES.number_of_icons = $$size(ICON) 48 RSS_RULES.icon_file = $$APP_RESOURCE_DIR/$${baseTarget}.mif 3 contains(CONFIG, no_icon) { 4 # If no_icon keyword exist, the S60 UI app is just made hidden. This because S60 app FW 5 # requires the registration resource file to exist always 6 contains(QT, gui):contains(CONFIG, qt) { 7 symbian:RSS_RULES += "hidden = KAppIsHidden;" 8 CONFIG -= no_icon 49 9 } 50 10 } 51 11 12 !contains(CONFIG, no_icon) { 13 baseTarget = $$symbianRemoveSpecialCharacters($$basename(TARGET)) 14 contains(baseTarget, "^.*\\..*$") { 15 CONFIG += no_icon 16 ICON = 17 warning("Symbian resources do not support '.' character in TARGET, skipping resource generation.") 18 } else { 19 symbian-abld|symbian-sbsv2 { 20 resourceZDir = $$EPOCROOT$$HW_ZDIR$$APP_RESOURCE_DIR 21 regZDir = $$EPOCROOT$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR 22 } else { 23 contains(DESTDIR, "/.*") { 24 resourceZDir = $$DESTDIR 25 } else:isEmpty(DESTDIR) { 26 resourceZDir = $$OUT_PWD 27 } else { 28 resourceZDir = $$OUT_PWD/$$DESTDIR 29 } 30 regZDir = $$resourceZDir 31 } 32 33 default_resource_deployment.sources += $$resourceZDir/$${baseTarget}.rsc 34 default_resource_deployment.path = $$APP_RESOURCE_DIR 35 default_reg_deployment.sources += $$regZDir/$${baseTarget}_reg.rsc 36 default_reg_deployment.path = $$REG_RESOURCE_IMPORT_DIR 37 38 !isEmpty(ICON) { 39 !count(ICON, 1) { 40 ICON = $$first(ICON) 41 warning("Only first icon specified in ICON variable is used: $$ICON") 42 } 43 44 # Note: symbian-sbsv2 builds can't utilize extra compiler for mifconv, so ICON handling is done in code 45 !symbian-sbsv2 { 46 # Absolute path required for shadow builds. 47 # However, in older Symbian environments abld toolchain can't handle even moderately long 48 # paths, so don't force absolute there. 49 !symbian-abld:!contains(ICON, "^(/|\\\\|.:).*"):ICON = $$_PRO_FILE_PWD_/$$ICON 50 51 #Makefile: requires paths with backslash 52 ICON_backslashed = $$ICON 53 54 symbian-abld { 55 # ${ZDIR} is defined in Makefile 56 mifIconZDir = ${ZDIR}$$APP_RESOURCE_DIR 57 } else { 58 mifIconZDir = $$resourceZDir 59 } 60 61 # Extra compiler rules for mifconv 62 mifconv.target = $$mifIconZDir/$${baseTarget}.mif 63 contains(QMAKE_HOST.os, "Windows") { 64 ICON_backslashed = $$replace(ICON_backslashed, /, \\) 65 mifconv.target = $$replace(mifconv.target, /, \\) 66 } 67 # Based on: http://www.forum.nokia.com/document/Cpp_Developers_Library 68 # svg-t icons should always use /c32 depth 69 mifconv.commands = mifconv $$mifconv.target /c32 $$ICON_backslashed 70 71 mifconv.depends = $$ICON 72 PRE_TARGETDEPS += $$mifconv.target 73 QMAKE_EXTRA_TARGETS += mifconv 74 QMAKE_DISTCLEAN += $$mifconv.target 75 } 76 # Rules to use generated MIF file from symbian resources 77 RSS_RULES.number_of_icons = $$size(ICON_backslashed) 78 RSS_RULES.icon_file = $$APP_RESOURCE_DIR/$${baseTarget}.mif 79 80 default_resource_deployment.sources += $$resourceZDir/$${baseTarget}.mif 81 } 82 } 83 } 84 85
Note:
See TracChangeset
for help on using the changeset viewer.