Browse Source

Merge pull request #277 from patrickelectric/args

Add -show-exclude-libs
master
TheAssassin 7 years ago
committed by GitHub
parent
commit
cc9d6ab911
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 32
      tools/linuxdeployqt/main.cpp

32
tools/linuxdeployqt/main.cpp

@ -67,23 +67,24 @@ int main(int argc, char **argv)
qInfo() << "Usage: linuxdeployqt <app-binary|desktop file> [options]"; qInfo() << "Usage: linuxdeployqt <app-binary|desktop file> [options]";
qInfo() << ""; qInfo() << "";
qInfo() << "Options:"; qInfo() << "Options:";
qInfo() << " -verbose=<0-3> : 0 = no output, 1 = error/warning (default),"; qInfo() << " -always-overwrite : Copy files even if the target file exists.";
qInfo() << " 2 = normal, 3 = debug"; qInfo() << " -appimage : Create an AppImage (implies -bundle-non-qt-libs).";
qInfo() << " -no-plugins : Skip plugin deployment"; qInfo() << " -bundle-non-qt-libs : Also bundle non-core, non-Qt libraries.";
qInfo() << " -appimage : Create an AppImage (implies -bundle-non-qt-libs)"; qInfo() << " -exclude-libs=<list> : List of libraries which should be excluded,";
qInfo() << " -no-strip : Don't run 'strip' on the binaries"; qInfo() << " separated by comma.";
qInfo() << " -bundle-non-qt-libs : Also bundle non-core, non-Qt libraries";
qInfo() << " -executable=<path> : Let the given executable use the deployed libraries"; qInfo() << " -executable=<path> : Let the given executable use the deployed libraries";
qInfo() << " too"; qInfo() << " too";
qInfo() << " -qmldir=<path> : Scan for QML imports in the given path";
qInfo() << " -always-overwrite : Copy files even if the target file exists";
qInfo() << " -qmake=<path> : The qmake executable to use";
qInfo() << " -no-translations : Skip deployment of translations.";
qInfo() << " -no-copy-copyright-files : Skip deployment of copyright files.";
qInfo() << " -extra-plugins=<list> : List of extra plugins which should be deployed,"; qInfo() << " -extra-plugins=<list> : List of extra plugins which should be deployed,";
qInfo() << " separated by comma."; qInfo() << " separated by comma.";
qInfo() << " -exclude-libs=<list> : List of libraries which should be excluded,"; qInfo() << " -no-copy-copyright-files : Skip deployment of copyright files.";
qInfo() << " separated by comma."; qInfo() << " -no-plugins : Skip plugin deployment.";
qInfo() << " -no-strip : Don't run 'strip' on the binaries.";
qInfo() << " -no-translations : Skip deployment of translations.";
qInfo() << " -qmake=<path> : The qmake executable to use.";
qInfo() << " -qmldir=<path> : Scan for QML imports in the given path.";
qInfo() << " -show-exclude-libs : Print exclude libraries list.";
qInfo() << " -verbose=<0-3> : 0 = no output, 1 = error/warning (default),";
qInfo() << " 2 = normal, 3 = debug.";
qInfo() << " -version : Print version statement and exit."; qInfo() << " -version : Print version statement and exit.";
qInfo() << ""; qInfo() << "";
qInfo() << "linuxdeployqt takes an application as input and makes it"; qInfo() << "linuxdeployqt takes an application as input and makes it";
@ -363,8 +364,10 @@ int main(int argc, char **argv)
} }
} }
// Check arguments
for (int i = 2; i < argc; ++i) { for (int i = 2; i < argc; ++i) {
QByteArray argument = QByteArray(argv[i]); QByteArray argument = QByteArray(argv[i]);
if (argument == QByteArray("-no-plugins")) { if (argument == QByteArray("-no-plugins")) {
LogDebug() << "Argument found:" << argument; LogDebug() << "Argument found:" << argument;
plugins = false; plugins = false;
@ -423,6 +426,9 @@ 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