Feature windows nsis (#2705)

* Add nsis for windows

* Revert to one click true

* Add nsis for windows

* Revert to one click true

* Add nsis for windows

* Revert to one click true

* Update message for uninstallation messageBox

---------

Co-authored-by: Hien To <tominhhien97@gmail.com>
This commit is contained in:
hiento09 2024-04-17 16:32:38 +07:00 committed by GitHub
parent 83f9e965d8
commit 8820ad6d3d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 25 additions and 0 deletions

BIN
electron/icons/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -54,6 +54,13 @@
"nsis"
]
},
"nsis": {
"oneClick": true,
"installerIcon": "icons/icon.ico",
"uninstallerIcon": "icons/icon.ico",
"include": "scripts/uninstaller.nsh",
"deleteAppDataOnUninstall": true
},
"artifactName": "jan-${os}-${arch}-${version}.${ext}"
},
"scripts": {

View File

@ -0,0 +1,18 @@
!include nsDialogs.nsh
XPStyle on
!macro customUnInstall
; Uninstall process execution
${ifNot} ${isUpdated}
# If you tick Delete fixed folder
MessageBox MB_OKCANCEL "Do you also want to delete the DEFAULT Jan data folder at $PROFILE\jan?" IDOK label_ok IDCANCEL label_cancel
label_ok:
# Delete user data folder
RMDir /r $PROFILE\jan
Goto end
label_cancel:
Goto end
end:
${endIf}
!macroend