Skip to content
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
66a0e56
feat: NSIS uninstaller support.
Kokoro2336 Apr 5, 2026
25372c3
chore: fix typo and update schema.
Kokoro2336 Apr 5, 2026
701dde7
fix: comments and alias.
Kokoro2336 Apr 5, 2026
bcab68d
fix: add pages for uninst sidebar.
Kokoro2336 Apr 5, 2026
ecc5d08
chore: fix typo in comments of fields.
Kokoro2336 Apr 6, 2026
6506140
fix: group HEADERIMAGE.
Kokoro2336 Apr 7, 2026
56f5e2b
fix: remove welcome/finish of uninstaller.
Kokoro2336 Apr 7, 2026
b2278cb
fix: remove uninstaller_sidebar_image.
Kokoro2336 Apr 7, 2026
f6ffd33
Update crates/tauri-utils/src/config.rs
Kokoro2336 Apr 7, 2026
19f10ef
chore: revert comments.
Kokoro2336 Apr 7, 2026
f356880
Merge branch 'feat/nsis-uninstaller-icon' of github.com:Kokoro2336/ta…
Kokoro2336 Apr 7, 2026
d1aafa2
chore: update schema.
Kokoro2336 Apr 7, 2026
7b3cebc
Update crates/tauri-utils/src/config.rs
Kokoro2336 Apr 7, 2026
84c373e
Update crates/tauri-utils/src/config.rs
Kokoro2336 Apr 7, 2026
2a1adbe
fix: typo of installer_icon.
Kokoro2336 Apr 7, 2026
7d31bed
chore: add change file.
Kokoro2336 Apr 7, 2026
120ac07
fix: typo.
Kokoro2336 Apr 7, 2026
7e95853
Merge branch 'dev' into feat/nsis-uninstaller-icon
Kokoro2336 Apr 7, 2026
16b4db1
chore: update config.json.
Kokoro2336 Apr 8, 2026
ff6ee87
Merge branch 'feat/nsis-uninstaller-icon' of github.com:Kokoro2336/ta…
Kokoro2336 Apr 8, 2026
96e798a
Update .changes/feat-uninstaller-icon-image.md
Kokoro2336 Apr 8, 2026
2408fcd
fix: revert alias.
Kokoro2336 Apr 8, 2026
d59546b
chore: update comments in settings.rs.
Kokoro2336 Apr 8, 2026
f2ab5d6
chore: update comments.
Kokoro2336 Apr 8, 2026
c12ec08
fix: installer.nsi
Kokoro2336 Apr 8, 2026
a1a466e
fix: installer.nsi
Kokoro2336 Apr 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changes/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,11 @@
"tauri-driver": {
"path": "./crates/tauri-driver",
"manager": "rust"
},
"tauri-schema-generator": {
Comment thread
Kokoro2336 marked this conversation as resolved.
Resolved
"path": "./crates/tauri-schema-generator",
"manager": "rust",
"dependencies": ["tauri-utils"]
}
}
}
13 changes: 13 additions & 0 deletions .changes/feat-uninstaller-icon-image.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"tauri-bundler": minor:feat
"tauri-cli": minor:feat
"tauri-schema-generator": minor:feat
"tauri-utils": minor:feat
Comment thread
Kokoro2336 marked this conversation as resolved.
Resolved
---

Added uninstaller icon and uninstaller header image support for NSIS installer.

Notes:

- For `tauri-bundler` lib users, the `NsisSettings` now has 2 new fields `uninstaller_icon` and `uninstaller_header_image` which can be a breaking change
- When bundling with NSIS, users can add `uninstallerIcon` and `uninstallerHeaderImage` under `bundle > windows > nsis` to configure them.
7 changes: 7 additions & 0 deletions crates/tauri-bundler/src/bundle/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,13 @@ pub struct NsisSettings {
pub sidebar_image: Option<PathBuf>,
/// The path to an icon file used as the installer icon.
pub installer_icon: Option<PathBuf>,
/// The path to an icon file used as the uninstaller icon.
pub uninstaller_icon: Option<PathBuf>,
/// The path to a bitmap file to display on the header of uninstallers pages.
/// Defaults to header_image. If set but header_image is missing, uses the NSIS default.
Comment thread
Kokoro2336 marked this conversation as resolved.
Resolved
///
/// The recommended dimensions are 150px x 57px.
pub uninstaller_header_image: Option<PathBuf>,
/// Whether the installation will be for all users or just the current user.
pub install_mode: NSISInstallerMode,
/// A list of installer languages.
Expand Down
15 changes: 13 additions & 2 deletions crates/tauri-bundler/src/bundle/windows/nsis/installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ ${StrLoc}
!define INSTALLERICON "{{installer_icon}}"
!define SIDEBARIMAGE "{{sidebar_image}}"
!define HEADERIMAGE "{{header_image}}"
!define UNINSTALLERICON "{{uninstaller_icon}}"
!define UNINSTALLERHEADERIMAGE "{{uninstaller_header_image}}"
!define MAINBINARYNAME "{{main_binary_name}}"
!define MAINBINARYSRCPATH "{{main_binary_path}}"
!define BUNDLEID "{{bundle_id}}"
Expand Down Expand Up @@ -129,10 +131,19 @@ VIAddVersionKey "ProductVersion" "${VERSION}"
!define MUI_WELCOMEFINISHPAGE_BITMAP "${SIDEBARIMAGE}"
!endif

; Installer header image
!if "${HEADERIMAGE}" != ""
; Installer header image
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "${HEADERIMAGE}"
!define MUI_HEADERIMAGE_BITMAP "${HEADERIMAGE}"
!else if "${UNINSTALLERHEADERIMAGE}" != ""
; Uninstaller header image
!define MUI_HEADERIMAGE
Comment thread
Kokoro2336 marked this conversation as resolved.
Resolved
!define MUI_HEADERIMAGE_UNBITMAP "${UNINSTALLERHEADERIMAGE}"
!endif

Comment thread
Kokoro2336 marked this conversation as resolved.
Resolved
; Uninstaller icon
!if "${UNINSTALLERICON}" != ""
!define MUI_UNICON "${UNINSTALLERICON}"
!endif

; Define registry key to store installer language
Expand Down
14 changes: 14 additions & 0 deletions crates/tauri-bundler/src/bundle/windows/nsis/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,20 @@ fn build_nsis_app_installer(
);
}

