diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-06-15 14:51:21 +0200 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@theqtcompany.com> | 2015-06-15 14:49:18 +0000 |
commit | e1b97bb31a685b1d98d26046c4129f2bf6903af0 (patch) | |
tree | 2065ad8439845e2a976123067bb800be0de1bf60 | |
parent | d7f40baf8866eeb9840608b43bd84e27818824af (diff) |
windeployqt: Fix MSVC debug/release detection for WinRT.v5.5.0-rc1v5.5.0
Change 6c8954b07807e31dbc8967ba6d92d4d022073087 caused WinRT modules
to be detected as release always since the runtime libraries there are
called msvcp120d_app.dll / msvcp120_app.dll. Change the algorithm
to check on the first character after the version number.
Change-Id: I7eb645e9b94f21dd8daaf24f59009cc9c6f18c4c
Task-number: QTBUG-46629
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
-rw-r--r-- | src/windeployqt/utils.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/windeployqt/utils.cpp b/src/windeployqt/utils.cpp index a331bac9e..e7a755500 100644 --- a/src/windeployqt/utils.cpp +++ b/src/windeployqt/utils.cpp @@ -725,7 +725,8 @@ inline QStringList readImportSections(const ImageNtHeader *ntHeaders, const void return result; } -// Check for MSCV runtime (MSVCP120D.dll/MSVCP120.dll). +// Check for MSCV runtime (MSVCP90D.dll/MSVCP90.dll, MSVCP120D.dll/MSVCP120.dll +// or msvcp120d_app.dll/msvcp120_app.dll). enum MsvcDebugRuntimeResult { MsvcDebugRuntime, MsvcReleaseRuntime, NoMsvcRuntime }; static inline MsvcDebugRuntimeResult checkMsvcDebugRuntime(const QStringList &dependentLibraries) @@ -733,8 +734,13 @@ static inline MsvcDebugRuntimeResult checkMsvcDebugRuntime(const QStringList &de foreach (const QString &lib, dependentLibraries) { if (lib.startsWith(QLatin1String("MSVCR"), Qt::CaseInsensitive) || lib.startsWith(QLatin1String("MSVCP"), Qt::CaseInsensitive)) { - return lib.endsWith(QLatin1String("D.dll"), Qt::CaseInsensitive) - ? MsvcDebugRuntime : MsvcReleaseRuntime; + int pos = 5; + if (lib.at(pos).isDigit()) { + for (++pos; lib.at(pos).isDigit(); ++pos) + ; + return lib.at(pos).toLower() == QLatin1Char('d') + ? MsvcDebugRuntime : MsvcReleaseRuntime; + } } } return NoMsvcRuntime; |