summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2016-09-16 11:27:00 +0200
committerKai Koehne <kai.koehne@qt.io>2016-11-22 08:36:49 +0000
commita9af3c85022994cfe18a05cd92db9fc0b0ad902c (patch)
tree5b34ed26abe2d70cd00514ab71bc1faf759ee3a3 /tools
parente1f0e08e9a290689f2778ffcfafc133f8a1b99cf (diff)
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 <oswald.buddenhagen@qt.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/configure/configureapp.cpp34
-rw-r--r--tools/configure/tools.cpp8
2 files changed, 21 insertions, 21 deletions
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<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 =
@@ -80,6 +73,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