From 89ded0446ba8e6f19445196000d8f065dda663f2 Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Tue, 15 Nov 2011 14:57:59 +0100 Subject: introduce a DownloadableArchives package description xml-tag - with this new tag we are able to create simple components which have some content without a needed script - this saves us some scriptengine instances in the future Change-Id: Ib9890324bfbd9b18fb33f3f7bd88cae93c6a2062 Reviewed-by: Niels Weber --- installerbuilder/libinstaller/component.cpp | 1 + installerbuilder/libinstaller/constants.h | 1 + installerbuilder/libinstaller/packagemanagercore.cpp | 7 +++++++ 3 files changed, 9 insertions(+) diff --git a/installerbuilder/libinstaller/component.cpp b/installerbuilder/libinstaller/component.cpp index 5158c032c..cc93e0b55 100644 --- a/installerbuilder/libinstaller/component.cpp +++ b/installerbuilder/libinstaller/component.cpp @@ -145,6 +145,7 @@ void Component::loadDataFromPackage(const Package &package) setValue(scRemoteVersion, package.data(scRemoteVersion).toString()); setValue(scInheritVersion, package.data(scInheritVersion).toString()); setValue(scDependencies, package.data(scDependencies).toString()); + setValue(scDownloadableArchives, package.data(scDownloadableArchives).toString()); setValue(scVirtual, package.data(scVirtual).toString()); setValue(scSortingPriority, package.data(scSortingPriority).toString()); diff --git a/installerbuilder/libinstaller/constants.h b/installerbuilder/libinstaller/constants.h index b42da114d..b5843c03b 100644 --- a/installerbuilder/libinstaller/constants.h +++ b/installerbuilder/libinstaller/constants.h @@ -41,6 +41,7 @@ static const QLatin1String scDisplayVersion("DisplayVersion"); static const QLatin1String scRemoteDisplayVersion("RemoteDisplayVersion"); static const QLatin1String scInheritVersion("inheritVersionFrom"); static const QLatin1String scReplaces("Replaces"); +static const QLatin1String scDownloadableArchives("DownloadableArchives"); static const QLatin1String scEssential("Essential"); static const QLatin1String scTargetDir("TargetDir"); static const QLatin1String scReleaseDate("ReleaseDate"); diff --git a/installerbuilder/libinstaller/packagemanagercore.cpp b/installerbuilder/libinstaller/packagemanagercore.cpp index 9769b1dbc..d0ca2f0b2 100644 --- a/installerbuilder/libinstaller/packagemanagercore.cpp +++ b/installerbuilder/libinstaller/packagemanagercore.cpp @@ -1478,6 +1478,13 @@ bool PackageManagerCore::updateComponentData(struct Data &data, Component *compo if (d->m_repoMetaInfoJob) component->setRepositoryUrl(d->m_repoMetaInfoJob->repositoryForTemporaryDirectory(localPath).url()); + // add downloadable archive from xml + const QStringList downloadableArchives = data.package->data(scDownloadableArchives).toString() + .split(QRegExp(QLatin1String("\\b(,|, )\\b")), QString::SkipEmptyParts); + foreach (const QString downloadableArchive, downloadableArchives) { + component->addDownloadableArchive(downloadableArchive); + } + const QStringList componentsToReplace = data.package->data(scReplaces).toString() .split(QRegExp(QLatin1String("\\b(,|, )\\b")), QString::SkipEmptyParts); -- cgit v1.2.3