diff --git a/.changes/bundler-wix-dialog-image.md b/.changes/bundler-wix-dialog-image.md new file mode 100644 index 000000000..3f29587c3 --- /dev/null +++ b/.changes/bundler-wix-dialog-image.md @@ -0,0 +1,5 @@ +--- +"tauri-bundler": patch +--- + +Added `dialog_image_path` field to the `WixSettings` struct. diff --git a/.changes/cli.rs-wix-dialog-image.md b/.changes/cli.rs-wix-dialog-image.md new file mode 100644 index 000000000..b2622d924 --- /dev/null +++ b/.changes/cli.rs-wix-dialog-image.md @@ -0,0 +1,5 @@ +--- +"cli.rs": patch +--- + +Added configuration for the WiX dialog background bitmap under `tauri.conf.json > tauri > bundle > windows > wix > dialogImagePath`. diff --git a/docs/api/config.md b/docs/api/config.md index b28e638d5..410f7685d 100644 --- a/docs/api/config.md +++ b/docs/api/config.md @@ -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.` }]} /> } ]} /> }, diff --git a/tooling/bundler/src/bundle/settings.rs b/tooling/bundler/src/bundle/settings.rs index c36de5873..5dcd15793 100644 --- a/tooling/bundler/src/bundle/settings.rs +++ b/tooling/bundler/src/bundle/settings.rs @@ -205,6 +205,11 @@ pub struct WixSettings { /// /// The required dimensions are 493px × 58px. pub banner_path: Option, + /// 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, } /// The Windows bundle settings. diff --git a/tooling/bundler/src/bundle/windows/msi/wix.rs b/tooling/bundler/src/bundle/windows/msi/wix.rs index 0dc7d21b4..f7bd79118 100644 --- a/tooling/bundler/src/bundle/windows/msi/wix.rs +++ b/tooling/bundler/src/bundle/windows/msi/wix.rs @@ -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 { diff --git a/tooling/bundler/src/bundle/windows/templates/main.wxs b/tooling/bundler/src/bundle/windows/templates/main.wxs index caf826323..bc4fd24cb 100644 --- a/tooling/bundler/src/bundle/windows/templates/main.wxs +++ b/tooling/bundler/src/bundle/windows/templates/main.wxs @@ -34,6 +34,9 @@ {{#if banner_path}} {{/if}} + {{#if dialog_image_path}} + + {{/if}} {{#if license}} {{/if}} diff --git a/tooling/cli.rs/config_definition.rs b/tooling/cli.rs/config_definition.rs index 9ca08e28b..f9d929372 100644 --- a/tooling/cli.rs/config_definition.rs +++ b/tooling/cli.rs/config_definition.rs @@ -89,6 +89,11 @@ pub struct WixConfig { /// /// The required dimensions are 493px × 58px. pub banner_path: Option, + /// 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, } #[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize, JsonSchema)] diff --git a/tooling/cli.rs/schema.json b/tooling/cli.rs/schema.json index d4c7a1a04..b0bac5b3e 100644 --- a/tooling/cli.rs/schema.json +++ b/tooling/cli.rs/schema.json @@ -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" diff --git a/tooling/cli.rs/src/helpers/config.rs b/tooling/cli.rs/src/helpers/config.rs index 2f5f77f01..bf659a2c6 100644 --- a/tooling/cli.rs/src/helpers/config.rs +++ b/tooling/cli.rs/src/helpers/config.rs @@ -26,6 +26,7 @@ impl From 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, } } }