From 63dc93cbba6ba00a7451de5bd783862904e64ce2 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Tue, 3 Aug 2021 12:13:30 +0200 Subject: windeployqt: Account for debug version of ICU library when deploying MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 (cherry picked from commit 8c6f62b9c26f6fb42fff185e702d365ab18bd1c5) Reviewed-by: Qt Cherry-pick Bot --- src/windeployqt/main.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3