Skip to content

Commit 7f77ae6

Browse files
committed
Rename EXTRA_QT_PLUGINS to EXTRA_QT_MODULES
Fixes: linuxdeploy#121
1 parent babb58d commit 7f77ae6

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

Diff for: README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ Just like all linuxdeploy plugins, the Qt plugin's behavior can be configured so
5656

5757
**Qt specific:**
5858
- `$QMAKE=/path/to/my/qmake`: use another `qmake` binary to detect paths of plugins and other resources (usually doesn't need to be set manually, most Qt environments ship scripts changing `$PATH`)
59-
- `$EXTRA_QT_PLUGINS=pluginA;pluginB`: Plugins to deploy even if not found automatically by linuxdeploy-plugin-qt
60-
- example: `EXTRA_QT_PLUGINS=svg;` if you want to use the module [QtSvg](https://doc.qt.io/qt-5/qtsvg-index.html)
59+
- `$EXTRA_QT_MODULES=pluginA;pluginB`: Modules to deploy even if not found automatically by linuxdeploy-plugin-qt
60+
- example: `EXTRA_QT_MODULES=svg;` if you want to use the module [QtSvg](https://doc.qt.io/qt-5/qtsvg-index.html)
6161
- `$EXTRA_PLATFORM_PLUGINS=platformA;platformB`: Platforms to deploy in addition to `libqxcb.so`. Platform must be available from `QT_INSTALL_PLUGINS/platforms`.
6262

6363
QML related:

Diff for: src/main.cpp

+11-11
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ int main(const int argc, const char *const *const argv) {
3737
args::HelpFlag help(parser, "help", "Display this help text", {'h', "help"});
3838

3939
args::ValueFlag<fs::path> appDirPath(parser, "appdir path", "Path to an existing AppDir", {"appdir"});
40-
args::ValueFlagList<std::string> extraPlugins(parser, "plugin",
41-
"Extra Qt plugin to deploy (specified by name, filename or path)",
42-
{'p', "extra-plugin"});
40+
args::ValueFlagList<std::string> extraModules(parser, "module",
41+
"Extra Qt module to deploy (specified by name, filename or path)",
42+
{'m', "extra-module"});
4343

4444
args::Flag pluginType(parser, "", "Print plugin type and exit", {"plugin-type"});
4545
args::Flag pluginApiVersion(parser, "", "Print plugin API version and exit", {"plugin-api-version"});
@@ -199,18 +199,18 @@ int main(const int argc, const char *const *const argv) {
199199
}) != libraryNames.end();
200200
});
201201

202-
std::vector<std::string> extraPluginsFromEnv;
203-
const auto* const extraPluginsFromEnvData = getenv("EXTRA_QT_PLUGINS");
204-
if (extraPluginsFromEnvData != nullptr)
205-
extraPluginsFromEnv = linuxdeploy::util::split(std::string(extraPluginsFromEnvData), ';');
202+
std::vector<std::string> extraModulesFromEnv;
203+
const auto* const extraModulesFromEnvData = getenv("EXTRA_QT_MODULES") ? getenv("EXTRA_QT_MODULES") : getenv("EXTRA_QT_PLUGINS");
204+
if (extraModulesFromEnvData != nullptr)
205+
extraModulesFromEnv = linuxdeploy::util::split(std::string(extraModulesFromEnvData), ';');
206206

207-
for (const auto& pluginsList : {static_cast<std::vector<std::string>>(extraPlugins.Get()), extraPluginsFromEnv}) {
207+
for (const auto& modulesList : {static_cast<std::vector<std::string>>(extraModules.Get()), extraModulesFromEnv}) {
208208
std::copy_if(qtModules.begin(), qtModules.end(), std::back_inserter(extraQtModules),
209-
[&matchesQtModule, &libraryNames, &pluginsList](const QtModule &module) {
210-
return std::find_if(pluginsList.begin(), pluginsList.end(),
209+
[&matchesQtModule, &libraryNames, &modulesList](const QtModule &module) {
210+
return std::find_if(modulesList.begin(), modulesList.end(),
211211
[&matchesQtModule, &module](const std::string &libraryName) {
212212
return matchesQtModule(libraryName, module);
213-
}) != pluginsList.end();
213+
}) != modulesList.end();
214214
}
215215
);
216216
}

0 commit comments

Comments
 (0)