From ae189db85f30ee3cab56c0b9138139966aa19586 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Tue, 7 Feb 2023 10:29:01 +0100 Subject: [PATCH] fix #529 --- resources/nsis/NSIS.template.in | 12 +++++++++++- resources/scripts/nsis | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/resources/nsis/NSIS.template.in b/resources/nsis/NSIS.template.in index b125c6ee1..f2c6ae730 100644 --- a/resources/nsis/NSIS.template.in +++ b/resources/nsis/NSIS.template.in @@ -8,6 +8,7 @@ Unicode True ; Do necessary inclusions. !include NSIS.definitions.nsh !include MUI2.nsh +!include nsProcess.nsh ;-------------------------------- ; Basic values definitions. @@ -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. @@ -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" diff --git a/resources/scripts/nsis b/resources/scripts/nsis index 1b3775319..c53c77101 160000 --- a/resources/scripts/nsis +++ b/resources/scripts/nsis @@ -1 +1 @@ -Subproject commit 1b37753199e99c1d8baf41b9cc208fbc0cb400c9 +Subproject commit c53c77101d7349334442e18a9b754ed1ab44724a