Skip to content

Commit

Permalink
Add nsis for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
hientominh authored and hiento09 committed Apr 17, 2024
1 parent e43ee8e commit ac9228b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
Binary file added electron/icons/icon.ico
Binary file not shown.
8 changes: 8 additions & 0 deletions electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@
"nsis"
]
},
"nsis": {
"oneClick": false,
"allowToChangeInstallationDirectory": true,
"installerIcon": "icons/icon.ico",
"uninstallerIcon": "icons/icon.ico",
"include": "scripts/uninstaller.nsh",
"deleteAppDataOnUninstall": true
},
"artifactName": "jan-${os}-${arch}-${version}.${ext}"
},
"scripts": {
Expand Down
18 changes: 18 additions & 0 deletions electron/scripts/uninstaller.nsh
Original file line number Diff line number Diff line change
@@ -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 jan data 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

0 comments on commit ac9228b

Please sign in to comment.