fix configure -commercial
Commit 0aad3fc742
broke
"configure -commercial". The license check needs to know where Qt's
source directory is.
Change-Id: I5e53135b6b628eb5e413b2c2b3b8721dae02b503
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Kalle Viironen <kalle.viironen@digia.com>
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
This commit is contained in:
parent
e952f233e6
commit
fa7f446f8f
@ -4187,7 +4187,7 @@ void Configure::readLicense()
|
||||
}
|
||||
#ifdef COMMERCIAL_VERSION
|
||||
else {
|
||||
Tools::checkLicense(dictionary, licenseInfo, firstLicensePath());
|
||||
Tools::checkLicense(dictionary, licenseInfo, firstLicensePath(), sourcePath);
|
||||
if (dictionary["DONE"] != "error") {
|
||||
// give the user some feedback, and prompt for license acceptance
|
||||
cout << endl << "This is the " << dictionary["PLATFORM NAME"] << " " << dictionary["EDITION"] << " Edition."<< endl << endl;
|
||||
|
@ -56,16 +56,16 @@ std::ostream &operator<<(std::ostream &s, const QString &val); // defined in con
|
||||
using namespace std;
|
||||
|
||||
void Tools::checkLicense(QMap<QString,QString> &dictionary, QMap<QString,QString> &licenseInfo,
|
||||
const QString &path)
|
||||
const QString &path, const QString &sourcePath)
|
||||
{
|
||||
QString tpLicense = dictionary["QT_SOURCE_TREE"] + "/LICENSE.PREVIEW.OPENSOURCE";
|
||||
QString tpLicense = sourcePath + "/LICENSE.PREVIEW.OPENSOURCE";
|
||||
if (QFile::exists(tpLicense)) {
|
||||
dictionary["EDITION"] = "Preview";
|
||||
dictionary["LICENSE FILE"] = tpLicense;
|
||||
dictionary["QT_EDITION"] = "QT_EDITION_OPENSOURCE";
|
||||
return; // No license key checking in Tech Preview
|
||||
}
|
||||
tpLicense = dictionary["QT_SOURCE_TREE"] + "/LICENSE.PREVIEW.COMMERCIAL";
|
||||
tpLicense = sourcePath + "/LICENSE.PREVIEW.COMMERCIAL";
|
||||
if (QFile::exists(tpLicense)) {
|
||||
dictionary["EDITION"] = "Preview";
|
||||
dictionary["LICENSE FILE"] = tpLicense;
|
||||
@ -204,7 +204,7 @@ void Tools::checkLicense(QMap<QString,QString> &dictionary, QMap<QString,QString
|
||||
if (dictionary["EDITION"] == "Evaluation")
|
||||
dictionary["LICENSE_EXTENSION"] = "-EVALUATION";
|
||||
|
||||
if (QFile::exists(dictionary["QT_SOURCE_TREE"] + "/.LICENSE")) {
|
||||
if (QFile::exists(sourcePath + "/.LICENSE")) {
|
||||
// Generic, no-suffix license
|
||||
dictionary["LICENSE_EXTENSION"].clear();
|
||||
} else if (dictionary["LICENSE_EXTENSION"].isEmpty()) {
|
||||
@ -220,8 +220,8 @@ void Tools::checkLicense(QMap<QString,QString> &dictionary, QMap<QString,QString
|
||||
}
|
||||
|
||||
// copy one of .LICENSE-*(-US) to LICENSE
|
||||
QString toLicenseFile = dictionary["QT_SOURCE_TREE"] + "/LICENSE";
|
||||
QString fromLicenseFile = dictionary["QT_SOURCE_TREE"] + "/.LICENSE" + dictionary["LICENSE_EXTENSION"];
|
||||
QString toLicenseFile = sourcePath + "/LICENSE";
|
||||
QString fromLicenseFile = sourcePath + "/.LICENSE" + dictionary["LICENSE_EXTENSION"];
|
||||
if (licenseFeatures == 'B' || licenseFeatures == 'G'
|
||||
|| licenseFeatures == 'L' || licenseFeatures == 'Y')
|
||||
fromLicenseFile += "-US";
|
||||
|
@ -51,7 +51,7 @@ class Tools
|
||||
{
|
||||
public:
|
||||
static void checkLicense(QMap<QString,QString> &dictionary, QMap<QString,QString> &licenseInfo,
|
||||
const QString &path);
|
||||
const QString &path, const QString &sourcePath);
|
||||
};
|
||||
|
||||
#endif // _TOOLS_H_
|
||||
|
Loading…
Reference in New Issue
Block a user