mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-24 16:51:59 +01:00
Kill the running clementine process before uninstalling. Fixes issue #279
This commit is contained in:
parent
8c9b546cc5
commit
02d6d17f0b
24
dist/windows/clementine.nsi.in
vendored
24
dist/windows/clementine.nsi.in
vendored
@ -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
BIN
dist/windows/nsisplugins/KillProc.dll
vendored
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user