archiver

Provides support for building archives. More...

Since: Qbs 1.4

Properties

Detailed Description

The archiver module contains the properties and rules for creating (compressed) archives. The output artifact has the file tag "archiver.archive". The sole input artifact is a text file containing the list of files to package, with one file path per line. The paths can be relative, in which case they will be looked for in workingDirectory. The file tag of this input artifact is "archiver.input-list".

Property Documentation

archiveBaseName : string

The base name of the archive file. That is, the file name without any extensions.

Default: product.targetName


command : string

The path to the executable used to create the archive.

This is usually the native tool corresponding to the archive type being produced, but may fall back to another tool also capable of producing that archive type if the native tool is not installed on the host system. This behavior is especially useful on platforms such as Windows, where the native tools for producing tar and zip archives in particular are much less likely to be installed.

The following table lists the supported archive types and the tools capable of producing them, listed in search order from left to right:

TypeSupported tools
7zip7z
tartar, 7z
zipzip (Info-Zip), 7z, jar (from Java JDK)

Default: Depends on type.


compressionLevel : string

How much effort to put into the compression of a 7-Zip or zip archive.

Possible values for zip are:

  • undefined
  • "0"
  • "1"
  • "2"
  • "3"
  • "4"
  • "5"
  • "6"
  • "7"
  • "8"
  • "9"

7-Zip only supports 0 and the odd numbers above.

Higher numbers result in a smaller archive, but the compression process will take more time.

If the value is left undefined, the default compression level is used.

Default: Undefined


compressionType : string

How to compress a tar or zip archive.

Possible options are:

  • "bz2"
  • "deflate"
  • "gz"
  • "none"
  • "store"
  • undefined, which uses the archiver's default compression type.
  • "xz"
  • "Z"

Default: "gz" for tar archives, otherwise undefined.


flags : stringList

Custom options not covered by any of the other properties.

Default: []


outputDirectory : string

Where to put the archive file.

Default: product.destinationDirectory


type : string

Which kind of archiver to use.

The currently supported values are:

  • "7zip"
  • "tar"
  • "zip"

Default: Undefined


workingDirectory : string

The directory in which to execute the archiver tool specified by command.

Default: Undefined


© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.