summaryrefslogtreecommitdiffstats
path: root/src/libs/ifwtools
diff options
context:
space:
mode:
authorArttu Tarkiainen <arttu.tarkiainen@qt.io>2021-08-27 13:26:24 +0300
committerArttu Tarkiainen <arttu.tarkiainen@qt.io>2021-09-14 15:04:39 +0300
commitfce4d500a0394d4d46235f77a5cbb8fd2b5a5e68 (patch)
tree8ce174163b44585b6bc1b6caf0c4ee016aabca8d /src/libs/ifwtools
parent14b4bdde43a6e400a2212b155c75b67c2913998a (diff)
binarycreator: support selecting compression level and archive format
Task-number: QTIFW-1587 Change-Id: I8855b1ce4bb8abf072ff235846428fc63729f0fb Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Diffstat (limited to 'src/libs/ifwtools')
-rw-r--r--src/libs/ifwtools/binarycreator.cpp3
-rw-r--r--src/libs/ifwtools/binarycreator.h6
2 files changed, 8 insertions, 1 deletions
diff --git a/src/libs/ifwtools/binarycreator.cpp b/src/libs/ifwtools/binarycreator.cpp
index a1261d55e..cf04355de 100644
--- a/src/libs/ifwtools/binarycreator.cpp
+++ b/src/libs/ifwtools/binarycreator.cpp
@@ -804,7 +804,8 @@ int QInstallerTools::createBinary(BinaryCreatorArgs args, QString &argumentError
// 2.2; copy the packages data and setup the packages vector with the files we copied,
// must happen before copying meta data because files will be compressed if
// needed and meta data generation relies on this
- copyComponentData(args.packagesDirectories, tmpRepoDir, &preparedPackages, QLatin1String("7z"));
+ copyComponentData(args.packagesDirectories, tmpRepoDir, &preparedPackages,
+ args.archiveSuffix, args.compression);
// 2.3; add to common vector
packages.append(preparedPackages);
}
diff --git a/src/libs/ifwtools/binarycreator.h b/src/libs/ifwtools/binarycreator.h
index 0c079b865..7c14ea039 100644
--- a/src/libs/ifwtools/binarycreator.h
+++ b/src/libs/ifwtools/binarycreator.h
@@ -35,6 +35,8 @@
#include "fileutils.h"
#include "binaryformat.h"
+#include <abstractarchive.h>
+
#include <QtCore/QString>
#include <QtCore/QFile>
@@ -48,6 +50,8 @@ struct Input
QInstaller::ResourceCollectionManager manager;
};
+typedef QInstaller::AbstractArchive::CompressionLevel Compression;
+
struct IFWTOOLS_EXPORT BinaryCreatorArgs
{
QString target;
@@ -55,6 +59,8 @@ struct IFWTOOLS_EXPORT BinaryCreatorArgs
QString templateBinary;
QStringList packagesDirectories;
QStringList repositoryDirectories;
+ QString archiveSuffix = QLatin1String("7z");
+ Compression compression = Compression::Normal;
bool onlineOnly = false;
bool offlineOnly = false;
QStringList resources;