Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[build] Generate catalogue file and sign binaries automatically
Incorporate the building of a catalogue file (using inf2cat), and sign binaries automatically as part of the build process. If the official Fen Systems Ltd. code-signing certificate is available, it will be used; if not then a self-signed test certificate will be generated and used instead.
- Loading branch information
Michael Brown
committed
Oct 30, 2009
1 parent
e2d450f
commit 15c04ae
Showing
7 changed files
with
73 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,52 @@ | ||
@echo off | ||
|
||
if "%ddkdir%" == "" set ddkdir=C:\WinDDK\6001.18002 | ||
set setenv=%ddkdir%\bin\setenv.bat %ddkdir% | ||
|
||
for /f "delims=" %%i in ('cd') do set cwd=%%i | ||
|
||
rem Build code | ||
rem | ||
call :build driver chk w2k i386 | ||
call :build installer chk w2k i386 | ||
call :build driver chk wnet x64 | ||
call :build installer chk wnet x64 | ||
|
||
goto :end | ||
rem Create catalogue file | ||
rem | ||
set oslist=2000,XP_x86,XP_x64,Server2003_x86,Server2003_x64,Vista_x86,Vista_x64,Server2008_x86,Server2008_x64 | ||
cmd /c "%setenv% && inf2cat /driver:%cwd%\..\bin /os:%oslist%" || exit /b 1 | ||
|
||
rem Sign files | ||
rem | ||
set certname="Fen Systems Ltd." | ||
set xcertfile=%cwd%\certs\mscv_globalsign.cer | ||
cmd /c "%setenv% && certmgr -put -s my -c -n %certname% NUL >NUL" && goto havecert | ||
set certname="Test Certificate for sanbootconf" | ||
set certfile=%cwd%\certs\testcer.cer | ||
if exist %certfile% goto havecert | ||
cmd /c "%setenv% && makecert -r -ss my -n CN=%certname% %certfile%" || exit /b 1 | ||
echo *********************************************************************** | ||
echo * * | ||
echo * Using a self-signed test certificate * | ||
echo * * | ||
echo * If you are using Windows Vista or newer, you must enable the use of * | ||
echo * self-signed driver certificates by typing * | ||
echo * * | ||
echo * bcdedit -set TestSigning Yes * | ||
echo * * | ||
echo * before installing this driver. * | ||
echo * * | ||
echo *********************************************************************** | ||
:havecert | ||
set timestamp=http://timestamp.verisign.com/scripts/timestamp.dll | ||
set desc="SAN Boot Configuration Driver" | ||
cmd /c "%setenv% && signtool sign -ac %xcertfile% -n %certname% -t %timestamp% -d %desc% %cwd%\..\bin\i386\*.sys %cwd%\..\bin\amd64\*.sys %cwd%\..\bin\*.cat" || exit /b 1 | ||
|
||
exit /b | ||
|
||
:build | ||
set subdir=%cwd%\%1 | ||
set ddkenv=%2 %3 %4 | ||
echo Building %subdir% for %ddkenv% | ||
cmd /c "%ddkdir%\bin\setenv.bat %ddkdir% %ddkenv% && cd /d %subdir% && build /cwg" || exit /b 1 | ||
goto :end | ||
|
||
:end | ||
cmd /c "%setenv% %ddkenv% && cd /d %subdir% && build /cwg" || exit /b 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
testcer.cer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIFfzCCA2egAwIBAgIKYQt/awAAAAAAGTANBgkqhkiG9w0BAQUFADB/MQswCQYD | ||
VQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEe | ||
MBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSkwJwYDVQQDEyBNaWNyb3Nv | ||
ZnQgQ29kZ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AQATxWxeB388V/+bMV8/ | ||
vZVUJcZ5+SwxA01kaUtW2VuXb3zz8NAkZXU4Y5gTcBYT96cB8cYj4IWGbAvwgJRa | ||
deh85B6StHO/wbOnsAvTGITLzAmjXJxPPrA6nC0bxATvlzeWb+Xsuqxqs9TiPN+L | ||
JeesvGJFMd2kCnLkG/h4QwHMujkU3l2Qrthaz17KRoFRM9WmDlhn09hmWIgWm+6x | ||
GsqtkROEIdqabiDv2gB0KLrJX/NNXcPaJWklVOpEvMObKTMc1jyWH4eBxVPXKicz | ||
1C4ZfAhYbdtOGZmp6l/zmp2MUTpaXL0vqQg1m1Sn2zUaUhYzNDqjgARq/bSDjK2Q | ||
zww6ZZbsM04YJrhJu+uBkv8TTTJLI8cz57ZxaxX2nIDmvLdsvkHVAzpxMxUAUHQ7 | ||
Dl35lqrtkD6rE0yAmSa8OKXrAjaJHbYgvoOrEPgZntdjedSusS9hNvlKS6gzxw5y | ||
QfnxsZB+rkbv3jl7daBBFFkEHUK8R4i4Ew4F+h3wgI3/cMZ32EvcRg4jGnLVv97+ | ||
qq5pWDz8XEbk1YGai25lWXcaMqWQprZkk2T9B1PJoN4orSpsxjjRgc6Y9UAZ6SwX | ||
Q6QmX9NEMFPkHQK6pAovFt16YCdSQrutmDcol+S40nkR4xCMSNUwXQoMUt71iOqN | ||
Gi1nyfSAFIS3hQzRZiilxm8kYQ== | ||
-----END CERTIFICATE----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.