1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
;libCEC EventGhost Plugin installer
;Copyright (C) 2025 Pulse-Eight Ltd.
;http://www.pulse-eight.com/
XPStyle on
RequestExecutionLevel user
SetCompressor /SOLID lzma
!include "LogicLib.nsh"
!include "MUI2.nsh"
!include "nsDialogs.nsh"
!include "nsis\libcec-version.nsh"
Name "Pulse-Eight libCEC v${LIBCEC_VERSION_STRING} EventGhost Plugin"
OutFile "..\build\libcec-eventghost-plugin-${LIBCEC_VERSION_STRING}.exe"
InstType "Full installation"
Var EventGhostLocation
Section "EventGhost plugin" SecEvGhostCec
SetShellVarContext current
SectionIn 1
SectionIn RO
SetOutPath "$%TEMP%\"
File "..\build\EventGhost\pulse_eight.egplugin"
ExecWait '"$EventGhostLocation\eventghost.exe" "$%TEMP%\pulse_eight.egplugin"'
Delete "$%TEMP%\pulse_eight.egplugin"
SectionEnd
Function EventGhost
ReadRegDword $1 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\EventGhost_is1" "InstallLocation"
${If} $1 != ""
StrCpy $EventGhostLocation "$1"
${Else}
MessageBox MB_OK "EventGhost is not installed. Exiting."
Quit
${Endif}
FunctionEnd
!define MUI_FINISHPAGE_LINK "Visit https://libcec.pulse-eight.com/ for more information."
!define MUI_FINISHPAGE_LINK_LOCATION "https://libcec.pulse-eight.com/"
!define MUI_ABORTWARNING
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "..\LICENSE.md"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_LANGUAGE "English"
Function .onInit
; check for EventGhost
Call EventGhost
FunctionEnd
|