summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/symbian/run_on_phone.prf
blob: f77369cb1ab4badc5cad68aed724db9f1ead2eb5 (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
# make sure we have a sis file and then call 'runonphone' to execute it on the phone

GENERATE_RUN_TARGETS = false

contains(TEMPLATE, app): GENERATE_RUN_TARGETS = true
else:!equals(DEPLOYMENT, default_deployment) {
    for(dep_item, $$list($$DEPLOYMENT)) {
        dep_item_sources = $$eval($${dep_item}.sources)
        !isEmpty(dep_item_sources): GENERATE_RUN_TARGETS = true
    }
}

equals(GENERATE_RUN_TARGETS, true) {
    symbian-abld|symbian-sbsv2 {
        sis_destdir =
        sis_file = $$basename(TARGET).sis
    } else {
        sis_destdir = $$DESTDIR
        sis_file = $${TARGET}.sis
        !isEmpty(sis_destdir):!contains(sis_destdir, "[/\\\\]$"):sis_destdir = $${sis_destdir}/
        contains(QMAKE_HOST.os, "Windows"):sis_destdir = $$replace(sis_destdir, "/", "\\")
    }

    contains(SYMBIAN_PLATFORMS, "WINSCW"):contains(TEMPLATE, "app") {
        run_target.target = run
        run_target.commands = call "$${EPOCROOT}epoc32/release/winscw/udeb/$$basename(TARGET).exe" $(QT_RUN_OPTIONS)

        QMAKE_EXTRA_TARGETS += run_target
    }

    runonphone_target.target = runonphone
    runonphone_target.depends = sis
    runonphone_target.commands = runonphone $(QT_RUN_ON_PHONE_OPTIONS) --sis "$${sis_destdir}$${sis_file}"
    contains(TEMPLATE, "app"):runonphone_target.commands += "$$basename(TARGET).exe" $(QT_RUN_OPTIONS)

    QMAKE_EXTRA_TARGETS += runonphone_target
}