1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-24 00:31:36 +01:00

Kill the running clementine process before uninstalling. Fixes issue #279

This commit is contained in:
David Sansome 2010-05-05 16:57:04 +00:00
parent 8c9b546cc5
commit 02d6d17f0b
2 changed files with 24 additions and 0 deletions

View File

@ -10,6 +10,7 @@
!define PRODUCT_INSTALL_DIR "$PROGRAMFILES\Clementine" !define PRODUCT_INSTALL_DIR "$PROGRAMFILES\Clementine"
SetCompressor /SOLID lzma SetCompressor /SOLID lzma
!addplugindir nsisplugins
!include "MUI2.nsh" !include "MUI2.nsh"
!define MUI_ICON "clementine.ico" !define MUI_ICON "clementine.ico"
@ -136,6 +137,29 @@ Section "Uninstaller"
SectionEnd SectionEnd
Section "Uninstall" Section "Uninstall"
; Kill clementine.exe if it's running
; This calling convention is retarded...
StrCpy $0 "clementine.exe"
KillProc::FindProcesses
StrCmp $1 "-1" wooops
StrCmp $0 "0" completed
DetailPrint "Killing running clementine.exe..."
StrCpy $0 "clementine.exe"
KillProc::KillProcesses
StrCmp $1 "-1" wooops
Sleep 2000
Goto completed
wooops:
DetailPrint "-> Error: Something went wrong while killing running clementine.exe"
Abort
completed:
; Delete all the files ; Delete all the files
Delete "$INSTDIR\clementine.ico" Delete "$INSTDIR\clementine.ico"
Delete "$INSTDIR\clementine.exe" Delete "$INSTDIR\clementine.exe"

BIN
dist/windows/nsisplugins/KillProc.dll vendored Normal file

Binary file not shown.