1 load(data_caging_paths) |
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 |
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 |
4 # requires the registration resource file to exist always |
5 contains( CONFIG, no_icon ) { |
5 contains( CONFIG, no_icon ) { |
6 symbian:RSS_RULES ="hidden = KAppIsHidden;" |
6 symbian:RSS_RULES ="hidden = KAppIsHidden;" |
7 CONFIG -= no_icon |
7 CONFIG -= no_icon |
8 } else { |
8 } else { |
9 # There is no point in compiling the MIF icon if no_icon CONFIGS is set |
9 # There is no point in compiling the MIF icon if no_icon CONFIGS is set |
10 !isEmpty(ICON) { |
10 !isEmpty(ICON) { |
11 |
11 |
12 !count(ICON, $$size(TRANSLATIONS)):!count(ICON, 1) { |
12 !count(ICON, 1) { |
13 message("ICON keyword must have one or the same amout of items as in TRANSLATIONS keyword") |
13 ICON = $$first(ICON) |
|
14 warning("Only first icon specified in ICON variable is used: $$ICON") |
14 } |
15 } |
15 |
16 |
16 # MIF files will have UID in their names, if TARGET.UID3 is not set, remind the user |
17 # Try to produce indentical string to fixedTarget in SymbianMakefileGenerator, replaced chars taken |
17 isEmpty(TARGET.UID3):error("TARGET.UID3 must be explicitly defined for ICON generation") |
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, " ",_) |
18 |
29 |
19 # Note: symbian-sbsv2 builds can't utilize extra compiler for mifconv, so ICON handling is done in code |
30 # Note: symbian-sbsv2 builds can't utilize extra compiler for mifconv, so ICON handling is done in code |
20 symbian-abld { |
31 symbian-abld { |
21 #Makefile: requires paths with backslash |
32 #Makefile: requires paths with backslash |
22 ICON = $$replace( ICON, /, \\) |
33 ICON = $$replace( ICON, /, \\) |
23 |
34 |
24 # Extra compiler rules for mifconv |
35 # Extra compiler rules for mifconv |
25 mifconv.output = ${ZDIR}$$APP_RESOURCE_DIR/$${TARGET.UID3}.mif |
36 mifconv.output = ${ZDIR}$$APP_RESOURCE_DIR/$${baseTarget}.mif |
26 # Based on: http://www.forum.nokia.com/document/Cpp_Developers_Library |
37 # Based on: http://www.forum.nokia.com/document/Cpp_Developers_Library |
27 # svg-t icons should always use /c32 depth |
38 # svg-t icons should always use /c32 depth |
28 mifconv.commands = mifconv ${QMAKE_FILE_OUT} $$join(ICON, " /c32 ", "/c32 ",) |
39 mifconv.commands = mifconv ${QMAKE_FILE_OUT} /c32 ${QMAKE_FILE_IN} |
29 mifconv.input = ICON |
40 mifconv.input = ICON |
30 mifconv.CONFIG = no_link combine |
41 mifconv.CONFIG = no_link combine |
31 # target_predeps together with combine seems not to work correctly, lets define it by ourselves |
42 # target_predeps together with combine seems not to work correctly, lets define it by ourselves |
32 PRE_TARGETDEPS += $$mifconv.output |
43 PRE_TARGETDEPS += $$mifconv.output |
33 QMAKE_EXTRA_COMPILERS += mifconv |
44 QMAKE_EXTRA_COMPILERS += mifconv |
34 } |
45 } |
35 # Rules to use generated MIF file from symbian resources |
46 # Rules to use generated MIF file from symbian resources |
36 RSS_RULES.number_of_icons = $$size(ICON) |
47 RSS_RULES.number_of_icons = $$size(ICON) |
37 RSS_RULES.icon_file = $$replace( APP_RESOURCE_DIR, /, \\\\ )\\\\$${TARGET.UID3}.mif |
48 RSS_RULES.icon_file = $$APP_RESOURCE_DIR/$${baseTarget}.mif |
38 } |
49 } |
39 } |
50 } |
40 |
51 |