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.

70 lines
1.5 KiB

  1. @echo off
  2. REM ------------------------------------------------------------------
  3. REM
  4. REM loc.cmd - JeremyD
  5. REM Localize service pack binaries
  6. REM
  7. REM Copyright (c) Microsoft Corporation. All rights reserved.
  8. REM
  9. REM ------------------------------------------------------------------
  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. use Logmsg;
  19. sub Usage { print<<USAGE; exit(1) }
  20. loc -l <language>
  21. USAGE
  22. sub Dependencies {
  23. if ( !open DEPEND, ">>$ENV{_NTPOSTBLD}\\..\\build_logs\\dependencies.txt" ) {
  24. errmsg("Unable to open dependency list file.");
  25. die;
  26. }
  27. print DEPEND<<DEPENDENCIES;
  28. \[$0\]
  29. IF {...} ADD {}
  30. DEPENDENCIES
  31. close DEPEND;
  32. exit;
  33. }
  34. my $qfe;
  35. parseargs('?' => \&Usage,
  36. 'plan' => \&Dependencies,
  37. 'qfe:' => \$qfe);
  38. if ( -f "$ENV{_NTPOSTBLD}\\..\\build_logs\\skip.txt" ) {
  39. if ( !open SKIP, "$ENV{_NTPOSTBLD}\\..\\build_logs\\skip.txt" ) {
  40. errmsg("Unable to open skip list file.");
  41. die;
  42. }
  43. while (<SKIP>) {
  44. chomp;
  45. exit if lc$_ eq lc$0;
  46. }
  47. close SKIP;
  48. }
  49. if (!$ENV{LANG}) {
  50. &Usage;
  51. }
  52. if (lc $ENV{LANG} eq 'usa') {
  53. system("compdir /enustd $ENV{_NTFILTER} $ENV{_NTPOSTBLD}");
  54. }
  55. else {
  56. {
  57. local $ENV{_NTTREE} = $ENV{_NTFILTER};
  58. system("perl $ENV{RAZZLETOOLPATH}\\postbuildscripts\\locag.pl -c -l:$ENV{LANG}");
  59. }
  60. system("$ENV{RAZZLETOOLPATH}\\sp\\unicode.cmd");
  61. }