Skip to content

Commit c8ad97b

Browse files
committed
Introduce WaylandGraphicsIntegrationClient deployer
1 parent 9203dde commit c8ad97b

File tree

5 files changed

+58
-0
lines changed

5 files changed

+58
-0
lines changed

src/deployers/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ set(CLASSES
2323
TlsBackendsDeployer
2424
WaylandcompositorPluginsDeployer
2525
WaylandShellIntegrationPluginsDeployer
26+
WaylandGraphicsIntegrationClientPluginsDeployer
2627
)
2728

2829
# TODO: CMake <= 3.7 (at least!) doesn't allow for using OBJECT libraries with target_link_libraries

src/deployers/PluginsDeployerFactory.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "TlsBackendsDeployer.h"
2020
#include "WaylandcompositorPluginsDeployer.h"
2121
#include "WaylandShellIntegrationPluginsDeployer.h"
22+
#include "WaylandGraphicsIntegrationClientPluginsDeployer.h"
2223

2324
using namespace linuxdeploy::plugin::qt;
2425
using namespace linuxdeploy::core::appdir;
@@ -113,6 +114,10 @@ std::vector<std::shared_ptr<PluginsDeployer>> PluginsDeployerFactory::getDeploye
113114
return {getInstance<WaylandShellIntegrationPluginsDeployer>(moduleName)};
114115
}
115116

117+
if (moduleName == "wayland-graphics-integration-client") {
118+
return {getInstance<WaylandGraphicsIntegrationClientPluginsDeployer>(moduleName)};
119+
}
120+
116121
// fallback
117122
return {getInstance<BasicPluginsDeployer>(moduleName)};
118123
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// system headers
2+
#include <filesystem>
3+
4+
// library headers
5+
#include <linuxdeploy/core/log.h>
6+
#include <linuxdeploy/util/util.h>
7+
8+
// local headers
9+
#include "WaylandGraphicsIntegrationClientPluginsDeployer.h"
10+
11+
using namespace linuxdeploy::plugin::qt;
12+
using namespace linuxdeploy::core::log;
13+
14+
namespace fs = std::filesystem;
15+
16+
bool WaylandGraphicsIntegrationClientPluginsDeployer::deploy() {
17+
// calling the default code is optional, but it won't hurt for now
18+
if (!BasicPluginsDeployer::deploy())
19+
return false;
20+
21+
ldLog() << "Deploying Wayland Shell Integration plugins" << std::endl;
22+
23+
for (fs::directory_iterator i(qtPluginsPath / "wayland-graphics-integration-client"); i != fs::directory_iterator(); ++i) {
24+
if (i->path().extension() == ".debug") {
25+
ldLog() << LD_DEBUG << "skipping .debug file:" << i->path() << std::endl;
26+
continue;
27+
}
28+
29+
if (!appDir.deployLibrary(*i, appDir.path() / "usr/plugins/wayland-graphics-integration-client/"))
30+
return false;
31+
}
32+
33+
return true;
34+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#pragma once
2+
3+
#include "BasicPluginsDeployer.h"
4+
5+
namespace linuxdeploy {
6+
namespace plugin {
7+
namespace qt {
8+
class WaylandGraphicsIntegrationClientPluginsDeployer : public BasicPluginsDeployer {
9+
public:
10+
// we can just use the base class's constructor
11+
using BasicPluginsDeployer::BasicPluginsDeployer;
12+
13+
bool deploy() override;
14+
};
15+
}
16+
}
17+
}

src/qt-modules.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ static const std::vector<QtModule> Qt6Modules = {
122122
{"uitools", "libQt6UiTools", ""},
123123
{"waylandclient", "libQt6WaylandClient", ""},
124124
{"wayland-shell-integration", "libQt6WlShellIntegration", ""},
125+
{"wayland-graphics-integration-client", "", ""},
125126
{"waylandcompositor", "libQt6WaylandCompositor", ""},
126127
{"webenginecore", "libQt6WebEngineCore", ""},
127128
{"webengine", "libQt6WebEngine", "qtwebengine"},

0 commit comments

Comments
 (0)