]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
[WinOF] cleaning house - move trunk\buildrelease.bat --> trunk\WinOF
authorstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 12 Nov 2008 23:41:00 +0000 (23:41 +0000)
committerstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 12 Nov 2008 23:41:00 +0000 (23:41 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1@1754 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

trunk/BuildRelease.bat [deleted file]
trunk/WinOF/BuildRelease.bat [new file with mode: 0644]

diff --git a/trunk/BuildRelease.bat b/trunk/BuildRelease.bat
deleted file mode 100644 (file)
index e911962..0000000
+++ /dev/null
@@ -1,396 +0,0 @@
-@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 | wix | clean | msi-label | msi-del | msi-dir {OPENIB_REV}\r
-rem\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 set CERTNAME=noCert\r
-set CERTNAME=cse1CStore\r
-\r
-rem A Digital driver signing certificate store name may be required.\r
-if "%1" == "all" (\r
-    if "%CERTNAME%" == "noCert" set /P CERTNAME=[Enter Certificate Store Name] \r
-    if "%CERTNAME%" == "" (\r
-        echo %0\r
-        echo %0: Err - driver signing certificate store name required.\r
-        echo %0: see certmgr.exe\r
-        exit /B 1\r
-    )\r
-)\r
-\r
-if "%1" == "msi" (\r
-    if "%CERTNAME%" == "noCert" set /P CERTNAME=[Enter Certificate Store Name] \r
-    if "%CERTNAME%" == "" (\r
-        echo %0\r
-        echo %0: Err - driver signing certificate store name 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 setup value for OPENIB_REV assignment.\r
-\r
-if not "%2" == "" (\r
-    set SVN=%2\r
-    set LBL=%2\r
-) else (\r
-    rem WARNING - SVN value depends on the path '\openIB-windows-svn\XXX\gen1',\r
-    rem where SVN is set to XXX\r
-    rem  substring[23rd...26th] chars (offset counting) == xxxx\r
-    rem Note - OPENIB_REV is assigned SVN in a child script.\r
-\r
-    set SVN=%CD:~22,4%\r
-    set LBL=_svn.!SVN!\r
-)\r
-\r
-rem assumes %CD% == '...\gen1\trunk'\r
-set BSE=%CD%\r
-set WIX=%CD:trunk=Branches\WinOF\WIX%\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
-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 '%CERTNAME%'\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.5325.0-binaries.zip download and unzip to\r
-rem   ..\branches\WinOF\WIX\WIX_tools\\r
-rem\r
-if NOT EXIST %WIX%\WIX_tools\wix-2.0.5325.0-binaries (\r
-    echo %0 - Missing WIX tools @ %WIX%\WIX_tools \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 CERTNAME=nosign\r
-    goto mk_msi\r
-)\r
-\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 %CERTNAME% , Binary releases built 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 %CERTNAME% %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
diff --git a/trunk/WinOF/BuildRelease.bat b/trunk/WinOF/BuildRelease.bat
new file mode 100644 (file)
index 0000000..e911962
--- /dev/null
@@ -0,0 +1,396 @@
+@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 | wix | clean | msi-label | msi-del | msi-dir {OPENIB_REV}\r
+rem\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 set CERTNAME=noCert\r
+set CERTNAME=cse1CStore\r
+\r
+rem A Digital driver signing certificate store name may be required.\r
+if "%1" == "all" (\r
+    if "%CERTNAME%" == "noCert" set /P CERTNAME=[Enter Certificate Store Name] \r
+    if "%CERTNAME%" == "" (\r
+        echo %0\r
+        echo %0: Err - driver signing certificate store name required.\r
+        echo %0: see certmgr.exe\r
+        exit /B 1\r
+    )\r
+)\r
+\r
+if "%1" == "msi" (\r
+    if "%CERTNAME%" == "noCert" set /P CERTNAME=[Enter Certificate Store Name] \r
+    if "%CERTNAME%" == "" (\r
+        echo %0\r
+        echo %0: Err - driver signing certificate store name 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 setup value for OPENIB_REV assignment.\r
+\r
+if not "%2" == "" (\r
+    set SVN=%2\r
+    set LBL=%2\r
+) else (\r
+    rem WARNING - SVN value depends on the path '\openIB-windows-svn\XXX\gen1',\r
+    rem where SVN is set to XXX\r
+    rem  substring[23rd...26th] chars (offset counting) == xxxx\r
+    rem Note - OPENIB_REV is assigned SVN in a child script.\r
+\r
+    set SVN=%CD:~22,4%\r
+    set LBL=_svn.!SVN!\r
+)\r
+\r
+rem assumes %CD% == '...\gen1\trunk'\r
+set BSE=%CD%\r
+set WIX=%CD:trunk=Branches\WinOF\WIX%\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
+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 '%CERTNAME%'\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.5325.0-binaries.zip download and unzip to\r
+rem   ..\branches\WinOF\WIX\WIX_tools\\r
+rem\r
+if NOT EXIST %WIX%\WIX_tools\wix-2.0.5325.0-binaries (\r
+    echo %0 - Missing WIX tools @ %WIX%\WIX_tools \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 CERTNAME=nosign\r
+    goto mk_msi\r
+)\r
+\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 %CERTNAME% , Binary releases built 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 %CERTNAME% %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