if let Some(uninstaller_icon) = &nsis.uninstaller_icon {
data.insert(
"uninstaller_icon",
to_json(dunce::canonicalize(uninstaller_icon)?),
);
}

if let Some(uninstaller_header_image) = &nsis.uninstaller_header_image {
data.insert(
"uninstaller_header_image",
to_json(dunce::canonicalize(uninstaller_header_image)?),
);
}

if let Some(installer_hooks) = &nsis.installer_hooks {
let installer_hooks = dunce::canonicalize(installer_hooks)?;
data.insert("installer_hooks", to_json(installer_hooks));
Expand Down
14 changes: 14 additions & 0 deletions crates/tauri-cli/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2996,6 +2996,20 @@
"null"
]
},
"uninstallerIcon": {
"description": "The path to an icon file used as the uninstaller icon.",
"type": [
"string",
"null"
]
},
"uninstallerHeaderImage": {
"description": "The path to a bitmap file to display on the header of uninstallers pages.\n Defaults to [`Self::header_image`]. If this is set but [`Self::header_image`] is not, a default image from NSIS will be applied to `header_image`\n\n The recommended dimensions are 150px x 57px.",
"type": [
"string",
"null"
]
},
"installMode": {
"description": "Whether the installation will be for all users or just the current user.",
"default": "currentUser",
Expand Down
2 changes: 2 additions & 0 deletions crates/tauri-cli/src/helpers/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ pub fn nsis_settings(config: NsisConfig) -> tauri_bundler::NsisSettings {
header_image: config.header_image,
sidebar_image: config.sidebar_image,
installer_icon: config.installer_icon,
uninstaller_icon: config.uninstaller_icon,
uninstaller_header_image: config.uninstaller_header_image,
install_mode: config.install_mode,
languages: config.languages,
custom_language_files: config.custom_language_files,
Expand Down
14 changes: 14 additions & 0 deletions crates/tauri-schema-generator/schemas/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2996,6 +2996,20 @@
"null"
]
},
"uninstallerIcon": {
"description": "The path to an icon file used as the uninstaller icon.",
"type": [
"string",
"null"
]
},
"uninstallerHeaderImage": {
"description": "The path to a bitmap file to display on the header of uninstallers pages.\n Defaults to [`Self::header_image`]. If this is set but [`Self::header_image`] is not, a default image from NSIS will be applied to `header_image`\n\n The recommended dimensions are 150px x 57px.",
"type": [
"string",
"null"
]
},
"installMode": {
"description": "Whether the installation will be for all users or just the current user.",
"default": "currentUser",
Expand Down
11 changes: 10 additions & 1 deletion crates/tauri-utils/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -858,8 +858,17 @@ pub struct NsisConfig {
#[serde(alias = "sidebar-image")]
pub sidebar_image: Option<PathBuf>,
/// The path to an icon file used as the installer icon.
#[serde(alias = "install-icon")]
#[serde(alias = "installer-icon")]
Comment thread
Kokoro2336 marked this conversation as resolved.
Resolved
pub installer_icon: Option<PathBuf>,
/// The path to an icon file used as the uninstaller icon.
#[serde(alias = "uninstaller-icon")]
pub uninstaller_icon: Option<PathBuf>,
/// The path to a bitmap file to display on the header of uninstallers pages.
Comment thread
Legend-Master marked this conversation as resolved.
Resolved
/// Defaults to [`Self::header_image`]. If this is set but [`Self::header_image`] is not, a default image from NSIS will be applied to `header_image`
///
/// The recommended dimensions are 150px x 57px.
#[serde(alias = "uninstaller-header-image")]
pub uninstaller_header_image: Option<PathBuf>,
/// Whether the installation will be for all users or just the current user.
#[serde(default, alias = "install-mode")]
pub install_mode: NSISInstallerMode,
Expand Down
Loading