diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-10-10 15:40:52 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-10-11 08:00:38 +0000 |
commit | c7a44cfb5b243028bfe187715297c6deb2c09ffa (patch) | |
tree | 9ef36f36d08bcc4c6ad60bd0889b7c8071564987 /src | |
parent | f0da7c856f667bb116b6dec0e0c16f3038af3b5e (diff) | |
download | qttools-c7a44cfb5b243028bfe187715297c6deb2c09ffa.tar.gz |
windeployqt: Do not use debug redistributable files from "onecore" on Windows 7
They require Windows 10.
Amends 061e1a8bbe5fb05b8f85811d55e805f54327d1d6.
Task-number: QTBUG-63676
Change-Id: I32d94bf3d52616fc0d5c861a6a7444d8b8e61cdf
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/windeployqt/main.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/windeployqt/main.cpp b/src/windeployqt/main.cpp index 69ab76441..5f6340d3b 100644 --- a/src/windeployqt/main.cpp +++ b/src/windeployqt/main.cpp @@ -37,6 +37,7 @@ #include <QtCore/QJsonArray> #include <QtCore/QCommandLineParser> #include <QtCore/QCommandLineOption> +#include <QtCore/QOperatingSystemVersion> #include <QtCore/QSharedPointer> #include <QtCore/QVector> @@ -1047,13 +1048,16 @@ static QString vcRedistDir() // Look in reverse order for folder containing the debug redist folder const QFileInfoList subDirs = QDir(vc2017RedistDirName).entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name | QDir::Reversed); + const bool isWindows10 = QOperatingSystemVersion::current() >= QOperatingSystemVersion::Windows10; for (const QFileInfo &f : subDirs) { QString path = f.absoluteFilePath(); if (QFileInfo(path + slash + vcDebugRedistDir()).isDir()) return path; - path += QStringLiteral("/onecore"); - if (QFileInfo(path + slash + vcDebugRedistDir()).isDir()) - return path; + if (isWindows10) { + path += QStringLiteral("/onecore"); + if (QFileInfo(path + slash + vcDebugRedistDir()).isDir()) + return path; + } } std::wcerr << "Warning: Cannot find Visual Studio redist directory under " << QDir::toNativeSeparators(vc2017RedistDirName).toStdWString() << ".\n"; |