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.

194 lines
4.3 KiB

  1. @echo off
  2. goto SkipComments
  3. *
  4. * Each release will move the previous build of the product to the next
  5. * available numbered build to allow some history; if a build is for a
  6. * forked version of the installer the product 3 letter code will be
  7. * appended to the subdirectories associated with that OS.
  8. *
  9. * \\winseqfe\release\PkgInstaller\<build>[.<OS>]\<Lang>\<Platform>\<buildtype>
  10. *
  11. * Build will be latest.tst unless the installer has been forked to meet
  12. * the needs of a product OS is optional and only applies if we are building
  13. *
  14. * A forked version of installer will be W2K, WxP
  15. * Lang 2 letter lang code
  16. * Platform x86, ia64
  17. * Buildtype only release FRE builds
  18. *
  19. * We will release NON split binaries; this will allow people to drop
  20. * these binaries to other locations and get them split as required by
  21. * that process.
  22. *
  23. * Directory structure and binaries at inception of this project:
  24. * Spcustom.dll
  25. * Spuninst.exe
  26. * Update.exe
  27. * OS\W2K\spmsg.dll ; Only copy the OS specific spmsg.dll
  28. * OS\WxP\spmsg.dll
  29. * Symbols.pri\..... ; only publish private symbols
  30. *
  31. *
  32. *
  33. :SkipComments
  34. setlocal
  35. set Build=%1
  36. set LangOpt=%2
  37. set OS=wxp
  38. set TgtDir=.
  39. if "%Build%" == "" Echo No build specified & goto :ErrorExit
  40. set SrcDir=\\winseqfe\release\PkgInstaller\%1
  41. if not exist %SrcDir% Echo Invalid build directory & goto :ErrorExit
  42. for /f "tokens=1,2" %%i in (.\langcode.txt) do call :ProcessLang %%i %%j
  43. REM sd submit -C "SrvPack PkgInstaller bindrop" %TgtDir%\...
  44. goto :EOF
  45. ***********************
  46. :ProcessLang
  47. set LangDone = 0
  48. set Lang2=%1
  49. set Lang3=%2
  50. if "%LangOpt%" == "" goto :ChkLangSrc
  51. if "%LangOpt%" == "%Lang2%" goto :ChkLangSrc
  52. goto :EOF
  53. :ChkLangSrc
  54. set SrcLang=%SrcDir%\%Lang3%
  55. if exist %SrcLang% goto :DoLang
  56. REM
  57. REM If the listed Sourc Lang doesn't exist first try the 2 char lang code
  58. REM If that doesn't work look up in the lang codes table for all the possible
  59. REM 3 char lang codes that match, and try them.
  60. REM
  61. set SrcLang=%SrcDir%\Lang2%
  62. if exist %SrcLang% set Lang3=%Lang2% & goto :DoLang
  63. for /f "tokens=1,9 delims=, " %%i in (%SDXROOT%\tools\codes.txt) do call :FindLang %%i %%j
  64. goto :EOF
  65. :FindLang
  66. if "%LangDone%" == "1" goto :EOF
  67. if not "%Lang2%" == "%2" goto :EOF
  68. set SrcLang=%SrcDir%\%1
  69. if exist %SrcLang% set Lang3=%1 & goto :DoLang
  70. goto :EOF
  71. :DoLang
  72. if "%LangDone%" == "1" goto :EOF
  73. echo.
  74. echo ----------------------------
  75. echo Propping %Lang2% %Lang3%
  76. call :ProcessPlatform x86\fre i386\fre
  77. call :ProcessPlatform ia64\fre ia64\fre
  78. set LangDone = 1
  79. if not "%Lang2%" == "en" goto :EOF
  80. call :ProcessPlatform x86\chk i386\chk
  81. call :ProcessPlatform ia64\chk ia64\chk
  82. goto :EOF
  83. :ProcessPlatform
  84. set SrcPlatform=%1
  85. set TgtPlatform=%2
  86. echo.
  87. echo --------
  88. echo Propping %SrcPlatform% %TgtPlatform%
  89. echo.
  90. call :ProcessFile spcustom.dll \ \
  91. call :ProcessFile spuninst.exe \ \
  92. call :ProcessFile update.exe \ \
  93. call :ProcessFile spmsg.dll \os\%os%\ \
  94. REM call :SplitSyms
  95. call :ProcessFile spuninst.pdb \symbols.pri\exe\ \
  96. call :ProcessFile update.pdb \symbols.pri\exe\ \
  97. call :ProcessFile spcustom.pdb \symbols.pri\dll\ \
  98. goto :EOF
  99. :ProcessFile
  100. set File=%1
  101. set SrcPath=%2
  102. set TgtPath=%3
  103. set SrcFile=%SrcDir%\%Lang3%\%SrcPlatform%%SrcPath%%File%
  104. set TgtFile=%TgtDir%\%Lang2%\%TgtPlatform%%TgtPath%%File%
  105. if not exist %SrcFile% goto :EOF
  106. if not exist %TgtFile% goto :AddNewFile
  107. sd edit %TgtFile% > nul
  108. echo copy %SrcFile% %TgtFile%
  109. copy %SrcFile% %TgtFile% > nul
  110. goto :EOF
  111. :AddNewFile
  112. set TgtNew=%TgtDir%\%Lang2%\%TgtPlatform%
  113. mkdir %TgtNew% > nul
  114. echo copy %SrcFile% %TgtFile%
  115. copy %SrcFile% %TgtFile%
  116. sd add %TgtFile% > nul
  117. goto :EOF
  118. :SplitSyms
  119. set TgtPath=%TgtDir%\%Lang%\%Platform%
  120. splitsym -a -v %TgtPath%\spcustom.dll
  121. splitsym -a -v %TgtPath%\spuninst.exe
  122. splitsym -a -v %TgtPath%\update.exe
  123. del %TgtPath%\*.dbg
  124. goto :EOF
  125. :ErrorExit
  126. echo.
  127. echo Syntax: PROPSD SourceDir [Lang]
  128. echo.
  129. echo - SourceDir typically is "latest.tst" from \\winseqfe\release\PkgInstaller\
  130. echo - Language can be specified if only one language is desired.
  131. echo.
  132. goto :EOF