|
10 | 10 | // local headers
|
11 | 11 | #include "PluginsDeployer.h"
|
12 | 12 |
|
13 |
| - |
14 | 13 | namespace linuxdeploy {
|
15 |
| - namespace plugin { |
16 |
| - namespace qt { |
17 |
| - /** |
18 |
| - * |
19 |
| - */ |
20 |
| - class BasicPluginsDeployer : public PluginsDeployer { |
21 |
| - protected: |
22 |
| - std::string moduleName; |
23 |
| - core::appdir::AppDir& appDir; |
24 |
| - |
25 |
| - // Qt data |
26 |
| - const std::filesystem::path qtPluginsPath; |
27 |
| - const std::filesystem::path qtLibexecsPath; |
28 |
| - const std::filesystem::path qtInstallQmlPath; |
29 |
| - const std::filesystem::path qtTranslationsPath; |
30 |
| - const std::filesystem::path qtDataPath; |
31 |
| - |
32 |
| - public: |
33 |
| - /** |
34 |
| - * Default constructor. Constructs a basic deployer for a plugin with the given name. |
35 |
| - * |
36 |
| - * @param moduleName |
37 |
| - */ |
38 |
| - explicit BasicPluginsDeployer(std::string moduleName, core::appdir::AppDir& appDir, |
39 |
| - std::filesystem::path qtPluginsPath, |
40 |
| - std::filesystem::path qtLibexecsPath, |
41 |
| - std::filesystem::path installLibsPath, |
42 |
| - std::filesystem::path qtTranslationsPath, |
43 |
| - std::filesystem::path qtDataPath); |
44 |
| - |
45 |
| - /** |
46 |
| - * Default destroyer is good enough for this class for now, but in case we need to change this we declare a virtual |
47 |
| - * one. |
48 |
| - */ |
49 |
| - virtual ~BasicPluginsDeployer() = default; |
50 |
| - |
51 |
| - public: |
52 |
| - bool deploy() override; |
53 |
| - }; |
54 |
| - } |
55 |
| - } |
56 |
| -} |
| 14 | +namespace plugin { |
| 15 | +namespace qt { |
| 16 | +/** |
| 17 | + * |
| 18 | + */ |
| 19 | +class BasicPluginsDeployer : public PluginsDeployer |
| 20 | +{ |
| 21 | +protected: |
| 22 | + std::string moduleName; |
| 23 | + core::appdir::AppDir &appDir; |
| 24 | + |
| 25 | + // Qt data |
| 26 | + const std::filesystem::path qtPluginsPath; |
| 27 | + const std::filesystem::path qtLibexecsPath; |
| 28 | + const std::filesystem::path qtInstallQmlPath; |
| 29 | + const std::filesystem::path qtTranslationsPath; |
| 30 | + const std::filesystem::path qtDataPath; |
| 31 | + |
| 32 | +public: |
| 33 | + /** |
| 34 | + * Default constructor. Constructs a basic deployer for a plugin with the |
| 35 | + * given name. |
| 36 | + * |
| 37 | + * @param moduleName |
| 38 | + */ |
| 39 | + explicit BasicPluginsDeployer(std::string moduleName, |
| 40 | + core::appdir::AppDir &appDir, |
| 41 | + std::filesystem::path qtPluginsPath, |
| 42 | + std::filesystem::path qtLibexecsPath, |
| 43 | + std::filesystem::path installLibsPath, |
| 44 | + std::filesystem::path qtTranslationsPath, |
| 45 | + std::filesystem::path qtDataPath); |
| 46 | + |
| 47 | + /** |
| 48 | + * Default destroyer is good enough for this class for now, but in case we |
| 49 | + * need to change this we declare a virtual one. |
| 50 | + */ |
| 51 | + virtual ~BasicPluginsDeployer() = default; |
| 52 | + |
| 53 | +public: |
| 54 | + /** |
| 55 | + * This method deploys the plugins returned by \sa qtPluginsToBeDeployed() |
| 56 | + * and call \sa customDeploy() to finalize the deployment. |
| 57 | + */ |
| 58 | + bool deploy() override final; |
| 59 | + |
| 60 | +protected: |
| 61 | + /** |
| 62 | + * The \sa deploy() method can deploy Qt plugins that follow the default |
| 63 | + * name and path scheme, but some modules are special so |
| 64 | + * they should write custom deployment code. |
| 65 | + */ |
| 66 | + virtual bool customDeploy(); |
| 67 | + |
| 68 | + /** |
| 69 | + * Returns a list of Qt plugin names that should be deployed and |
| 70 | + * follow the default name and path scheme. |
| 71 | + */ |
| 72 | + virtual std::vector<std::string> qtPluginsToBeDeployed() const; |
| 73 | +}; |
| 74 | +} // namespace qt |
| 75 | +} // namespace plugin |
| 76 | +} // namespace linuxdeploy |
0 commit comments