summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/symbian/qt.prf
blob: e9b4ab896d5dab794607923131b5c3fdbd3396b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
contains(DEFINES, QT_MAKEDLL)|contains(DEFINES, QT_DLL) {
    CONFIG *= epocallowdlldata
}

CONFIG += qtmain

load(qt)

# Allow .pro files to specify include path(s) to be prepended to the list.
#
# This allows the project to override the default ordering, whereby paths
# relative to $$QMAKE_INCDIR_QT always come first.  This ordering can cause
# problems when both the epoc32/include tree and a Qt include directory
# contain a header of the same name - in this case, the Qt header is always
# included by virtue of its path appearing first in the SYSTEMINCLUDE
# directives in the generated MMP file.
#
# To work around this situation, the following line can be added to the .pro
# file:
#	PREPEND_INCLUDEPATH = /epoc32/include
#
INCLUDEPATH = $$PREPEND_INCLUDEPATH $$INCLUDEPATH

# Add dependency to Qt package to all other projects besides Qt libs.
# Note: Qt libs with full capabilities has UID3 of 0x2001E61C,
#       while self-signed version typically has temporary UID3 of 0xE001E61C.
contains(CONFIG, qt):!contains(TARGET.UID3, 0x2001E61C):!contains(TARGET.UID3, 0xE001E61C) {
    default_deployment.pkg_prerules += \
        "; Default dependency to Qt libraries" \
        "(0x2001E61C), $${QT_MAJOR_VERSION}, $${QT_MINOR_VERSION}, $${QT_PATCH_VERSION},  {\"Qt\"}"

    # Projects linking to webkit need dependency to webkit
    contains(QT, webkit): {
        default_deployment.pkg_prerules += \
            "; Dependency to Qt Webkit" \
            "(0x200267C2), $${QT_MAJOR_VERSION}, $${QT_MINOR_VERSION}, $${QT_PATCH_VERSION},  {\"QtWebKit\"}"
    }
}

isEmpty(TARGET.EPOCSTACKSIZE):TARGET.EPOCSTACKSIZE = 0x14000
isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x020000 0x800000

