From 602cd6c8f6fb9c8ed21786bb08c56c81a40203af Mon Sep 17 00:00:00 2001 From: Arttu Tarkiainen Date: Tue, 17 Nov 2020 13:26:25 +0200 Subject: Set "FrameworkVersion" installer value This makes it possible to query for the Installer Framework version of the running installer binary from the scripting-API. Change-Id: I88fd12d081aa720cbe95683ee35714e5e2d4908b Reviewed-by: Katja Marttila --- src/sdk/sdkapp.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sdk/sdkapp.h b/src/sdk/sdkapp.h index 3a32d0336..9c9e01f95 100644 --- a/src/sdk/sdkapp.h +++ b/src/sdk/sdkapp.h @@ -57,6 +57,9 @@ #include #include +#define QUOTE_(x) #x +#define QUOTE(x) QUOTE_(x) + template class SDKApp : public T { @@ -196,6 +199,8 @@ public: QUuid::createUuid().toString(), QUuid::createUuid().toString(), QInstaller::Protocol::Mode::Production, userArgs, isCommandLineInterface); } + // Set this for convenience usage with the installer JS object + m_core->setValue(QLatin1String("FrameworkVersion"), QLatin1String(QUOTE(IFW_VERSION_STR))); // From Qt5.8 onwards system proxy is used by default. If Qt is built with // QT_USE_SYSTEM_PROXIES false then system proxies are not used by default. -- cgit v1.2.3