diff --git a/src/deployers/PluginsDeployerFactory.cpp b/src/deployers/PluginsDeployerFactory.cpp index f6e4b8d..6a9d270 100644 --- a/src/deployers/PluginsDeployerFactory.cpp +++ b/src/deployers/PluginsDeployerFactory.cpp @@ -29,51 +29,51 @@ PluginsDeployerFactory::PluginsDeployerFactory(AppDir& appDir, qtTranslationsPath(std::move(qtTranslationsPath)), qtDataPath(std::move(qtDataPath)) {} -std::shared_ptr PluginsDeployerFactory::getInstance(const std::string& moduleName) { +std::vector> PluginsDeployerFactory::getDeployers(const std::string& moduleName) { if (moduleName == "gui") { - return getInstance(moduleName); + return {getInstance(moduleName), getInstance(moduleName)}; } - if (moduleName == "opengl" || moduleName == "gui" || moduleName == "xcbqpa") { - return getInstance(moduleName); + if (moduleName == "opengl" || moduleName == "xcbqpa") { + return {getInstance(moduleName)}; } if (moduleName == "network") { - return getInstance(moduleName); + return {getInstance(moduleName)}; } if (moduleName == "svg") { - return getInstance(moduleName); + return {getInstance(moduleName)}; } if (moduleName == "sql") { - return getInstance(moduleName); + return {getInstance(moduleName)}; } if (moduleName == "positioning") { - return getInstance(moduleName); + return {getInstance(moduleName)}; } if (moduleName == "multimedia") { - return getInstance(moduleName); + return {getInstance(moduleName)}; } if (moduleName == "webenginecore") { - return getInstance(moduleName); + return {getInstance(moduleName)}; } if (moduleName == "qml") { - return getInstance(moduleName); + return {getInstance(moduleName)}; } if (moduleName == "3dquickrender") { - return getInstance(moduleName); + return {getInstance(moduleName)}; } if (moduleName == "gamepad") { - return getInstance(moduleName); + return {getInstance(moduleName)}; } // fallback - return getInstance(moduleName); + return {getInstance(moduleName)}; } diff --git a/src/deployers/PluginsDeployerFactory.h b/src/deployers/PluginsDeployerFactory.h index 349e1b3..389929f 100644 --- a/src/deployers/PluginsDeployerFactory.h +++ b/src/deployers/PluginsDeployerFactory.h @@ -47,7 +47,7 @@ namespace linuxdeploy { boost::filesystem::path qtTranslationsPath, boost::filesystem::path qtDataPath); - std::shared_ptr getInstance(const std::string& moduleName); + std::vector> getDeployers(const std::string& moduleName); }; } } diff --git a/src/main.cpp b/src/main.cpp index d5bba31..3241b4f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -229,11 +229,11 @@ int main(const int argc, const char *const *const argv) { for (const auto& module : qtModulesToDeploy) { ldLog() << std::endl << "-- Deploying module:" << module.name << "--" << std::endl; - auto deployer = deployerFactory.getInstance(module.name); + auto deployers = deployerFactory.getDeployers(module.name); - if (!deployer->deploy()) { - return 1; - } + for (const auto& deployer : deployers) + if (!deployer->deploy()) + return 1; } ldLog() << std::endl << "-- Deploying translations --" << std::endl;