Leaked source code of windows server 2003
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.

622 lines
20 KiB

  1. @REM -----------------------------------------------------------------
  2. @REM
  3. @REM CdImage.cmd - BPerkins
  4. @REM Creates cd images for each sku from the binaries tree
  5. @REM
  6. @REM Copyright (c) Microsoft Corporation. All rights reserved.
  7. @REM
  8. @REM -----------------------------------------------------------------
  9. @if defined _CPCMAGIC goto CPCBegin
  10. @perl -x "%~f0" %*
  11. @goto :EOF
  12. #!perl
  13. use strict;
  14. use lib $ENV{RAZZLETOOLPATH} . "\\PostBuildScripts";
  15. use lib $ENV{RAZZLETOOLPATH};
  16. use PbuildEnv;
  17. use ParseArgs;
  18. sub Usage { print<<USAGE; exit(1) }
  19. CdImage [-d <release|full>] [-c <comp|uncomp>] [-l <language>]
  20. Creates cd images for each sku from the binaries tree.
  21. Default is to get data, perform compression on 4 proc or greater
  22. machines, and make CD image.
  23. -d Release Running on Archive server, compute CD image and make it
  24. but do not perform compression.
  25. -d Full Run as a standalone program. Perform list creation and
  26. compression (if appropriate), and linking from scratch.
  27. -c Comp Force compression regardless of number of procs.
  28. -c Uncomp Force no compression regardless of number of procs.
  29. USAGE
  30. parseargs('?' => \&Usage,
  31. 'd:'=> \$ENV{CLDATA},
  32. 'c:'=> \$ENV{CLCOMP});
  33. # *** TEMPLATE CODE ***
  34. $ENV{"_CPCMAGIC"}++;exit(system($0)>>8);
  35. __END__
  36. @:CPCBegin
  37. @set _CPCMAGIC=
  38. @setlocal ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
  39. @if not defined DEBUG echo off
  40. @REM *** CMD SCRIPT BELOW ***
  41. if defined 386 set Share=i386
  42. if defined amd64 set Share=amd64
  43. if defined ia64 set Share=ia64
  44. set perl=perl
  45. REM Need CompDr to evaluate to something even when not used
  46. set CompDr=%_NTPostBld%\comp
  47. REM Interpret any command-line parameters
  48. set Release=No
  49. set Full=No
  50. if /i "%cldata%" EQU "full" (set Full=Yes)
  51. if /i "%cldata%" EQU "release" (set Release=Yes)
  52. if /i "%clcomp%" EQU "comp" (set Comp=Yes)
  53. if /i "%clcomp%" EQU "uncomp" (set Comp=No)
  54. REM Make uncomp default for now except on 4 proc machines
  55. if NOT defined Comp (
  56. set Comp=No
  57. if /i %NUMBER_OF_PROCESSORS% GEQ 4 (
  58. set Comp=Yes
  59. )
  60. if defined OFFICIAL_BUILD_MACHINE (
  61. set Comp=Yes
  62. )
  63. )
  64. REM
  65. REM Product List Fields:
  66. REM Display Name,CD Root,Sku,'Ordered links','CD Product membership',CD Tag letter, win9x upgrade (yes/no)
  67. REM
  68. set NumProds=0
  69. set Products=;
  70. REM Exclude skus even they are defined in prodskus.txt
  71. REM
  72. set CmdIni=perl %RazzleToolPath%\PostBuildScripts\CmdIniSetting.pl
  73. set CommandLine=%CmdIni% -l:%lang% -f:ExcludeSkus::%_BuildArch%%_BuildType%
  74. %CommandLine% >nul 2>nul
  75. if ERRORLEVEL 0 (
  76. for /f "tokens=1 delims=" %%a in ('%CommandLine%') do (
  77. set ExcludeSkus=%%a
  78. )
  79. )
  80. call logmsg "Exclude skus are [%ExcludeSkus%]"
  81. for %%a in ( %ExcludeSkus% ) do (
  82. if /i "%%a" == "per" set ExcludePer=1
  83. if /i "%%a" == "pro" set ExcludePro=1
  84. if /i "%%a" == "bla" set ExcludeBla=1
  85. if /i "%%a" == "sbs" set ExcludeSbs=1
  86. if /i "%%a" == "srv" set ExcludeSrv=1
  87. if /i "%%a" == "ads" set ExcludeAds=1
  88. if /i "%%a" == "dtc" set ExcludeDtc=1
  89. )
  90. REM Personal
  91. if not defined ExcludePer (
  92. perl %RazzleToolPath%\cksku.pm -t:per -l:%lang% -a:%_BuildArch%
  93. if not errorlevel 1 (
  94. set /a NumProds=!NumProds! + 1
  95. set Products=!Products!;Personal,%_NTPOSTBLD%,per,'perinf','p',c,yes
  96. )
  97. )
  98. REM Professional
  99. if not defined ExcludePro (
  100. perl %RazzleToolPath%\cksku.pm -t:pro -l:%lang% -a:%_BuildArch%
  101. if not errorlevel 1 (
  102. set /a NumProds=!NumProds! + 1
  103. set Products=!Products!;Professional,%_NTPOSTBLD%,pro,'','w',p,yes
  104. )
  105. )
  106. REM Web blade
  107. if not defined ExcludeBla (
  108. perl %RazzleToolPath%\cksku.pm -t:bla -l:%lang% -a:%_BuildArch%
  109. if not errorlevel 1 (
  110. set /a NumProds=!NumProds! + 1
  111. set Products=!Products!;Blade,%_NTPOSTBLD%,bla,'srvinf blainf','b',b,no
  112. )
  113. )
  114. REM Small Business Server
  115. if not defined ExcludeSbs (
  116. perl %RazzleToolPath%\cksku.pm -t:sbs -l:%lang% -a:%_BuildArch%
  117. if not errorlevel 1 (
  118. set /a NumProds=!NumProds! + 1
  119. set Products=!Products!;sbs,%_NTPOSTBLD%,sbs,'srvinf sbsinf','l',l,no
  120. )
  121. )
  122. REM Server
  123. if not defined ExcludeSrv (
  124. perl %RazzleToolPath%\cksku.pm -t:srv -l:%lang% -a:%_BuildArch%
  125. if not errorlevel 1 (
  126. set /a NumProds=!NumProds! + 1
  127. set Products=!Products!;Server,%_NTPOSTBLD%,srv,'srvinf','s',s,no
  128. )
  129. )
  130. REM Advanced Server
  131. if not defined ExcludeAds (
  132. perl %RazzleToolPath%\cksku.pm -t:ads -l:%lang% -a:%_BuildArch%
  133. if not errorlevel 1 (
  134. set /a NumProds=!NumProds! + 1
  135. set Products=!Products!;Advanced,%_NTPOSTBLD%,ads,'srvinf entinf','e',a,no
  136. )
  137. )
  138. REM Datacenter Server
  139. if not defined ExcludeDtc (
  140. perl %RazzleToolPath%\cksku.pm -t:dtc -l:%lang% -a:%_BuildArch%
  141. if not errorlevel 1 (
  142. set /a NumProds=!NumProds! + 1
  143. set Products=!Products!;Datacenter,%_NTPOSTBLD%,dtc,'srvinf entinf dtcinf','d',d,no
  144. )
  145. )
  146. REM Call GetData to create a new cddata list if appropriate
  147. if /i "%Release%" EQU "Yes" call :GetData
  148. if /i "%Full%" EQU "Yes" call :GetData
  149. REM
  150. REM Now compress if required
  151. REM
  152. if /i not "%Comp%" EQU "Yes" GOTO EndCompLoop
  153. REM Need at least the base directory to exist
  154. if not exist %CompDr% md %CompDr%
  155. REM Loop through products
  156. for /l %%a in ( 1,1,%NumProds% ) do (
  157. REM Want OrderedLinks value for each product
  158. CALL :GetProductData %%a
  159. REM Want to make sure a compressed directory exists for every link
  160. for /f "tokens=*" %%k in (!OrderedLinks!) do for %%j in (%%k) do (
  161. if not exist %CompDr%\%%j md %CompDr%\%%j
  162. )
  163. )
  164. if not exist %CompDr%\lang md %CompDr%\lang
  165. REM BUGBUG?
  166. REM Apparently done if we are releasing
  167. if /i "%Release%" EQU "Yes" goto :EndCompLoop
  168. echo Now compressing ...
  169. call %RazzleToolPath%\PostBuildScripts\startcompress.cmd endcomp -l %lang%
  170. REM Wait on Compression to finish
  171. echo Waiting on compression to finish ...
  172. :CompLoop
  173. sleep 5
  174. If not exist %tmp%\compression\*.tmp goto EndSleepLoop
  175. goto :CompLoop
  176. :EndSleepLoop
  177. :EndCompLoop
  178. REM BUGBUG--JasonS--Force creation of support\tools dir on ia64, since cddirs.lst has it.
  179. if not exist %_NTPostBld%\support\tools md %_NTPostBld%\support\tools
  180. REM BUGBUG--JasonS--Force creation of support\tools dir on ia64, since cddirs.lst has it.
  181. set UseCompressedLinks=yes
  182. if /i "%Release%" EQU "no" if /i "%Comp%" EQU "no" set UseCompressedLinks=no
  183. REM Loop through products
  184. for /l %%a in ( 1,1,%NumProds% ) do (
  185. REM Need to get the following variables set:
  186. REM DisplayName
  187. REM CDRoot
  188. REM Sku
  189. REM OrderedLinks
  190. REM CDProductGroups
  191. REM CDTagLetter
  192. REM Win9xUpgrade
  193. CALL :GetProductData %%a
  194. echo Creating CD image for !DisplayName! ...
  195. if /i "%Full%" EQU "yes" (
  196. echo Deleting !DisplayName! directory ...
  197. rd /s /q !CDRoot!\!Sku!
  198. )
  199. echo Linking base directories ...
  200. if "%UseCompressedLinks%" == "yes" (
  201. CALL :MakeLinksWithCompression !DisplayName! !CDRoot! %CompDr% !Sku! %Share% !OrderedLinks!
  202. ) else (
  203. CALL :MakeLinksWithoutCompression !DisplayName! !CDRoot! !Sku! %Share% !OrderedLinks!
  204. )
  205. echo Linking winnt32 directories ...
  206. CALL :LinkSetupSubdirs !DisplayName! !CDRoot! !Sku! %Share% %UseCompressedLinks% !Win9xUpgrade! !OrderedLinks!
  207. echo Linking other directories ...
  208. CALL :LinkCDSubdirs !DisplayName! !CDRoot! !Sku! %Share% !CDProductGroups!
  209. REM Remove any symbols directories
  210. for /f %%z in ('dir /ad /s /b !CDRoot!\!Sku!\symbols*') do (
  211. echo removing symbols directory %%z...
  212. rd /s/q %%z
  213. )
  214. echo Linking miscellaneous files ...
  215. CALL :CommonMiscellaneousLinks !DisplayName! !CDRoot! !Sku! %Share% !CDProductGroups!
  216. REM Make tag files for CDs
  217. set TagPrefix=i
  218. if /i "%_BuildArch%" EQU "amd64" set TagPrefix=a
  219. if /i "%_BuildArch%" EQU "ia64" set TagPrefix=m
  220. set TagFileName=win51!TagPrefix!!CDTagLetter!
  221. echo Windows > !CDRoot!\!Sku!\win51
  222. echo Windows > !CDRoot!\!Sku!\!TagFileName!
  223. )
  224. REM Done
  225. if defined errors seterror.exe "%errors%"& goto :EOF
  226. GOTO :EOF
  227. REM Function: GetProductData
  228. REM
  229. REM accesses the global %Products% variable and
  230. REM sets global values that reflect entry %1
  231. REM in that list (1,2,3,...)
  232. REM
  233. REM Note: have to use a function like this in
  234. REM order to access a random number of
  235. REM entries, even though this is really
  236. REM bad about using and setting globals
  237. REM that are used elsewhere
  238. :GetProductData
  239. set EntryNum=%1
  240. for /f "tokens=%EntryNum% delims=;" %%z in ("%Products%") do (
  241. for /f "tokens=1-8 delims=," %%a in ("%%z") do (
  242. set DisplayName=%%a
  243. set CDRoot=%%b
  244. set Sku=%%c
  245. set OrderedLinks=%%d
  246. set CDProductGroups=%%e
  247. set CDTagLetter=%%f
  248. set Win9xUpgrade=%%g
  249. REM Replace single-quote in list variables with double-quotes
  250. REM so they can be passed into subroutines as a single parameter
  251. set OrderedLinks=!OrderedLinks:'="!
  252. set CDProductGroups=!CDProductGroups:'="!
  253. ))
  254. if defined errors if 0%errors% NEQ 0 (
  255. endlocal
  256. set errors=1
  257. ) else endlocal
  258. GOTO :EOF
  259. :MakeLinksWithCompression
  260. setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
  261. set FullSkuName=%1& shift
  262. set CDRoot=%1&shift
  263. set CompDr=%1& shift
  264. set Sku=%1& shift
  265. set Share=%1& shift
  266. set OrderedLinkSubdirs=%1& shift
  267. REM base compressed files...
  268. echo Running compdir /kerlntsd /m:%tmp%\%Sku%comp.lst %CompDr% %CDRoot%\%Sku%\%Share%
  269. call ExecuteCmd.cmd "compdir /kerlntsd /m:%tmp%\%Sku%comp.lst %CompDr% %CDRoot%\%Sku%\%Share%" >nul
  270. REM base uncompressed files...
  271. echo Running compdir /kerlntsd /m:%tmp%\%Sku%uncomp.lst %_NTPostBld% %CDRoot%\%Sku%\%Share%
  272. call ExecuteCmd.cmd "compdir /kerlntsd /m:%tmp%\%Sku%uncomp.lst %_NTPostBld% %CDRoot%\%Sku%\%Share%" >nul
  273. REM lang compressed files...
  274. echo Running compdir /kelntsd %CompDr%\lang %CDRoot%\%Sku%\%Share%\lang
  275. call ExecuteCmd.cmd "compdir /kelntsd %CompDr%\lang %CDRoot%\%Sku%\%Share%\lang" >nul
  276. for /f "tokens=*" %%z in ( %OrderedLinkSubdirs% ) do for %%a in (%%z) do (
  277. REM ???inf compressed files...
  278. echo Running compdir /deklnruz /m:%tmp%\%Sku%subcomp.lst %CompDr%\%%a %CDRoot%\%Sku%\%Share%
  279. call ExecuteCmd.cmd "compdir /deklnruz /m:%tmp%\%Sku%subcomp.lst %CompDr%\%%a %CDRoot%\%Sku%\%Share%" >nul
  280. REM ???inf uncompressed files...
  281. echo Running compdir /deklnruz /m:%tmp%\%Sku%subuncomp.lst %_NTPostBld%\%%a %CDRoot%\%Sku%\%Share%
  282. call ExecuteCmd.cmd "compdir /deklnruz /m:%tmp%\%Sku%subuncomp.lst %_NTPostBld%\%%a %CDRoot%\%Sku%\%Share%" >nul
  283. )
  284. REM Rename files we are responisble for converting to their CD names
  285. for /f "tokens=1,2 delims=:" %%a in (%tmp%\%Sku%Rename_c.lst) do (
  286. REM Ignore relative paths and assume all operations
  287. REM will be performed in our %Share% directory
  288. if exist %CDRoot%\%Sku%\%Share%\%%~nxa call ExecuteCmd.cmd "ren %CDRoot%\%Sku%\%Share%\%%~nxa %%~nxb"
  289. )
  290. if defined errors if 0%errors% NEQ 0 (
  291. endlocal
  292. set errors=1
  293. ) else endlocal
  294. GOTO :EOF
  295. :MakeLinksWithoutCompression
  296. setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
  297. set FullSkuName=%1& shift
  298. set CDRoot=%1& shift
  299. set Sku=%1& shift
  300. set Share=%1& shift
  301. set OrderedLinkSubdirs=%1& shift
  302. REM base files...
  303. echo Running compdir /kerlntsd /m:%tmp%\%Sku%.lst %_NTPostBld% %CDRoot%\%Sku%\%Share%
  304. call ExecuteCmd.cmd "compdir /kerlntsd /m:%tmp%\%Sku%.lst %_NTPostBld% %CDRoot%\%Sku%\%Share%" >nul
  305. REM lang files...
  306. echo Running compdir /kelntsd %_NTPostBld%\lang %CDRoot%\%Sku%\%Share%\lang
  307. call ExecuteCmd.cmd "compdir /kelntsd %_NTPostBld%\lang %CDRoot%\%Sku%\%Share%\lang" >nul
  308. for /f "tokens=*" %%z in ( %OrderedLinkSubdirs% ) do for %%a in (%%z) do (
  309. REM ???inf files...
  310. echo Running compdir /deklnruz /m:%tmp%\%Sku%sub.lst %_NTPostBld%\%%a %CDRoot%\%Sku%\%Share%
  311. call ExecuteCmd.cmd "compdir /deklnruz /m:%tmp%\%Sku%sub.lst %_NTPostBld%\%%a %CDRoot%\%Sku%\%Share%" >nul
  312. )
  313. REM Rename files we are responisble for converting to their CD names
  314. for /f "tokens=1,2 delims=:" %%a in (%tmp%\%Sku%Rename.lst) do (
  315. REM Ignore relative paths and assume all operations
  316. REM will be performed in our %Share% directory
  317. if exist %CDRoot%\%Sku%\%Share%\%%~nxa call ExecuteCmd.cmd "ren %CDRoot%\%Sku%\%Share%\%%~nxa %%~nxb"
  318. )
  319. if defined errors if 0%errors% NEQ 0 (
  320. endlocal
  321. set errors=1
  322. ) else endlocal
  323. GOTO :EOF
  324. :LinkSetupSubdirs
  325. setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
  326. set FullSkuName=%1& shift
  327. set CDRoot=%1& shift
  328. set Sku=%1& shift
  329. set Share=%1& shift
  330. set Comp=%1& shift
  331. set Win9xUpgrade=%1& shift
  332. set OrderedLinkSubDirs=%1& shift
  333. set SetupSubDirs=winnt32\compdata
  334. REM Add Win9x upgrade directory on X86 architectures if supported by the sku
  335. if defined 386 if /I "%Win9xupgrade%" == "yes" set SetupSubDirs=%SetupSubDirs% winnt32\win9xupg
  336. set RecursiveSetupSubDirs=winnt32\winntupg
  337. REM Setup subdirs get linked under the flat CD dirs on compressed
  338. REM and underneath a winnt32 subdirectory on uncompressed
  339. if /i "%Comp%" EQU "no" (
  340. set StartingDestDir=%CDRoot%\%Sku%\%Share%\winnt32
  341. ) else (
  342. set StartingDestDir=%CDRoot%\%Sku%\%Share%
  343. )
  344. REM Link dr watson files required for winnt32.
  345. call ExecuteCmd.cmd "perl %RazzleToolPath%\postbuildscripts\Copydw.pl %_NTPostBld% %CDRoot%\%Sku%\%Share% %StartingDestDir%"
  346. REM Now link all of the winnt32 directories, starting with
  347. REM the ones in the flat binaries share and then the
  348. REM ones in the SKU specific directories
  349. for /f "tokens=*" %%z in ( %OrderedLinkSubdirs% ) do set LinkDirs=%%z
  350. set LinkDirs=. %LinkDirs%
  351. for %%a in (%LinkDirs%) do (
  352. REM Start with base winnt32 directory
  353. echo Running compdir /deklnruz %_NTPostBld%\%%a\winnt32 %StartingDestDir%
  354. call ExecuteCmd.cmd "compdir /deklnruz %_NTPostBld%\%%a\winnt32 %StartingDestDir%"
  355. for %%b in (%RecursiveSetupSubDirs%) do (
  356. REM Only want to concatenate the last part
  357. REM of the path for the destination
  358. set DestDir=%StartingDestDir%\%%~nxb
  359. if exist %_NTPostBld%\%%a\%%b (
  360. echo Running compdir /deklnuz %_NTPostBld%\%%a\%%b !DestDir!
  361. call ExecuteCmd.cmd "compdir /deklnuz %_NTPostBld%\%%a\%%b !DestDir!" >nul
  362. )
  363. )
  364. for %%b in (%SetupSubDirs%) do (
  365. REM Only want to concatenate the last part
  366. REM of the path for the destination
  367. set DestDir=%StartingDestDir%\%%~nxb
  368. if exist %_NTPostBld%\%%a\%%b (
  369. echo Running compdir /deklnruz %_NTPostBld%\%%a\%%b !DestDir!
  370. call ExecuteCmd.cmd "compdir /deklnruz %_NTPostBld%\%%a\%%b !DestDir!" >nul
  371. )
  372. )
  373. )
  374. if defined errors if 0%errors% NEQ 0 (
  375. endlocal
  376. set errors=1
  377. ) else endlocal
  378. GOTO :EOF
  379. :LinkCDSubDirs
  380. setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
  381. set FullSkuName=%1& shift
  382. set CDRoot=%1& shift
  383. set Sku=%1& shift
  384. set Share=%1& shift
  385. set ValidForProduct=%1& shift
  386. for /f "tokens=1-7" %%a in (%RazzleToolPath%\postbuildscripts\CDDirs.lst) do (
  387. REM Fields retrieved from file
  388. set BinSubDir=%%a
  389. set RootCDDir=%%b
  390. set CDSubDir=%%c
  391. set ProductInfo=%%d
  392. set Recursion=%%e
  393. set Archs=%%f
  394. REM According to our architecture, are we interested?
  395. set ValidForArchitecture=0
  396. if /i "!Archs!" EQU "a" (
  397. set ValidForArchitecture=1
  398. ) else if /i "%_BuildArch%" EQU "x86" (
  399. if /i "!Archs!" EQU "x" set ValidForArchitecture=1
  400. ) else if /i "%_BuildArch%" EQU "amd64" (
  401. if /i "!Archs!" EQU "d" set ValidForArchitecture=1
  402. ) else if /i "%_BuildArch%" EQU "ia64" (
  403. if /i "!Archs!" EQU "i" set ValidForArchitecture=1
  404. )
  405. REM Only continue if valid
  406. if !ValidForArchitecture! EQU 1 (
  407. REM According to our product type, are we interested?
  408. set ValidForSku=0
  409. perl -e "exit $ARGV[1] ^!~ /$ARGV[0]/" !ValidForProduct! !ProductInfo!
  410. if NOT ERRORLEVEL 1 set ValidForSku=1
  411. REM Only continue if valid
  412. if !ValidForSku! EQU 1 (
  413. REM Linked under root or product on the CD?
  414. if not "!RootCDDir!" EQU "p" (
  415. if not "!RootCDDir!" EQU "r" (
  416. call errmsg.cmd "Unknown value in second column of %RazzleToolPath%\postbuildscripts\CDDirs.lst (!RootCDDir!)"
  417. GOTO :EOF
  418. ) else (
  419. set CDDest=!CDSubDir!
  420. )
  421. ) else (
  422. set CDDest=%Share%\!CDSubDir!
  423. )
  424. REM Default compdir switches
  425. set CompdirSwitches=/deklnuz
  426. REM Set no-recursion flag for compdir if necessary
  427. if /i NOT "!Recursion!" EQU "y" set CompdirSwitches=!CompdirSwitches!r
  428. echo Running compdir !CompdirSwitches! %_NTPostBld%\!BinSubDir! %CDRoot%\%Sku%\!CDDest!
  429. call ExecuteCmd.cmd "compdir !CompdirSwitches! %_NTPostBld%\!BinSubDir! %CDRoot%\%Sku%\!CDDest!" >nul
  430. REM These parens end the architecture check
  431. REM and the valid product check -- could
  432. REM heavily indent all of the above or
  433. REM just make this nice comment
  434. ))
  435. )
  436. if defined errors if 0%errors% NEQ 0 (
  437. endlocal
  438. set errors=1
  439. ) else endlocal
  440. GOTO :EOF
  441. :CommonMiscellaneousLinks
  442. setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
  443. set FullSkuName=%1& shift
  444. set CDRoot=%1& shift
  445. set Sku=%1& shift
  446. set Share=%1& shift
  447. set CDProductGroups=%1& shift
  448. REM Link WOW64 stuff
  449. if not defined 386 (
  450. echo Linking wow bins for %FullSkuName% ...
  451. echo Running compdir /kelntsd /m:%_NTPostBld%\congeal_scripts\copywowlist_%CDProductGroups%.lst %_NTPostBld%\wowbins %CDRoot%\%Sku%\i386
  452. call ExecuteCmd.cmd "compdir /kelntsd /m:%_NTPostBld%\congeal_scripts\copywowlist_%CDProductGroups%.lst %_NTPostBld%\wowbins %CDRoot%\%Sku%\i386"
  453. )
  454. REM WARNING: hard-coded special case for PRO and ADS
  455. if /i "%Sku%" EQU "pro" (
  456. call ExecuteCmd.cmd "copy %_NTPostBld%\autorun.exe %CDRoot%\pro\setup.exe"
  457. call ExecuteCmd.cmd "copy %_NTPostBld%\ntautorun.inf %CDRoot%\pro\autorun.inf"
  458. ) else if /i "%Sku%" EQU "ads" (
  459. call ExecuteCmd.cmd "copy %_NTPostBld%\entinf\autorun.exe %CDRoot%\ads\setup.exe"
  460. call ExecuteCmd.cmd "copy %_NTPostBld%\entinf\ntautorun.inf %CDRoot%\ads\autorun.inf"
  461. ) else (
  462. call ExecuteCmd.cmd "copy %_NTPostBld%\%Sku%inf\autorun.exe %CDRoot%\%Sku%\setup.exe"
  463. call ExecuteCmd.cmd "copy %_NTPostBld%\%Sku%inf\ntautorun.inf %CDRoot%\%Sku%\autorun.inf"
  464. )
  465. REM system32 subdirectory...
  466. if not exist %CDRoot%\%Sku%\%Share%\system32 (
  467. call ExecuteCmd.cmd "md %CDRoot%\%Sku%\%Share%\system32"
  468. )
  469. call ExecuteCmd.cmd "copy %_NTPostBld%\usetup.exe %CDRoot%\%Sku%\%Share%\system32\smss.exe"
  470. call ExecuteCmd.cmd "copy %_NTPostBld%\ntdll.dll %CDRoot%\%Sku%\%Share%\system32\ntdll.dll"
  471. REM WARNING: Hardcoded special case extra dir on CD for SBS builds
  472. if /i "%Sku%" EQU "sbs" (
  473. if not exist %CDRoot%\%Sku%\%Share%\svcpack (
  474. call ExecuteCmd.cmd "md %CDRoot%\%Sku%\%Share%\svcpack"
  475. )
  476. call ExecuteCmd.cmd "copy %_NTPostBld%\bosprep.exe %CDRoot%\%Sku%\%Share%\svcpack\bosprep.exe"
  477. )
  478. REM Bootfont.bin
  479. if exist %CDRoot%\%Sku%\%Share%\bootfont.bin call ExecuteCmd.cmd "copy %CDRoot%\%Sku%\%Share%\bootfont.bin %CDRoot%\%Sku%"
  480. if defined errors if 0%errors% NEQ 0 (
  481. endlocal
  482. set errors=1
  483. ) else endlocal
  484. GOTO :EOF
  485. REM
  486. REM Funcion: GetData
  487. REM Clears current lists, then calls CDData.cmd
  488. REM
  489. :GetData
  490. setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
  491. REM Call CDdata.cmd - pushd to make logmsg output fit on one line
  492. pushd %RazzleToolPath%\postbuildscripts
  493. set DelFileList=%_NTPostBld%\build_logs\bindiff.txt
  494. set DelFileList=!DelFileList! %_NTPostBld%\build_logs\cddata.txt
  495. set DelFileList=!DelFileList! %_NTPostBld%\build_logs\cddata.txt.full
  496. set DelFileList=!DelFileList!
  497. for %%a in (!DelFileList!) do (
  498. if exist %%a (
  499. call logmsg.cmd "Deleting %%a ..."
  500. del /f /q %%a
  501. )
  502. )
  503. call CDdata.cmd -f -d -l %lang%
  504. popd
  505. if defined errors if 0%errors% NEQ 0 (
  506. endlocal
  507. set errors=1
  508. ) else endlocal
  509. GOTO :EOF