Use KillProc in nsi

This commit is contained in:
Jonas Kvinge
2019-11-15 23:25:12 +01:00
parent 8ac83a46f5
commit a718e19979

View File

@@ -72,9 +72,9 @@ SetCompressor /SOLID lzma
!define MUI_ICON "strawberry.ico" !define MUI_ICON "strawberry.ico"
!define MUI_COMPONENTSPAGE_SMALLDESC !define MUI_COMPONENTSPAGE_SMALLDESC
;!define MUI_FINISHPAGE_RUN !define MUI_FINISHPAGE_RUN
;!define MUI_FINISHPAGE_RUN_TEXT "Run Strawberry" !define MUI_FINISHPAGE_RUN_TEXT "Run Strawberry"
;!define MUI_FINISHPAGE_RUN_FUNCTION "RunStrawberry" !define MUI_FINISHPAGE_RUN_FUNCTION "RunStrawberry"
; Installer pages ; Installer pages
!insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_WELCOME
@@ -144,9 +144,9 @@ Function .onInit
FunctionEnd FunctionEnd
;Function RunStrawberry Function RunStrawberry
;ShellExecAsUser::ShellExecAsUser "" "$INSTDIR/strawberry.exe" "" ShellExecAsUser::ShellExecAsUser "" "$INSTDIR/strawberry.exe" ""
;FunctionEnd FunctionEnd
Section "Delete old files" oldfiles Section "Delete old files" oldfiles
SectionEnd SectionEnd
@@ -408,26 +408,26 @@ SectionEnd
Section "Uninstall" Section "Uninstall"
; Kill strawberry.exe if it's running ; Kill strawberry.exe if it's running
; This calling convention is retarded... ; This calling convention is retarded...
;StrCpy $0 "strawberry.exe" StrCpy $0 "strawberry.exe"
;KillProc::FindProcesses KillProc::FindProcesses
;StrCmp $1 "-1" wooops 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" StrCpy $0 "strawberry.exe"
;KillProc::KillProcesses KillProc::KillProcesses
;StrCmp $1 "-1" wooops StrCmp $1 "-1" wooops
;Sleep 2000 Sleep 2000
;Goto completed Goto completed
;wooops: wooops:
;DetailPrint "-> Error: Something went wrong while killing running strawberry.exe" DetailPrint "-> Error: Something went wrong while killing running strawberry.exe"
;Abort Abort
;completed: completed:
; Delete all the files ; Delete all the files
@@ -608,6 +608,7 @@ Section "Uninstall"
RMDir "$INSTDIR\platforms" RMDir "$INSTDIR\platforms"
RMDir "$INSTDIR\sqldrivers" RMDir "$INSTDIR\sqldrivers"
RMDir "$INSTDIR\imageformats" RMDir "$INSTDIR\imageformats"
RMDir "$INSTDIR\gio-modules"
RMDir "$INSTDIR\gstreamer-plugins" RMDir "$INSTDIR\gstreamer-plugins"
RMDir "$INSTDIR\xine-plugins" RMDir "$INSTDIR\xine-plugins"
RMDir "$INSTDIR" RMDir "$INSTDIR"