Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[build] Convert all batch files to DOS-style line endings
http://help.wugnet.com/windows/system-find-batch-label-ftopict615555.html
documents a known error case that can occur when Unix-style line
endings are used in batch files.
  • Loading branch information
Michael Brown committed Oct 30, 2009
1 parent 386e3e5 commit e2d450f
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 65 deletions.
34 changes: 17 additions & 17 deletions bin/setup.bat
@@ -1,17 +1,17 @@
@echo off

title SAN Boot Configuration Driver

set cpu=
if "%PROCESSOR_ARCHITECTURE%"=="x86" set cpu=i386
if "%PROCESSOR_ARCHITECTURE%"=="AMD64" set cpu=amd64
if "%PROCESSOR_ARCHITEW6432%"=="AMD64" set cpu=amd64
if "%cpu%"=="" goto cpuerror

%0\..\%cpu%\setup.exe || exit /B 1
exit /B

:cpuerror
echo Could not determine CPU type
pause
exit /B 1
@echo off

title SAN Boot Configuration Driver

set cpu=
if "%PROCESSOR_ARCHITECTURE%"=="x86" set cpu=i386
if "%PROCESSOR_ARCHITECTURE%"=="AMD64" set cpu=amd64
if "%PROCESSOR_ARCHITEW6432%"=="AMD64" set cpu=amd64
if "%cpu%"=="" goto cpuerror

%0\..\%cpu%\setup.exe || exit /B 1
exit /B

:cpuerror
echo Could not determine CPU type
pause
exit /B 1
42 changes: 21 additions & 21 deletions src/build.bat
@@ -1,21 +1,21 @@
@echo off

if "%ddkdir%" == "" set ddkdir=C:\WinDDK\6001.18002

for /f "delims=" %%i in ('cd') do set cwd=%%i

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

: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
@echo off

if "%ddkdir%" == "" set ddkdir=C:\WinDDK\6001.18002

for /f "delims=" %%i in ('cd') do set cwd=%%i

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

: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
14 changes: 7 additions & 7 deletions src/clean.bat
@@ -1,7 +1,7 @@
@echo off

del /q ..\bin\i386\*.*
del /q ..\bin\amd64\*.*
del /q msi\*.wixobj
del /q msi\*.wixpdb
del /q ..\*.msi
@echo off

del /q ..\bin\i386\*.*
del /q ..\bin\amd64\*.*
del /q msi\*.wixobj
del /q msi\*.wixpdb
del /q ..\*.msi
12 changes: 6 additions & 6 deletions src/genmsi.bat
@@ -1,6 +1,6 @@
@echo off

for /f "delims=" %%i in ('cd') do set cwd=%%i

"%WIX%\bin\candle" -nologo -arch x86 -o %cwd%\msi\sanbootconf.wixobj %cwd%\msi\sanbootconf.wxs
"%WIX%\bin\light" -nologo -o %cwd%\..\sanbootconf.msi -pdbout %cwd%\msi\sanbootconf.wixpdb -b %cwd%\..\bin %cwd%\msi\sanbootconf.wixobj -ext WixUIExtension
@echo off

for /f "delims=" %%i in ('cd') do set cwd=%%i

"%WIX%\bin\candle" -nologo -arch x86 -o %cwd%\msi\sanbootconf.wixobj %cwd%\msi\sanbootconf.wxs
"%WIX%\bin\light" -nologo -o %cwd%\..\sanbootconf.msi -pdbout %cwd%\msi\sanbootconf.wixpdb -b %cwd%\..\bin %cwd%\msi\sanbootconf.wixobj -ext WixUIExtension
28 changes: 14 additions & 14 deletions src/testsign.bat
@@ -1,14 +1,14 @@
@echo off

if "%ddkdir%" == "" set ddkdir=C:\WinDDK\6001.18002

for /f "delims=" %%i in ('cd') do set cwd=%%i

set setenv=%ddkdir%\bin\setenv.bat %ddkdir% chk wnet x64
set cert=%cwd%\..\bin\testcer.cer

if not exist %cert% cmd /c "%setenv% && makecert -r -pe -ss PrivateCertStore -n CN=fensystems.co.uk %cert% && certmgr /add %cert% /s /r localMachine root && certmgr /add %cert% /s /r localMachine trustedpublisher" || exit /b 1
bcdedit -set TestSigning on || exit /b 1
bcdedit -set NoIntegrityChecks on || exit /b 1

cmd /c "%setenv% && signtool sign /s PrivateCertStore /n fensystems.co.uk /t http://timestamp.verisign.com/scripts/timestamp.dll %cwd%\..\bin\i386\*.sys %cwd%\..\bin\amd64\*.sys " || exit /b 1
@echo off

if "%ddkdir%" == "" set ddkdir=C:\WinDDK\6001.18002

for /f "delims=" %%i in ('cd') do set cwd=%%i

set setenv=%ddkdir%\bin\setenv.bat %ddkdir% chk wnet x64
set cert=%cwd%\..\bin\testcer.cer

if not exist %cert% cmd /c "%setenv% && makecert -r -pe -ss PrivateCertStore -n CN=fensystems.co.uk %cert% && certmgr /add %cert% /s /r localMachine root && certmgr /add %cert% /s /r localMachine trustedpublisher" || exit /b 1
bcdedit -set TestSigning on || exit /b 1
bcdedit -set NoIntegrityChecks on || exit /b 1

cmd /c "%setenv% && signtool sign /s PrivateCertStore /n fensystems.co.uk /t http://timestamp.verisign.com/scripts/timestamp.dll %cwd%\..\bin\i386\*.sys %cwd%\..\bin\amd64\*.sys " || exit /b 1

0 comments on commit e2d450f

Please sign in to comment.