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.

105 lines
2.7 KiB

  1. @REM -----------------------------------------------------------------
  2. @REM
  3. @REM nt5infcat.cmd - WadeLa
  4. @REM Creates the nt5inf.cat system catalogs for each sku
  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. nt5infcat.cmd [-l <language>]
  20. Creates the nt5inf.cat system catalogs for each sku
  21. USAGE
  22. parseargs('?' => \&Usage);
  23. # *** TEMPLATE CODE ***
  24. $ENV{"_CPCMAGIC"}++;exit(system($0)>>8);
  25. __END__
  26. @:CPCBegin
  27. @set _CPCMAGIC=
  28. @setlocal ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
  29. @if not defined DEBUG echo off
  30. @REM *** CMD SCRIPT BELOW ***
  31. REM Set some local vars
  32. set catCDFs=%tmp%\CDFs
  33. set CatTemp=%tmp%\cattemp
  34. set catfiles=%tmp%\cats
  35. REM Make a tempfile for catsign
  36. if NOT exist %CatTemp% md %CatTemp%
  37. echotime /t > %CatTemp%\nt5infcat.tmp
  38. set InfList=
  39. perl %RazzleToolPath%\CkSku.pm -t:pro -l:%lang%
  40. if %errorlevel% EQU 0 (
  41. set InfList=!InfList! .
  42. )
  43. perl %RazzleToolPath%\CkSku.pm -t:per -l:%lang%
  44. if %errorlevel% EQU 0 (
  45. set InfList=!InfList! perinf
  46. )
  47. perl %RazzleToolPath%\CkSku.pm -t:bla -l:%lang%
  48. if %errorlevel% EQU 0 (
  49. set InfList=%InfList% blainf)
  50. )
  51. perl %RazzleToolPath%\CkSku.pm -t:sbs -l:%lang%
  52. if %errorlevel% EQU 0 (
  53. set InfList=%InfList% sbsinf)
  54. )
  55. perl %RazzleToolPath%\CkSku.pm -t:srv -l:%lang%
  56. if %errorlevel% EQU 0 (
  57. set InfList=!InfList! srvinf
  58. )
  59. perl %RazzleToolPath%\CkSku.pm -t:ads -l:%lang%
  60. if %errorlevel% EQU 0 (
  61. set InfList=!InfList! entinf
  62. )
  63. perl %RazzleToolPath%\CkSku.pm -t:dtc -l:%lang%
  64. if %errorlevel% EQU 0 (
  65. set InfList=!InfList! dtcinf
  66. )
  67. for %%a in (%InfList%) do (
  68. if NOT exist %catfiles%\%%a md %catfiles%\%%a
  69. if NOT exist %_NTPostBld%\congeal_scripts\%%a md %_NTPostBld%\congeal_scripts\%%a
  70. call logmsg.cmd "Creating %catfiles%\%%a\nt5inf.CAT ..."
  71. set flat_name=%%a
  72. set flat_name=!flat_name:\=_!
  73. makecat -o %_NTPostBld%\congeal_scripts\%%a\nt5inf.hash -v %catCDFS%\%%a\nt5inf.CDF > %catCDFs%\nt5inf.!flat_name!.log
  74. if errorlevel 1 (
  75. for /f "tokens=1*" %%i in ('findstr /i processed %catCDFs%\nt5inf.!flat_name!.log') do call errmsg.cmd "%%i %%j"
  76. call errmsg.cmd "makecat -o %_NTPostBld%\congeal_scripts\%%a\nt5inf.hash -v %catCDFS%\%%a\nt5inf.CDF failed"
  77. set exitcode=1
  78. )
  79. copy nt5inf.CAT %catfiles%\%%a\
  80. del nt5inf.cat
  81. )
  82. del %CatTemp%\nt5infcat.tmp
  83. :end
  84. seterror.exe "%errors%"& goto :EOF