summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2009-04-06 10:23:50 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-04-06 10:23:50 (GMT)
commit6d1ba5590c99ad92de75ecd8bc9921921123d809 (patch)
tree9a6d48d0852bb5a67eb208412fb78c7730e449ef /tools
parentb67938a45ae548de42773a735d9284848ac46d88 (diff)
parentd071b3528f51aaded18029f2f22e8db03e47a2a6 (diff)
downloadQt-6d1ba5590c99ad92de75ecd8bc9921921123d809.zip
Qt-6d1ba5590c99ad92de75ecd8bc9921921123d809.tar.gz
Qt-6d1ba5590c99ad92de75ecd8bc9921921123d809.tar.bz2
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'tools')
-rw-r--r--tools/configure/tools.cpp35
1 files changed, 14 insertions, 21 deletions
diff --git a/tools/configure/tools.cpp b/tools/configure/tools.cpp
index 5d12ea5..760c101 100644
--- a/tools/configure/tools.cpp
+++ b/tools/configure/tools.cpp
@@ -142,25 +142,28 @@ void Tools::checkLicense(QMap<QString,QString> &dictionary, QMap<QString,QString
dictionary["EDITION"] = "GUIFramework";
dictionary["QT_EDITION"] = "QT_EDITION_DESKTOPLIGHT";
}
+
+ if (platforms == 'X') {
+ dictionary["LICENSE_EXTENSION"] = "-ALLOS";
+ } else if (strchr("3679ACDEHJKMSUWX", platforms)) {
+ dictionary["LICENSE_EXTENSION"] = "-EMBEDDED";
+ } else if (strchr("4BFPQRTY", platforms)) {
+ dictionary["LICENSE_EXTENSION"] = "-DESKTOP";
+ }
} else if (strcmp(licenseSchema,"Z4M") == 0 || strcmp(licenseSchema,"R4M") == 0 || strcmp(licenseSchema,"Q4M") == 0) {
if (products == 'B') {
dictionary["EDITION"] = "Evaluation";
dictionary["QT_EDITION"] = "QT_EDITION_EVALUATION";
+ dictionary["LICENSE_EXTENSION"] = "-EVALUATION";
}
}
- // Determine license extension -----------------------------------------------------------------
if (QFile::exists(dictionary["QT_SOURCE_TREE"] + "/.LICENSE")) {
// Generic, no-suffix license
dictionary["LICENSE_EXTENSION"] = QString();
- } else if (platforms == 'X') {
- dictionary["LICENSE_EXTENSION"] = "-ALLOS";
- } else if (/*Windows CE */platforms == '6' || /*Embedded */ platforms == '8' || /*Embedded + Windows CE*/platforms == 'K' || /*Windows + Windows CE*/ platforms == 'H') {
- dictionary["LICENSE_EXTENSION"] = "-EMBEDDED";
- } else if (/*Windows*/ platforms == 'R' || /*Mac+X11+Windows*/ platforms == 'F') {
- dictionary["LICENSE_EXTENSION"] = "-DESKTOP";
- } else if (dictionary["EDITION"] == "Evaluation") {
- dictionary["LICENSE_EXTENSION"] = "-EVALUATION";
+ } else if (dictionary["LICENSE_EXTENSION"].isEmpty()) {
+ cout << "License file does not contain proper license key." << endl;
+ dictionary["DONE"] = "error";
}
if (licenseType.isEmpty()
|| dictionary["EDITION"].isEmpty()
@@ -170,19 +173,9 @@ void Tools::checkLicense(QMap<QString,QString> &dictionary, QMap<QString,QString
return;
}
- // verify that we are licensed to use Qt for Windows
if (dictionary["PLATFORM NAME"].contains("Windows CE")) {
- // verify that we are licensed to use Qt for Windows AND Qt for Windows CE
- if (platforms != 'H') {
- cout << "You are not licensed for the " << dictionary["PLATFORM NAME"] << " platform." << endl << endl;
- cout << "Please contact sales@trolltech.com to upgrade your license" << endl;
- cout << "to include the " << dictionary["PLATFORM NAME"] << " platform, or install the" << endl;
- cout << "Qt Open Source Edition if you intend to develop free software." << endl;
- dictionary["DONE"] = "error";
- return;
- }
- } else {
- if (!( platforms == 'R' || ( platforms == '6' )|| platforms == '8' )) {
+ // verify that we are licensed to use Qt for Windows CE
+ if (dictionary["LICENSE_EXTENSION"] != "-EMBEDDED" && dictionary["LICENSE_EXTENSION"] != "-ALLOS") {
cout << "You are not licensed for the " << dictionary["PLATFORM NAME"] << " platform." << endl << endl;
cout << "Please contact sales@trolltech.com to upgrade your license" << endl;
cout << "to include the " << dictionary["PLATFORM NAME"] << " platform, or install the" << endl;