# Sis file creation
symbian-abld|symbian-sbsv2 {
    sis_destdir =
    make_cache_name = .make.cache
    sis_target.target = sis
    sis_target.commands = $(if $(wildcard $$basename(TARGET)_template.pkg), \
                              $(if $(wildcard $$make_cache_name), \
                                  $(MAKE) -f $(MAKEFILE) ok_sis MAKEFILES=$$make_cache_name \
                              , \
                                  $(if $(QT_SIS_TARGET), \
                                      $(MAKE) -f $(MAKEFILE) ok_sis \
                                  , \
                                      $(MAKE) -f $(MAKEFILE) fail_sis_nocache \
                                  ) \
                              ) \
                          , \
                              $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \
                          )

    ok_sis_target.target = ok_sis
    ok_sis_target.commands = createpackage.bat $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \
                                 $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)

    target_sis_target.target = $${sis_destdir}$${TARGET}.sis
    target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis

    installer_sis_target.target = installer_sis
    installer_sis_target.commands = $(if $(wildcard $$basename(TARGET)_installer.pkg), \
                                        $(MAKE) -f $(MAKEFILE) ok_installer_sis \
                                    , \
                                        $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \
                                    )
    installer_sis_target.depends = $${sis_destdir}$${TARGET}.sis

    ok_installer_sis_target.target = ok_installer_sis
    ok_installer_sis_target.commands = createpackage.bat $(QT_SIS_OPTIONS) $$basename(TARGET)_installer.pkg - \
                                           $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)

    fail_sis_nopkg_target.target = fail_sis_nopkg
    fail_sis_nopkg_target.commands = "$(error PKG file does not exist, 'sis' and 'installer_sis' target are only supported for executables or projects with DEPLOYMENT statement)"

    fail_sis_nocache_target.target = fail_sis_nocache
    fail_sis_nocache_target.commands = "$(error Project has to be built or QT_SIS_TARGET environment variable has to be set before calling 'SIS' target)"

    stub_sis_target.target = stub_sis
    stub_sis_target.commands = $(if $(wildcard $$basename(TARGET)_template.pkg), \
                                   $(if $(wildcard $$make_cache_name), \
                                       $(MAKE) -f $(MAKEFILE) ok_stub_sis MAKEFILES=$$make_cache_name \
                                   , \
                                       $(if $(QT_SIS_TARGET), \
                                           $(MAKE) -f $(MAKEFILE) ok_stub_sis \
                                       , \
                                           $(MAKE) -f $(MAKEFILE) fail_sis_nocache \
                                       ) \
                                   ) \
                               , \
                                   $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \
                               )

    ok_stub_sis_target.target = ok_stub_sis
    ok_stub_sis_target.commands = createpackage.bat -s $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \
                                      $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)

    QMAKE_EXTRA_TARGETS += sis_target \
                           ok_sis_target \
                           target_sis_target \
                           installer_sis_target \
                           ok_installer_sis_target \
                           fail_sis_nopkg_target \
                           fail_sis_nocache_target \
                           stub_sis_target \
                           ok_stub_sis_target
    # Sbsv2 has its own store_build target which is using flms.
    !symbian-sbsv2 {
        contains(QMAKE_HOST.os, "Windows") {
            shellFixedHash = $${LITERAL_HASH}
        } else {
            shellFixedHash = \\$${LITERAL_HASH}
        }
        store_build_target.target = store_build
        store_build_target.commands = \
              @echo $${shellFixedHash} ============================================================================== > $$make_cache_name \
            && echo $${shellFixedHash}   This file is generated by make and should not be modified by the user >> $$make_cache_name \
            && echo $${shellFixedHash}  Name        : $$make_cache_name >> $$make_cache_name \
            && echo $${shellFixedHash}  Part of     : lineedits >> $$make_cache_name \
            && echo $${shellFixedHash}  Description : This file is used to cache last build target for >> $$make_cache_name \
            && echo $${shellFixedHash}                make sis target. >> $$make_cache_name \
            && echo $${shellFixedHash}  Version     :  >> $$make_cache_name \
            && echo $${shellFixedHash} >> $$make_cache_name \
            && echo $${shellFixedHash} ============================================================================== >> $$make_cache_name \
            && echo. >> $$make_cache_name \
            && echo QT_SIS_TARGET ?= $(QT_SIS_TARGET) >> $$make_cache_name

        QMAKE_EXTRA_TARGETS += store_build_target
    }
} else {
    sis_destdir = $$DESTDIR
    !isEmpty(sis_destdir):!contains(sis_destdir, "[/\\]$"):sis_destdir = $${sis_destdir}/
    contains(QMAKE_HOST.os, "Windows"):sis_destdir = $$replace(sis_destdir, "/", "\\")

    sis_target.target = sis
    sis_target.commands = createpackage $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \
                              - $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)

    target_sis_target.target = $${sis_destdir}$${TARGET}.sis
    target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis

    installer_sis_target.target = installer_sis
    installer_sis_target.commands = createpackage $(QT_SIS_OPTIONS) $$basename(TARGET)_installer.pkg - \
                                        $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
    installer_sis_target.depends = $${sis_destdir}$${TARGET}.sis

    !isEmpty(DESTDIR) {
        sis_target.commands += && $$QMAKE_MOVE $$basename(TARGET).sis $$DESTDIR
        installer_sis_target.commands += && $$QMAKE_MOVE $$basename(TARGET).sis $$DESTDIR
    }

    QMAKE_EXTRA_TARGETS += sis_target \
                           target_sis_target \
                           installer_sis_target
}

QMAKE_DISTCLEAN += $${sis_destdir}$${TARGET}.sis