diff options
author | Katja Marttila <katja.marttila@qt.io> | 2016-09-20 14:45:24 +0300 |
---|---|---|
committer | Iikka Eklund <iikka.eklund@qt.io> | 2016-11-09 07:08:48 +0000 |
commit | e7f93217182233383851a25ae21bd950d05b408a (patch) | |
tree | 978adb275ec5b3f52a93a610ef5d50d27c6a2479 /src/sdk | |
parent | 6e5ef08718b7b638b57dda4ef4a7bdbfe8046743 (diff) |
allow installing compressed packages
This change introduces new feature to add 7z packages to be
installed. Packages must be installer repositories (created with repogen),
compressed to 7z file and named as qtbsp or 7z. Selecting compressed package
is done either with button in component selection page or with
--installCompressedRepository parameter given to installer or to maintenancetool.
Button will not be created by default. If you want to show the button
either build IFW with DEFINES+=INSTALLCOMPRESSED or enable the button in control
script with allowCompressedRepositoryInstall() in ComponentSelectionPageCallback
Task-number: QTIFW-886
Change-Id: Ia060092c348991d5195393b7dc154205f8bf92a5
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Diffstat (limited to 'src/sdk')
-rw-r--r-- | src/sdk/commandlineparser.cpp | 5 | ||||
-rw-r--r-- | src/sdk/constants.h | 1 | ||||
-rw-r--r-- | src/sdk/installerbase.cpp | 8 |
3 files changed, 13 insertions, 1 deletions
diff --git a/src/sdk/commandlineparser.cpp b/src/sdk/commandlineparser.cpp index 6da318806..1dc7ca168 100644 --- a/src/sdk/commandlineparser.cpp +++ b/src/sdk/commandlineparser.cpp @@ -114,7 +114,10 @@ CommandLineParser::CommandLineParser() "a value is omitted, the client will use a default instead. Note: The server process is " "not started by the client application in that case, you need to start it on your own."), QLatin1String("socketname,key"))); - + m_parser.addOption(QCommandLineOption(QLatin1String(CommandLineOptions::InstallCompressedRepository), + QLatin1String("Installs QtBSP or 7z file. The QtBSP (Board Support Package) file must be a .7z " + "file which contains a valid repository."), + QLatin1String("URI,..."))); m_parser.addPositionalArgument(QLatin1String(CommandLineOptions::KeyValue), QLatin1String("Key Value pair to be set.")); } diff --git a/src/sdk/constants.h b/src/sdk/constants.h index a322df09b..763377a08 100644 --- a/src/sdk/constants.h +++ b/src/sdk/constants.h @@ -56,6 +56,7 @@ const char AddTmpRepository[] = "addTempRepository"; const char SetTmpRepository[] = "setTempRepository"; const char StartServer[] = "startserver"; const char StartClient[] = "startclient"; +const char InstallCompressedRepository[] = "installCompressedRepository"; } // namespace CommandLineOptions diff --git a/src/sdk/installerbase.cpp b/src/sdk/installerbase.cpp index c99a48aa8..ec3a87a8d 100644 --- a/src/sdk/installerbase.cpp +++ b/src/sdk/installerbase.cpp @@ -217,6 +217,14 @@ int InstallerBase::run() m_core->setTemporaryRepositories(repoList, true); } + if (parser.isSet(QLatin1String(CommandLineOptions::InstallCompressedRepository))) { + const QStringList repoList = repositories(parser + .value(QLatin1String(CommandLineOptions::InstallCompressedRepository))); + if (repoList.isEmpty()) + throw QInstaller::Error(QLatin1String("Empty repository list for option 'installCompressedRepository'.")); + m_core->setTemporaryRepositories(repoList, false, true); + } + QInstaller::PackageManagerCore::setNoForceInstallation(parser .isSet(QLatin1String(CommandLineOptions::NoForceInstallation))); QInstaller::PackageManagerCore::setCreateLocalRepositoryFromBinary(parser |