summaryrefslogtreecommitdiff
path: root/qmake-features/am-app.prf
diff options
context:
space:
mode:
authorDominik Holland <dominik.holland@qt.io>2019-11-06 13:50:14 +0100
committerDominik Holland <dominik.holland@qt.io>2019-11-08 12:51:03 +0100
commite056b469c5421117bcb05fb54ccd2973b7a7c81f (patch)
tree91156555aa8f0a2f6a858603b773679d2a82e500 /qmake-features/am-app.prf
parentf73ca6c1fa06d83fb44c7f56189c659b29db0ea0 (diff)
downloadqtapplicationmanager-e056b469c5421117bcb05fb54ccd2973b7a7c81f.tar.gz
am-app: Return with a warning if the appman-packager is not available
Currently every project which uses the am-app feature fails with an error if the appman-packager exectuable is not available. Instead check for the executable before and return early with a warning. Change-Id: I6725d6d801baa3a60bbe381b3b42fe680dcbff3e Reviewed-by: Robert Griebl <robert.griebl@qt.io>
Diffstat (limited to 'qmake-features/am-app.prf')
-rw-r--r--qmake-features/am-app.prf4
1 files changed, 4 insertions, 0 deletions
diff --git a/qmake-features/am-app.prf b/qmake-features/am-app.prf
index fe2f590a..0ca6d1fd 100644
--- a/qmake-features/am-app.prf
+++ b/qmake-features/am-app.prf
@@ -11,6 +11,10 @@ AM_MANIFEST_PATH = $$absolute_path($$AM_MANIFEST, $$_PRO_FILE_PWD_)
# Call the appman-packager to convert the yaml to JSON to parse it here
qtPrepareTool(APPMAN_PACKAGER, appman-packager, , system)
+!exists($$APPMAN_PACKAGER): {
+ warning("Couldn't add the 'package' step, due to the missing appman-packager binary")
+ return()
+}
JSON = $$system($$APPMAN_PACKAGER yaml-to-json -i1 $$system_quote($$AM_MANIFEST_PATH))
parseJson(JSON, INFO)| error("Failed to parse appman-packager output.")