Commit 4c29f5fc authored by Friedemann Kleint's avatar Friedemann Kleint

Add support for Visual Studio 15.0 (MSVC2017)

Extend ABI by flavor and add look-up.

As with each major update, rewrite the the MSVC toolchain
autodetection.
Previously, the detection looped over the entries in "VC" registry
section and checked in the "VS" section whether a valid installation
belonged to the entry. MSVC2017 no longer has an entry in the "VC"
section.
Introduce a struct describing the installation including version
number and rewrite the loop to run over the "VS" section and retrieve
the VC path from the "VC" section only for versions <= 14.0.
Also, the various .bat files for the target architecture are
now in a single folder instead of spread around various bin/XXX
subfolders. Introduce an array of structs for the platform that
has the prefix and .bat name and uses the prefix only for
versions <= 14.0.

Task-number: QTBUG-57086
Change-Id: I947edd885c0a379f196440041c07d60cd4244d9c
Reviewed-by: Eike Ziller's avatarEike Ziller <eike.ziller@qt.io>
Reviewed-by: Joerg Bornemann's avatarJoerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: David Schulz's avatarDavid Schulz <david.schulz@qt.io>
Reviewed-by: Tobias Hunger's avatarTobias Hunger <tobias.hunger@qt.io>
parent e7d6f8e5
......@@ -695,6 +695,8 @@ QString Abi::toString(const OSFlavor &of)
return QLatin1String("msvc2013");
case Abi::WindowsMsvc2015Flavor:
return QLatin1String("msvc2015");
case Abi::WindowsMsvc2017Flavor:
return QLatin1String("msvc2017");
case Abi::WindowsMSysFlavor:
return QLatin1String("msys");
case Abi::WindowsCEFlavor:
......
......@@ -85,6 +85,7 @@ public:
WindowsMsvc2012Flavor,
WindowsMsvc2013Flavor,
WindowsMsvc2015Flavor,
WindowsMsvc2017Flavor,
WindowsMSysFlavor,
WindowsCEFlavor,
......
......@@ -30,6 +30,7 @@
#include "toolchainconfigwidget.h"
QT_FORWARD_DECLARE_CLASS(QLabel)
QT_FORWARD_DECLARE_CLASS(QVersionNumber)
namespace ProjectExplorer {
namespace Internal {
......@@ -133,9 +134,8 @@ public:
ToolChain *restore(const QVariantMap &data) override;
ToolChainConfigWidget *configurationWidget(ToolChain *);
static QString vcVarsBatFor(const QString &basePath, MsvcToolChain::Platform platform);
private:
static bool checkForVisualStudioInstallation(const QString &vsName);
static QString vcVarsBatFor(const QString &basePath, MsvcToolChain::Platform platform,
const QVersionNumber &v);
};
// --------------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment