summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/symbian/run_on_phone.prf
blob: d8452773da517ec97b5c22148b4e3cdfac98e99d (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
# 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) {
    baseTarget = $$symbianRemoveSpecialCharacters($$basename(TARGET))
    sis_file = $${baseTarget}.sis
    symbian-abld|symbian-sbsv2 {
        sis_destdir =
    } else {
        sis_destdir = $$DESTDIR
        isEmpty(sis_destdir):sis_destdir = .
        !equals(TARGET, "$$baseTarget"):sis_destdir = $$sis_destdir/$$dirname(TARGET)
        !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/$${baseTarget}.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 += "$${baseTarget}.exe" $(QT_RUN_OPTIONS)

    QMAKE_EXTRA_TARGETS += runonphone_target
}