Skip to content

Commit

Permalink
Add --exclude-library option to standalone version
Browse files Browse the repository at this point in the history
It would be useful to have the standalone version also
able to exclude-libraries, this helps with issues:

 #153
 #150
 #110
 #108
  • Loading branch information
dantti committed Jun 19, 2024
1 parent bcd597c commit a1cd6fc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ int main(const int argc, const char *const *const argv) {
args::HelpFlag help(parser, "help", "Display this help text", {'h', "help"});

args::ValueFlag<fs::path> appDirPath(parser, "appdir path", "Path to an existing AppDir", {"appdir"});
args::ValueFlagList<std::string> excludeLibraryPatterns(parser, "pattern", "Shared library to exclude from deployment (glob pattern)", {"exclude-library"});
args::ValueFlagList<std::string> extraPlugins(parser, "plugin",
"Extra Qt plugin to deploy (specified by name, filename or path)",
{'p', "extra-plugin"});
Expand Down Expand Up @@ -135,6 +136,9 @@ int main(const int argc, const char *const *const argv) {
ldLog() << std::endl << "Using Qt version: " << qtVersion << " (" << qtMajorVersion << ")" << std::endl;

appdir::AppDir appDir(appDirPath.Get());
if (const auto patterns = excludeLibraryPatterns.Get(); !patterns.empty()) {
appDir.setExcludeLibraryPatterns(patterns);
}

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

0 comments on commit a1cd6fc

Please sign in to comment.