summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-07-21 14:12:03 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-07-21 12:40:06 +0000
commita15cef268dbfe64e90fe665bc453e46c18f08f59 (patch)
tree5049fa81b6844914a8d7c3aff65988c18ff55259
parent5b9d262e5f411459ecd57bc75f923006856d9a0f (diff)
downloadqttools-a15cef268dbfe64e90fe665bc453e46c18f08f59.tar.gz
windeployqt: Adapt to MSVC 2015.
The name of the runtime libraries changed to VCRUNTIME140[D].DLL. Task-number: QTBUG-47334 Change-Id: Ibe9234e91801730afb2c0015abe94458fe22ba0f Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
-rw-r--r--src/windeployqt/utils.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/windeployqt/utils.cpp b/src/windeployqt/utils.cpp
index e7a755500..20a1829e6 100644
--- a/src/windeployqt/utils.cpp
+++ b/src/windeployqt/utils.cpp
@@ -725,22 +725,25 @@ inline QStringList readImportSections(const ImageNtHeader *ntHeaders, const void
return result;
}
-// Check for MSCV runtime (MSVCP90D.dll/MSVCP90.dll, MSVCP120D.dll/MSVCP120.dll
-// or msvcp120d_app.dll/msvcp120_app.dll).
+// Check for MSCV runtime (MSVCP90D.dll/MSVCP90.dll, MSVCP120D.dll/MSVCP120.dll,
+// VCRUNTIME140D.DLL/VCRUNTIME140.DLL (VS2015) or msvcp120d_app.dll/msvcp120_app.dll).
enum MsvcDebugRuntimeResult { MsvcDebugRuntime, MsvcReleaseRuntime, NoMsvcRuntime };
static inline MsvcDebugRuntimeResult checkMsvcDebugRuntime(const QStringList &dependentLibraries)
{
foreach (const QString &lib, dependentLibraries) {
+ int pos = 0;
if (lib.startsWith(QLatin1String("MSVCR"), Qt::CaseInsensitive)
|| lib.startsWith(QLatin1String("MSVCP"), Qt::CaseInsensitive)) {
- int pos = 5;
- if (lib.at(pos).isDigit()) {
- for (++pos; lib.at(pos).isDigit(); ++pos)
- ;
- return lib.at(pos).toLower() == QLatin1Char('d')
- ? MsvcDebugRuntime : MsvcReleaseRuntime;
- }
+ pos = 5;
+ } else if (lib.startsWith(QLatin1String("VCRUNTIME"), Qt::CaseInsensitive)) {
+ pos = 9;
+ }
+ if (pos && lib.at(pos).isDigit()) {
+ for (++pos; lib.at(pos).isDigit(); ++pos)
+ ;
+ return lib.at(pos).toLower() == QLatin1Char('d')
+ ? MsvcDebugRuntime : MsvcReleaseRuntime;
}
}
return NoMsvcRuntime;