diff options
author | Dominik Holland <dominik.holland@pelagicore.com> | 2018-04-10 17:22:42 +0200 |
---|---|---|
committer | Robert Griebl <robert.griebl@pelagicore.com> | 2018-05-16 10:39:46 +0000 |
commit | 41b5e823a10a2c87890cbd1e30af0cc793747314 (patch) | |
tree | f60fc32d0b6712a41372df6fd1887c795a11925f /qmake-features | |
parent | 9ffac00e032dbf2887f57b0eb8f3152967d16d16 (diff) |
Make the minidesk and monitor examples launchable from qt-creator
For project like these there is now a new qmake feature called
am-systemui. This feature will copy all files and folder defined
by AM_COPY_DIRECTORIES and AM_COPY_FILES to the build-folder and
create a runner script which executes appman with the the arguments
defined by AM_DEFAULT_ARGS.
This script is setup as the qmake TARGET and can be started by
qt-creator.
This trick has the limitation that debugging is not supported
Change-Id: If93d7971df646163e9819a3c5e8a436fc76bef21
Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
Diffstat (limited to 'qmake-features')
-rw-r--r-- | qmake-features/am-systemui.prf | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/qmake-features/am-systemui.prf b/qmake-features/am-systemui.prf new file mode 100644 index 00000000..a81a502c --- /dev/null +++ b/qmake-features/am-systemui.prf @@ -0,0 +1,28 @@ +win32: { + TEMPLATE = aux + warning("Couldn't generate a appman wrapper. Please start the example as mentioned in the documentation instead.") +} else { + WRAPPER_EXT=.sh + ORIG_TARGET=$$TARGET + TARGET=$${TARGET}_wrapper$${WRAPPER_EXT} + CONFIG-=app_bundle + APPMAN=$$[QT_INSTALL_BINS]/appman $$AM_DEFAULT_ARGS + + QT_TOOL_NAME = $$ORIG_TARGET + qtAddTargetEnv(APPMAN, QT) + + # Copy assets to build folder + for (d , AM_COPY_DIRECTORIES) { + win32: do_copydata.commands += $(COPY_DIR) $$shell_path($$_PRO_FILE_PWD_/$${d}) $$shell_path($$OUT_PWD/$${d}) $$escape_expand(\n\t) + else: do_copydata.commands += $(COPY_DIR) $$shell_path($$_PRO_FILE_PWD_/$${d}) $$shell_path($$OUT_PWD) $$escape_expand(\n\t) + } + for (f , AM_COPY_FILES) { + do_copydata.commands += $(COPY) $$shell_path($$_PRO_FILE_PWD_/$${f}) $$shell_path($$OUT_PWD/$${f}) $$escape_expand(\n\t) + } + + !equals(_PRO_FILE_PWD_, $$OUT_PWD) { + first.depends = do_copydata + QMAKE_EXTRA_TARGETS += do_copydata + QMAKE_EXTRA_TARGETS += first + } +} |