From 63660402d8d803b97c676395895c25e550c07f94 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 22 May 2015 15:02:23 +0200 Subject: Run license checker in qmake Check for a valid license not only in configure, but also in qmake. To limit the runtime overhead we cache the day of the last run in a .stash file. This allows us to run licheck only for the top-level qmake call, and only once per day. This requires an updated licheck executable that supports the new check mode. [ChangeLog][Tools][qmake] For commercial builds, qmake now checks for a valid Qt license. This requires setting up a Qt Account (or .qt-license file) on the development machine. Change-Id: I2c2a05a4602cc661560568b76ddf520cb8134769 Reviewed-by: Oswald Buddenhagen --- tools/configure/configureapp.cpp | 5 +++++ tools/configure/tools.cpp | 2 ++ 2 files changed, 7 insertions(+) (limited to 'tools') diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 4d1ce3d113..6bf0646378 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -3463,6 +3463,11 @@ void Configure::generateQConfigPri() configStream << endl << "QT_EDITION = " << dictionary["EDITION"] << endl; + if (dictionary["EDITION"] != "OpenSource" && dictionary["EDITION"] != "Preview") { + configStream << "QT_LICHECK = " << dictionary["LICHECK"] << endl; + configStream << "QT_RELEASE_DATE = " << dictionary["RELEASEDATE"] << endl; + } + if (!dictionary["CFG_SYSROOT"].isEmpty() && dictionary["CFG_GCC_SYSROOT"] == "yes") { configStream << endl << "# sysroot" << endl diff --git a/tools/configure/tools.cpp b/tools/configure/tools.cpp index 83d969ce16..095e798332 100644 --- a/tools/configure/tools.cpp +++ b/tools/configure/tools.cpp @@ -54,6 +54,8 @@ void Tools::checkLicense(QMap &dictionary, return; } + dictionary["LICHECK"] = "licheck.exe"; + const QString licenseChecker = QDir::toNativeSeparators(sourcePath + "/bin/licheck.exe"); -- cgit v1.2.3