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