+++ /dev/null
-@echo off\r
-setlocal\r
-rem\r
-rem EXAMPLE - Build entire openIB-windows release & WIX installers (.msi) files.\r
-rem Binary release is constructed in ..\Branches\WinOF\Wix\OS\bin.\r
-rem Processor architecture specific WIX installers are constructed\r
-rem in %IDIR%\r
-rem\r
-rem BuildRelease option\r
-rem option == all | allnoforce | compile | compilenoforce | makebin | msi |\r
-rem wix | clean | msi-label | msi-del | msi-dir {OPENIB_REV}\r
-\r
-rem This script is an 'example' of a one-command entire IB stack build to\r
-rem single-file installer; used to build a WinOF releases.\r
-rem Script is designed to be invoked from the <whatever>\gen1\trunk folder with\r
-rem <whatever>\branches\WinOF\Wix\* accessible.\r
-rem\r
-rem Verify the following env vars are suitible for your system configuration.\r
-rem _DDK, _PSDK, SVN, IDIR\r
-\r
-if "%1" == "" goto usage\r
-if "%1" == "/?" goto usage\r
-if "%1" == "-h" goto usage\r
-if "%1" == "all" goto OK\r
-if "%1" == "allnoforce" goto OK\r
-if "%1" == "compile" goto OK\r
-if "%1" == "compilenoforce" goto OK\r
-if "%1" == "makebin" goto OK\r
-if "%1" == "msi" goto OK\r
-if "%1" == "wix" goto OK\r
-if "%1" == "clean" goto OK\r
-if "%1" == "msi-label" goto OK\r
-if "%1" == "msi-del" goto OK\r
-if "%1" == "msi-dir" goto OK\r
-\r
-echo Unknown arg '%1' ?\r
-\r
-:usage\r
-\r
-echo "usage: BuildRelease command {OPENIB_REV value}"\r
-echo where 'command' may be:\r
-echo all - force recompile, install binaries to WIX tree, sign drivers and\r
-echo build installers.\r
-\r
-echo allnoforce - recompile only if needed, install binaries to WIX tree,\r
-echo sign drivers and build installers.\r
-echo compile - force a recompile/link of everything then exit.\r
-echo compilenoforce - recompile/link only if needed then exit.\r
-echo makebin - assumes binaries are built, will installs binaries to WIX tree\r
-echo then exit.\r
-echo msi - assumes binaries are installed in WIX tree, signs drivers and\r
-echo create installers (.msi files) in IDIR.\r
-echo wix - build .msi installers, assumes (drivers signed) .cat files exist\r
-echo clean - remove build artifacts for a clean build: .obj, .sys, ...\r
-echo msi-label {OPENIB_REV}\r
-echo rename WOF_os*_arch*.msi to WOF_os*_arch*_svn#.msi \r
-echo Uniquely identify installers just created.\r
-echo If OPENIB_REV arg used, then rename WOF_os*_arch*argVal.msi\r
-echo otherwise, use SVN# from path.\r
-echo msi-del - del %windir%\temp\WOF_os*_arch*.msi\r
-echo msi-dir - del %windir%\temp\WOF_os*_arch*.msi\r
-echo :\r
-echo {OPENIB_REV}\r
-echo optional, if set then OPENIB_REV is assigned this value.\r
-echo example: BuildRelease all 1414\r
-\r
-exit /B 1 \r
-\r
-:OK\r
-\r
-if not "%WDM_INC_PATH%" == "" (\r
- echo %0: Error - %0 unable to run from WDK window,\r
- echo use %comspec%\r
- exit /B 1\r
-)\r
-\r
-rem remove build artifacts\r
-if "%1" == "clean" (\r
- echo Removing build artifacts and folders...\r
- call %CD%\etc\clean-build.bat\r
- exit /B 0\r
-)\r
-\r
-rem Driver Signing Certificate filename, assumes %WIX%\%CERTFILE% is valid.\r
-rem set CERTFILE=noCert\r
-set CERTFILE=MSCV-VSClass3.cer\r
-set CERTSNAME="OpenFabrics Alliance"\r
-\r
-rem A Digital driver signing certificate store name may be required.\r
-if "%1" == "all" (\r
- if "%CERTFILE%" == "noCert" set /P CERTFILE=[Enter Certificate FileName] \r
- if "%CERTFILE%" == "" (\r
- echo %0\r
- echo %0: Err - driver signing certificate filename required.\r
- echo %0: see certmgr.exe\r
- exit /B 1\r
- )\r
-)\r
-\r
-if "%1" == "msi" (\r
- if "%CERTFILE%" == "noCert" set /P CERTFILE=[Enter Certificate FileName] \r
- if "%CERTFILE%" == "" (\r
- echo %0\r
- echo %0: Err - driver signing certificate filename required.\r
- echo %0: see certmgr.exe\r
- exit /B 1\r
- )\r
-)\r
-\r
-rem Use this WDK\r
-\r
-set _DDK=%SystemDrive%\WinDDK\6001.18001\r
-\r
-if NOT EXIST %_DDK% (\r
- echo Missing WDK @ %_DDK%\r
- exit /B 1\r
-)\r
-\r
-rem Platform SDK path - watchout for missing LoadPerf.h (installsp.c)\r
-set _PSDK=%SystemDrive%\progra~1\mi2578~1\r
-\r
-rem Special override case for WinOF 2.0 release.\r
-rem setup value for OPENIB_REV assignment.\r
-\r
-set SVN=1763\r
-\r
-rem assumes %CD% == '...\gen1\trunk'\r
-set BSE=%CD%\r
-set WIX=%CD:trunk=branches\WinOF\WIX%\r
-rem Use Wix V2 binaries.\r
-rem set WIX_BIN=wix-2.0.5325.0-binaries\r
-set WIX_BIN=wix-2.0.5805.0-binaries\r
-\r
-set RBIN_WLH=%WIX%\wlh\bin%\r
-set RBIN_WNET=%WIX%\wnet\bin%\r
-set RBIN_WXP=%WIX%\wxp\bin%\r
-\r
-if NOT EXIST "..\branches\WinOF\WIX\build-all-MSI.bat" (\r
- echo %0 - Missing .msi installer build script\r
- echo ..\branches\WinOF\WIX\build-all-MSI.bat\r
- exit /B 1\r
-)\r
-\r
-rem WIX Installer files (.msi) destination folder - set for local environment.\r
-rem \r
-set IDIR=%SystemRoot%\temp\r
-\r
-rem append additional text to default label if specified.\r
-if "%2" == "" (\r
- set LBL=_R2.0\r
-) else (\r
- set LBL=_R2.0_%2\r
-)\r
-\r
-if "%1" == "msi-label" (\r
- pushd %IDIR%\r
- if exist WOF_wxp_x86.msi (\r
- if exist WOF_wxp_x86%LBL%.msi del /F/Q WOF_wxp_x86%LBL%.msi\r
- rename WOF_wxp_x86.msi WOF_wxp_x86%LBL%.msi\r
- )\r
-\r
- if exist WOF_wnet_x86.msi (\r
- if exist WOF_wnet_x86%LBL%.msi del /F/Q WOF_wnet_x86%LBL%.msi\r
- rename WOF_wnet_x86.msi WOF_wnet_x86%LBL%.msi\r
- )\r
- if exist WOF_wnet_x64.msi (\r
- if exist WOF_wnet_x64%LBL%.msi del /F/Q WOF_wnet_x64%LBL%.msi\r
- rename WOF_wnet_x64.msi WOF_wnet_x64%LBL%.msi\r
- )\r
- if exist WOF_wnet_ia64.msi (\r
- if exist WOF_wnet_ia64%LBL%.msi del /F/Q WOF_wnet_ia64%LBL%.msi\r
- rename WOF_wnet_ia64.msi WOF_wnet_ia64%LBL%.msi\r
- )\r
-\r
- if exist WOF_wlh_x86.msi (\r
- if exist WOF_wlh_x86%LBL%.msi del /F/Q WOF_wlh_x86%LBL%.msi\r
- rename WOF_wlh_x86.msi WOF_wlh_x86%LBL%.msi\r
- )\r
- if exist WOF_wlh_x64.msi (\r
- if exist WOF_wlh_x64%LBL%.msi del /F/Q WOF_wlh_x64%LBL%.msi\r
- rename WOF_wlh_x64.msi WOF_wlh_x64%LBL%.msi\r
- )\r
- if exist WOF_wlh_ia64.msi (\r
- if exist WOF_wlh_ia64%LBL%.msi del /F/Q WOF_wlh_ia64%LBL%.msi\r
- rename WOF_wlh_ia64.msi WOF_wlh_ia64%LBL%.msi\r
- )\r
- dir WOF_*%LBL%.msi\r
- popd\r
- exit /B 0\r
-)\r
-\r
-if "%1" == "msi-del" (\r
- echo Deleting WOF_{wxp,wnet,wlh}_{x86,x64,ia64}%LBL%.msi\r
- pushd %IDIR%\r
- if exist WOF_wxp_x86%LBL%.msi del /F/P WOF_wxp_x86%LBL%.msi\r
-\r
- if exist WOF_wnet_x86%LBL%.msi del /F/P WOF_wnet_x86%LBL%.msi\r
- if exist WOF_wnet_x64%LBL%.msi del /F/P WOF_wnet_x64%LBL%.msi\r
- if exist WOF_wnet_ia64%LBL%.msi del /F/P WOF_wnet_ia64%LBL%.msi\r
-\r
- if exist WOF_wlh_x86%LBL%.msi del /F/P WOF_wlh_x86%LBL%.msi\r
- if exist WOF_wlh_x64%LBL%.msi del /F/P WOF_wlh_x64%LBL%.msi\r
- if exist WOF_wlh_ia64%LBL%.msi del /F/P WOF_wlh_ia64%LBL%.msi\r
-\r
- dir /N/OD WOF_*.msi\r
- popd\r
- exit /B 0\r
-)\r
-\r
-if "%1" == "msi-dir" (\r
- pushd %IDIR%\r
- dir /N/OD WOF_*.msi\r
- popd\r
- exit /B 0\r
-)\r
-\r
-echo %0 - Building with WDK @ %_DDK%\r
-echo Building for OPENIB_REV %SVN%, installer files @ %IDIR%\r
-echo Drivers signed using Certificate '%CERTFILE%'\r
-\r
-rem pause thoughtfully.\r
-if exist %windir%\system32\timeout.exe (\r
- timeout /T 10\r
-) else (\r
- pause\r
-)\r
-\r
-if NOT EXIST "%IDIR%" (\r
- echo %0 - Missing Installer file destination folder %IDIR%\r
- exit /B 1\r
-)\r
-\r
-rem Verify WIX 2.0 toolset is available - if not, download from\r
-rem http://sourceforge.net/project/showfiles.php?group_id=105970&package_id=114109\r
-rem select wix-2.0.5805.0-binaries.zip download and unzip to\r
-rem ..\branches\WinOF\WIX\WIX_tools\\r
-rem\r
-if NOT EXIST %WIX%\WIX_tools\%WIX_BIN% (\r
- echo %0 - Missing WIX tools @ %WIX%\WIX_tools\%WIX_BIN% \r
- exit /B 1\r
-)\r
-\r
-if NOT EXIST etc\makebin.bat (\r
- echo %0 - Missing etc\makebin.bat, script must run from gen1\trunk\r
- exit /B 1\r
-)\r
-set STIME=%TIME%\r
-\r
-rem skip build - assumes binaries already built.\r
-\r
-if "%1" == "wix" (\r
- set MSI_CMD=msi\r
- goto mk_msi\r
-)\r
-\r
-set MSI_CMD=all\r
-if "%1" == "msi" (\r
- if not EXIST "%RBIN_WLH%" goto InstallBin\r
- if not EXIST "%RBIN_WNET%" goto InstallBin\r
- if not EXIST "%RBIN_WXP%" goto InstallBin\r
- goto mk_msi\r
-)\r
-\r
-if "%1" == "makebin" goto InstallBin\r
-\r
-set OPS=-wgcPM 3\r
-if "%1" == "allnoforce" (\r
- rem Compile everything only if needed.\r
- set OPS=-wgPM 3\r
-)\r
-if "%1" == "compilenoforce" (\r
- rem Compile everything only if needed.\r
- set OPS=-wgPM 3\r
-)\r
-\r
-if "%1" == "all" (\r
- echo Removing build artifacts and folders...\r
- call %CD%\etc\clean-build.bat\r
-)\r
-\r
-rem ********* Compile for WLH - Windows Server 2008 & Vista\r
-\r
-rem WLH x64\r
-echo %0 - Build WLH x64 Checked\r
-%COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_x64.bat %SVN% %CD% %_DDK% %_PSDK% WLH & build %OPS%"\r
-if ERRORLEVEL 1 exit /B 1\r
-echo %0 - Build WLH x64 Free\r
-%COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_x64.bat %SVN% %CD% %_DDK% %_PSDK% WLH & build %OPS%"\r
-if ERRORLEVEL 1 exit /B 1\r
-\r
-rem WLH x86\r
-\r
-echo %0 - Build WLH x86 Checked\r
-%COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_x86.bat %SVN% %CD% %_DDK% %_PSDK% WLH & build %OPS%"\r
-if ERRORLEVEL 1 exit /B 1\r
-echo %0 - Build WLH x86 Free\r
-%COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_x86.bat %SVN% %CD% %_DDK% %_PSDK% WLH & build %OPS%"\r
-if ERRORLEVEL 1 exit /B 1\r
-\r
-rem WLH ia64\r
-echo %0 - Build WLH ia64 Checked\r
-%COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_IA64.bat %SVN% %CD% %_DDK% %_PSDK% WLH & build %OPS%"\r
-if ERRORLEVEL 1 exit /B 1\r
-echo %0 - Build WLH ia64 Free\r
-%COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_IA64.bat %SVN% %CD% %_DDK% %_PSDK% WLH & build %OPS%"\r
-if ERRORLEVEL 1 exit /B 1\r
-\r
-\r
-rem ********* WXP - Windows XP - x86 only\r
-\r
-echo %0 - Build XP x86 Checked\r
-%COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_x86.bat %SVN% %CD% %_DDK% %_PSDK% WXP & build %OPS%"\r
-if ERRORLEVEL 1 exit /B 1\r
-\r
-echo %0 - Build XP x86 Free\r
-%COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_x86.bat %SVN% %CD% %_DDK% %_PSDK% WXP & build %OPS%"\r
-if ERRORLEVEL 1 exit /B 1\r
-\r
-\r
-rem ********* WNET - Windows Server 2003\r
-echo %0 - Build WNET x64 Checked\r
-%COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_x64.bat %SVN% %CD% %_DDK% %_PSDK% WNET & build %OPS%"\r
-if ERRORLEVEL 1 exit /B 1\r
-echo %0 - Build WNET x64 Free\r
-%COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_x64.bat %SVN% %CD% %_DDK% %_PSDK% WNET & build %OPS%"\r
-if ERRORLEVEL 1 exit /B 1\r
-\r
-echo %0 - Build WNET x86 Checked\r
-%COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_x86.bat %SVN% %CD% %_DDK% %_PSDK% WNET & build %OPS%"\r
-if ERRORLEVEL 1 exit /B 1\r
-echo %0 - Build WNET x86 Free\r
-%COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_x86.bat %SVN% %CD% %_DDK% %_PSDK% WNET & build %OPS%"\r
-if ERRORLEVEL 1 exit /B 1\r
-\r
-echo %0 - Build WNET ia64 Checked\r
-%COMSPEC% /C "call %BSE%\etc\IB_CHK_BLD_IA64.bat %SVN% %CD% %_DDK% %_PSDK% WNET & build %OPS%"\r
-if ERRORLEVEL 1 exit /B 1\r
-echo %0 - Build WNET ia64 Free\r
-%COMSPEC% /C "call %BSE%\etc\IB_FRE_BLD_IA64.bat %SVN% %CD% %_DDK% %_PSDK% WNET & build %OPS%"\r
-if ERRORLEVEL 1 exit /B 1\r
-\r
-if "%1" == "compile" goto finito\r
-if "%1" == "compilenoforce" goto finito\r
-\r
-rem Install binaries into WIX environment, build msi installers.\r
-\r
-:InstallBin\r
-\r
-echo Create binary release tree - suitible for WinOF-WIX installer build.\r
-\r
-if EXIST "%RBIN_WLH%" (rmdir /S /Q %RBIN_WLH% & echo %0 - removed %RBIN_WLH%)\r
-if EXIST "%RBIN_WNET%" (rmdir /S /Q %RBIN_WNET% & echo %0 - removed %RBIN_WNET%)\r
-if EXIST "%RBIN_WXP%" (rmdir /S /Q %RBIN_WXP% & echo %0 - removed %RBIN_WXP%)\r
-\r
-mkdir %RBIN_WLH%\r
-mkdir %RBIN_WNET%\r
-mkdir %RBIN_WXP%\r
-\r
-if EXIST "%BSE%\etc\makebin.bat" (\r
- call %BSE%\etc\makebin.bat %BSE% %RBIN_WLH% wlh\r
- if ERRORLEVEL 1 (\r
- echo %0: Err in makebin.bat %BSE% %RBIN_WLH% wlh\r
- exit /B 1\r
- )\r
- call %BSE%\etc\makebin.bat %BSE% %RBIN_WNET% wnet\r
- if ERRORLEVEL 1 (\r
- echo %0: Err in makebin.bat %BSE% %RBIN_WNET% wnet\r
- exit /B 1\r
- )\r
- call %BSE%\etc\makebin.bat %BSE% %RBIN_WXP% wxp\r
- if ERRORLEVEL 1 (\r
- echo %0: Err in makebin.bat %BSE% %RBIN_WXP% wxp\r
- exit /B 1\r
- )\r
-)\r
-\r
-if "%1" == "makebin" goto finito\r
-\r
-:mk_msi\r
-\r
-echo %0 - Drivers Signed with %CERTFILE%\r
-echo Binary releases created in\r
-echo %RBIN_WLH%\r
-echo %RBIN_WNET%\r
-echo %RBIN_WXP%\r
-\r
-rem build WIX installers --> see ..\branches\WinOF\WIX\r
-\r
-%COMSPEC% /V:on /E:on /C "%_DDK%\bin\setenv.bat %_DDK% fre X64 WNET & cd /D %WIX% & build-all-MSI %MSI_CMD% %CERTFILE% %CERTSNAME% %IDIR%"\r
-\r
-\r
-:finito\r
-\r
-echo .\r
-echo %0: Finished %0 %*\r
-echo %0: Started %STIME%\r
-echo %0: Finished %TIME%\r
-\r
-endlocal\r
-@echo on\r