Skip to content

Commit 2140d90

Browse files
committed
Add support for the wayland platform
1 parent d6ac06c commit 2140d90

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

tools/linuxdeployqt/shared.cpp

+26
Original file line numberDiff line numberDiff line change
@@ -1234,8 +1234,34 @@ void deployPlugins(const AppDirInfo &appDirInfo, const QString &pluginSourcePath
12341234

12351235
// Platform plugin:
12361236
if (containsHowOften(deploymentInfo.deployedLibraries, "libQt5Gui")) {
1237+
12371238
LogDebug() << "libQt5Gui detected";
1239+
1240+
// Platform xcb support
12381241
pluginList.append("platforms/libqxcb.so");
1242+
1243+
// Platform wayland support
1244+
// pluginList.append("platforms/libqwayland-*.so");
1245+
QStringList platformWaylandPlugins = QDir(pluginSourcePath + QStringLiteral("/platforms")).entryList(QStringList() << QStringLiteral("libqwayland-*.so"));
1246+
foreach (const QString &plugin, platformWaylandPlugins) {
1247+
pluginList.append(QStringLiteral("platforms/") + plugin);
1248+
}
1249+
1250+
// Always bundle wayland-* plugins
1251+
// pluginList.append("wayland-*");
1252+
QStringList waylandPluginDirs = QDir(pluginSourcePath).entryList(QStringList() << QStringLiteral("wayland-*"), QDir::NoDot | QDir::NoDotDot | QDir::Dirs);
1253+
foreach (const QString &plugin, waylandPluginDirs) {
1254+
QDir pluginDirectory(pluginSourcePath + "/" + plugin);
1255+
if (pluginDirectory.exists()) {
1256+
//If it is a plugin directory we will deploy the entire directory
1257+
QStringList plugins = pluginDirectory.entryList(QStringList() << QStringLiteral("*.so"));
1258+
foreach (const QString &pluginFile, plugins) {
1259+
pluginList.append(plugin + "/" + pluginFile);
1260+
LogDebug() << plugin + "/" + pluginFile << "appended";
1261+
}
1262+
}
1263+
}
1264+
12391265
// Platform plugin contexts - apparently needed to enter special characters
12401266
QStringList platformPluginContexts = QDir(pluginSourcePath + QStringLiteral("/platforminputcontexts")).entryList(QStringList() << QStringLiteral("*.so"));
12411267
foreach (const QString &plugin, platformPluginContexts) {

0 commit comments

Comments
 (0)