@@ -58,6 +58,7 @@ int qtDetected = 0;
5858bool qtDetectionComplete = 0 ; // As long as Qt is not detected yet, ldd may encounter "not found" messages, continue anyway
5959bool deployLibrary = false ;
6060QStringList extraQtPlugins;
61+ QStringList excludeLibs;
6162bool copyCopyrightFiles = true ;
6263
6364using std::cout;
@@ -478,6 +479,7 @@ LibraryInfo parseLddLibraryLine(const QString &line, const QString &appDirPath,
478479 #else
479480 excludelist << EXCLUDELIST;
480481 #endif
482+ excludelist += excludeLibs;
481483
482484 LogDebug () << " excludelist:" << excludelist;
483485 if (! trimmed.contains (" libicu" )) {
@@ -671,10 +673,13 @@ QList<LibraryInfo> getQtLibrariesForPaths(const QStringList &paths, const QStrin
671673 QSet<QString> existing;
672674
673675 foreach (const QString &path, paths) {
674- foreach (const LibraryInfo &info, getQtLibraries (path, appDirPath, rpaths)) {
675- if (!existing.contains (info.libraryPath )) { // avoid duplicates
676- existing.insert (info.libraryPath );
677- result << info;
676+ if (!excludeLibs.contains (QFileInfo (path).baseName ()))
677+ {
678+ foreach (const LibraryInfo &info, getQtLibraries (path, appDirPath, rpaths)) {
679+ if (!existing.contains (info.libraryPath )) { // avoid duplicates
680+ existing.insert (info.libraryPath );
681+ result << info;
682+ }
678683 }
679684 }
680685 }
@@ -1022,7 +1027,7 @@ DeploymentInfo deployQtLibraries(QList<LibraryInfo> libraries,
10221027 deploymentInfo.qtPath = library.libraryDirectory ;
10231028 }
10241029
1025- if (library.libraryName .contains (" libQt" ) and library.libraryName .contains (" Widgets.so" )) {
1030+ if (library.libraryName .contains (" libQt" ) and library.libraryName .contains (" Widgets.so" )) {
10261031 deploymentInfo.requiresQtWidgetsLibrary = true ;
10271032 }
10281033
@@ -1399,23 +1404,26 @@ void deployPlugins(const AppDirInfo &appDirInfo, const QString &pluginSourcePath
13991404 foreach (const QString &plugin, pluginList) {
14001405 sourcePath = pluginSourcePath + " /" + plugin;
14011406 destinationPath = pluginDestinationPath + " /" + plugin;
1402- QDir dir;
1403- dir.mkpath (QFileInfo (destinationPath).path ());
1404- QList<LibraryInfo> libraries = getQtLibraries (sourcePath, appDirInfo.path , deploymentInfo.rpathsUsed );
1405- LogDebug () << " Deploying plugin" << sourcePath;
1406- if (copyFilePrintStatus (sourcePath, destinationPath)) {
1407- runStrip (destinationPath);
1408- deployQtLibraries (libraries, appDirInfo.path , QStringList () << destinationPath, deploymentInfo.useLoaderPath );
1409- /* See whether this makes any difference */
1410- // Find out the relative path to the lib/ directory and set it as the rpath
1411- QDir dir (destinationPath);
1412- QString relativePath = dir.relativeFilePath (appDirInfo.path + " /" + libraries[0 ].libraryDestinationDirectory );
1413- relativePath.remove (0 , 3 ); // remove initial '../'
1414- changeIdentification (" $ORIGIN/" + relativePath, QFileInfo (destinationPath).canonicalFilePath ());
1407+ if (!excludeLibs.contains (QFileInfo (sourcePath).baseName ()))
1408+ {
1409+ QDir dir;
1410+ dir.mkpath (QFileInfo (destinationPath).path ());
1411+ QList<LibraryInfo> libraries = getQtLibraries (sourcePath, appDirInfo.path , deploymentInfo.rpathsUsed );
1412+ LogDebug () << " Deploying plugin" << sourcePath;
1413+ if (copyFilePrintStatus (sourcePath, destinationPath)) {
1414+ runStrip (destinationPath);
1415+ deployQtLibraries (libraries, appDirInfo.path , QStringList () << destinationPath, deploymentInfo.useLoaderPath );
1416+ /* See whether this makes any difference */
1417+ // Find out the relative path to the lib/ directory and set it as the rpath
1418+ QDir dir (destinationPath);
1419+ QString relativePath = dir.relativeFilePath (appDirInfo.path + " /" + libraries[0 ].libraryDestinationDirectory );
1420+ relativePath.remove (0 , 3 ); // remove initial '../'
1421+ changeIdentification (" $ORIGIN/" + relativePath, QFileInfo (destinationPath).canonicalFilePath ());
14151422
1423+ }
1424+ LogDebug () << " copyCopyrightFile:" << sourcePath;
1425+ copyCopyrightFile (sourcePath);
14161426 }
1417- LogDebug () << " copyCopyrightFile:" << sourcePath;
1418- copyCopyrightFile (sourcePath);
14191427 }
14201428}
14211429
0 commit comments