+ ExecWait '"$INSTDIR\driver\p8-usbcec-driver-installer.exe" /S'
+ Delete "$INSTDIR\driver\p8-usbcec-driver-installer.exe"
+SectionEnd
+
+Section "libCEC" SecLibCec
+ SetShellVarContext current
+ SectionIn 1 3
+
+ ; Copy to the installation directory
+ SetOutPath "$INSTDIR"
+ File "..\ChangeLog"
+ File "..\README"
+ File "..\build\*.dll"
+ SetOutPath "$INSTDIR\x64"
+ File /nonfatal "..\build\x64\*.dll"
+
+ ; Copy to XBMC\system
+ ReadRegStr $1 HKCU "Software\XBMC" ""
+ ${If} $1 != ""
+ SetOutPath "$1\system"
+ File "..\build\libcec.dll"
+ ${EndIf}
+
+ ; Copy the headers
+ SetOutPath "$INSTDIR\include"
+ File /r /x *.so "..\include\cec*.*"
+SectionEnd
+
+Section "CEC debug client" SecCecClient
+ SetShellVarContext current
+ SectionIn 3
+
+ ; Copy to the installation directory
+ SetOutPath "$INSTDIR"
+ File /x p8-usbcec-driver-installer.exe /x cec-config-gui.exe "..\build\*.exe"
+ SetOutPath "$INSTDIR\x64"
+ File /nonfatal /x cec-config-gui.exe "..\build\x64\*.exe"
+
+ !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
+ SetOutPath "$INSTDIR"
+
+ CreateDirectory "$SMPROGRAMS\$StartMenuFolder"