Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

225 lines
7.5 KiB

  1. @echo off
  2. if "%_echo%"=="1" echo on
  3. rem -----------------------------------------------------------------------------
  4. rem Copyright (c) Microsoft Corporation 2001
  5. rem
  6. rem build_install.bat
  7. rem
  8. rem Batch script to build the client and server MSM and MSI installs for BITS.
  9. rem
  10. rem build_install.bat -s <vbl04|main|private> -t <target_path>
  11. rem
  12. rem -? Help.
  13. rem
  14. rem -s <loc> Specifies the location to get the BITS binaries from. The default is
  15. rem to get these from the VBL04 latest x86 release location. You currently
  16. rem have three choices: vbl04, main (ntdev\release) or private (local build).
  17. rem
  18. rem -S <loc> Use instead of -s if you want to specify a particular path.
  19. rem
  20. rem -t <path> Specifies the target path where the MSMs and MSIs will be placed after
  21. rem they are built.
  22. rem
  23. rem -c Only do the copy, don't rebuild the MSM/MSIs.
  24. rem
  25. rem Note:
  26. rem You must include InstallShield and Common Files\InstallShield in your
  27. rem path for this to work correctly. For example, the following (or equivalent)
  28. rem must be in your path for iscmdbld.exe to execute properly:
  29. rem
  30. rem c:\Program Files\Common Files\InstallShield
  31. rem c:\Program Files\InstallShield\Developer\System
  32. rem c:\Program Files\InstallShield\Professional - Windows Installer Edition\System
  33. rem -----------------------------------------------------------------------------
  34. set CurrentPath=%CD%
  35. set ClientPath="\\mgmtrel1\latest.tst.x86fre"
  36. set ServerPath="\\mgmtrel1\latest.tst.x86fre"
  37. set WinHttpPath="\\mgmtrel1\latest.tst.x86fre\asms\5100\msft\windows\winhttp"
  38. set SymbolPath=""
  39. set BuildMSIs="yes"
  40. :ArgLoop
  41. if not "%1"=="" (
  42. echo %1
  43. if "%1"=="-s" (
  44. if "%2"=="vbl04" (
  45. set ClientPath="\\mgmtrel1\latest.tst.x86fre"
  46. set ServerPath="\\mgmtrel1\latest.tst.x86fre"
  47. set WinHttpPath="\\mgmtrel1\latest.tst.x86fre\asms\5100\msft\windows\winhttp"
  48. set SymbolPath="\\mgmtrel1\latest.tst.x86fre\Symbols.pri\retail\dll"
  49. )
  50. if "%2"=="main" (
  51. set ClientPath="\\ntdev\release\main\usa\latest.tst\x86fre\srv\i386"
  52. set ServerPath="\\ntdev\release\main\usa\latest.tst\x86fre\srv\i386"
  53. set WinHttpPath="\\ntdev\release\main\usa\latest.tst\x86fre\bin\asms\5100\msft\windows\winhttp"
  54. set SymbolPath=""
  55. )
  56. if "%2"=="private" (
  57. set ClientPath="%CurrentPath%\bins\obj\i386"
  58. set ServerPath="%CurrentPath%\bins\obj\i386"
  59. set WinHttpPath="\\mgmtx86fre\latest\asms\5100\msft\windows\winhttp"
  60. set SymbolPath="%CurrentPath%\bins\obj\i386"
  61. )
  62. shift
  63. )
  64. if "%1"=="-c" (
  65. set BuildMSIs="no"
  66. )
  67. if "%1"=="-S" (
  68. set ClientPath=%2
  69. set ServerPath=%2
  70. set WinHttpPath="\\mgmtrel1\latest.tst.x86fre\asms\5100\msft\windows\winhttp"
  71. set SymbolPath=""
  72. )
  73. if "%1"=="-t" (
  74. set TargetDir=%2
  75. shift
  76. )
  77. if "%1"=="-?" (
  78. echo "Batch script to build the client and server MSM and MSI installs for BITS.
  79. echo "
  80. echo "build_install.bat -s <vbl04|main|private> -t <target_path>
  81. echo "
  82. echo " -? Help.
  83. echo "
  84. echo " -s <loc> Specifies the location to get the BITS binaries from. The default is
  85. echo " to get these from the VBL04 latest x86 release location. You currently
  86. echo " have three choices: vbl04, main (ntdev\release) or private (local build).
  87. echo "
  88. echo " -S <loc> Use instead of -s if you want to specify a particular path.
  89. echo "
  90. echo " -t <path> Specifies the target path where the MSMs and MSIs will be placed after
  91. echo " they are built.
  92. echo "
  93. echo " -c Only do the copy, don't rebuild the MSM/MSIs.
  94. echo "
  95. echo "Note:
  96. echo " You must include InstallShield and Common Files\InstallShield in your
  97. echo " path for this to work correctly. For example, the following (or equivalent)
  98. echo " must be in your path for iscmdbld.exe to execute properly:
  99. echo "
  100. echo " c:\Program Files\Common Files\InstallShield
  101. echo " c:\Program Files\InstallShield\Developer\System
  102. echo " c:\Program Files\InstallShield\Professional - Windows Installer Edition\System
  103. goto :eof
  104. )
  105. shift
  106. goto ArgLoop
  107. )
  108. if "%TargetDir%"=="" set TargetDir=%_NTTREE%\BITS
  109. rem
  110. rem Ok, build the MSM and MSIs
  111. rem
  112. echo Clearing MSM cache
  113. set MSMCache=%USERPROFILE%\My Documents\MySetups\MergeModules
  114. if exist %MSMCache%\BITS.MSM ( del %MSMCache%\BITS.MSM )
  115. if exist %MSMCache%\BITS_Server_Extensions.MSM ( del %MSMCache%\BITS_Server_Extensions.MSM )
  116. if exist %MSMCache%\WinHttp_v51.MSM ( del %MSMCache%\WinHttp_v51.MSM )
  117. echo Get BITS client binaries from %ClientPath%
  118. echo Get BITS server binaries from %ServerPath%
  119. echo Target Directory is %TargetDir%
  120. if not exist %TargetDir% md %TargetDir%
  121. if errorlevel 2 (
  122. echo Unable to create target directory.
  123. goto :eof
  124. )
  125. rem
  126. rem Test source paths.
  127. rem
  128. if not exist %ClientPath% (
  129. echo error: client path %ClientPath% doesn't exist.
  130. goto :eof
  131. )
  132. if not exist %ServerPath% (
  133. echo error: server path %ServerPath% doesn't exist.
  134. goto :eof
  135. )
  136. if not exist %WinHttpPath% (
  137. echo error: WinHttp path %WinHttpPath% doesn't exist.
  138. goto :eof
  139. )
  140. if not exist %SymbolPath% (
  141. echo error: symbol path %SymbolPath% doesn't exist.
  142. goto :eof
  143. )
  144. if not "%BuildMSIs%"=="yes" (
  145. echo ------------------- WinHttp MSM ---------------------------------------
  146. cd winhttp_msm
  147. call build_msm.bat %WinHttpPath% || goto :eof
  148. echo ------------------- BITS Client MSM -----------------------------------
  149. cd ..\bits_client_msm
  150. call build_msm.bat %ClientPath% || goto :eof
  151. echo ------------------- BITS Client MSI -----------------------------------
  152. cd ..\bits_client_msi
  153. call build_msi.bat %ClientPath% || goto :eof
  154. echo ------------------- BITS Server MSM/MSI -------------------------------
  155. cd ..\server-setup
  156. call build_install.bat %ServerPath% || goto :eof
  157. cd ..
  158. )
  159. rem
  160. rem Place the new MSMs and MSIs in the target directory
  161. rem
  162. echo ------------------- Copy Installs to %TargetDir% --------
  163. echo Copying files to %TargetDir%
  164. if not exist %TargetDir%\Client_MSM (md %TargetDir%\Client_MSM || goto :eof)
  165. xcopy /sfiderh "%CurrentPath%\bits_client_msm\Product Configuration 1\Release 1\diskimages\disk1" %TargetDir%\Client_MSM
  166. if errorlevel 2 goto :eof
  167. if not exist %TargetDir%\Client_MSI (md %TargetDir%\Client_MSI || goto :eof)
  168. xcopy /sfiderh "%CurrentPath%\bits_client_msi\Product Configuration 1\Release 1\diskimages\disk1" %TargetDir%\Client_MSI
  169. if errorlevel 2 goto :eof
  170. if not exist %TargetDir%\Server_MSM (md %TargetDir%\Server_MSM || goto :eof)
  171. xcopy /sfiderh "%CurrentPath%\server-setup\Server_MSM\Product Configuration 1\Release 1\diskimages\disk1" %TargetDir%\Server_MSM
  172. if errorlevel 2 goto :eof
  173. if not exist %TargetDir%\Server_MSI (md %TargetDir%\Server_MSI || goto :eof)
  174. xcopy /sfiderh "%CurrentPath%\server-setup\Server_MSI\Product Configuration 1\Release 1\diskimages\disk1" %TargetDir%\Server_MSI
  175. if errorlevel 2 goto :eof
  176. if not "%SymbolPath%"=="" (
  177. if not exist %TargetDir%\Symbols (md %TargetDir%\Symbols || goto :eof)
  178. copy %SymbolPath%\bits*.pdb %TargetDir%\Symbols || goto :eof
  179. copy %SymbolPath%\qmgr*.pdb %TargetDir%\Symbols || goto :eof
  180. )