Skip to content

Commit 324d734

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: linuxdeploy#153 linuxdeploy#150 linuxdeploy#110 linuxdeploy#108
1 parent 0a29e02 commit 324d734

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -37,6 +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> excludeLibraryPatterns(parser, "pattern",
41+
"Shared library to exclude from deployment (glob pattern)",
42+
{"exclude-library"});
4043
args::ValueFlagList<std::string> extraModules(parser, "module",
4144
"Extra Qt module to deploy (specified by name, filename or path)",
4245
{'m', "extra-module"});
@@ -135,6 +138,9 @@ int main(const int argc, const char *const *const argv) {
135138
ldLog() << std::endl << "Using Qt version: " << qtVersion << " (" << qtMajorVersion << ")" << std::endl;
136139

137140
appdir::AppDir appDir(appDirPath.Get());
141+
if (const auto patterns = excludeLibraryPatterns.Get(); !patterns.empty()) {
142+
appDir.setExcludeLibraryPatterns(patterns);
143+
}
138144

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

0 commit comments

Comments
 (0)