win-pvdrivers

view makedist.bat @ 1086:3d4d85c41fc6

Added tag 1.0.1085 for changeset 896402519f15
author James Harper <james.harper@bendigoit.com.au>
date Thu Dec 12 20:06:12 2013 +1100 (2013-12-12)
parents 04fc4aca982c
children 27bd2a5a4704
line source
1 @echo off
2 IF NOT EXIST set_ddk_path.bat ECHO >set_ddk_path.bat SET DDK_PATH=C:\WinDDK\7600.16385.0
3 IF NOT EXIST set_ddk_path_2k.bat ECHO >set_ddk_path_2k.bat SET DDK_PATH_2K=C:\WinDDK\6001.18002
5 SET BUILD_NUMBER=1
6 SET VERSION_MAJOR=1
7 SET VERSION_MINOR=0
8 for /f %%i in ('hg identify --num -r .') do set REVISION=%%i
10 hg status | findstr "^M" && GOTO TEST_BUILD
11 SET GPLPV_VERSION=%VERSION_MAJOR%.%VERSION_MINOR%.%REVISION%
12 GOTO DONE_VERSION
14 :TEST_BUILD
15 IF EXIST build_number.bat CALL build_number.bat
16 SET GPLPV_VERSION=%VERSION_MAJOR%.%VERSION_MINOR%.%REVISION%.%BUILD_NUMBER%
18 :DONE_VERSION
20 SET /A NEW_BUILD_NUMBER=%BUILD_NUMBER%+1
21 ECHO >build_number.bat SET BUILD_NUMBER=%NEW_BUILD_NUMBER%
23 ECHO BUILDING %GPLPV_VERSION%
25 CALL set_ddk_path.bat
26 CALL set_ddk_path_2K.bat
28 SET PV_DIR=%CD%
30 SET SIGNTOOL=%DDK_PATH%\bin\x86\signtool.exe
31 IF NOT EXIST %SIGNTOOL% SET SIGNTOOL=%DDK_PATH%\bin\selfsign\signtool.exe
33 SET CERT_FILENAME=
34 SET CERT_PASSWORD=
35 SET CERT_CROSS_CERT_FILENAME=
36 SET CERT_PUBLIC_FILENAME=
37 IF NOT EXIST SIGN_CONFIG.BAT GOTO DONT_SIGN
38 CALL SIGN_CONFIG.BAT
39 SET CERT_CROSS_CERT_FLAG=
40 SET CERT_PASSWORD_FLAG=
41 IF DEFINED CERT_CROSS_CERT_FILENAME SET CERT_CROSS_CERT_FLAG=/ac %CERT_CROSS_CERT_FILENAME%
42 IF DEFINED CERT_PASSWORD SET CERT_PASSWORD_FLAG=-p %CERT_PASSWORD%
43 IF EXIST %CERT_FILENAME% GOTO :DONT_SIGN
44 "%DDK_PATH%"\bin\x86\makecert -r -pe -ss PrivateCertStore -n "CN=GPLPV Test Cert" %CERT_PUBLIC_FILENAME%
45 certutil -exportpfx -user -privatekey %CERT_PASSWORD_FLAG% PrivateCertStore "GPLPV Test Cert" "%CERT_FILENAME%
46 :DONT_SIGN
48 mkdir symbols\%GPLPV_VERSION%
50 cmd /C "%DDK_PATH_2K%\bin\setenv.bat %DDK_PATH_2K%\ chk W2K && CD /D "%PV_DIR%" && build -cZg ~xenvbd_storport ~xenusb ~copyconfig ~waitnopendinginstallevents && call sign.bat && call archive.bat && call wix.bat"
52 cmd /C "%DDK_PATH%\bin\setenv.bat %DDK_PATH%\ chk WXP && CD /D "%PV_DIR%" && build -cZg ~xenvbd_storport && call sign.bat && call archive.bat && call wix.bat"
54 cmd /C "%DDK_PATH%\bin\setenv.bat %DDK_PATH%\ chk WNET && CD /D "%PV_DIR%" && build -cZg && call sign.bat && call archive.bat && call wix.bat"
56 cmd /C "%DDK_PATH%\bin\setenv.bat %DDK_PATH%\ chk x64 WNET && CD /D "%PV_DIR%" && build -cZg && call sign.bat && call archive.bat && call wix.bat"
58 cmd /C "%DDK_PATH%\bin\setenv.bat %DDK_PATH%\ chk WLH && CD /D "%PV_DIR%" && build -cZg && call sign.bat && call archive.bat && call wix.bat"
60 cmd /C "%DDK_PATH%\bin\setenv.bat %DDK_PATH%\ chk x64 WLH && CD /D "%PV_DIR%" && build -cZg && call sign.bat && call archive.bat && call wix.bat"
62 cmd /C "%DDK_PATH_2K%\bin\setenv.bat %DDK_PATH_2K%\ fre W2K && CD /D "%PV_DIR%" && build -cZg ~xenvbd_storport ~xenusb ~copyconfig ~waitnopendinginstallevents && call sign.bat && call wix.bat"
64 cmd /C "%DDK_PATH%\bin\setenv.bat %DDK_PATH%\ fre WXP && CD /D "%PV_DIR%" && build -cZg ~xenvbd_storport && call sign.bat && call wix.bat"
66 cmd /C "%DDK_PATH%\bin\setenv.bat %DDK_PATH%\ fre WNET && CD /D "%PV_DIR%" && build -cZg && call sign.bat && call wix.bat"
68 cmd /C "%DDK_PATH%\bin\setenv.bat %DDK_PATH%\ fre x64 WNET && CD /D "%PV_DIR%" && build -cZg && call sign.bat && call wix.bat"
70 cmd /C "%DDK_PATH%\bin\setenv.bat %DDK_PATH%\ fre WLH && CD /D "%PV_DIR%" && build -cZg && call sign.bat && call wix.bat"
72 cmd /C "%DDK_PATH%\bin\setenv.bat %DDK_PATH%\ fre x64 WLH && CD /D "%PV_DIR%" && build -cZg && call sign.bat && call wix.bat"
74 hg status | findstr "^M" && GOTO DONT_TAG
75 IF NOT EXIST TAG_HG GOTO DONT_TAG
76 IF EXIST BUILD*.WRN GOTO DONT_TAG
77 IF EXIST BUILD*.ERR GOTO DONT_TAG
79 hg tag %GPLPV_VERSION%
81 :DONT_TAG