diff options
author | Liang Qi <liang.qi@qt.io> | 2016-11-24 09:09:01 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-11-24 10:31:21 +0100 |
commit | 4783de0473a288fdff7e5354c12315ba025ec7e0 (patch) | |
tree | 1dbd12129b4677c5a02307c1046fdb8cff056324 /tools/configure | |
parent | 60054b5940b19f4dd9780e63da1e2dce45baf131 (diff) | |
parent | 38c1057f696c4e3f168305091413428d99007c43 (diff) |
Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
src/network/socket/qnativesocketengine_winrt.cpp
tools/configure/configureapp.cpp
tools/configure/environment.cpp
Change-Id: Ieae6f2ee004a87f041751852b687484f91ee4480
Diffstat (limited to 'tools/configure')
-rw-r--r-- | tools/configure/configureapp.cpp | 38 | ||||
-rw-r--r-- | tools/configure/environment.cpp | 4 | ||||
-rw-r--r-- | tools/configure/environment.h | 3 | ||||
-rw-r--r-- | tools/configure/tools.cpp | 8 |
4 files changed, 30 insertions, 23 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 2e6ee2a681..841aa66b8f 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -453,7 +453,8 @@ void Configure::parseCmdLine() if (dictionary[ "QMAKESPEC" ].endsWith("-icc") || 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" ].startsWith(QLatin1String("win32-g++"))) { @@ -942,11 +943,6 @@ void Configure::configure() 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 showGpl2 = true; QString licenseFile = orgLicenseFile; QString theLicense; @@ -1057,23 +1053,35 @@ 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"; return; + } 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; } + if (dictionary["BUILDTYPE"] == "none") { if (openSource) configCmdLine << "-opensource"; diff --git a/tools/configure/environment.cpp b/tools/configure/environment.cpp index 17f44c12f7..e585b16ea7 100644 --- a/tools/configure/environment.cpp +++ b/tools/configure/environment.cpp @@ -68,6 +68,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}, }; @@ -93,6 +94,9 @@ QString Environment::detectQMakeSpec() { QString spec; switch (detectCompiler()) { + case CC_MSVC2017: + spec = "win32-msvc2017"; + break; case CC_MSVC2015: spec = "win32-msvc2015"; break; diff --git a/tools/configure/environment.h b/tools/configure/environment.h index 2ab5b00d1c..aa8e7fd8bc 100644 --- a/tools/configure/environment.h +++ b/tools/configure/environment.h @@ -40,7 +40,8 @@ enum Compiler { CC_MSVC2010 = 0xA0, CC_MSVC2012 = 0xB0, CC_MSVC2013 = 0xC0, - CC_MSVC2015 = 0xD0 + CC_MSVC2015 = 0xD0, + CC_MSVC2017 = 0xE0 }; struct CompilerInfo; diff --git a/tools/configure/tools.cpp b/tools/configure/tools.cpp index fb80e2136b..5ba7125975 100644 --- a/tools/configure/tools.cpp +++ b/tools/configure/tools.cpp @@ -42,13 +42,6 @@ using namespace std; void Tools::checkLicense(QMap<QString,QString> &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 = @@ -75,6 +68,7 @@ void Tools::checkLicense(QMap<QString,QString> &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 |