From: stansmith Date: Wed, 12 Nov 2008 23:41:00 +0000 (+0000) Subject: [WinOF] cleaning house - move trunk\buildrelease.bat --> trunk\WinOF X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=ea9f468349d93d66824bee8233a9de90337c106f;p=~shefty%2Frdma-win.git [WinOF] cleaning house - move trunk\buildrelease.bat --> trunk\WinOF git-svn-id: svn://openib.tc.cornell.edu/gen1@1754 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- diff --git a/trunk/BuildRelease.bat b/trunk/BuildRelease.bat deleted file mode 100644 index e9119626..00000000 --- a/trunk/BuildRelease.bat +++ /dev/null @@ -1,396 +0,0 @@ -@echo off -setlocal -rem -rem EXAMPLE - Build entire openIB-windows release & WIX installers (.msi) files. -rem Binary release is constructed in ..\Branches\WinOF\Wix\OS\bin. -rem Processor architecture specific WIX installers are constructed -rem in %IDIR% -rem -rem BuildRelease option -rem option == all | allnoforce | compile | compilenoforce | makebin | msi | wix | clean | msi-label | msi-del | msi-dir {OPENIB_REV} -rem - -rem This script is an 'example' of a one-command entire IB stack build to -rem single-file installer; used to build a WinOF releases. -rem Script is designed to be invoked from the \gen1\trunk folder with -rem \branches\WinOF\Wix\* accessible. -rem -rem Verify the following env vars are suitible for your system configuration. -rem _DDK, _PSDK, SVN, IDIR - -if "%1" == "" goto usage -if "%1" == "/?" goto usage -if "%1" == "-h" goto usage -if "%1" == "all" goto OK -if "%1" == "allnoforce" goto OK -if "%1" == "compile" goto OK -if "%1" == "compilenoforce" goto OK -if "%1" == "makebin" goto OK -if "%1" == "msi" goto OK -if "%1" == "wix" goto OK -if "%1" == "clean" goto OK -if "%1" == "msi-label" goto OK -if "%1" == "msi-del" goto OK -if "%1" == "msi-dir" goto OK - -echo Unknown arg '%1' ? - -:usage - -echo "usage: BuildRelease command {OPENIB_REV value}" -echo where 'command' may be: -echo all - force recompile, install binaries to WIX tree, sign drivers and -echo build installers. - -echo allnoforce - recompile only if needed, install binaries to WIX tree, -echo sign drivers and build installers. -echo compile - force a recompile/link of everything then exit. -echo compilenoforce - recompile/link only if needed then exit. -echo makebin - assumes binaries are built, will installs binaries to WIX tree -echo then exit. -echo msi - assumes binaries are installed in WIX tree, signs drivers and -echo create installers (.msi files) in IDIR. -echo wix - build .msi installers, assumes (drivers signed) .cat files exist -echo clean - remove build artifacts for a clean build: .obj, .sys, ... -echo msi-label {OPENIB_REV} -echo rename WOF_os*_arch*.msi to WOF_os*_arch*_svn#.msi -echo Uniquely identify installers just created. -echo If OPENIB_REV arg used, then rename WOF_os*_arch*argVal.msi -echo otherwise, use SVN# from path. -echo msi-del - del %windir%\temp\WOF_os*_arch*.msi -echo msi-dir - del %windir%\temp\WOF_os*_arch*.msi -echo : -echo {OPENIB_REV} -echo optional, if set then OPENIB_REV is assigned this value. -echo example: BuildRelease all 1414 - -exit /B 1 - -:OK - -if not "%WDM_INC_PATH%" == "" ( - echo %0: Error - %0 unable to run from WDK window, - echo use %comspec% - exit /B 1 -) - -rem remove build artifacts -if "%1" == "clean" ( - echo Removing build artifacts and folders... - call %CD%\etc\clean-build.bat - exit /B 0 -) - -rem set CERTNAME=noCert -set CERTNAME=cse1CStore - -rem A Digital driver signing certificate store name may be required. -if "%1" == "all" ( - if "%CERTNAME%" == "noCert" set /P CERTNAME=[Enter Certificate Store Name] - if "%CERTNAME%" == "" ( - echo %0 - echo %0: Err - driver signing certificate store name required. - echo %0: see certmgr.exe - exit /B 1 - ) -) - -if "%1" == "msi" ( - if "%CERTNAME%" == "noCert" set /P CERTNAME=[Enter Certificate Store Name] - if "%CERTNAME%" == "" ( - echo %0 - echo %0: Err - driver signing certificate store name required. - echo %0: see certmgr.exe - exit /B 1 - ) -) - -rem Use this WDK - -set _DDK=%SystemDrive%\WinDDK\6001.18001 - -if NOT EXIST %_DDK% ( - echo Missing WDK @ %_DDK% - exit /B 1 -) - -rem Platform SDK path - watchout for missing LoadPerf.h (installsp.c) -set _PSDK=%SystemDrive%\progra~1\mi2578~1 - -rem setup value for OPENIB_REV assignment. - -if not "%2" == "" ( - set SVN=%2 - set LBL=%2 -) else ( - rem WARNING - SVN value depends on the path '\openIB-windows-svn\XXX\gen1', - rem where SVN is set to XXX - rem substring[23rd...26th] chars (offset counting) == xxxx - rem Note - OPENIB_REV is assigned SVN in a child script. - - set SVN=%CD:~22,4% - set LBL=_svn.!SVN! -) - -rem assumes %CD% == '...\gen1\trunk' -set BSE=%CD% -set WIX=%CD:trunk=Branches\WinOF\WIX% - -set RBIN_WLH=%WIX%\wlh\bin% -set RBIN_WNET=%WIX%\wnet\bin% -set RBIN_WXP=%WIX%\wxp\bin% - -if NOT EXIST "..\branches\WinOF\WIX\build-all-MSI.bat" ( - echo %0 - Missing .msi installer build script - echo ..\branches\WinOF\WIX\build-all-MSI.bat - exit /B 1 -) - -rem WIX Installer files (.msi) destination folder - set for local environment. -rem -set IDIR=%SystemRoot%\temp - -if "%1" == "msi-label" ( - pushd %IDIR% - if exist WOF_wxp_x86.msi ( - if exist WOF_wxp_x86%LBL%.msi del /F/Q WOF_wxp_x86%LBL%.msi - rename WOF_wxp_x86.msi WOF_wxp_x86%LBL%.msi - ) - - if exist WOF_wnet_x86.msi ( - if exist WOF_wnet_x86%LBL%.msi del /F/Q WOF_wnet_x86%LBL%.msi - rename WOF_wnet_x86.msi WOF_wnet_x86%LBL%.msi - ) - if exist WOF_wnet_x64.msi ( - if exist WOF_wnet_x64%LBL%.msi del /F/Q WOF_wnet_x64%LBL%.msi - rename WOF_wnet_x64.msi WOF_wnet_x64%LBL%.msi - ) - if exist WOF_wnet_ia64.msi ( - if exist WOF_wnet_ia64%LBL%.msi del /F/Q WOF_wnet_ia64%LBL%.msi - rename WOF_wnet_ia64.msi WOF_wnet_ia64%LBL%.msi - ) - - if exist WOF_wlh_x86.msi ( - if exist WOF_wlh_x86%LBL%.msi del /F/Q WOF_wlh_x86%LBL%.msi - rename WOF_wlh_x86.msi WOF_wlh_x86%LBL%.msi - ) - if exist WOF_wlh_x64.msi ( - if exist WOF_wlh_x64%LBL%.msi del /F/Q WOF_wlh_x64%LBL%.msi - rename WOF_wlh_x64.msi WOF_wlh_x64%LBL%.msi - ) - if exist WOF_wlh_ia64.msi ( - if exist WOF_wlh_ia64%LBL%.msi del /F/Q WOF_wlh_ia64%LBL%.msi - rename WOF_wlh_ia64.msi WOF_wlh_ia64%LBL%.msi - ) - dir WOF_*%LBL%.msi - popd - exit /B 0 -) - -if "%1" == "msi-del" ( - echo Deleting WOF_{wxp,wnet,wlh}_{x86,x64,ia64}%LBL%.msi - pushd %IDIR% - if exist WOF_wxp_x86%LBL%.msi del /F/P WOF_wxp_x86%LBL%.msi - - if exist WOF_wnet_x86%LBL%.msi del /F/P WOF_wnet_x86%LBL%.msi - if exist WOF_wnet_x64%LBL%.msi del /F/P WOF_wnet_x64%LBL%.msi - if exist WOF_wnet_ia64%LBL%.msi del /F/P WOF_wnet_ia64%LBL%.msi - - if exist WOF_wlh_x86%LBL%.msi del /F/P WOF_wlh_x86%LBL%.msi - if exist WOF_wlh_x64%LBL%.msi del /F/P WOF_wlh_x64%LBL%.msi - if exist WOF_wlh_ia64%LBL%.msi del /F/P WOF_wlh_ia64%LBL%.msi - - dir /N/OD WOF_*.msi - popd - exit /B 0 -) - -if "%1" == "msi-dir" ( - pushd %IDIR% - dir /N/OD WOF_*.msi - popd - exit /B 0 -) - -echo %0 - Building with WDK @ %_DDK% -echo Building for OPENIB_REV %SVN%, installer files @ %IDIR% -echo Drivers signed using Certificate '%CERTNAME%' - -rem pause thoughtfully. -if exist %windir%\system32\timeout.exe ( - timeout /T 10 -) else ( - pause -) - -if NOT EXIST "%IDIR%" ( - echo %0 - Missing Installer file destination folder %IDIR% - exit /B 1 -) - -rem Verify WIX 2.0 toolset is available - if not, download from -rem http://sourceforge.net/project/showfiles.php?group_id=105970&package_id=114109 -rem select wix-2.0.5325.0-binaries.zip download and unzip to -rem ..\branches\WinOF\WIX\WIX_tools\ -rem -if NOT EXIST %WIX%\WIX_tools\wix-2.0.5325.0-binaries ( - echo %0 - Missing WIX tools @ %WIX%\WIX_tools - exit /B 1 -) - -if NOT EXIST etc\makebin.bat ( - echo %0 - Missing etc\makebin.bat, script must run from gen1\trunk - exit /B 1 -) -set STIME=%TIME% - -rem skip build - assumes binaries already built. - -if "%1" == "wix" ( - set CERTNAME=nosign - goto mk_msi -) - -if "%1" == "msi" ( - if not EXIST "%RBIN_WLH%" goto InstallBin - if not EXIST "%RBIN_WNET%" goto InstallBin - if not EXIST "%RBIN_WXP%" goto InstallBin - goto mk_msi -) - -if "%1" == "makebin" goto InstallBin - -set OPS=-wgcPM 3 -if "%1" == "allnoforce" ( - rem Compile everything only if needed. - set OPS=-wgPM 3 -) -if "%1" == "compilenoforce" ( - rem Compile everything only if needed. - set OPS=-wgPM 3 -) - -if "%1" == "all" ( - echo Removing build artifacts and folders... - call %CD%\etc\clean-build.bat -) - -rem ********* Compile for WLH - Windows Server 2008 & Vista - -rem WLH x64 -echo %0 - Build WLH x64 Checked -%COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_x64.bat %SVN% %CD% %_DDK% %_PSDK% WLH & build %OPS%" -if ERRORLEVEL 1 exit /B 1 -echo %0 - Build WLH x64 Free -%COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_x64.bat %SVN% %CD% %_DDK% %_PSDK% WLH & build %OPS%" -if ERRORLEVEL 1 exit /B 1 - -rem WLH x86 - -echo %0 - Build WLH x86 Checked -%COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_x86.bat %SVN% %CD% %_DDK% %_PSDK% WLH & build %OPS%" -if ERRORLEVEL 1 exit /B 1 -echo %0 - Build WLH x86 Free -%COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_x86.bat %SVN% %CD% %_DDK% %_PSDK% WLH & build %OPS%" -if ERRORLEVEL 1 exit /B 1 - -rem WLH ia64 -echo %0 - Build WLH ia64 Checked -%COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_IA64.bat %SVN% %CD% %_DDK% %_PSDK% WLH & build %OPS%" -if ERRORLEVEL 1 exit /B 1 -echo %0 - Build WLH ia64 Free -%COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_IA64.bat %SVN% %CD% %_DDK% %_PSDK% WLH & build %OPS%" -if ERRORLEVEL 1 exit /B 1 - - -rem ********* WXP - Windows XP - x86 only - -echo %0 - Build XP x86 Checked -%COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_x86.bat %SVN% %CD% %_DDK% %_PSDK% WXP & build %OPS%" -if ERRORLEVEL 1 exit /B 1 - -echo %0 - Build XP x86 Free -%COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_x86.bat %SVN% %CD% %_DDK% %_PSDK% WXP & build %OPS%" -if ERRORLEVEL 1 exit /B 1 - - -rem ********* WNET - Windows Server 2003 -echo %0 - Build WNET x64 Checked -%COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_x64.bat %SVN% %CD% %_DDK% %_PSDK% WNET & build %OPS%" -if ERRORLEVEL 1 exit /B 1 -echo %0 - Build WNET x64 Free -%COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_x64.bat %SVN% %CD% %_DDK% %_PSDK% WNET & build %OPS%" -if ERRORLEVEL 1 exit /B 1 - -echo %0 - Build WNET x86 Checked -%COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_x86.bat %SVN% %CD% %_DDK% %_PSDK% WNET & build %OPS%" -if ERRORLEVEL 1 exit /B 1 -echo %0 - Build WNET x86 Free -%COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_x86.bat %SVN% %CD% %_DDK% %_PSDK% WNET & build %OPS%" -if ERRORLEVEL 1 exit /B 1 - -echo %0 - Build WNET ia64 Checked -%COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_IA64.bat %SVN% %CD% %_DDK% %_PSDK% WNET & build %OPS%" -if ERRORLEVEL 1 exit /B 1 -echo %0 - Build WNET ia64 Free -%COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_IA64.bat %SVN% %CD% %_DDK% %_PSDK% WNET & build %OPS%" -if ERRORLEVEL 1 exit /B 1 - -if "%1" == "compile" goto finito -if "%1" == "compilenoforce" goto finito - -rem Install binaries into WIX environment, build msi installers. - -:InstallBin - -echo Create binary release tree - suitible for WinOF-WIX installer build. - -if EXIST "%RBIN_WLH%" (rmdir /S /Q %RBIN_WLH% & echo %0 - removed %RBIN_WLH%) -if EXIST "%RBIN_WNET%" (rmdir /S /Q %RBIN_WNET% & echo %0 - removed %RBIN_WNET%) -if EXIST "%RBIN_WXP%" (rmdir /S /Q %RBIN_WXP% & echo %0 - removed %RBIN_WXP%) - -mkdir %RBIN_WLH% -mkdir %RBIN_WNET% -mkdir %RBIN_WXP% - -if EXIST "%BSE%\etc\makebin.bat" ( - call %BSE%\etc\makebin.bat %BSE% %RBIN_WLH% wlh - if ERRORLEVEL 1 ( - echo %0: Err in makebin.bat %BSE% %RBIN_WLH% wlh - exit /B 1 - ) - call %BSE%\etc\makebin.bat %BSE% %RBIN_WNET% wnet - if ERRORLEVEL 1 ( - echo %0: Err in makebin.bat %BSE% %RBIN_WNET% wnet - exit /B 1 - ) - call %BSE%\etc\makebin.bat %BSE% %RBIN_WXP% wxp - if ERRORLEVEL 1 ( - echo %0: Err in makebin.bat %BSE% %RBIN_WXP% wxp - exit /B 1 - ) -) - -if "%1" == "makebin" goto finito - -:mk_msi - -echo %0 - Drivers Signed with %CERTNAME% , Binary releases built in -echo %RBIN_WLH% -echo %RBIN_WNET% -echo %RBIN_WXP% - -rem build WIX installers --> see ..\branches\WinOF\WIX - -%COMSPEC% /V:on /E:on /C "%_DDK%\bin\setenv.bat %_DDK% fre X64 WNET & cd /D %WIX% & build-all-MSI %CERTNAME% %IDIR%" - - -:finito - -echo . -echo %0: Finished %0 %* -echo %0: Started %STIME% -echo %0: Finished %TIME% - -endlocal -@echo on diff --git a/trunk/WinOF/BuildRelease.bat b/trunk/WinOF/BuildRelease.bat new file mode 100644 index 00000000..e9119626 --- /dev/null +++ b/trunk/WinOF/BuildRelease.bat @@ -0,0 +1,396 @@ +@echo off +setlocal +rem +rem EXAMPLE - Build entire openIB-windows release & WIX installers (.msi) files. +rem Binary release is constructed in ..\Branches\WinOF\Wix\OS\bin. +rem Processor architecture specific WIX installers are constructed +rem in %IDIR% +rem +rem BuildRelease option +rem option == all | allnoforce | compile | compilenoforce | makebin | msi | wix | clean | msi-label | msi-del | msi-dir {OPENIB_REV} +rem + +rem This script is an 'example' of a one-command entire IB stack build to +rem single-file installer; used to build a WinOF releases. +rem Script is designed to be invoked from the \gen1\trunk folder with +rem \branches\WinOF\Wix\* accessible. +rem +rem Verify the following env vars are suitible for your system configuration. +rem _DDK, _PSDK, SVN, IDIR + +if "%1" == "" goto usage +if "%1" == "/?" goto usage +if "%1" == "-h" goto usage +if "%1" == "all" goto OK +if "%1" == "allnoforce" goto OK +if "%1" == "compile" goto OK +if "%1" == "compilenoforce" goto OK +if "%1" == "makebin" goto OK +if "%1" == "msi" goto OK +if "%1" == "wix" goto OK +if "%1" == "clean" goto OK +if "%1" == "msi-label" goto OK +if "%1" == "msi-del" goto OK +if "%1" == "msi-dir" goto OK + +echo Unknown arg '%1' ? + +:usage + +echo "usage: BuildRelease command {OPENIB_REV value}" +echo where 'command' may be: +echo all - force recompile, install binaries to WIX tree, sign drivers and +echo build installers. + +echo allnoforce - recompile only if needed, install binaries to WIX tree, +echo sign drivers and build installers. +echo compile - force a recompile/link of everything then exit. +echo compilenoforce - recompile/link only if needed then exit. +echo makebin - assumes binaries are built, will installs binaries to WIX tree +echo then exit. +echo msi - assumes binaries are installed in WIX tree, signs drivers and +echo create installers (.msi files) in IDIR. +echo wix - build .msi installers, assumes (drivers signed) .cat files exist +echo clean - remove build artifacts for a clean build: .obj, .sys, ... +echo msi-label {OPENIB_REV} +echo rename WOF_os*_arch*.msi to WOF_os*_arch*_svn#.msi +echo Uniquely identify installers just created. +echo If OPENIB_REV arg used, then rename WOF_os*_arch*argVal.msi +echo otherwise, use SVN# from path. +echo msi-del - del %windir%\temp\WOF_os*_arch*.msi +echo msi-dir - del %windir%\temp\WOF_os*_arch*.msi +echo : +echo {OPENIB_REV} +echo optional, if set then OPENIB_REV is assigned this value. +echo example: BuildRelease all 1414 + +exit /B 1 + +:OK + +if not "%WDM_INC_PATH%" == "" ( + echo %0: Error - %0 unable to run from WDK window, + echo use %comspec% + exit /B 1 +) + +rem remove build artifacts +if "%1" == "clean" ( + echo Removing build artifacts and folders... + call %CD%\etc\clean-build.bat + exit /B 0 +) + +rem set CERTNAME=noCert +set CERTNAME=cse1CStore + +rem A Digital driver signing certificate store name may be required. +if "%1" == "all" ( + if "%CERTNAME%" == "noCert" set /P CERTNAME=[Enter Certificate Store Name] + if "%CERTNAME%" == "" ( + echo %0 + echo %0: Err - driver signing certificate store name required. + echo %0: see certmgr.exe + exit /B 1 + ) +) + +if "%1" == "msi" ( + if "%CERTNAME%" == "noCert" set /P CERTNAME=[Enter Certificate Store Name] + if "%CERTNAME%" == "" ( + echo %0 + echo %0: Err - driver signing certificate store name required. + echo %0: see certmgr.exe + exit /B 1 + ) +) + +rem Use this WDK + +set _DDK=%SystemDrive%\WinDDK\6001.18001 + +if NOT EXIST %_DDK% ( + echo Missing WDK @ %_DDK% + exit /B 1 +) + +rem Platform SDK path - watchout for missing LoadPerf.h (installsp.c) +set _PSDK=%SystemDrive%\progra~1\mi2578~1 + +rem setup value for OPENIB_REV assignment. + +if not "%2" == "" ( + set SVN=%2 + set LBL=%2 +) else ( + rem WARNING - SVN value depends on the path '\openIB-windows-svn\XXX\gen1', + rem where SVN is set to XXX + rem substring[23rd...26th] chars (offset counting) == xxxx + rem Note - OPENIB_REV is assigned SVN in a child script. + + set SVN=%CD:~22,4% + set LBL=_svn.!SVN! +) + +rem assumes %CD% == '...\gen1\trunk' +set BSE=%CD% +set WIX=%CD:trunk=Branches\WinOF\WIX% + +set RBIN_WLH=%WIX%\wlh\bin% +set RBIN_WNET=%WIX%\wnet\bin% +set RBIN_WXP=%WIX%\wxp\bin% + +if NOT EXIST "..\branches\WinOF\WIX\build-all-MSI.bat" ( + echo %0 - Missing .msi installer build script + echo ..\branches\WinOF\WIX\build-all-MSI.bat + exit /B 1 +) + +rem WIX Installer files (.msi) destination folder - set for local environment. +rem +set IDIR=%SystemRoot%\temp + +if "%1" == "msi-label" ( + pushd %IDIR% + if exist WOF_wxp_x86.msi ( + if exist WOF_wxp_x86%LBL%.msi del /F/Q WOF_wxp_x86%LBL%.msi + rename WOF_wxp_x86.msi WOF_wxp_x86%LBL%.msi + ) + + if exist WOF_wnet_x86.msi ( + if exist WOF_wnet_x86%LBL%.msi del /F/Q WOF_wnet_x86%LBL%.msi + rename WOF_wnet_x86.msi WOF_wnet_x86%LBL%.msi + ) + if exist WOF_wnet_x64.msi ( + if exist WOF_wnet_x64%LBL%.msi del /F/Q WOF_wnet_x64%LBL%.msi + rename WOF_wnet_x64.msi WOF_wnet_x64%LBL%.msi + ) + if exist WOF_wnet_ia64.msi ( + if exist WOF_wnet_ia64%LBL%.msi del /F/Q WOF_wnet_ia64%LBL%.msi + rename WOF_wnet_ia64.msi WOF_wnet_ia64%LBL%.msi + ) + + if exist WOF_wlh_x86.msi ( + if exist WOF_wlh_x86%LBL%.msi del /F/Q WOF_wlh_x86%LBL%.msi + rename WOF_wlh_x86.msi WOF_wlh_x86%LBL%.msi + ) + if exist WOF_wlh_x64.msi ( + if exist WOF_wlh_x64%LBL%.msi del /F/Q WOF_wlh_x64%LBL%.msi + rename WOF_wlh_x64.msi WOF_wlh_x64%LBL%.msi + ) + if exist WOF_wlh_ia64.msi ( + if exist WOF_wlh_ia64%LBL%.msi del /F/Q WOF_wlh_ia64%LBL%.msi + rename WOF_wlh_ia64.msi WOF_wlh_ia64%LBL%.msi + ) + dir WOF_*%LBL%.msi + popd + exit /B 0 +) + +if "%1" == "msi-del" ( + echo Deleting WOF_{wxp,wnet,wlh}_{x86,x64,ia64}%LBL%.msi + pushd %IDIR% + if exist WOF_wxp_x86%LBL%.msi del /F/P WOF_wxp_x86%LBL%.msi + + if exist WOF_wnet_x86%LBL%.msi del /F/P WOF_wnet_x86%LBL%.msi + if exist WOF_wnet_x64%LBL%.msi del /F/P WOF_wnet_x64%LBL%.msi + if exist WOF_wnet_ia64%LBL%.msi del /F/P WOF_wnet_ia64%LBL%.msi + + if exist WOF_wlh_x86%LBL%.msi del /F/P WOF_wlh_x86%LBL%.msi + if exist WOF_wlh_x64%LBL%.msi del /F/P WOF_wlh_x64%LBL%.msi + if exist WOF_wlh_ia64%LBL%.msi del /F/P WOF_wlh_ia64%LBL%.msi + + dir /N/OD WOF_*.msi + popd + exit /B 0 +) + +if "%1" == "msi-dir" ( + pushd %IDIR% + dir /N/OD WOF_*.msi + popd + exit /B 0 +) + +echo %0 - Building with WDK @ %_DDK% +echo Building for OPENIB_REV %SVN%, installer files @ %IDIR% +echo Drivers signed using Certificate '%CERTNAME%' + +rem pause thoughtfully. +if exist %windir%\system32\timeout.exe ( + timeout /T 10 +) else ( + pause +) + +if NOT EXIST "%IDIR%" ( + echo %0 - Missing Installer file destination folder %IDIR% + exit /B 1 +) + +rem Verify WIX 2.0 toolset is available - if not, download from +rem http://sourceforge.net/project/showfiles.php?group_id=105970&package_id=114109 +rem select wix-2.0.5325.0-binaries.zip download and unzip to +rem ..\branches\WinOF\WIX\WIX_tools\ +rem +if NOT EXIST %WIX%\WIX_tools\wix-2.0.5325.0-binaries ( + echo %0 - Missing WIX tools @ %WIX%\WIX_tools + exit /B 1 +) + +if NOT EXIST etc\makebin.bat ( + echo %0 - Missing etc\makebin.bat, script must run from gen1\trunk + exit /B 1 +) +set STIME=%TIME% + +rem skip build - assumes binaries already built. + +if "%1" == "wix" ( + set CERTNAME=nosign + goto mk_msi +) + +if "%1" == "msi" ( + if not EXIST "%RBIN_WLH%" goto InstallBin + if not EXIST "%RBIN_WNET%" goto InstallBin + if not EXIST "%RBIN_WXP%" goto InstallBin + goto mk_msi +) + +if "%1" == "makebin" goto InstallBin + +set OPS=-wgcPM 3 +if "%1" == "allnoforce" ( + rem Compile everything only if needed. + set OPS=-wgPM 3 +) +if "%1" == "compilenoforce" ( + rem Compile everything only if needed. + set OPS=-wgPM 3 +) + +if "%1" == "all" ( + echo Removing build artifacts and folders... + call %CD%\etc\clean-build.bat +) + +rem ********* Compile for WLH - Windows Server 2008 & Vista + +rem WLH x64 +echo %0 - Build WLH x64 Checked +%COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_x64.bat %SVN% %CD% %_DDK% %_PSDK% WLH & build %OPS%" +if ERRORLEVEL 1 exit /B 1 +echo %0 - Build WLH x64 Free +%COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_x64.bat %SVN% %CD% %_DDK% %_PSDK% WLH & build %OPS%" +if ERRORLEVEL 1 exit /B 1 + +rem WLH x86 + +echo %0 - Build WLH x86 Checked +%COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_x86.bat %SVN% %CD% %_DDK% %_PSDK% WLH & build %OPS%" +if ERRORLEVEL 1 exit /B 1 +echo %0 - Build WLH x86 Free +%COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_x86.bat %SVN% %CD% %_DDK% %_PSDK% WLH & build %OPS%" +if ERRORLEVEL 1 exit /B 1 + +rem WLH ia64 +echo %0 - Build WLH ia64 Checked +%COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_IA64.bat %SVN% %CD% %_DDK% %_PSDK% WLH & build %OPS%" +if ERRORLEVEL 1 exit /B 1 +echo %0 - Build WLH ia64 Free +%COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_IA64.bat %SVN% %CD% %_DDK% %_PSDK% WLH & build %OPS%" +if ERRORLEVEL 1 exit /B 1 + + +rem ********* WXP - Windows XP - x86 only + +echo %0 - Build XP x86 Checked +%COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_x86.bat %SVN% %CD% %_DDK% %_PSDK% WXP & build %OPS%" +if ERRORLEVEL 1 exit /B 1 + +echo %0 - Build XP x86 Free +%COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_x86.bat %SVN% %CD% %_DDK% %_PSDK% WXP & build %OPS%" +if ERRORLEVEL 1 exit /B 1 + + +rem ********* WNET - Windows Server 2003 +echo %0 - Build WNET x64 Checked +%COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_x64.bat %SVN% %CD% %_DDK% %_PSDK% WNET & build %OPS%" +if ERRORLEVEL 1 exit /B 1 +echo %0 - Build WNET x64 Free +%COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_x64.bat %SVN% %CD% %_DDK% %_PSDK% WNET & build %OPS%" +if ERRORLEVEL 1 exit /B 1 + +echo %0 - Build WNET x86 Checked +%COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_x86.bat %SVN% %CD% %_DDK% %_PSDK% WNET & build %OPS%" +if ERRORLEVEL 1 exit /B 1 +echo %0 - Build WNET x86 Free +%COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_x86.bat %SVN% %CD% %_DDK% %_PSDK% WNET & build %OPS%" +if ERRORLEVEL 1 exit /B 1 + +echo %0 - Build WNET ia64 Checked +%COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_IA64.bat %SVN% %CD% %_DDK% %_PSDK% WNET & build %OPS%" +if ERRORLEVEL 1 exit /B 1 +echo %0 - Build WNET ia64 Free +%COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_IA64.bat %SVN% %CD% %_DDK% %_PSDK% WNET & build %OPS%" +if ERRORLEVEL 1 exit /B 1 + +if "%1" == "compile" goto finito +if "%1" == "compilenoforce" goto finito + +rem Install binaries into WIX environment, build msi installers. + +:InstallBin + +echo Create binary release tree - suitible for WinOF-WIX installer build. + +if EXIST "%RBIN_WLH%" (rmdir /S /Q %RBIN_WLH% & echo %0 - removed %RBIN_WLH%) +if EXIST "%RBIN_WNET%" (rmdir /S /Q %RBIN_WNET% & echo %0 - removed %RBIN_WNET%) +if EXIST "%RBIN_WXP%" (rmdir /S /Q %RBIN_WXP% & echo %0 - removed %RBIN_WXP%) + +mkdir %RBIN_WLH% +mkdir %RBIN_WNET% +mkdir %RBIN_WXP% + +if EXIST "%BSE%\etc\makebin.bat" ( + call %BSE%\etc\makebin.bat %BSE% %RBIN_WLH% wlh + if ERRORLEVEL 1 ( + echo %0: Err in makebin.bat %BSE% %RBIN_WLH% wlh + exit /B 1 + ) + call %BSE%\etc\makebin.bat %BSE% %RBIN_WNET% wnet + if ERRORLEVEL 1 ( + echo %0: Err in makebin.bat %BSE% %RBIN_WNET% wnet + exit /B 1 + ) + call %BSE%\etc\makebin.bat %BSE% %RBIN_WXP% wxp + if ERRORLEVEL 1 ( + echo %0: Err in makebin.bat %BSE% %RBIN_WXP% wxp + exit /B 1 + ) +) + +if "%1" == "makebin" goto finito + +:mk_msi + +echo %0 - Drivers Signed with %CERTNAME% , Binary releases built in +echo %RBIN_WLH% +echo %RBIN_WNET% +echo %RBIN_WXP% + +rem build WIX installers --> see ..\branches\WinOF\WIX + +%COMSPEC% /V:on /E:on /C "%_DDK%\bin\setenv.bat %_DDK% fre X64 WNET & cd /D %WIX% & build-all-MSI %CERTNAME% %IDIR%" + + +:finito + +echo . +echo %0: Finished %0 %* +echo %0: Started %STIME% +echo %0: Finished %TIME% + +endlocal +@echo on