Fix for PrivateWidgets not being deployed, closes #113

https://github.com/Ribtoks/linuxdeployqt/commit/16f2176b15e4ade8b35f67ddc392aca1fbc9c5cc
This commit is contained in:
probonopd
2017-05-26 07:25:23 +02:00
parent 195b793686
commit e8ea2c94a5
2 changed files with 7 additions and 1 deletions
+6 -1
View File
@@ -810,6 +810,7 @@ DeploymentInfo deployQtLibraries(QList<LibraryInfo> libraries,
LogNormal() << "Deploying the following libraries:" << binaryPaths; LogNormal() << "Deploying the following libraries:" << binaryPaths;
QStringList copiedLibraries; QStringList copiedLibraries;
DeploymentInfo deploymentInfo; DeploymentInfo deploymentInfo;
deploymentInfo.requiresQtWidgetsLibrary = false;
deploymentInfo.useLoaderPath = useLoaderPath; deploymentInfo.useLoaderPath = useLoaderPath;
deploymentInfo.pluginPath = qtToBeBundledInfo.value("QT_INSTALL_PLUGINS"); deploymentInfo.pluginPath = qtToBeBundledInfo.value("QT_INSTALL_PLUGINS");
QSet<QString> rpathsUsed; QSet<QString> rpathsUsed;
@@ -823,6 +824,10 @@ DeploymentInfo deployQtLibraries(QList<LibraryInfo> libraries,
deploymentInfo.qtPath = library.libraryDirectory; deploymentInfo.qtPath = library.libraryDirectory;
} }
if(library.libraryName.contains("libQt") and library.libraryName.contains("Widgets.so")) {
deploymentInfo.requiresQtWidgetsLibrary = true;
}
if (library.libraryDirectory.startsWith(bundlePath)) { if (library.libraryDirectory.startsWith(bundlePath)) {
LogNormal() << library.libraryName << "already deployed, skipping."; LogNormal() << library.libraryName << "already deployed, skipping.";
continue; continue;
@@ -1381,7 +1386,7 @@ bool deployQmlImports(const QString &appDirPath, DeploymentInfo deploymentInfo,
// 2) QtQuick.Controls is used // 2) QtQuick.Controls is used
// The intended failure mode is that libwidgetsplugin.dylib will be present // The intended failure mode is that libwidgetsplugin.dylib will be present
// in the app bundle but not used at run-time. // in the app bundle but not used at run-time.
if (deploymentInfo.deployedLibraries.contains("QtWidgets") && qtQuickContolsInUse) { if (deploymentInfo.requiresQtWidgetsLibrary && qtQuickContolsInUse) {
LogNormal() << "Deploying QML import QtQuick/PrivateWidgets"; LogNormal() << "Deploying QML import QtQuick/PrivateWidgets";
QString name = "QtQuick/PrivateWidgets"; QString name = "QtQuick/PrivateWidgets";
QString path = qtToBeBundledInfo.value("QT_INSTALL_QML") + QLatin1Char('/') + name; QString path = qtToBeBundledInfo.value("QT_INSTALL_QML") + QLatin1Char('/') + name;
+1
View File
@@ -99,6 +99,7 @@ public:
QSet<QString> rpathsUsed; QSet<QString> rpathsUsed;
bool useLoaderPath; bool useLoaderPath;
bool isLibrary; bool isLibrary;
bool requiresQtWidgetsLibrary;
}; };
inline QDebug operator<<(QDebug debug, const AppDirInfo &info); inline QDebug operator<<(QDebug debug, const AppDirInfo &info);