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.

59 lines
1.5 KiB

  1. @echo off
  2. REM ------------------------------------------------------------------
  3. REM
  4. REM nt5cat.cmd
  5. REM Creates the nt5.cat system catalog
  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. nt5cat.cmd [-l <language>]
  21. Creates the nt5.cat system catalog
  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%\nt5cat.tmp
  38. call logmsg.cmd "Creating %catfiles%\nt5.CAT ..."
  39. if not exist %_NTPostBld%\congeal_scripts md %_NTPostBld%\congeal_scripts
  40. makecat -n -o %_NTPostBld%\congeal_scripts\nt5.hash -v %catCDFS%\nt5.CDF > %catCDFs%\nt5.log
  41. if errorlevel 1 (
  42. for /f "tokens=1*" %%i in ('findstr /i processed %catCDFs%\nt5.log') do call errmsg.cmd "%%i %%j"
  43. call errmsg.cmd "makecat -n -v %catCDFS%\nt5.CDF failed"
  44. )
  45. copy nt5.CAT %catfiles%
  46. del nt5.CAT
  47. REM Delete temp file
  48. del %CatTemp%\nt5cat.tmp