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.

59 lines
1.6 KiB

  1. @REM -----------------------------------------------------------------
  2. @REM
  3. @REM nt5cat.cmd - WadeLa
  4. @REM Creates the nt5.cat system catalog
  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. nt5cat.cmd [-l <language>]
  20. Creates the nt5.cat system catalog
  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%\nt5cat.tmp
  38. call logmsg.cmd "Creating %catfiles%\nt5.CAT ..."
  39. if not exist %_NTPostBld%\congeal_scripts md %_NTPostBld%\congeal_scripts
  40. makecat -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 -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