summaryrefslogtreecommitdiffstats
path: root/src/windeployqt/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/windeployqt/main.cpp')
-rw-r--r--src/windeployqt/main.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/windeployqt/main.cpp b/src/windeployqt/main.cpp
index ae27f36ba..4e480bb54 100644
--- a/src/windeployqt/main.cpp
+++ b/src/windeployqt/main.cpp
@@ -283,6 +283,7 @@ struct Options {
bool deployPdb = false;
bool dryRun = false;
bool patchQt = true;
+ bool ignoreLibraryErrors = false;
inline bool isWinRt() const { return platform.testFlag(WinRt); }
};
@@ -372,6 +373,10 @@ static inline int parseArguments(const QStringList &arguments, QCommandLineParse
QStringLiteral("Do not patch the Qt5Core library."));
parser->addOption(noPatchQtOption);
+ QCommandLineOption ignoreErrorOption(QStringLiteral("ignore-library-errors"),
+ QStringLiteral("Ignore errors when libraries cannot be found."));
+ parser->addOption(ignoreErrorOption);
+
QCommandLineOption noPluginsOption(QStringLiteral("no-plugins"),
QStringLiteral("Skip plugin deployment."));
parser->addOption(noPluginsOption);
@@ -553,6 +558,7 @@ static inline int parseArguments(const QStringList &arguments, QCommandLineParse
}
options->patchQt = !parser->isSet(noPatchQtOption);
+ options->ignoreLibraryErrors = parser->isSet(ignoreErrorOption);
for (int i = 0; i < qtModulesCount; ++i) {
if (parser->isSet(*enabledModuleOptions.at(i)))
@@ -1202,9 +1208,15 @@ static inline QString qtlibInfixFromCoreLibName(const QString &path, bool isDebu
static bool updateLibrary(const QString &sourceFileName, const QString &targetDirectory,
const Options &options, QString *errorMessage)
{
-
- if (!updateFile(sourceFileName, targetDirectory, options.updateFileFlags, options.json, errorMessage))
+ if (!updateFile(sourceFileName, targetDirectory, options.updateFileFlags, options.json, errorMessage)) {
+ if (options.ignoreLibraryErrors) {
+ std::wcerr << "Warning: Could not update " << sourceFileName << " :" << *errorMessage << '\n';
+ errorMessage->clear();
+ return true;
+ }
return false;
+ }
+
if (options.deployPdb) {
const QFileInfo pdb(pdbFileName(sourceFileName));
if (pdb.isFile())