Skip to content

Commit

Permalink
feat(nsis): Show welcome and finish page duing uninstall (electron-us…
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbrazier authored and develar committed Jan 26, 2017
1 parent 688111e commit aa43344
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 3 additions & 1 deletion packages/electron-builder/templates/nsis/boringInstaller.nsh
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,12 @@
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!else
!insertmacro MUI_UNPAGE_WELCOME
!ifndef INSTALL_MODE_PER_ALL_USERS
!insertmacro PAGE_INSTALL_MODE
!endif
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH
!endif

!macro initMultiUser
Expand Down Expand Up @@ -129,4 +131,4 @@
!endif
!macroend

!include "langs.nsh"
!include "langs.nsh"
12 changes: 7 additions & 5 deletions packages/electron-builder/templates/nsis/uninstaller.nsh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ Function un.onInit
!insertmacro check64BitAndSetRegView

${IfNot} ${Silent}
MessageBox MB_OKCANCEL "Are you sure you want to uninstall ${PRODUCT_NAME}?" IDOK +2
Quit

!ifdef ONE_CLICK
MessageBox MB_OKCANCEL "Are you sure you want to uninstall ${PRODUCT_NAME}?" IDOK +2
Quit

# one-click installer executes uninstall section in the silent mode, but we must show message dialog if silent mode was not explicitly set by user (using /S flag)
!insertmacro CHECK_APP_RUNNING "uninstall"
SetSilent silent
Expand Down Expand Up @@ -62,5 +62,7 @@ Section "un.install"
!insertmacro customUnInstall
!endif

!insertmacro quitSuccess
SectionEnd
!ifdef ONE_CLICK
!insertmacro quitSuccess
!endif
SectionEnd

0 comments on commit aa43344

Please sign in to comment.