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.

100 lines
2.5 KiB

  1. @echo off
  2. REM ------------------------------------------------------------------
  3. REM
  4. REM nt5infcat.cmd
  5. REM Creates the nt5inf.cat system catalogs for each sku
  6. REM
  7. REM Copyright (c) Microsoft Corporation. All rights reserved.
  8. REM
  9. REM ------------------------------------------------------------------
  10. if defined _CPCMAGIC goto CPCBegin
  11. perl -x "%~f0" %*
  12. goto :EOF
  13. #!perl
  14. use strict;
  15. use lib $ENV{RAZZLETOOLPATH} . "\\PostBuildScripts";
  16. use lib $ENV{RAZZLETOOLPATH};
  17. use PbuildEnv;
  18. use ParseArgs;
  19. sub Usage { print<<USAGE; exit(1) }
  20. nt5infcat.cmd [-l <language>]
  21. Creates the nt5inf.cat system catalogs for each sku
  22. USAGE
  23. parseargs('?' => \&Usage);
  24. # *** NEXT FEW LINES ARE TEMPLATE ***
  25. $ENV{"_CPCMAGIC"}++;exit(system($0)>>8);
  26. __END__
  27. :CPCBegin
  28. set _CPCMAGIC=
  29. setlocal ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
  30. REM *** BEGIN YOUR 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:per -l:%lang%
  40. if %errorlevel% EQU 0 (
  41. set InfList=!InfList! perinf
  42. )
  43. perl %RazzleToolPath%\CkSku.pm -t:bla -l:%lang%
  44. if %errorlevel% EQU 0 (
  45. set InfList=%InfList% blainf)
  46. )
  47. perl %RazzleToolPath%\CkSku.pm -t:sbs -l:%lang%
  48. if %errorlevel% EQU 0 (
  49. set InfList=%InfList% sbsinf)
  50. )
  51. perl %RazzleToolPath%\CkSku.pm -t:srv -l:%lang%
  52. if %errorlevel% EQU 0 (
  53. set InfList=!InfList! srvinf
  54. )
  55. perl %RazzleToolPath%\CkSku.pm -t:ads -l:%lang%
  56. if %errorlevel% EQU 0 (
  57. set InfList=!InfList! entinf
  58. )
  59. perl %RazzleToolPath%\CkSku.pm -t:dtc -l:%lang%
  60. if %errorlevel% EQU 0 (
  61. set InfList=!InfList! dtcinf
  62. )
  63. for %%a in (%InfList%) do (
  64. if NOT exist %catfiles%\%%a md %catfiles%\%%a
  65. if NOT exist %_NTPostBld%\congeal_scripts\%%a md %_NTPostBld%\congeal_scripts\%%a
  66. call logmsg.cmd "Creating %catfiles%\%%a\nt5inf.CAT ..."
  67. set flat_name=%%a
  68. set flat_name=!flat_name:\=_!
  69. makecat -n -o %_NTPostBld%\congeal_scripts\%%a\nt5inf.hash -v %catCDFS%\%%a\nt5inf.CDF > %catCDFs%\nt5inf.!flat_name!.log
  70. if errorlevel 1 (
  71. for /f "tokens=1*" %%i in ('findstr /i processed %catCDFs%\nt5inf.!flat_name!.log') do call errmsg.cmd "%%i %%j"
  72. call errmsg.cmd "makecat -n -o %_NTPostBld%\congeal_scripts\%%a\nt5inf.hash -v %catCDFS%\%%a\nt5inf.CDF failed"
  73. set exitcode=1
  74. )
  75. copy nt5inf.CAT %catfiles%\%%a\
  76. del nt5inf.cat
  77. )
  78. del %CatTemp%\nt5infcat.tmp
  79. :end
  80. seterror.exe "%errors%"& goto :EOF