Browse Source

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
master
TheAssassin 7 years ago
parent
commit
45088e5a5e
  1. 8
      tools/linuxdeployqt/main.cpp

8
tools/linuxdeployqt/main.cpp

@ -34,6 +34,7 @@
#include <QSettings> #include <QSettings>
#include <QDirIterator> #include <QDirIterator>
#include <sstream> #include <sstream>
#include "excludelist.h"
int main(int argc, char **argv) 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 // can just exit normally, version has been printed above
return 0; return 0;
} }
if (argument == QByteArray("-show-exclude-libs")) {
qInfo() << generatedExcludelist;
return 0;
}
} }
if (argc < 2 || (firstArgument.startsWith("-"))) { if (argc < 2 || (firstArgument.startsWith("-"))) {
@ -426,9 +431,6 @@ int main(int argc, char **argv)
LogDebug() << "Argument found:" << argument; LogDebug() << "Argument found:" << argument;
int index = argument.indexOf("="); int index = argument.indexOf("=");
excludeLibs = QString(argument.mid(index + 1)).split(","); excludeLibs = QString(argument.mid(index + 1)).split(",");
} else if (argument == QByteArray("-show-exclude-libs")) {
qInfo() << EXCLUDELIST;
return 0;
} else if (argument.startsWith("--")) { } else if (argument.startsWith("--")) {
LogError() << "Error: arguments must not start with --, only -:" << argument << "\n"; LogError() << "Error: arguments must not start with --, only -:" << argument << "\n";
return 1; return 1;

Loading…
Cancel
Save