-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake_package.bat
74 lines (63 loc) · 2.13 KB
/
make_package.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
:: ddk environment
if "%1"=="64" (
call C:\WinDDK\7600.16385.1\bin\setenv.bat C:\WinDDK\7600.16385.1\ fre x64 WNET no_oacr
) else (
call C:\WinDDK\7600.16385.1\bin\setenv.bat C:\WinDDK\7600.16385.1\ fre x86 WXP no_oacr
)
if "%1"=="64" (
set other_arch_spec=amd64
) else (
set other_arch_spec=i386
)
cd %~dp0
:: build busdog filter driver
build -ceZg
if exist build%BUILD_ALT_DIR%.err goto error
echo +++++++++++++++++++++++++++++++++
echo +++busdog filter driver built!+++
echo +++++++++++++++++++++++++++++++++
:: sign driver
SignTool sign /f testcert.pfx /p test /t http://timestamp.verisign.com/scripts/timestamp.dll filter\obj%BUILD_ALT_DIR%\%other_arch_spec%\busdog.sys
if errorlevel 1 goto error
echo +++++++++++++++++++++++++++++++++++++++
echo +++busdog filter driver test signed!+++
echo +++++++++++++++++++++++++++++++++++++++
:: copy driver to busdog gui directory
xcopy /Y filter\obj%BUILD_ALT_DIR%\%other_arch_spec%\busdog.sys gui\driverRes\bin
if errorlevel 1 goto error
xcopy /Y filter\obj%BUILD_ALT_DIR%\%other_arch_spec%\busdog.pdb gui\driverRes\bin
if errorlevel 1 goto error
xcopy /Y filter\obj%BUILD_ALT_DIR%\%other_arch_spec%\busdog.inf gui\driverRes\bin
if errorlevel 1 goto error
xcopy /Y %BASEDIR%\redist\wdf\%_BUILDARCH%\wdfcoinstaller?????.dll gui\driverRes\bin
if errorlevel 1 goto error
xcopy /Y %BASEDIR%\redist\DIFx\dpinst\MultiLin\%_BUILDARCH%\dpinst.exe gui\driverRes\bin
if errorlevel 1 goto error
::visual studio environment
if exist "c:\Program Files (x86)" (
call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86
) else (
call "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86
)
if errorlevel 1 goto error
cd %~dp0
:: build busdog gui
cd gui
msbuild build.xml /t:clean
if errorlevel 1 goto error
msbuild build.xml /t:release
if errorlevel 1 goto error
echo +++++++++++++++++++++++
echo +++busdog gui built!+++
echo +++++++++++++++++++++++
:: finito!
goto end
:error
echo +++++++++++++++++++++
echo +++Error in build!+++
echo +++++++++++++++++++++
cd %~dp0
exit /B 1
:end
cd %~dp0
exit /B 0