From a718e199795ce64d2b48b96becb00e6a5bea34cf Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Fri, 15 Nov 2019 23:25:12 +0100 Subject: [PATCH] Use KillProc in nsi --- dist/windows/strawberry.nsi.in | 41 +++++++++++++++++----------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/dist/windows/strawberry.nsi.in b/dist/windows/strawberry.nsi.in index 48a971231..54a7c8f83 100644 --- a/dist/windows/strawberry.nsi.in +++ b/dist/windows/strawberry.nsi.in @@ -72,9 +72,9 @@ SetCompressor /SOLID lzma !define MUI_ICON "strawberry.ico" !define MUI_COMPONENTSPAGE_SMALLDESC -;!define MUI_FINISHPAGE_RUN -;!define MUI_FINISHPAGE_RUN_TEXT "Run Strawberry" -;!define MUI_FINISHPAGE_RUN_FUNCTION "RunStrawberry" +!define MUI_FINISHPAGE_RUN +!define MUI_FINISHPAGE_RUN_TEXT "Run Strawberry" +!define MUI_FINISHPAGE_RUN_FUNCTION "RunStrawberry" ; Installer pages !insertmacro MUI_PAGE_WELCOME @@ -144,9 +144,9 @@ Function .onInit FunctionEnd -;Function RunStrawberry - ;ShellExecAsUser::ShellExecAsUser "" "$INSTDIR/strawberry.exe" "" -;FunctionEnd +Function RunStrawberry + ShellExecAsUser::ShellExecAsUser "" "$INSTDIR/strawberry.exe" "" +FunctionEnd Section "Delete old files" oldfiles SectionEnd @@ -408,26 +408,26 @@ SectionEnd Section "Uninstall" ; Kill strawberry.exe if it's running ; This calling convention is retarded... - ;StrCpy $0 "strawberry.exe" - ;KillProc::FindProcesses - ;StrCmp $1 "-1" wooops + StrCpy $0 "strawberry.exe" + KillProc::FindProcesses + StrCmp $1 "-1" wooops - ;StrCmp $0 "0" completed + StrCmp $0 "0" completed - ;DetailPrint "Killing running strawberry.exe..." + DetailPrint "Killing running strawberry.exe..." - ;StrCpy $0 "strawberry.exe" - ;KillProc::KillProcesses - ;StrCmp $1 "-1" wooops + StrCpy $0 "strawberry.exe" + KillProc::KillProcesses + StrCmp $1 "-1" wooops - ;Sleep 2000 - ;Goto completed + Sleep 2000 + Goto completed - ;wooops: - ;DetailPrint "-> Error: Something went wrong while killing running strawberry.exe" - ;Abort + wooops: + DetailPrint "-> Error: Something went wrong while killing running strawberry.exe" + Abort - ;completed: + completed: ; Delete all the files @@ -608,6 +608,7 @@ Section "Uninstall" RMDir "$INSTDIR\platforms" RMDir "$INSTDIR\sqldrivers" RMDir "$INSTDIR\imageformats" + RMDir "$INSTDIR\gio-modules" RMDir "$INSTDIR\gstreamer-plugins" RMDir "$INSTDIR\xine-plugins" RMDir "$INSTDIR"