summaryrefslogtreecommitdiffstats
path: root/src/sdk/installerbase.cpp
diff options
context:
space:
mode:
authorkh <karsten.heimrich@theqtcompany.com>2014-11-25 16:18:26 +0100
committerKai Koehne <kai.koehne@theqtcompany.com>2014-12-10 08:54:18 +0100
commit4853be33e29654304af4209b38137541068c1662 (patch)
tree71ea26e92db160ecdffc0bcc8b8c621bab9a4cf4 /src/sdk/installerbase.cpp
parent7c2d08ca09875224ee7dca480d91a07bcc7719a6 (diff)
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 <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Diffstat (limited to 'src/sdk/installerbase.cpp')
-rw-r--r--src/sdk/installerbase.cpp3
1 files changed, 3 insertions, 0 deletions
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))) {