From: Lars Op den Kamp Date: Sat, 6 Oct 2012 09:28:42 +0000 (+0200) Subject: let the installer uninstall previous beta installations of libCEC Tray, and remove... X-Git-Tag: upstream/2.2.0~1^2~17^2^2~32 X-Git-Url: https://git.piment-noir.org/?p=deb_libcec.git;a=commitdiff_plain;h=b521303c15095126a641423219cff826156afc81 let the installer uninstall previous beta installations of libCEC Tray, and remove cec-config-gui.exe when installing --- diff --git a/project/libCEC.nsi b/project/libCEC.nsi index 61cff60..5148406 100644 --- a/project/libCEC.nsi +++ b/project/libCEC.nsi @@ -172,10 +172,29 @@ Section "CEC debug client" SecCecClient SectionEnd -Section "libCEC Tray" SecCecConfig +Section "libCEC Tray Application" SecCecTray SetShellVarContext current SectionIn 1 3 + ; Uninstall previous beta builds of the tray application + ReadRegStr $1 HKLM "Software\Pulse-Eight\libCECTray" "" + ${If} $1 != "" + MessageBox MB_OK \ + "A previous beta build of the libCEC Tray Application was found. Press OK to uninstall the old version. Do not uninstall the driver when asked to. Thank you for participating in the beta test." + ExecWait '"$1\Uninstall.exe" /S _?=$1' + Delete "$1\Uninstall.exe" + ${EndIf} + + ; Replace cec-config-gui.exe + Delete "$INSTDIR\cec-config-gui.exe" + ${If} ${RunningX64} + Delete "$INSTDIR\x64\cec-config-gui.exe" + ${EndIf} + Delete "$SMPROGRAMS\$StartMenuFolder\CEC Adapter Configuration.lnk" + ${If} ${RunningX64} + Delete "$SMPROGRAMS\$StartMenuFolder\CEC Adapter Configuration (x64).lnk" + ${EndIf} + ; Copy to the installation directory SetOutPath "$INSTDIR" File "..\build\cec-tray.exe"