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.

63 lines
1.7 KiB

  1. @echo off
  2. REM ------------------------------------------------------------------
  3. REM
  4. REM ntprintcat.cmd
  5. REM Creates the ntprint.cat printer 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. ntprintcat [-l <language>]
  21. Creates the ntprint.cat printer catalog. NT5P needs to be set to the
  22. name of the catalog (ntprint).
  23. USAGE
  24. parseargs('?' => \&Usage);
  25. # *** NEXT FEW LINES ARE TEMPLATE ***
  26. $ENV{"_CPCMAGIC"}++;exit(system($0)>>8);
  27. __END__
  28. :CPCBegin
  29. set _CPCMAGIC=
  30. setlocal ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
  31. REM *** BEGIN YOUR CMD SCRIPT BELOW ***
  32. REM Set some local vars
  33. set catCDFs=%tmp%\CDFs
  34. set CatTemp=%tmp%\cattemp
  35. set catfiles=%tmp%\cats
  36. REM Make a tempfile for catsign
  37. if NOT exist %CatTemp% md %CatTemp%
  38. echotime /t > %CatTemp%\ntprintcat.tmp
  39. call logmsg.cmd "Creating %catfiles%\%nt5p%.CAT ..."
  40. if not exist %_NTPostBld%\congeal_scripts md %_NTPostBld%\congeal_scripts
  41. makecat -n -o %_NTPostBld%\congeal_scripts\%nt5p%.hash -v %catCDFS%\%nt5p%.CDF > %catCDFs%\%nt5p%.log
  42. if errorlevel 1 (
  43. for /f "tokens=1*" %%i in ('findstr /i processed %catCDFs%\%nt5p%.log') do call errmsg.cmd "%%i %%j"
  44. call errmsg.cmd "makecat -n -v %catCDFS%\%nt5p%.CDF failed"
  45. set exitcode=1
  46. )
  47. copy %nt5p%.CAT %catfiles%
  48. del %nt5p%.CAT
  49. REM Delete temp file
  50. del %CatTemp%\ntprintcat.tmp
  51. goto end
  52. :end
  53. seterror.exe "%errors%"& goto :EOF