From b521303c15095126a641423219cff826156afc81 Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Sat, 6 Oct 2012 11:28:42 +0200 Subject: [PATCH] let the installer uninstall previous beta installations of libCEC Tray, and remove cec-config-gui.exe when installing --- project/libCEC.nsi | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) 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" -- 2.34.1