Skip to content

Commit 65ceffe

Browse files
committed
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
1 parent ba3495b commit 65ceffe

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tools/linuxdeployqt/linuxdeployqt.pro

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,17 @@ contains(DEFINES, EXCLUDELIST.*) {
3939
message("EXCLUDELIST specified, to use the most recent exclude list, please run qmake without EXCLUDELIST definition and with internet.")
4040
} else {
4141
message("Creating exclude list.")
42+
43+
# check whether command _would_ run successfully
44+
EXCLUDELIST_GENERATION_WORKS = FALSE
45+
system($$_PRO_FILE_PWD_/../excludelist.sh): EXCLUDELIST_GENERATION_WORKS = TRUE
46+
isEqual(EXCLUDELIST_GENERATION_WORKS, FALSE) {
47+
error("Generating excludelist failed")
48+
}
49+
4250
EXCLUDELIST = $$system($$_PRO_FILE_PWD_/../excludelist.sh)
4351
isEmpty(EXCLUDELIST) {
44-
error("You must have internet to update EXCLUDELIST or define it in qmake.")
52+
error("Generated excludelist is empty")
4553
}
4654
DEFINES += EXCLUDELIST=\""$$EXCLUDELIST"\"
4755
}

0 commit comments

Comments
 (0)