Skip to content

Commit dd2e714

Browse files
authored
Merge pull request #52 from haampie/fix-gui-xcbgl-clash
Return multiple deployers per module
2 parents 70ca710 + 752c5f1 commit dd2e714

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

src/deployers/PluginsDeployerFactory.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,51 +29,51 @@ PluginsDeployerFactory::PluginsDeployerFactory(AppDir& appDir,
2929
qtTranslationsPath(std::move(qtTranslationsPath)),
3030
qtDataPath(std::move(qtDataPath)) {}
3131

32-
std::shared_ptr<PluginsDeployer> PluginsDeployerFactory::getInstance(const std::string& moduleName) {
32+
std::vector<std::shared_ptr<PluginsDeployer>> PluginsDeployerFactory::getDeployers(const std::string& moduleName) {
3333
if (moduleName == "gui") {
34-
return getInstance<PlatformPluginsDeployer>(moduleName);
34+
return {getInstance<PlatformPluginsDeployer>(moduleName), getInstance<XcbglIntegrationPluginsDeployer>(moduleName)};
3535
}
3636

37-
if (moduleName == "opengl" || moduleName == "gui" || moduleName == "xcbqpa") {
38-
return getInstance<XcbglIntegrationPluginsDeployer>(moduleName);
37+
if (moduleName == "opengl" || moduleName == "xcbqpa") {
38+
return {getInstance<XcbglIntegrationPluginsDeployer>(moduleName)};
3939
}
4040

4141
if (moduleName == "network") {
42-
return getInstance<BearerPluginsDeployer>(moduleName);
42+
return {getInstance<BearerPluginsDeployer>(moduleName)};
4343
}
4444

4545
if (moduleName == "svg") {
46-
return getInstance<SvgPluginsDeployer>(moduleName);
46+
return {getInstance<SvgPluginsDeployer>(moduleName)};
4747
}
4848

4949
if (moduleName == "sql") {
50-
return getInstance<SqlPluginsDeployer>(moduleName);
50+
return {getInstance<SqlPluginsDeployer>(moduleName)};
5151
}
5252

5353
if (moduleName == "positioning") {
54-
return getInstance<PositioningPluginsDeployer>(moduleName);
54+
return {getInstance<PositioningPluginsDeployer>(moduleName)};
5555
}
5656

5757
if (moduleName == "multimedia") {
58-
return getInstance<MultimediaPluginsDeployer>(moduleName);
58+
return {getInstance<MultimediaPluginsDeployer>(moduleName)};
5959
}
6060

6161
if (moduleName == "webenginecore") {
62-
return getInstance<WebEnginePluginsDeployer>(moduleName);
62+
return {getInstance<WebEnginePluginsDeployer>(moduleName)};
6363
}
6464

6565
if (moduleName == "qml") {
66-
return getInstance<QmlPluginsDeployer>(moduleName);
66+
return {getInstance<QmlPluginsDeployer>(moduleName)};
6767
}
6868

6969
if (moduleName == "3dquickrender") {
70-
return getInstance<Qt3DPluginsDeployer>(moduleName);
70+
return {getInstance<Qt3DPluginsDeployer>(moduleName)};
7171
}
7272

7373
if (moduleName == "gamepad") {
74-
return getInstance<GamepadPluginsDeployer>(moduleName);
74+
return {getInstance<GamepadPluginsDeployer>(moduleName)};
7575
}
7676

7777
// fallback
78-
return getInstance<BasicPluginsDeployer>(moduleName);
78+
return {getInstance<BasicPluginsDeployer>(moduleName)};
7979
}

src/deployers/PluginsDeployerFactory.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ namespace linuxdeploy {
4747
boost::filesystem::path qtTranslationsPath,
4848
boost::filesystem::path qtDataPath);
4949

50-
std::shared_ptr<PluginsDeployer> getInstance(const std::string& moduleName);
50+
std::vector<std::shared_ptr<PluginsDeployer>> getDeployers(const std::string& moduleName);
5151
};
5252
}
5353
}

src/main.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,11 @@ int main(const int argc, const char *const *const argv) {
229229
for (const auto& module : qtModulesToDeploy) {
230230
ldLog() << std::endl << "-- Deploying module:" << module.name << "--" << std::endl;
231231

232-
auto deployer = deployerFactory.getInstance(module.name);
232+
auto deployers = deployerFactory.getDeployers(module.name);
233233

234-
if (!deployer->deploy()) {
235-
return 1;
236-
}
234+
for (const auto& deployer : deployers)
235+
if (!deployer->deploy())
236+
return 1;
237237
}
238238

239239
ldLog() << std::endl << "-- Deploying translations --" << std::endl;

0 commit comments

Comments
 (0)