Skip to content

Commit a1cd6fc

Browse files
committed
Add --exclude-library option to standalone version
It would be useful to have the standalone version also able to exclude-libraries, this helps with issues: #153 #150 #110 #108
1 parent bcd597c commit a1cd6fc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ 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> excludeLibraryPatterns(parser, "pattern", "Shared library to exclude from deployment (glob pattern)", {"exclude-library"});
4041
args::ValueFlagList<std::string> extraPlugins(parser, "plugin",
4142
"Extra Qt plugin to deploy (specified by name, filename or path)",
4243
{'p', "extra-plugin"});
@@ -135,6 +136,9 @@ int main(const int argc, const char *const *const argv) {
135136
ldLog() << std::endl << "Using Qt version: " << qtVersion << " (" << qtMajorVersion << ")" << std::endl;
136137

137138
appdir::AppDir appDir(appDirPath.Get());
139+
if (const auto patterns = excludeLibraryPatterns.Get(); !patterns.empty()) {
140+
appDir.setExcludeLibraryPatterns(patterns);
141+
}
138142

139143
// allow disabling copyright files deployment via environment variable
140144
if (getenv("DISABLE_COPYRIGHT_FILES_DEPLOYMENT") != nullptr) {

0 commit comments

Comments
 (0)