From f17765b34f8da13734d64f8188cde535bc488998 Mon Sep 17 00:00:00 2001 From: Daniel Nicoletti Date: Wed, 19 Jun 2024 09:31:01 -0300 Subject: [PATCH] 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 --- src/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 9f0ca45..8614efd 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -37,6 +37,9 @@ int main(const int argc, const char *const *const argv) { args::HelpFlag help(parser, "help", "Display this help text", {'h', "help"}); args::ValueFlag appDirPath(parser, "appdir path", "Path to an existing AppDir", {"appdir"}); + args::ValueFlagList excludeLibraryPatterns(parser, "pattern", + "Shared library to exclude from deployment (glob pattern)", + {"exclude-library"}); args::ValueFlagList extraModules(parser, "module", "Extra Qt module to deploy (specified by name, filename or path)", {'m', "extra-module"}); @@ -135,6 +138,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) {