diff --git a/src/deployers/BasicPluginsDeployer.cpp b/src/deployers/BasicPluginsDeployer.cpp index f636fed..36d1299 100644 --- a/src/deployers/BasicPluginsDeployer.cpp +++ b/src/deployers/BasicPluginsDeployer.cpp @@ -39,6 +39,10 @@ bool BasicPluginsDeployer::deployStandardQtPlugins(const std::vectorpath().extension() == ".debug") { + ldLog() << LD_DEBUG << "skipping .debug file:" << i->path() << std::endl; + continue; + } // add a trailing slash, so pluginName is used as a destination directory, not a file. if (!appDir.deployLibrary(*i, appDir.path() / "usr/plugins" / pluginName / "")) return false; diff --git a/src/deployers/TextToSpeechPluginsDeployer.cpp b/src/deployers/TextToSpeechPluginsDeployer.cpp index 8b8e2c2..ddf5a3d 100644 --- a/src/deployers/TextToSpeechPluginsDeployer.cpp +++ b/src/deployers/TextToSpeechPluginsDeployer.cpp @@ -1,38 +1,8 @@ -// system headers -#include - -// library headers -#include - // local headers #include "TextToSpeechPluginsDeployer.h" using namespace linuxdeploy::plugin::qt; -using namespace linuxdeploy::core::log; - -namespace fs = std::filesystem; bool TextToSpeechPluginsDeployer::doDeploy() { - // calling the default code is optional, but it won't hurt for now - if (!BasicPluginsDeployer::deploy()) - return false; - - const std::string pluginsName = "texttospeech"; - - ldLog() << "Deploying" << pluginsName << "plugins" << std::endl; - - for (fs::directory_iterator i(qtPluginsPath / pluginsName); i != fs::directory_iterator(); ++i) { - if (i->path().extension() == ".debug") { - ldLog() << LD_DEBUG << "skipping .debug file:" << i->path() << std::endl; - continue; - } - - // terminate with a "/" to make sure the deployer will deploy the file into the target directory properly - // has to be cast to string, unfortunately, as std::filesystem doesn't allow for adding a terminating / - const auto targetPath = (appDir.path() / "usr/plugins/" / pluginsName).string() + "/"; - if (!appDir.deployLibrary(*i, targetPath)) - return false; - } - - return true; + return deployStandardQtPlugins({"texttospeech"}); } diff --git a/src/deployment.h b/src/deployment.h index 04df3a1..047941a 100644 --- a/src/deployment.h +++ b/src/deployment.h @@ -37,6 +37,10 @@ inline bool deployIntegrationPlugins(appdir::AppDir& appDir, const fs::path& qtP // otherwise, when the directory doesn't exist, it might just copy all files to files called like // destinationDir auto destinationDir = appDir.path() / "usr/plugins" / subDir / ""; + if (i->path().extension() == ".debug") { + ldLog() << LD_DEBUG << "skipping .debug file:" << i->path() << std::endl; + continue; + } if (!appDir.deployLibrary(*i, destinationDir)) return false;