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.

114 lines
2.6 KiB

  1. @echo off
  2. setlocal ENABLEDELAYEDEXPANSION
  3. if DEFINED _echo echo on
  4. if DEFINED verbose echo on
  5. REM ******************************************************************
  6. REM
  7. REM This script updates symbols.cat when the build lab takes backprops
  8. REM for symbol files that are in symbols.cab
  9. REM
  10. REM ******************************************************************
  11. if "%1" == "" goto Usage
  12. REM Check the command line for /? -? or ?
  13. for %%a in (./ .- .) do if ".%1." == "%%a?." goto Usage
  14. if "%2" == "" (
  15. set lang=usa
  16. set mybinaries=%_NTTREE%
  17. ) else (
  18. set lang=%2
  19. set mybinaries=%relbins%\%2
  20. )
  21. REM
  22. REM Decide which build we are working on
  23. REM debug vs. retail and i386 vs. amd64 vs. ia64
  24. REM
  25. set SUBDIR=
  26. if /i "%_BuildArch%" == "x86" (
  27. if /i "%lang%" == "NEC_98" (
  28. set SUBDIR=NEC98
  29. ) else (
  30. set SUBDIR=i386
  31. )
  32. )
  33. if /i "%_BuildArch%" == "ia64" (
  34. set SUBDIR=ia64
  35. )
  36. if /i "%_BuildArch%" == "amd64" (
  37. set SUBDIR=amd64
  38. )
  39. if "%SUBDIR%" == "" (
  40. call errmsg "Environment variables PROCESSOR_ARCHITECTURE is not recognized"
  41. goto errend
  42. )
  43. if /i "%_BuildType%" == "chk" (
  44. set FRECHK=Debug
  45. ) else (
  46. set FRECHK=Retail
  47. )
  48. set catalog=%mybinaries%\symbolcd\cd\symbols\%SUBDIR%\%FRECHK%\symbols.cat
  49. set temp.txt=%mybinaries%\symbolcd\%lang%\update.txt
  50. REM
  51. REM Find out which symbol files, if any need to be updated in
  52. REM the catalog file
  53. REM
  54. findstr /il %1 %mybinaries%\symbolcd\%lang%\symbolcd.txt > %temp.txt%
  55. set Resign=FALSE
  56. for /F "tokens=3 delims=," %%a in (%temp.txt%) do (
  57. updcat %catalog% -a %mybinaries%\%%a
  58. set Resign=TRUE
  59. )
  60. if /i "%Resign%" == "TRUE" (
  61. echo %catalog% needs to be signed and propped
  62. goto end
  63. ) else (
  64. del %temp.txt%
  65. echo No changes were made to %catalog%
  66. goto errend
  67. )
  68. goto end
  69. :Usage
  70. echo.
  71. echo Usage: symcatupd ^<file^> [^<language^>]
  72. echo.
  73. echo file The binary that is being updated.
  74. echo associated lists and infs
  75. echo cabs Update the out of date cabs
  76. echo.
  77. echo language Language must be one of the languages in codes.txt.
  78. echo If language is not given on the command line,
  79. echo usa is the default.
  80. echo.
  81. goto errend
  82. :errend
  83. endlocal
  84. REM Set errorlevel to 1 in case of errors during execution.
  85. REM Used by the build rule script "symbols.cmd" after calling "symbolcd.cmd".
  86. seterror.exe 1
  87. goto :EOF
  88. :end
  89. endlocal
  90. REM Set errorlevel to 0 when the script finishes successfully.
  91. REM Used by the build rule script "symbols.cmd" after calling "symbolcd.cmd".
  92. seterror.exe 0
  93. goto :EOF