From 68dafa5c85122148d63e61fb22509996cd6159bc Mon Sep 17 00:00:00 2001 From: axis Date: Thu, 10 Jun 2010 13:27:02 +0200 Subject: Enable runonphone target for libraries as well. RevBy: Miikka Heikkinen --- mkspecs/features/symbian/run_on_phone.prf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mkspecs/features/symbian/run_on_phone.prf b/mkspecs/features/symbian/run_on_phone.prf index c4c7baf..8a33dbd 100644 --- a/mkspecs/features/symbian/run_on_phone.prf +++ b/mkspecs/features/symbian/run_on_phone.prf @@ -1,9 +1,10 @@ # make sure we have a sis file and then call 'runonphone' to execute it on the phone -contains(TEMPLATE, app) { +contains(TEMPLATE, app)|!equals(DEPLOYMENT, default_deployment) { run_target.target = runonphone run_target.depends = sis - run_target.commands = runonphone $(QT_RUN_ON_PHONE_OPTIONS) --sis "$${sis_destdir}$${TARGET}.sis" "$${TARGET}.exe" $(QT_RUN_OPTIONS) + run_target.commands = runonphone $(QT_RUN_ON_PHONE_OPTIONS) --sis "$${sis_destdir}$${TARGET}.sis" + contains(TEMPLATE, "app"):run_target.commands += "$${TARGET}.exe" $(QT_RUN_OPTIONS) QMAKE_EXTRA_TARGETS += run_target } -- cgit v0.12 From 69b2e6e861debf71132277b123b59c87bb6e2c9e Mon Sep 17 00:00:00 2001 From: axis Date: Thu, 10 Jun 2010 13:31:40 +0200 Subject: Fixed destdir not being defined. Local variables can't be counted upon between different profiles. RevBy: Trust me --- mkspecs/features/symbian/run_on_phone.prf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mkspecs/features/symbian/run_on_phone.prf b/mkspecs/features/symbian/run_on_phone.prf index 8a33dbd..d3d2cfb 100644 --- a/mkspecs/features/symbian/run_on_phone.prf +++ b/mkspecs/features/symbian/run_on_phone.prf @@ -1,6 +1,10 @@ # make sure we have a sis file and then call 'runonphone' to execute it on the phone contains(TEMPLATE, app)|!equals(DEPLOYMENT, default_deployment) { + sis_destdir = $$DESTDIR + !isEmpty(sis_destdir):!contains(sis_destdir, "[/\\\\]$"):sis_destdir = $${sis_destdir}/ + contains(QMAKE_HOST.os, "Windows"):sis_destdir = $$replace(sis_destdir, "/", "\\") + run_target.target = runonphone run_target.depends = sis run_target.commands = runonphone $(QT_RUN_ON_PHONE_OPTIONS) --sis "$${sis_destdir}$${TARGET}.sis" -- cgit v0.12 From d7810cb2630be0af69284d2cf26f861e0cda52e6 Mon Sep 17 00:00:00 2001 From: axis Date: Thu, 10 Jun 2010 13:38:39 +0200 Subject: Moved runonphone target to prf files for all build systems. This reduces code duplication. RevBy: Miikka Heikkinen --- mkspecs/common/symbian/symbian-makefile.conf | 1 - mkspecs/common/symbian/symbian.conf | 2 +- mkspecs/features/symbian/run_on_phone.prf | 29 ++++++++++++++++++++++------ qmake/generators/symbian/symmake.cpp | 14 -------------- qmake/generators/symbian/symmake.h | 1 - qmake/generators/symbian/symmake_abld.cpp | 2 -- qmake/generators/symbian/symmake_sbsv2.cpp | 2 -- 7 files changed, 24 insertions(+), 27 deletions(-) diff --git a/mkspecs/common/symbian/symbian-makefile.conf b/mkspecs/common/symbian/symbian-makefile.conf index a3aade7..ab0c5b9 100644 --- a/mkspecs/common/symbian/symbian-makefile.conf +++ b/mkspecs/common/symbian/symbian-makefile.conf @@ -26,7 +26,6 @@ include(../../common/unix.conf) QMAKE_PREFIX_SHLIB = QMAKE_EXTENSION_SHLIB = dll CONFIG *= no_plugin_name_prefix -CONFIG += run_on_phone QMAKE_EXTENSION_PLUGIN = dll QMAKE_PREFIX_STATICLIB = QMAKE_EXTENSION_STATICLIB = lib diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index b8bfd7c..b037d3c 100644 --- a/mkspecs/common/symbian/symbian.conf +++ b/mkspecs/common/symbian/symbian.conf @@ -3,7 +3,7 @@ # TEMPLATE = app -CONFIG += qt warn_on release incremental link_prl sis_targets +CONFIG += qt warn_on release incremental link_prl sis_targets run_on_phone QT += core gui QMAKE_INCREMENTAL_STYLE = sublib diff --git a/mkspecs/features/symbian/run_on_phone.prf b/mkspecs/features/symbian/run_on_phone.prf index d3d2cfb..6948a48 100644 --- a/mkspecs/features/symbian/run_on_phone.prf +++ b/mkspecs/features/symbian/run_on_phone.prf @@ -1,14 +1,31 @@ # make sure we have a sis file and then call 'runonphone' to execute it on the phone -contains(TEMPLATE, app)|!equals(DEPLOYMENT, default_deployment) { +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) { sis_destdir = $$DESTDIR !isEmpty(sis_destdir):!contains(sis_destdir, "[/\\\\]$"):sis_destdir = $${sis_destdir}/ contains(QMAKE_HOST.os, "Windows"):sis_destdir = $$replace(sis_destdir, "/", "\\") - run_target.target = runonphone - run_target.depends = sis - run_target.commands = runonphone $(QT_RUN_ON_PHONE_OPTIONS) --sis "$${sis_destdir}$${TARGET}.sis" - contains(TEMPLATE, "app"):run_target.commands += "$${TARGET}.exe" $(QT_RUN_OPTIONS) + contains(SYMBIAN_PLATFORMS, "WINSCW"):contains(TEMPLATE, "app") { + run_target.target = run + run_target.commands = call "$${EPOCROOT}epoc32/release/winscw/udeb/$${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}$${TARGET}.sis" + contains(TEMPLATE, "app"):runonphone_target.commands += "$${TARGET}.exe" $(QT_RUN_OPTIONS) - QMAKE_EXTRA_TARGETS += run_target + QMAKE_EXTRA_TARGETS += runonphone_target } diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp index 6082aeb..ff58270 100644 --- a/qmake/generators/symbian/symmake.cpp +++ b/qmake/generators/symbian/symmake.cpp @@ -1112,17 +1112,3 @@ void SymbianMakefileGenerator::generateDistcleanTargets(QTextStream& t) t << "distclean: clean dodistclean" << endl; t << endl; } - -void SymbianMakefileGenerator::generateExecutionTargets(QTextStream& t, const QStringList& platforms) -{ - // create execution targets - if (targetType == TypeExe) { - if (platforms.contains("winscw")) { - t << "run:" << endl; - t << "\t-call " << epocRoot() << "epoc32/release/winscw/udeb/" << fixedTarget << ".exe " << "$(QT_RUN_OPTIONS)" << endl; - } - t << "runonphone: sis" << endl; - t << "\trunonphone $(QT_RUN_ON_PHONE_OPTIONS) --sis " << fixedTarget << ".sis " << fixedTarget << ".exe " << "$(QT_RUN_OPTIONS)" << endl; - t << endl; - } -} diff --git a/qmake/generators/symbian/symmake.h b/qmake/generators/symbian/symmake.h index c5b6907..9853790 100644 --- a/qmake/generators/symbian/symmake.h +++ b/qmake/generators/symbian/symmake.h @@ -129,7 +129,6 @@ protected: const QString& itemSuffix); void generateDistcleanTargets(QTextStream& t); - void generateExecutionTargets(QTextStream& t, const QStringList& platforms); // Subclass implements virtual void writeBldInfExtensionRulesPart(QTextStream& t, const QString &iconTargetFile) = 0; diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp index 7e3fb45..d60528b 100644 --- a/qmake/generators/symbian/symmake_abld.cpp +++ b/qmake/generators/symbian/symmake_abld.cpp @@ -409,8 +409,6 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool t << "\t$(ABLD)" << testClause << " reallyclean " << item << " urel" << endl; } t << endl; - - generateExecutionTargets(t, debugPlatforms); } void SymbianAbldMakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t, const QString &iconTargetFile) diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp index feacbef..c2f1d1a 100644 --- a/qmake/generators/symbian/symmake_sbsv2.cpp +++ b/qmake/generators/symbian/symmake_sbsv2.cpp @@ -282,8 +282,6 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo t << "\t$(SBS) reallyclean -c " << item << "_urel" << testClause << endl; } t << endl; - - generateExecutionTargets(t, debugPlatforms); } void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t, const QString &iconTargetFile) -- cgit v0.12