From 4853be33e29654304af4209b38137541068c1662 Mon Sep 17 00:00:00 2001 From: kh Date: Tue, 25 Nov 2014 16:18:26 +0100 Subject: Add possibility to specify a control script. Right now we support control scripts just as command line argument, but now we can also bundle it in the binary as well. This helps e.g. with running scripts during uninstallation, enables the possibility to modify the introduction page or enables headless installer builds. Task-number: QTIFW-495 Task-number: QTIFW-166 Change-Id: I6fee6a55db78ed28b1eeb8257a4febaa2703c04e Reviewed-by: Leena Miettinen Reviewed-by: Kai Koehne --- src/sdk/installerbase.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/sdk/installerbase.cpp') diff --git a/src/sdk/installerbase.cpp b/src/sdk/installerbase.cpp index 6253f3e25..7eb816a1a 100644 --- a/src/sdk/installerbase.cpp +++ b/src/sdk/installerbase.cpp @@ -141,6 +141,9 @@ int InstallerBase::run() controlScript = parser.value(QLatin1String(CommandLineOptions::Script)); if (!QFileInfo(controlScript).exists()) throw QInstaller::Error(QLatin1String("Script file does not exist.")); + } else if (!m_core->settings().controlScript().isEmpty()) { + controlScript = QLatin1String(":/metadata/installer-config/") + + m_core->settings().controlScript(); } if (parser.isSet(QLatin1String(CommandLineOptions::Proxy))) { -- cgit v1.2.3