diff options
author | Andy Shaw <andy.shaw@qt.io> | 2021-08-03 12:13:30 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-08-06 08:15:25 +0000 |
commit | 63dc93cbba6ba00a7451de5bd783862904e64ce2 (patch) | |
tree | 819bea529ac4dc73ada840543815034985d5a83e | |
parent | 9cbf3f5e4a106b497c6d9d2a201b6b35b1108630 (diff) | |
download | qttools-63dc93cbba6ba00a7451de5bd783862904e64ce2.tar.gz |
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.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/windeployqt/main.cpp b/src/windeployqt/main.cpp index d98e454fa..be03ae45b 100644 --- a/src/windeployqt/main.cpp +++ b/src/windeployqt/main.cpp @@ -1334,7 +1334,18 @@ static DeployResult deploy(const Options &options, const QString icuVersion = icuLibs.front().mid(index, numberExpression.matchedLength()); 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); |