summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2021-08-03 12:13:30 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-08-06 07:15:25 +0000
commit45bfc094ec1967c2de8c1e2b9c9af07f6279f06d (patch)
tree8bc9594065ff4b7b147f694ce2191a5e3049de13
parentc35fa560e0897ce4896b1e8965d3d2cc5c96dd70 (diff)
windeployqt: Account for debug version of ICU library when deploying
If windeployqt is deploying the debug version of the libraries and the used ICU package contains debug versions of ICU libraries then the debug version of icudt should be included as well. Fixes: QTBUG-87677 Change-Id: I43266f9d65feacfd22c26de1008976bda001b481 Reviewed-by: André de la Rocha <andre.rocha@qt.io> (cherry picked from commit 8c6f62b9c26f6fb42fff185e702d365ab18bd1c5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/windeployqt/main.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/windeployqt/main.cpp b/src/windeployqt/main.cpp
index f7741f4aa..7b3cb82e6 100644
--- a/src/windeployqt/main.cpp
+++ b/src/windeployqt/main.cpp
@@ -1315,7 +1315,18 @@ static DeployResult deploy(const Options &options,
if (!icuVersion.isEmpty()) {
if (optVerboseLevel > 1)
std::wcout << "Adding ICU version " << icuVersion << '\n';
- icuLibs.push_back(QStringLiteral("icudt") + icuVersion + QLatin1String(windowsSharedLibrarySuffix));
+ QString icuLib = QStringLiteral("icudt") + icuVersion
+ + QLatin1String(windowsSharedLibrarySuffix);;
+ // Some packages contain debug dlls of ICU libraries even though it's a C
+ // library and the official packages do not differentiate (QTBUG-87677)
+ if (result.isDebug) {
+ const QString icuLibCandidate = QStringLiteral("icudtd") + icuVersion
+ + QLatin1String(windowsSharedLibrarySuffix);
+ if (!findInPath(icuLibCandidate).isEmpty()) {
+ icuLib = icuLibCandidate;
+ }
+ }
+ icuLibs.push_back(icuLib);
}
for (const QString &icuLib : qAsConst(icuLibs)) {
const QString icuPath = findInPath(icuLib);