cec: fixed crash on exit in LibCecSharp
[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
14cd ..\project
15
16del /s /f /q ..\build
17mkdir ..\build
18
19echo. Copying driver installer
20copy "%DDK%\redist\DIFx\dpinst\MultiLin\amd64\dpinst.exe" ..\build\dpinst-amd64.exe
21copy "%DDK%\redist\DIFx\dpinst\MultiLin\x86\dpinst.exe" ..\build\dpinst-x86.exe
22
23:CREATEINSTALLER
24echo. Creating the installer
25%NSIS% /V1 /X"SetCompressor /FINAL lzma" "p8-usbcec-driver.nsi"
26
27IF NOT EXIST "..\build\p8-usbcec-driver-installer.exe" GOTO :ERRORCREATINGINSTALLER
28
29rem Sign the installer if sign-binary.cmd exists
30IF EXIST "..\support\sign-binary.cmd" (
31 echo. Signing the installer binaries
32 CALL ..\support\sign-binary.cmd ..\build\p8-usbcec-driver-installer.exe
33)
34
35echo. The installer can be found here: ..\build\p8-usbcec-driver-installer.exe
36
37GOTO EXIT
38
39:NOSIS
40echo. NSIS could not be found on your system.
41GOTO EXIT
42
43:NODDK
44echo. Windows DDK could not be found on your system
45GOTO EXIT
46
47:ERRORCREATINGINSTALLER
48echo. The installer could not be created.
49
50:EXIT
51del /q /f ..\build\dpinst-amd64.exe
52del /q /f ..\build\dpinst-x86.exe
53cd ..\support