mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-11-28 12:27:16 +03:00
feat(bundler): add config for WiX dialog image path (#2449)
This commit is contained in:
parent
cd55d67149
commit
9bfdeb42ef
5
.changes/bundler-wix-dialog-image.md
Normal file
5
.changes/bundler-wix-dialog-image.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri-bundler": patch
|
||||
---
|
||||
|
||||
Added `dialog_image_path` field to the `WixSettings` struct.
|
5
.changes/cli.rs-wix-dialog-image.md
Normal file
5
.changes/cli.rs-wix-dialog-image.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"cli.rs": patch
|
||||
---
|
||||
|
||||
Added configuration for the WiX dialog background bitmap under `tauri.conf.json > tauri > bundle > windows > wix > dialogImagePath`.
|
@ -176,7 +176,8 @@ In addition to the JSON defined on the `tauri.conf.json` file, Tauri reads a pla
|
||||
{ property: "mergeRefs", optional: true, type: "string[]", description: `The Merge element ids you want to reference from the fragments.` },
|
||||
{ property: "skipWebviewInstall", optional: true, type: "boolean", description: `Disables the Webview2 runtime installation after app install.` },
|
||||
{ property: "license", optional: true, type: "string", description: `The path to the license file to render on the installer. Must be an RTF file, so if a different extension is provided, we convert it to the RTF format.` },
|
||||
{ property: "bannerPath", optional: true, type: "string", description: `Path to a bitmap file to use as the installation user interface banner. This bitmap will appear at the top of all but the first page of the installer. The required dimensions are 493px × 58px.` }]} />
|
||||
{ property: "bannerPath", optional: true, type: "string", description: `Path to a bitmap file to use as the installation user interface banner. This bitmap will appear at the top of all but the first page of the installer. The required dimensions are 493px × 58px.` },
|
||||
{ property: "dialogImagePath", optional: true, type: "string", description: `Path to a bitmap file to use on the installation user interface dialogs. It is used on the welcome and completion dialogs. The required dimensions are 493px × 312px.` }]} />
|
||||
}
|
||||
]} />
|
||||
},
|
||||
|
@ -205,6 +205,11 @@ pub struct WixSettings {
|
||||
///
|
||||
/// The required dimensions are 493px × 58px.
|
||||
pub banner_path: Option<PathBuf>,
|
||||
/// Path to a bitmap file to use on the installation user interface dialogs.
|
||||
/// It is used on the welcome and completion dialogs.
|
||||
|
||||
/// The required dimensions are 493px × 312px.
|
||||
pub dialog_image_path: Option<PathBuf>,
|
||||
}
|
||||
|
||||
/// The Windows bundle settings.
|
||||
|
@ -546,6 +546,19 @@ pub fn build_wix_app_installer(
|
||||
to_json(copy_icon(settings, &filename, banner_path)?),
|
||||
);
|
||||
}
|
||||
|
||||
if let Some(dialog_image_path) = &wix.dialog_image_path {
|
||||
let filename = dialog_image_path
|
||||
.file_name()
|
||||
.unwrap()
|
||||
.to_string_lossy()
|
||||
.into_owned()
|
||||
.to_string();
|
||||
data.insert(
|
||||
"dialog_image_path",
|
||||
to_json(copy_icon(settings, &filename, dialog_image_path)?),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if !has_custom_template {
|
||||
|
@ -34,6 +34,9 @@
|
||||
{{#if banner_path}}
|
||||
<WixVariable Id="WixUIBannerBmp" Value="{{{banner_path}}}" />
|
||||
{{/if}}
|
||||
{{#if dialog_image_path}}
|
||||
<WixVariable Id="WixUIDialogBmp" Value="{{{dialog_image_path}}}" />
|
||||
{{/if}}
|
||||
{{#if license}}
|
||||
<WixVariable Id="WixUILicenseRtf" Value="{{{license}}}" />
|
||||
{{/if}}
|
||||
|
@ -89,6 +89,11 @@ pub struct WixConfig {
|
||||
///
|
||||
/// The required dimensions are 493px × 58px.
|
||||
pub banner_path: Option<PathBuf>,
|
||||
/// Path to a bitmap file to use on the installation user interface dialogs.
|
||||
/// It is used on the welcome and completion dialogs.
|
||||
|
||||
/// The required dimensions are 493px × 312px.
|
||||
pub dialog_image_path: Option<PathBuf>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize, JsonSchema)]
|
||||
|
@ -1345,6 +1345,13 @@
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"dialogImagePath": {
|
||||
"description": "Path to a bitmap file to use on the installation user interface dialogs. It is used on the welcome and completion dialogs. The required dimensions are 493px × 312px.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"enableElevatedUpdateTask": {
|
||||
"default": false,
|
||||
"type": "boolean"
|
||||
|
@ -26,6 +26,7 @@ impl From<WixConfig> for tauri_bundler::WixSettings {
|
||||
license: config.license,
|
||||
enable_elevated_update_task: config.enable_elevated_update_task,
|
||||
banner_path: config.banner_path,
|
||||
dialog_image_path: config.dialog_image_path,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user