summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorTimothée Keller <timothee.keller@qt.io>2024-03-11 13:53:53 +0100
committerTimothée Keller <timothee.keller@qt.io>2024-03-14 02:58:02 +0100
commita88b6bca21498f367908feedf660243eaf1d613d (patch)
tree990906e468dea18150eeaf00efa6f7d549b220e3 /src/tools
parenta30824a9846a67aa0d6207b4dfcbf925ce8d50e9 (diff)
Windeployqt: improve multiple directory warning
The multipleDirs warning was added to avoid surprises related to where windeployqt would deploy files when using binaries from different paths. To do this properly, make the warning message more meaningful, and suppress the warning when the --dir option is specified, i.e. when the user is already explicitly choosing where to deploy. Pick-to: 6.7 6.6 Change-Id: Ie2984f4af740776c568610370d49ad4ff85ffff0 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/windeployqt/main.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/tools/windeployqt/main.cpp b/src/tools/windeployqt/main.cpp
index abee6e13c1..7156fcc612 100644
--- a/src/tools/windeployqt/main.cpp
+++ b/src/tools/windeployqt/main.cpp
@@ -706,13 +706,15 @@ static inline int parseArguments(const QStringList &arguments, QCommandLineParse
for (const QString &library : libraries)
options->binaries.append(path + u'/' + library);
} else {
- if (fi.absolutePath() != options->directory)
+ if (!parser->isSet(dirOption) && fi.absolutePath() != options->directory)
multipleDirs = true;
options->binaries.append(path);
}
}
- if (multipleDirs)
- std::wcerr << "Warning: using binaries from different directories\n";
+ if (multipleDirs) {
+ std::wcerr << "Warning: using binaries from different directories, deploying to following path: "
+ << options->directory << '\n' << "To disable this warning, use the --dir option\n";
+ }
if (options->translationsDirectory.isEmpty())
options->translationsDirectory = options->directory + "/translations"_L1;
return 0;