forked from desowin/usbpcap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
driver_build_win8.bat
44 lines (33 loc) · 1.07 KB
/
driver_build_win8.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
::Parameters:
:: %1 - x86 or x86_amd64
call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" %1
if "%1"=="x86" (
set USBPcap_catalog=USBPcapx86.cat
set USBPcap_OS=8_X86
set USBPcap_prefix=.
) else (
set USBPcap_catalog=USBPcapamd64.cat
set USBPcap_OS=8_X64
set USBPcap_prefix=x64
)
cd %~dp0
CALL config.bat
::Delete the release directory if it already exists
if exist %USBPcap_prefix%\Win8Release RMDIR /S /Q %USBPcap_prefix%\Win8Release
Nmake2MsBuild dirs
MSBuild dirs.sln /p:Configuration="Win8 Release"
%_USBPCAP_SIGNTOOL% %_USBPCAP_SIGN_OPTS% %USBPcap_prefix%\Win8Release\Package\USBPcap.sys
if errorlevel 1 goto error
Inf2cat.exe /driver:%USBPcap_prefix%\Win8Release\Package\ /os:%USBPcap_OS%
goto end
:error
echo ===== BUILD FAILED! =====
pause
exit /B 1
:end
copy %USBPcap_prefix%\Win8Release\Package\USBPcap.sys %2
copy %USBPcap_prefix%\Win8Release\Package\USBPcap.inf %2
copy %USBPcap_prefix%\Win8Release\Package\%USBPcap_catalog% %2
%_USBPCAP_SIGNTOOL% %_USBPCAP_SIGN_OPTS% %2\%USBPcap_catalog%
if errorlevel 1 goto error
exit /B 0