fix: remove desktop shortcut from NSIS installer by default
Some checks failed
Build & Sign Wraith / Build Windows + Sign (push) Has been cancelled

Tauri's NSIS bundler creates a desktop shortcut unconditionally. Added
a POSTINSTALL hook that deletes it immediately after creation. Start
menu shortcut remains. Users who want a desktop shortcut can create
one manually.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Vantz Stockwell 2026-03-24 20:04:06 -04:00
parent f825692ecc
commit 74b9be3046
2 changed files with 8 additions and 1 deletions

View File

@ -39,7 +39,8 @@
"nsis": { "nsis": {
"displayLanguageSelector": false, "displayLanguageSelector": false,
"installerIcon": "icons/icon.ico", "installerIcon": "icons/icon.ico",
"installMode": "perMachine" "installMode": "perMachine",
"installerHooks": "./windows/hooks.nsh"
} }
} }
}, },

View File

@ -0,0 +1,6 @@
; Wraith NSIS installer hooks
; Desktop shortcut is OFF by default — Tauri creates one, we remove it.
!macro NSIS_HOOK_POSTINSTALL
Delete "$DESKTOP\${MAINBINARYNAME}.lnk"
!macroend