|
@@ -438,6 +438,21 @@ pub struct WixConfig {
|
|
|
pub dialog_image_path: Option<PathBuf>,
|
|
|
}
|
|
|
|
|
|
+/// Compression algorithms used in the NSIS installer.
|
|
|
+///
|
|
|
+/// See <https://nsis.sourceforge.io/Reference/SetCompressor>
|
|
|
+#[derive(Debug, PartialEq, Eq, Clone, Copy, Serialize, Deserialize)]
|
|
|
+#[cfg_attr(feature = "schema", derive(JsonSchema))]
|
|
|
+#[serde(rename_all = "camelCase", deny_unknown_fields)]
|
|
|
+pub enum NsisCompression {
|
|
|
+ /// ZLIB uses the deflate algorithm, it is a quick and simple method. With the default compression level it uses about 300 KB of memory.
|
|
|
+ Zlib,
|
|
|
+ /// BZIP2 usually gives better compression ratios than ZLIB, but it is a bit slower and uses more memory. With the default compression level it uses about 4 MB of memory.
|
|
|
+ Bzip2,
|
|
|
+ /// LZMA (default) is a new compression method that gives very good compression ratios. The decompression speed is high (10-20 MB/s on a 2 GHz CPU), the compression speed is lower. The memory size that will be used for decompression is the dictionary size plus a few KBs, the default is 8 MB.
|
|
|
+ Lzma,
|
|
|
+}
|
|
|
+
|
|
|
/// Configuration for the Installer bundle using NSIS.
|
|
|
#[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)]
|
|
|
#[cfg_attr(feature = "schema", derive(JsonSchema))]
|
|
@@ -480,6 +495,10 @@ pub struct NsisConfig {
|
|
|
/// By default the OS language is selected, with a fallback to the first language in the `languages` array.
|
|
|
#[serde(default, alias = "display-language-selector")]
|
|
|
pub display_language_selector: bool,
|
|
|
+ /// Set the compression algorithm used to compress files in the installer.
|
|
|
+ ///
|
|
|
+ /// See <https://nsis.sourceforge.io/Reference/SetCompressor>
|
|
|
+ pub compression: Option<NsisCompression>,
|
|
|
}
|
|
|
|
|
|
/// Install Modes for the NSIS installer.
|