diff options
author | Liang Qi <liang.qi@qt.io> | 2016-11-23 07:12:07 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-11-23 09:24:36 +0100 |
commit | 38c1057f696c4e3f168305091413428d99007c43 (patch) | |
tree | 49c3ef009cc723151298bfc9eef85bb6fa5910be /tools | |
parent | 48d7db6b3119ee27d9ae6b1bd0fdb24333f44756 (diff) | |
parent | e2b856d56290e9b3eaaf889b3e0a08badbaa6046 (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
This also reverts commit 0d2f0164f45cb626c40a7c95026ba00fa56ac249.
Conflicts:
header.BSD-NEW
qmake/Makefile.win32
src/openglextensions/qopenglextensions.cpp
src/openglextensions/qopenglextensions.h
src/winmain/qtmain_win.cpp
src/winmain/qtmain_winrt.cpp
tools/configure/configureapp.cpp
util/glgen/qopenglextensions.cpp.header
util/glgen/qopenglextensions.h.header
Change-Id: If26c6f4111b342378dd88bbdc657e322d2ab6ad8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/configure/configureapp.cpp | 37 | ||||
-rw-r--r-- | tools/configure/environment.cpp | 6 | ||||
-rw-r--r-- | tools/configure/environment.h | 3 | ||||
-rw-r--r-- | tools/configure/tools.cpp | 8 |
4 files changed, 31 insertions, 23 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 4639709602..1800bfc873 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -1409,7 +1409,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++"))) { @@ -4462,11 +4463,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 showGpl2 = true; QString licenseFile = orgLicenseFile; QString theLicense; @@ -4576,21 +4572,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/environment.cpp b/tools/configure/environment.cpp index 8f18f3c489..1df8be38af 100644 --- a/tools/configure/environment.cpp +++ b/tools/configure/environment.cpp @@ -69,6 +69,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}, }; @@ -94,6 +95,9 @@ QString Environment::detectQMakeSpec() { QString spec; switch (detectCompiler()) { + case CC_MSVC2017: + spec = "win32-msvc2017"; + break; case CC_MSVC2015: spec = "win32-msvc2015"; break; @@ -121,6 +125,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 344404505e..04b42f45ff 100644 --- a/tools/configure/environment.h +++ b/tools/configure/environment.h @@ -41,7 +41,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 |