Add -qtlibinfix support in order to precise the libinfix set for a custom Qt distribution. Without this option, linuxdeployqt is not able to look at the Qt plugins directory. (#463)

* Add -qtlibinfix support in order to precise the libinfix set for a custom Qt distribution. Without this option, linuxdeployqt is not able to look at the Qt plugins directory.

* Add dedicated qtlibinfix section in documentation.

* Missing lib prefix for the -qtlibinfix example in documentation.

* Update README.md

Co-authored-by: Tristan Cladet <tristan.cladet@siemens.com>
Co-authored-by: probonopd <probonopd@users.noreply.github.com>
This commit is contained in:
Tristan Cladet
2021-08-28 22:16:28 +02:00
committed by GitHub
parent b4697483c9
commit 570ca2dcb1
3 changed files with 19 additions and 2 deletions
+6
View File
@@ -74,6 +74,7 @@ int main(int argc, char **argv)
extern QStringList ignoreGlob;
extern bool copyCopyrightFiles;
extern QString updateInformation;
extern QString qtLibInfix;
// Check arguments
// Due to the structure of the argument parser, we have to check all arguments at first to check whether the user
@@ -173,6 +174,10 @@ int main(int argc, char **argv)
LogDebug() << "Argument found:" << argument;
int index = argument.indexOf("=");
updateInformation = QString(argument.mid(index+1));
} else if (argument.startsWith("-qtlibinfix=")) {
LogDebug() << "Argument found:" << argument;
int index = argument.indexOf("=");
qtLibInfix = QString(argument.mid(index+1));
} else if (argument.startsWith("--")) {
LogError() << "Error: arguments must not start with --, only -:" << argument << "\n";
return 1;
@@ -233,6 +238,7 @@ int main(int argc, char **argv)
qInfo() << " -verbose=<0-3> : 0 = no output, 1 = error/warning (default),";
qInfo() << " 2 = normal, 3 = debug.";
qInfo() << " -updateinformation=<update string> : Embed update information STRING; if zsyncmake is installed, generate zsync file";
qInfo() << " -qtlibinfix=<infix> : Adapt the .so search if your Qt distribution has infix.";
qInfo() << " -version : Print version statement and exit.";
qInfo() << "";
qInfo() << "linuxdeployqt takes an application as input and makes it";
+3 -2
View File
@@ -64,6 +64,7 @@ QStringList excludeLibs;
QStringList ignoreGlob;
bool copyCopyrightFiles = true;
QString updateInformation;
QString qtLibInfix;
using std::cout;
using std::endl;
@@ -1010,12 +1011,12 @@ DeploymentInfo deployQtLibraries(QList<LibraryInfo> libraries,
const LibraryInfo library = libraries.takeFirst();
copiedLibraries.append(library.libraryName);
if(library.libraryName.contains("libQt") and library.libraryName.contains("Core.so")) {
if(library.libraryName.contains("libQt") and library.libraryName.contains("Core" + qtLibInfix + ".so")) {
LogNormal() << "Setting deploymentInfo.qtPath to:" << library.libraryDirectory;
deploymentInfo.qtPath = library.libraryDirectory;
}
if(library.libraryName.contains("libQt") and library.libraryName.contains("Widgets.so")) {
if(library.libraryName.contains("libQt") and library.libraryName.contains("Widgets" + qtLibInfix + ".so")) {
deploymentInfo.requiresQtWidgetsLibrary = true;
}