4 rem EXAMPLE - Build entire openIB-windows release & WIX installers (.msi) files.
\r
5 rem Binary release is constructed in ..\Branches\WinOF\Wix\OS\bin.
\r
6 rem Processor architecture specific WIX installers are constructed
\r
9 rem BuildRelease {all | compile | makebin | msi | wix}
\r
12 rem all - recompile, install binaries to WIX tree, sign drivers and
\r
13 rem build installers.
\r
15 rem compile - recompile/link
\r
17 rem makebin - assumes binaries are built, will installs binaries to WIX tree
\r
18 rem sign drivers + builds installers (.msi files) in IDIR.
\r
20 rem msi - assumes binaries are installed in WIX tree, will sign drivers and
\r
21 rem create installers (.msi files) in IDIR.
\r
23 rem wix - build .msi installers, assumes (drivers signed) & .cat files exist
\r
25 rem Common invocations are:
\r
26 rem buildrelease compile
\r
27 rem buildrelease msi
\r
28 rem buildrelease all
\r
30 rem This script is an 'example' of a one-command entire IB stack build to
\r
31 rem single-file installer; used to build a WinOF release.
\r
32 rem Script is designed to be invoked from the <whatever>\gen1\trunk folder with
\r
33 rem <whatever>\branches\WinOF\Wix\* accessible.
\r
35 rem Verify the following env vars are suitible for your system configuration.
\r
36 rem _DDK, _PSDK, SVN, IDIR
\r
38 if "%1" == "" goto usage
\r
39 if "%1" == "/?" goto usage
\r
40 if "%1" == "-h" goto usage
\r
41 if "%1" == "all" goto OK
\r
42 if "%1" == "compile" goto OK
\r
43 if "%1" == "makebin" goto OK
\r
44 if "%1" == "msi" goto OK
\r
45 if "%1" == "wix" goto OK
\r
46 echo Unknown arg '%1' ?
\r
48 echo "usage: BuildRelease { all | compile | makebin | msi | wix }"
\r
53 rem set CERTNAME=noCert
\r
54 set CERTNAME=cse1CStore
\r
56 rem A Digital driver signing certificate store name may be required.
\r
58 if "%CERTNAME%" == "noCert" set /P CERTNAME=[Enter Certificate Store Name]
\r
59 if "%CERTNAME%" == "" (
\r
61 echo %0: Err - driver signing certificate store name required.
\r
62 echo %0: see certmgr.exe
\r
68 if "%CERTNAME%" == "noCert" set /P CERTNAME=[Enter Certificate Store Name]
\r
69 if "%CERTNAME%" == "" (
\r
71 echo %0: Err - driver signing certificate store name required.
\r
72 echo %0: see certmgr.exe
\r
79 set _DDK=C:\WinDDK\6001.18001
\r
81 if NOT EXIST %_DDK% (
\r
82 echo Missing WDK @ %_DDK%
\r
85 echo Building with WDK @ %_DDK%
\r
87 rem Platform SDK path - watchout for missing LoadPerf.h (installsp.c)
\r
88 set _PSDK=C:\progra~1\mi2578~1
\r
90 rem WARNING - SVN set depends on the path '\openIB-windows-svn\xxx\gen1', where SVN is set to XXX
\r
91 rem substring[23rd...26th] chars (offset counting) == xxxx
\r
93 rem If this example method doesn't fit your environment, set SVN accordingly.
\r
94 rem Note - OPENIB_REV is assigned SVN in a child script.
\r
98 rem assumes %CD% == '...\gen1\trunk'
\r
100 set WIX=%CD:trunk=Branches\WinOF\WIX%
\r
102 set RBIN_WLH=%WIX%\wlh\bin%
\r
103 set RBIN_WNET=%WIX%\wnet\bin%
\r
104 set RBIN_WXP=%WIX%\wxp\bin%
\r
106 if NOT EXIST "..\branches\WinOF\WIX\build-all-MSI.bat" (
\r
107 echo Missing .msi installer build script
\r
108 echo ..\branches\WinOF\WIX\build-all-MSI.bat
\r
112 rem WIX Installer files (.msi) destination folder - set for local environment.
\r
114 set IDIR=%SystemRoot%\temp
\r
116 echo Building for OPENIB_REV %SVN%, installer files @ %IDIR%
\r
117 echo Drivers signed using Certificate '%CERTNAME%'
\r
119 rem pause thoughtfully.
\r
120 if exist %windir%\system32\timeout.exe (
\r
126 if NOT EXIST "%IDIR%" (
\r
127 echo Missing Installer file destination folder %IDIR%
\r
131 rem Verify WIX 2.0 toolset is available - if not, download from
\r
132 rem http://sourceforge.net/project/showfiles.php?group_id=105970&package_id=114109
\r
133 rem select wix-2.0.5325.0-binaries.zip download and unzip to
\r
134 rem ..\branches\WinOF\WIX\WIX_tools\
\r
136 if NOT EXIST %WIX%\WIX_tools\wix-2.0.5325.0-binaries (
\r
137 echo Missing WIX tools @ %WIX%\WIX_tools
\r
141 if NOT EXIST etc\makebin.bat (
\r
142 echo Missing etc\makebin.bat, script must run from gen1\trunk
\r
147 rem skip build - assumes binaries already built.
\r
150 set CERTNAME=nosign
\r
155 if not EXIST "%RBIN_WLH%" goto InstallBin
\r
156 if not EXIST "%RBIN_WNET%" goto InstallBin
\r
157 if not EXIST "%RBIN_WXP%" goto InstallBin
\r
161 if "%1" == "makebin" goto InstallBin
\r
163 rem Compile everything
\r
167 rem ********* WLH - Windows Server 2008 & Vista
\r
170 %COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_x64.bat %SVN% %CD% %_DDK% %_PSDK% WLH & build %OPS%"
\r
171 if ERRORLEVEL 1 exit /B 1
\r
172 %COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_x64.bat %SVN% %CD% %_DDK% %_PSDK% WLH & build %OPS%"
\r
173 if ERRORLEVEL 1 exit /B 1
\r
177 %COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_x86.bat %SVN% %CD% %_DDK% %_PSDK% WLH & build %OPS%"
\r
178 if ERRORLEVEL 1 exit /B 1
\r
179 %COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_x86.bat %SVN% %CD% %_DDK% %_PSDK% WLH & build %OPS%"
\r
180 if ERRORLEVEL 1 exit /B 1
\r
183 %COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_IA64.bat %SVN% %CD% %_DDK% %_PSDK% WLH & build %OPS%"
\r
184 if ERRORLEVEL 1 exit /B 1
\r
185 %COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_IA64.bat %SVN% %CD% %_DDK% %_PSDK% WLH & build %OPS%"
\r
186 if ERRORLEVEL 1 exit /B 1
\r
189 rem ********* WXP - Windows XP - x86 only
\r
191 rem Fix XP WSD/installsp.exe build problems
\r
193 if exist .\ulp\wsd\dirs rename .\ulp\wsd\dirs Xdirs
\r
194 if exist .\tools\wsdinstall\dirs rename .\tools\wsdinstall\dirs Xdirs
\r
196 %COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_x86.bat %SVN% %CD% %_DDK% %_PSDK% WXP & build %OPS%"
\r
197 if ERRORLEVEL 1 exit /B 1
\r
199 %COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_x86.bat %SVN% %CD% %_DDK% %_PSDK% WXP & build %OPS%"
\r
200 if ERRORLEVEL 1 exit /B 1
\r
202 rem restore WSD/installsp builds
\r
203 if exist .\ulp\wsd\Xdirs rename .\ulp\wsd\Xdirs dirs
\r
204 if exist .\tools\wsdinstall\Xdirs rename .\tools\wsdinstall\Xdirs dirs
\r
208 rem ********* WNET - Windows Server 2003
\r
210 %COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_x64.bat %SVN% %CD% %_DDK% %_PSDK% WNET & build %OPS%"
\r
211 if ERRORLEVEL 1 exit /B 1
\r
212 %COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_x64.bat %SVN% %CD% %_DDK% %_PSDK% WNET & build %OPS%"
\r
213 if ERRORLEVEL 1 exit /B 1
\r
215 %COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_x86.bat %SVN% %CD% %_DDK% %_PSDK% WNET & build %OPS%"
\r
216 if ERRORLEVEL 1 exit /B 1
\r
217 %COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_x86.bat %SVN% %CD% %_DDK% %_PSDK% WNET & build %OPS%"
\r
218 if ERRORLEVEL 1 exit /B 1
\r
220 %COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_IA64.bat %SVN% %CD% %_DDK% %_PSDK% WNET & build %OPS%"
\r
221 if ERRORLEVEL 1 exit /B 1
\r
222 %COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_IA64.bat %SVN% %CD% %_DDK% %_PSDK% WNET & build %OPS%"
\r
223 if ERRORLEVEL 1 exit /B 1
\r
225 if "%1" == "compile" goto finito
\r
227 rem Install binaries into WIX environment, build msi installers.
\r
231 echo Create binary release tree - suitible for WinOF-WIX installer build.
\r
233 if EXIST "%RBIN_WLH%" rmdir /S /Q %RBIN_WLH%
\r
234 if EXIST "%RBIN_WNET%" rmdir /S /Q %RBIN_WNET%
\r
235 if EXIST "%RBIN_WXP%" rmdir /S /Q %RBIN_WXP%
\r
241 if EXIST "%BSE%\etc\makebin.bat" (
\r
242 call %BSE%\etc\makebin.bat %BSE% %RBIN_WLH% wlh
\r
244 echo %0: Err in makebin.bat %BSE% %RBIN_WLH% wlh
\r
247 call %BSE%\etc\makebin.bat %BSE% %RBIN_WNET% wnet
\r
249 echo %0: Err in makebin.bat %BSE% %RBIN_WNET% wnet
\r
252 call %BSE%\etc\makebin.bat %BSE% %RBIN_WXP% wxp
\r
254 echo %0: Err in makebin.bat %BSE% %RBIN_WXP% wxp
\r
259 if "%1" == "makebin" goto finito
\r
263 echo %0 - Drivers Signed with %CERTNAME% , Binary releases built in
\r
268 rem build WIX installers --> see ..\branches\WinOF\WIX
\r
270 %COMSPEC% /V:on /E:on /C "%_DDK%\bin\setenv.bat %_DDK% fre X64 WNET & cd /D %WIX% & build-all-MSI %CERTNAME% %IDIR%"
\r
276 echo %0: Finished %0 %*
\r
277 echo %0: Started %STIME%
\r
278 echo %0: Finished %TIME%
\r