cec: use the correct Sleep() method in CCECProcessor::OpenConnection(). the thread...
[deb_libcec.git] / support / create-driver-installer.cmd
1 @echo off
2
3 rem Check for NSIS
4 IF EXIST "%ProgramFiles%\NSIS\makensis.exe" (
5 set NSIS="%ProgramFiles%\NSIS\makensis.exe"
6 ) ELSE IF EXIST "%ProgramFiles(x86)%\NSIS\makensis.exe" (
7 set NSIS="%ProgramFiles(x86)%\NSIS\makensis.exe"
8 ) ELSE GOTO NONSIS
9
10 rem Check for the Windows DDK
11 IF NOT EXIST "C:\WinDDK\7600.16385.1" GOTO NODDK
12 set DDK="C:\WinDDK\7600.16385.1"
13
14 mkdir ..\build
15
16 echo. Copying driver installer
17 copy "%DDK%\redist\DIFx\dpinst\MultiLin\amd64\dpinst.exe" ..\build\dpinst-amd64.exe
18 copy "%DDK%\redist\DIFx\dpinst\MultiLin\x86\dpinst.exe" ..\build\dpinst-x86.exe
19
20 :CREATECAT
21 cd ..\driver
22 IF EXIST "..\support\private\create-cat.cmd" (
23 echo. Updating the catalogue
24 CALL ..\support\private\create-cat.cmd p8usb-cec.cat
25 )
26
27 :CREATEINSTALLER
28 echo. Creating the installer
29 %NSIS% /V1 /X"SetCompressor /FINAL lzma" "p8-usbcec-driver.nsi"
30
31 IF NOT EXIST "..\build\p8-usbcec-driver-installer.exe" GOTO :ERRORCREATINGINSTALLER
32
33 rem Sign the installer if sign-binary.cmd exists
34 IF EXIST "..\support\private\sign-binary.cmd" (
35 echo. Signing the installer binaries
36 CALL ..\support\private\sign-binary.cmd ..\build\p8-usbcec-driver-installer.exe
37 )
38
39 echo. The installer can be found here: ..\build\p8-usbcec-driver-installer.exe
40
41 GOTO EXIT
42
43 :NOSIS
44 echo. NSIS could not be found on your system.
45 GOTO EXIT
46
47 :NODDK
48 echo. Windows DDK could not be found on your system
49 GOTO EXIT
50
51 :ERRORCREATINGINSTALLER
52 echo. The installer could not be created.
53
54 :EXIT
55 del /q /f ..\build\dpinst-amd64.exe
56 del /q /f ..\build\dpinst-x86.exe
57 cd ..\support