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