From 65ceffeffd9b17cb5e6d96dc8beb2fdae6f8730c Mon Sep 17 00:00:00 2001 From: TheAssassin Date: Thu, 12 Apr 2018 02:55:14 +0200 Subject: [PATCH] Properly check exit code of excludelist.sh in qmake qmake is really making this overly complicated. We should rather try to use this syntax, which is only available in Qt 5.6 and higher, apparently: https://doc.qt.io/qt-5/qmake-function-reference.html#system-replace --- tools/linuxdeployqt/linuxdeployqt.pro | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/linuxdeployqt/linuxdeployqt.pro b/tools/linuxdeployqt/linuxdeployqt.pro index bf3fe72..823568e 100644 --- a/tools/linuxdeployqt/linuxdeployqt.pro +++ b/tools/linuxdeployqt/linuxdeployqt.pro @@ -39,9 +39,17 @@ contains(DEFINES, EXCLUDELIST.*) { message("EXCLUDELIST specified, to use the most recent exclude list, please run qmake without EXCLUDELIST definition and with internet.") } else { message("Creating exclude list.") + + # check whether command _would_ run successfully + EXCLUDELIST_GENERATION_WORKS = FALSE + system($$_PRO_FILE_PWD_/../excludelist.sh): EXCLUDELIST_GENERATION_WORKS = TRUE + isEqual(EXCLUDELIST_GENERATION_WORKS, FALSE) { + error("Generating excludelist failed") + } + EXCLUDELIST = $$system($$_PRO_FILE_PWD_/../excludelist.sh) isEmpty(EXCLUDELIST) { - error("You must have internet to update EXCLUDELIST or define it in qmake.") + error("Generated excludelist is empty") } DEFINES += EXCLUDELIST=\""$$EXCLUDELIST"\" }