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.

330 lines
12 KiB

  1. rem %1 is the name of this script
  2. rem %2 is the build number
  3. rem %3 is the language
  4. rem %4 is the platform (i386 or ia64)
  5. rem %5 is optional, blank=internal, else beta or rtm
  6. set logfile=%~dp0%~n0.log
  7. echo %1 %2 %3 %4 %5 > %logfile%
  8. if "%4"=="" goto :EOF
  9. echo set ReleaseShare=\\ntdev\release >> %logfile%
  10. echo set Product=xp >> %logfile%
  11. echo set ServicePack=SP1 >> %logfile%
  12. echo set OtherReleases=2600 >> %logfile%
  13. echo set BldType=fre >> %logfile%
  14. echo set BuildNumber=%2 >> %logfile%
  15. if /i %3==usa set ReleaseShare=\\skifre00\release
  16. if /i %3==ger set ReleaseShare=\\skifre00\release
  17. if /i %3==jpn set ReleaseShare=\\skifre00\release
  18. if /i %3==fr set ReleaseShare=\\skifre00\release
  19. if /i %3==kor set ReleaseShare=\\skifre00\release
  20. if /i %3==ara set ReleaseShare=\\xpspbld1\release
  21. if /i %3==heb set ReleaseShare=\\xpspbld1\release
  22. if /i %3==chh set ReleaseShare=\\xpspbld2\release
  23. if /i %3==cht set ReleaseShare=\\xpspbld2\release
  24. if /i %3==chs set ReleaseShare=\\xpspbld2\release
  25. if /i %3==es set ReleaseShare=\\xpspbld3\release
  26. if /i %3==it set ReleaseShare=\\xpspbld3\release
  27. if /i %3==br set ReleaseShare=\\xpspbld4\release
  28. if /i %3==nl set ReleaseShare=\\xpspbld4\release
  29. if /i %3==sv set ReleaseShare=\\xpspbld4\release
  30. if /i %3==da set ReleaseShare=\\xpspbld5\release
  31. if /i %3==fi set ReleaseShare=\\xpspbld5\release
  32. if /i %3==no set ReleaseShare=\\xpspbld5\release
  33. if /i %3==cs set ReleaseShare=\\xpspbld6\release
  34. if /i %3==pl set ReleaseShare=\\xpspbld6\release
  35. if /i %3==hu set ReleaseShare=\\xpspbld6\release
  36. if /i %3==pt set ReleaseShare=\\xpspbld7\release
  37. if /i %3==ru set ReleaseShare=\\xpspbld7\release
  38. if /i %3==el set ReleaseShare=\\xpspbld8\release
  39. if /i %3==tr set ReleaseShare=\\xpspbld8\release
  40. if /i %ComputerName%==msliger0 set ReleaseShare=\\ntdev\release\xpsp1
  41. if /i %ComputerName%==msliger3 set ReleaseShare=\\ntdev\release\xpsp1
  42. if /i %ComputerName%==msliger8 set ReleaseShare=\\ntdev\release\xpsp1
  43. set Product=xp
  44. set ServicePack=SP1
  45. set OtherReleases=2600
  46. set BldType=fre
  47. set BuildNumber=%2
  48. rem patchpath is the root of the patch build directory.
  49. if /i %ComputerName%==skipatch set patchpath=d:\xppatch
  50. if /i %ComputerName%==winsebld set patchpath=d:\xppatch
  51. if /i %ComputerName%==msliger0 set patchpath=f:\xppatch
  52. if /i %ComputerName%==msliger3 set patchpath=e:\xppatch
  53. echo computername=%computername% patchpath=%patchpath% >> %logfile%
  54. rem ISOLang is the ISO (two-letter) language code
  55. rem Language is the code used for product releases
  56. set ISOLang=
  57. set Language=
  58. for /f "tokens=1,2,3,4,7" %%f in (%~dp0\language.lst) do call :CheckLang %3 %%f %%g %%h %%i %%j
  59. rem platform is either i386 or ia64
  60. if /i "%4" == "x86" set platform=i386
  61. if /i "%4" == "i386" set platform=i386
  62. if /i "%4" == "ia64" set platform=ia64
  63. set PlatformFre=%Platform:i386=x86%fre
  64. rem newbuild is the name of the directory where the current build's
  65. rem compressed files can be found.
  66. rem set newbuild=%ReleaseShare%\%Product%%ServicePack%\%BuildNumber%\%Language%\%PlatformFre%\upd
  67. set newbuild=%ReleaseShare%\%BuildNumber%\%Language%\%PlatformFre%\spcd
  68. echo newbuild=%newbuild% >> %logfile%
  69. rem newexe is the name of the self-extracting EXE containing the new (network install) build
  70. set newexe=%Product%%ServicePack%.exe
  71. echo newexe=%newexe% >> %logfile%
  72. rem newsymbols is the name of the directory containing private symbols
  73. rem set newsymbols=%ReleaseShare%\%Product%%ServicePack%\%BuildNumber%\%Language%\%PlatformFre%\bin\symbols.pri\retail
  74. set newsymbols=%ReleaseShare%\%BuildNumber%\%Language%\%PlatformFre%\bin\symbols.pri\retail
  75. echo newsymbols=%newsymbols% >> %logfile%
  76. rem servername is the name of the pstream server
  77. rem This forms part of the URL in the built file update.url.
  78. rem A build-machine entry is required here unless you will
  79. rem serve your builds directly from the build machine.
  80. set servername=%ComputerName%
  81. if /i %ComputerName%==skipatch set servername=skipatch
  82. if /i %ComputerName%==msliger0 set servername=msliger7
  83. if /i "%5"=="beta" set servername=download.windowsbeta.microsoft.com
  84. if /i "%5"=="rtm" set servername=%Product%%ServicePack%.microsoft.com
  85. echo servername=%servername% >> %logfile%
  86. rem psfroot is the destination path for built PSF files
  87. rem A specific build-machine entry is required here only if you want to prop your build.
  88. if /i %ComputerName%==skipatch set psfroot=\\%servername%\psfroot$\%Product%
  89. if /i %ComputerName%==winsebld set psfroot=d:\psfroot\%Product%
  90. if /i %ComputerName%==msliger0 set psfroot=\\%servername%\psfroot$\%Product%
  91. if /i %ComputerName%==msliger3 set psfroot=c:\psfroot\%Product%
  92. echo psfroot=%psfroot% >> %logfile%
  93. rem wwwroot is the destination path for built EXE files
  94. rem A specific build-machine entry is required here only if you want to prop your build.
  95. if /i %ComputerName%==skipatch set wwwroot=\\%servername%\wwwroot$\%Product%%ServicePack%\%Language%
  96. if /i %ComputerName%==winsebld set wwwroot=d:\wwwroot\%Product%%ServicePack%\%Language%
  97. if /i %ComputerName%==msliger0 set wwwroot=\\%servername%\wwwroot$\%Product%%ServicePack%\%Language%
  98. if /i %ComputerName%==msliger3 set wwwroot=c:\wwwroot\%Product%%ServicePack%\%Language%
  99. echo wwwroot=%wwwroot% >> %logfile%
  100. rem patchbuild is the directory where the finished files will go.
  101. set patchbuild=%patchpath%\build\%Language%\%BuildNumber%
  102. echo patchbuild=%patchbuild% >> %logfile%
  103. rem patchtemp is a directory where intermediate files are built.
  104. set patchtemp=%patchpath%\temp\%Language%
  105. echo patchtemp=%patchtemp% >> %logfile%
  106. rem logpath is the name of the directory where log files go.
  107. set logpath=%patchbuild%\logs
  108. echo logpath=%logpath% >> %logfile%
  109. rem loglinkpath is the name of the directory of the link to the latest log files.
  110. set loglinkpath=%patchpath%\build\%Language%
  111. echo loglinkpath=%loglinkpath% >> %logfile%
  112. rem forest is the name of the directory where all patch reference
  113. rem files (from previous and current build) can be found. Ideally,
  114. rem there will be a manifest file at the base of each tree in the forest.
  115. set forest=%patchpath%\forest\%Language%\%Platform%
  116. echo forest=%forest% >> %logfile%
  117. rem newfiles is the name of the directory where all the current
  118. rem build's files (fully uncompressed) can be located. Every file named
  119. rem in the sourcelist must exist in this directory.
  120. set newfiles=%forest%\stage\%BuildNumber%
  121. echo newfiles=%newfiles% >> %logfile%
  122. rem patching is the name of the override directory where the
  123. rem current build's patch-only files (update.url and patching
  124. rem flavor of update.ver) can be located. Any file found in
  125. rem in this directory will override the file from newfiles.
  126. set patching=%patchtemp%\patching
  127. echo patching=%patching% >> %logfile%
  128. rem psfname is the full pathname of the PSF
  129. set psfname=%patchbuild%\%ServicePack%.%Language%.%BuildNumber%.%Platform%.psf
  130. echo psfname=%psfname% >> %logfile%
  131. rem cablist is the list of cab files which can be built from update.url
  132. set cablist=new\%ServicePack%.cab
  133. echo cablist=%cablist% >> %logfile%
  134. rem template is the full pathname of updateurl.template
  135. set template=%bldtools%\updateurl.template
  136. echo template=%template% >> %logfile%
  137. rem patchexe is the name of the patch EXE to be produced
  138. set patchexe=%patchbuild%\patch.%Language%.%BuildNumber%.exe
  139. if /i "%5"=="beta" set patchexe=%patchbuild%\beta\%ServicePack%express.exe
  140. if /i "%5"=="rtm" set patchexe=%patchbuild%\rtw\%ServicePack%express.exe
  141. echo patchexe=%patchexe% >> %logfile%
  142. rem patchddf is the name of the patch DDF to be produced.
  143. set patchddf=%patchtemp%\patch.ddf
  144. echo patchddf=%patchddf% >> %logfile%
  145. rem patchlist is the name of the patch DDF file list.
  146. set patchlist=patchddf.filelist
  147. echo patchlist=%patchlist% >> %logfile%
  148. rem patchcab is the name of the patch CAB to be produced.
  149. set patchcab=%patchtemp%\patch.cab
  150. echo patchcab=%patchcab% >> %logfile%
  151. rem stubexe is the full pathname of the self-extracting stub.
  152. set stubexe=%bldtools%\%ISOLang%\%platform:i386=x86%\sfxstub.exe
  153. echo stubexe=%stubexe% >> %logfile%
  154. rem nonsysfree is an option for the self-extractor for required free space
  155. rem this number was doubled temporarily (s/b 325MB) to accomodate disk space calc bug# 696943
  156. set nonsysfree=/nonsysfree 650000000
  157. echo nonsysfree=%nonsysfree% >> %logfile%
  158. rem server is the full URL prefix of the patch server including the
  159. rem ISAPI pstream.dll name
  160. set server=http://%servername%/isapi/pstream3.dll/%Product%
  161. echo server=%server% >> %logfile%
  162. rem updatever is the name of the update.ver file.
  163. set updatever=update.ver
  164. echo updatever=%updatever% >> %logfile%
  165. rem sourcelist is the name of a text file containing the names of all
  166. rem the files which could be downloaded. Usually derived from the
  167. rem [SourceDisksFiles] sections in update.inf and update.url
  168. set sourcelist=%patching%\update\%updatever%
  169. echo sourcelist=%sourcelist% >> %logfile%
  170. rem targetpool is the name of the directory where all the produced
  171. rem patches will be collected. Existing contents of this directory
  172. rem will be deleted.
  173. set targetpool=%patchpath%\patches.out\%Language%
  174. echo targetpool=%targetpool% >> %logfile%
  175. rem cache is the name of the directory where mpatches can look for
  176. rem previously-built patch files. Any new patches built will be added
  177. rem to this directory.
  178. set cache=%patchpath%\PatchCache
  179. echo cache=%cache% >> %logfile%
  180. rem symcache is the name of the directory where mpatches can look for
  181. rem previously-built patch symbol files. Any new patch symbols built will
  182. rem be added to this directory.
  183. set symcache=%patchpath%\SymCache
  184. echo symcache=%symcache% >> %logfile%
  185. rem psfcomment is a comment to go in the produced PSF.
  186. set psfcomment=Build %1 %BuildNumber% %Language% %Platform% %5 (%COMPUTERNAME%)
  187. echo psfcomment=%psfcomment% >> %logfile%
  188. rem oldsympath is the symbol path for "old" files
  189. set strcat=
  190. for %%p in (%OtherReleases%) do call :strcat %forest%\history\%%p\symbols
  191. set oldsympath=%strcat%;%newfiles%\symbols
  192. rem newsympath is the symbol path for "new" files
  193. set strcat=%newfiles%\symbols
  194. for %%p in (%OtherReleases%) do call :strcat %forest%\history\%%p\symbols
  195. set newsympath=%strcat%
  196. set strcat=
  197. if /i %Language% == usa goto :NoExtraSymbols
  198. set forest_usa=%patchpath%\forest\usa\%Platform%
  199. set newfiles_usa=%forest_usa%\stage\%BuildNumber%
  200. set strcat=
  201. for %%p in (%OtherReleases%) do call :strcat %forest_usa%\history\%%p\symbols
  202. set oldsympath=%oldsympath%;%strcat%;%newfiles_usa%\symbols
  203. set strcat=%newfiles_usa%\symbols
  204. for %%p in (%OtherReleases%) do call :strcat %forest_usa%\history\%%p\symbols
  205. set newsympath=%newsympath%;%strcat%
  206. set strcat=
  207. :NoExtraSymbols
  208. echo oldsympath=%oldsympath% >> %logfile%
  209. echo newsympath=%newsympath% >> %logfile%
  210. goto :EOF
  211. :strcat
  212. if not "%strcat%"=="" set strcat=%strcat%;
  213. set strcat=%strcat%%1
  214. goto :EOF
  215. :CheckLang
  216. rem %1 = given language
  217. rem %2 = Language
  218. rem %3 = Equiv1
  219. rem %4 = Equiv2
  220. rem %5 = CPRLang
  221. rem %6 = ISOLang
  222. if /i %1 equ %2 goto :FoundLang
  223. if /i %1 equ %3 goto :FoundLang
  224. if /i %1 equ %4 goto :FoundLang
  225. if /i %1 equ %5 goto :FoundLang
  226. if /i %1 equ %6 goto :FoundLang
  227. goto :EOF
  228. :FoundLang
  229. set Language=%2
  230. set ISOLang=%6
  231. goto :EOF