From 45088e5a5e86989c5b755f48880608afacbfb20b Mon Sep 17 00:00:00 2001 From: TheAssassin Date: Fri, 13 Apr 2018 03:37:26 +0200 Subject: [PATCH] Fix -show-exclude-libs Had to move the parsing of -show-exclude-lib up to the block where the version options are parsed, otherwise a call like ./linuxdeployqt<...>.AppImage -show-exclude-libs wouldn't work. CC @patrickelectric --- tools/linuxdeployqt/main.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/linuxdeployqt/main.cpp b/tools/linuxdeployqt/main.cpp index 51d4660..95ce4dd 100644 --- a/tools/linuxdeployqt/main.cpp +++ b/tools/linuxdeployqt/main.cpp @@ -34,6 +34,7 @@ #include #include #include +#include "excludelist.h" int main(int argc, char **argv) { @@ -60,6 +61,10 @@ int main(int argc, char **argv) // can just exit normally, version has been printed above return 0; } + if (argument == QByteArray("-show-exclude-libs")) { + qInfo() << generatedExcludelist; + return 0; + } } if (argc < 2 || (firstArgument.startsWith("-"))) { @@ -426,9 +431,6 @@ int main(int argc, char **argv) LogDebug() << "Argument found:" << argument; int index = argument.indexOf("="); excludeLibs = QString(argument.mid(index + 1)).split(","); - } else if (argument == QByteArray("-show-exclude-libs")) { - qInfo() << EXCLUDELIST; - return 0; } else if (argument.startsWith("--")) { LogError() << "Error: arguments must not start with --, only -:" << argument << "\n"; return 1;