summaryrefslogtreecommitdiffstats
path: root/installerbuilder/libinstaller/qinstallercomponent.cpp
diff options
context:
space:
mode:
authorTim Jenssen <tim.jenssen@nokia.com>2011-03-15 18:17:20 +0100
committerTim Jenssen <tim.jenssen@nokia.com>2011-03-15 18:17:20 +0100
commitabbee7b0ec2e1fbc676b31949320b35a4c6620c7 (patch)
tree20c0a840e04fd256ccf1d0889350f37bfbdf564b /installerbuilder/libinstaller/qinstallercomponent.cpp
parentd2c8d9f6f6f672a07df110c54ca992f8322b3bce (diff)
load the component scripts with help of new variable localTempPath
Diffstat (limited to 'installerbuilder/libinstaller/qinstallercomponent.cpp')
-rw-r--r--installerbuilder/libinstaller/qinstallercomponent.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/installerbuilder/libinstaller/qinstallercomponent.cpp b/installerbuilder/libinstaller/qinstallercomponent.cpp
index 8ea6fc878..eb6919035 100644
--- a/installerbuilder/libinstaller/qinstallercomponent.cpp
+++ b/installerbuilder/libinstaller/qinstallercomponent.cpp
@@ -107,6 +107,7 @@ public:
QMap< QString, QWidget* > userInterfaces;
QUrl repositoryUrl;
+ QString localTempPath;
QStringList downloadableArchives;
QStringList stopProcessForUpdateRequests;
@@ -462,6 +463,15 @@ QString Component::displayName() const
return value( QLatin1String( "DisplayName" ) );
}
+void Component::loadComponentScript()
+{
+ const QString script = value(QLatin1String("Script"));
+ if (!localTempPath().isEmpty() && !script.isEmpty()) {
+ loadComponentScript(QString::fromLatin1("%1/%2/%3").arg(
+ d->localTempPath, name(), script));
+ }
+}
+
/*!
Loads the script at \a fileName into this component's script engine.
The installer and all its components as well as other useful stuff are being exported into the script.
@@ -1195,3 +1205,14 @@ void Component::setRepositoryUrl( const QUrl& url )
{
d->repositoryUrl = url;
}
+
+
+QString Component::localTempPath() const
+{
+ return d->localTempPath;
+}
+
+void Component::setLocalTempPath(const QString &tempLocalPath)
+{
+ d->localTempPath = tempLocalPath;
+}