Revert "Deploy platformthemes/libqgtk2.so, styles/libqgtk2style.so, iconengines and imageformats (#352)"
This reverts commit aa78a03de0.
This commit is contained in:
@@ -1218,6 +1218,25 @@ void deployPlugins(const AppDirInfo &appDirInfo, const QString &pluginSourcePath
|
|||||||
// Plugin white list:
|
// Plugin white list:
|
||||||
QStringList pluginList;
|
QStringList pluginList;
|
||||||
|
|
||||||
|
// Make the bundled application look good on, e.g., Xfce
|
||||||
|
// Note: http://code.qt.io/qt/qtstyleplugins.git must be compiled (using libgtk2.0-dev)
|
||||||
|
// https://askubuntu.com/a/910143
|
||||||
|
// https://askubuntu.com/a/748186
|
||||||
|
// This functionality used to come as part of Qt by default in earlier versions
|
||||||
|
// At runtime, export QT_QPA_PLATFORMTHEME=gtk2 (Xfce does this itself)
|
||||||
|
pluginList.append("platformthemes/libqgtk2.so");
|
||||||
|
pluginList.append("styles/libqgtk2style.so");
|
||||||
|
|
||||||
|
// Always bundle iconengines,imageformats
|
||||||
|
// https://github.com/probonopd/linuxdeployqt/issues/82
|
||||||
|
// https://github.com/probonopd/linuxdeployqt/issues/325
|
||||||
|
// FIXME
|
||||||
|
// The following does NOT work;
|
||||||
|
// findDependencyInfo: "ldd: /usr/local/Qt-5.9.3/plugins/iconengines: not regular file"
|
||||||
|
// pluginList.append("iconengines");
|
||||||
|
// pluginList.append("imageformats");
|
||||||
|
// TODO: Need to traverse the directories and add each contained plugin individually
|
||||||
|
|
||||||
LogDebug() << "deploymentInfo.deployedLibraries before attempting to bundle required plugins:" << deploymentInfo.deployedLibraries;
|
LogDebug() << "deploymentInfo.deployedLibraries before attempting to bundle required plugins:" << deploymentInfo.deployedLibraries;
|
||||||
|
|
||||||
// Platform plugin:
|
// Platform plugin:
|
||||||
@@ -1238,41 +1257,15 @@ void deployPlugins(const AppDirInfo &appDirInfo, const QString &pluginSourcePath
|
|||||||
pluginList.append(QStringLiteral("platformthemes/") + plugin);
|
pluginList.append(QStringLiteral("platformthemes/") + plugin);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
// All image formats (svg if QtSvg library is used)
|
||||||
// Make the bundled application look good on, e.g., Xfce
|
QStringList imagePlugins = QDir(pluginSourcePath + QStringLiteral("/imageformats")).entryList(QStringList() << QStringLiteral("*.so"));
|
||||||
// Note: http://code.qt.io/qt/qtstyleplugins.git must be compiled (using libgtk2.0-dev)
|
foreach (const QString &plugin, imagePlugins) {
|
||||||
// https://askubuntu.com/a/910143
|
if (plugin.contains(QStringLiteral("qsvg"))) {
|
||||||
// https://askubuntu.com/a/748186
|
if (containsHowOften(deploymentInfo.deployedLibraries, "libQt5Svg")) {
|
||||||
// This functionality used to come as part of Qt by default in earlier versions
|
pluginList.append(QStringLiteral("imageformats/") + plugin);
|
||||||
// At runtime, export QT_QPA_PLATFORMTHEME=gtk2 (Xfce does this itself)
|
}
|
||||||
QStringList extraQtPluginsAdded = { "platformthemes/libqgtk2.so", "styles/libqgtk2style.so" };
|
|
||||||
foreach (const QString &plugin, extraQtPluginsAdded) {
|
|
||||||
if (QFile::exists(pluginSourcePath + "/" + plugin)) {
|
|
||||||
pluginList.append(plugin);
|
|
||||||
LogDebug() << plugin << "appended";
|
|
||||||
} else {
|
} else {
|
||||||
LogWarning() <<"Plugin" << pluginSourcePath + "/" + plugin << "not found, skipping";
|
pluginList.append(QStringLiteral("imageformats/") + plugin);
|
||||||
}
|
|
||||||
}
|
|
||||||
// Always bundle iconengines,imageformats
|
|
||||||
// https://github.com/probonopd/linuxdeployqt/issues/82
|
|
||||||
// https://github.com/probonopd/linuxdeployqt/issues/325
|
|
||||||
// FIXME
|
|
||||||
// The following does NOT work;
|
|
||||||
// findDependencyInfo: "ldd: /usr/local/Qt-5.9.3/plugins/iconengines: not regular file"
|
|
||||||
// pluginList.append("iconengines");
|
|
||||||
// pluginList.append("imageformats");
|
|
||||||
// TODO: Need to traverse the directories and add each contained plugin individually
|
|
||||||
QStringList extraQtPluginDirs = { "iconengines", "imageformats" };
|
|
||||||
foreach (const QString &plugin, extraQtPluginDirs) {
|
|
||||||
QDir pluginDirectory(pluginSourcePath + "/" + plugin);
|
|
||||||
if (pluginDirectory.exists()) {
|
|
||||||
//If it is a plugin directory we will deploy the entire directory
|
|
||||||
QStringList plugins = pluginDirectory.entryList(QStringList() << QStringLiteral("*.so"));
|
|
||||||
foreach (const QString &pluginFile, plugins) {
|
|
||||||
pluginList.append(plugin + "/" + pluginFile);
|
|
||||||
LogDebug() << plugin + "/" + pluginFile << "appended";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user