Skip to content

Commit

Permalink
fix #529
Browse files Browse the repository at this point in the history
  • Loading branch information
martinrotter committed Feb 7, 2023
1 parent 89e11f9 commit ae189db
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion resources/nsis/NSIS.template.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Unicode True
; Do necessary inclusions.
!include NSIS.definitions.nsh
!include MUI2.nsh
!include nsProcess.nsh

;--------------------------------
; Basic values definitions.
Expand Down Expand Up @@ -105,7 +106,7 @@ System::Call 'kernel32::CloseHandle(i $1)'
!undef __ExecWaitJob__
${IfThen} $9 < 6 ${|} MessageBox mb_iconstop `ExecWaitJob "${_exec}" failed!` ${|}
!macroend

; If you are using solid compression, files that are required before
; the actual installation should be stored first in the data block,
; because this will make your installer start faster.
Expand Down Expand Up @@ -161,6 +162,15 @@ LangString DESC_StartMenuShortcuts ${LANG_ENGLISH} "Start Menu Shortcuts for ${A

; Uninstaller section.
Section "Uninstall"
exeTest:
${nsProcess::FindProcess} "${EXE_NAME}" $R0
StrCmp $R0 0 0 notRunning
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION '${APP_NAME} (${EXE_NAME}) is still running. Quit it first and then proceed.' IDOK exeTest IDCANCEL quitMe

quitMe:
Abort

notRunning:
; Here remove all files, but skip "data" folder.
Push "$INSTDIR"
Push "data4"
Expand Down
2 changes: 1 addition & 1 deletion resources/scripts/nsis

0 comments on commit ae189db

Please sign in to comment.