Skip to content

Commit

Permalink
fix(updater): pass /NS and /UPDATE to nsis installer to disable c…
Browse files Browse the repository at this point in the history
…reating shortcuts on updates (#1162)

* fix(updater): pass `/NS` to nsis installer to disable creating shortcuts on updates

ref: tauri-apps/tauri#9395

* add `/UPDATE`

* move args to function

* update updater test config

* revert /R

---------

Co-authored-by: Lucas Nogueira <[email protected]>
  • Loading branch information
amrbashir and lucasfernog authored May 25, 2024
1 parent 7581576 commit 69e4c2e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changes/updater-nsis-shortcuts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"updater": "patch"
---

Fix NSIS updater creating new shortcuts on update.
2 changes: 2 additions & 0 deletions plugins/updater/src/updater.rs
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,8 @@ impl Update {
match updater_type {
WindowsUpdaterType::Nsis => {
installer_args.extend(install_mode.nsis_args().iter().map(OsStr::new));
installer_args.push(OsStr::new("/NS"));
installer_args.push(OsStr::new("/UPDATE"));
}
WindowsUpdaterType::Msi => {
installer_args.extend(install_mode.msiexec_args().iter().map(OsStr::new));
Expand Down
4 changes: 2 additions & 2 deletions plugins/updater/tests/app-updater/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"icons/icon.ico"
],
"windows": {
"wix": {
"skipWebviewInstall": true
"webviewInstallMode": {
"type": "skip"
}
}
}
Expand Down

0 comments on commit 69e4c2e

Please sign in to comment.