From 38675e18fcc841228141568a2ecfafdeb99eba2a Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Thu, 17 Nov 2016 10:40:44 +0100 Subject: Add support for Visual Studio 2017 Tested with RC Task-number: QTBUG-57086 Change-Id: I21f56edca3852b52edd2c5fdcce76817141e8d4a Reviewed-by: Friedemann Kleint --- tools/configure/configureapp.cpp | 3 ++- tools/configure/environment.cpp | 6 ++++++ tools/configure/environment.h | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 88dcd8170b..a908db0707 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -1458,7 +1458,8 @@ void Configure::parseCmdLine() dictionary[ "QMAKESPEC" ].endsWith("-msvc2010") || dictionary[ "QMAKESPEC" ].endsWith("-msvc2012") || dictionary[ "QMAKESPEC" ].endsWith("-msvc2013") || - dictionary[ "QMAKESPEC" ].endsWith("-msvc2015")) { + dictionary[ "QMAKESPEC" ].endsWith("-msvc2015") || + dictionary[ "QMAKESPEC" ].endsWith("-msvc2017")) { if (dictionary[ "MAKE" ].isEmpty()) dictionary[ "MAKE" ] = "nmake"; dictionary[ "QMAKEMAKEFILE" ] = "Makefile.win32"; } else if (dictionary[ "QMAKESPEC" ] == QString("win32-g++")) { diff --git a/tools/configure/environment.cpp b/tools/configure/environment.cpp index 153a141d7a..f950945597 100644 --- a/tools/configure/environment.cpp +++ b/tools/configure/environment.cpp @@ -76,6 +76,7 @@ struct CompilerInfo{ {CC_MSVC2013, "Microsoft (R) Visual Studio 2013 C/C++ Compiler (12.0)", "Software\\Microsoft\\VisualStudio\\SxS\\VC7\\12.0", "cl.exe"}, // link.exe, lib.exe // Microsoft skipped version 13 {CC_MSVC2015, "Microsoft (R) Visual Studio 2015 C/C++ Compiler (14.0)", "Software\\Microsoft\\VisualStudio\\SxS\\VS7\\14.0", "cl.exe"}, // link.exe, lib.exe + {CC_MSVC2017, "Microsoft (R) Visual Studio 2017 C/C++ Compiler (15.0)", "Software\\Microsoft\\VisualStudio\\SxS\\VS7\\15.0", "cl.exe"}, // link.exe, lib.exe {CC_UNKNOWN, "Unknown", 0, 0}, }; @@ -101,6 +102,9 @@ QString Environment::detectQMakeSpec() { QString spec; switch (detectCompiler()) { + case CC_MSVC2017: + spec = "win32-msvc2017"; + break; case CC_MSVC2015: spec = "win32-msvc2015"; break; @@ -137,6 +141,8 @@ QString Environment::detectQMakeSpec() Compiler Environment::compilerFromQMakeSpec(const QString &qmakeSpec) { + if (qmakeSpec == QLatin1String("win32-msvc2017")) + return CC_MSVC2017; if (qmakeSpec == QLatin1String("win32-msvc2015")) return CC_MSVC2015; if (qmakeSpec == QLatin1String("win32-msvc2013")) diff --git a/tools/configure/environment.h b/tools/configure/environment.h index d096782e70..6b0e9bb9fe 100644 --- a/tools/configure/environment.h +++ b/tools/configure/environment.h @@ -46,7 +46,8 @@ enum Compiler { CC_MSVC2010 = 0xA0, CC_MSVC2012 = 0xB0, CC_MSVC2013 = 0xC0, - CC_MSVC2015 = 0xD0 + CC_MSVC2015 = 0xD0, + CC_MSVC2017 = 0xE0 }; struct CompilerInfo; -- cgit v1.2.3 From a9af3c85022994cfe18a05cd92db9fc0b0ad902c Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 16 Sep 2016 11:27:00 +0200 Subject: win: Show Tech Preview license Show the tech preview license for commercial users if -confirm-license is not set. This matches what the configure shell script is doing, too. Task-number: QTBUG-55676 Change-Id: I69f5553ab53dfcdc14c200e682c024a6cebee8fe Reviewed-by: Oswald Buddenhagen --- tools/configure/configureapp.cpp | 34 ++++++++++++++++++++-------------- tools/configure/tools.cpp | 8 +------- 2 files changed, 21 insertions(+), 21 deletions(-) (limited to 'tools') diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index a908db0707..2b7a1d6b07 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -4550,11 +4550,6 @@ Configure::ProjectType Configure::projectType(const QString& proFileName) bool Configure::showLicense(QString orgLicenseFile) { - if (dictionary["LICENSE_CONFIRMED"] == "yes") { - cout << "You have already accepted the terms of the license." << endl << endl; - return true; - } - bool showLgpl2 = true; QString licenseFile = orgLicenseFile; QString theLicense; @@ -4665,21 +4660,32 @@ void Configure::readLicense() } } if (hasOpenSource && openSource) { - cout << endl << "This is the " << dictionary["PLATFORM NAME"] << " Open Source Edition." << endl; + cout << endl << "This is the " << dictionary["PLATFORM NAME"] << " Open Source Edition." << endl << endl; dictionary["LICENSEE"] = "Open Source"; dictionary["EDITION"] = "OpenSource"; - cout << endl; - if (!showLicense(dictionary["LICENSE FILE"])) { - cout << "Configuration aborted since license was not accepted"; - dictionary["DONE"] = "error"; - return; - } } else if (openSource) { cout << endl << "Cannot find the GPL license files! Please download the Open Source version of the library." << endl; dictionary["DONE"] = "error"; + } else { + QString tpLicense = sourcePath + "/LICENSE.PREVIEW.COMMERCIAL"; + if (QFile::exists(tpLicense)) { + cout << endl << "This is the Qt Preview Edition." << endl << endl; + + dictionary["EDITION"] = "Preview"; + dictionary["LICENSE FILE"] = tpLicense; + } else { + Tools::checkLicense(dictionary, sourcePath, buildPath); + } } - else { - Tools::checkLicense(dictionary, sourcePath, buildPath); + + if (dictionary["LICENSE_CONFIRMED"] != "yes") { + if (!showLicense(dictionary["LICENSE FILE"])) { + cout << "Configuration aborted since license was not accepted" << endl; + dictionary["DONE"] = "error"; + return; + } + } else if (dictionary["LICHECK"].isEmpty()) { // licheck executable shows license + cout << "You have already accepted the terms of the license." << endl << endl; } } diff --git a/tools/configure/tools.cpp b/tools/configure/tools.cpp index 095e798332..02c74282cd 100644 --- a/tools/configure/tools.cpp +++ b/tools/configure/tools.cpp @@ -47,13 +47,6 @@ using namespace std; void Tools::checkLicense(QMap &dictionary, const QString &sourcePath, const QString &buildPath) { - QString tpLicense = sourcePath + "/LICENSE.PREVIEW.COMMERCIAL"; - if (QFile::exists(tpLicense)) { - dictionary["EDITION"] = "Preview"; - dictionary["LICENSE FILE"] = tpLicense; - return; - } - dictionary["LICHECK"] = "licheck.exe"; const QString licenseChecker = @@ -80,6 +73,7 @@ void Tools::checkLicense(QMap &dictionary, } else { foreach (const QString &var, licheckOutput.split('\n')) dictionary[var.section('=', 0, 0).toUpper()] = var.section('=', 1, 1); + dictionary["LICENSE_CONFIRMED"] = "yes"; } } else { cout << endl << "Error: Could not find licheck.exe" << endl -- cgit v1.2.3