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.

58 lines
1.6 KiB

  1. @echo off
  2. REM ------------------------------------------------------------------
  3. REM
  4. REM aggregation.cmd
  5. REM This script select which aggregation steps to perform according
  6. REM to the language specified.
  7. REM
  8. REM Copyright (c) Microsoft Corporation. All rights reserved.
  9. REM
  10. REM ------------------------------------------------------------------
  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. use Logmsg;
  20. sub Usage { print<<USAGE; exit(1) }
  21. aggregation [-l <language>]
  22. Perform aggregation step according to the selected language.
  23. USA: Perform no aggregation steps.
  24. PSU: Perform the pseudo localization steps.
  25. All other langs: Perform localization steps.
  26. USAGE
  27. parseargs('?' => \&Usage);
  28. # US builds don't do any aggregation
  29. if ($ENV{LANG} =~ /usa/i) {
  30. logmsg "No aggregation step for USA.";
  31. }
  32. # Psuedoloc will eventually do aggregation here
  33. elsif ($ENV{LANG} =~ /psu/i) {
  34. logmsg "Add pseudoloc aggregation step here.";
  35. }
  36. # Psuedoloc will eventually do aggregation here
  37. elsif ($ENV{LANG} =~ /mir/i) {
  38. logmsg "Add mirror aggregation step here.";
  39. }
  40. # all other languages call locag to perfrom aggregation
  41. else {
  42. logmsg "Start localize build's aggregation step ...";
  43. my $clean_flag = '';
  44. $clean_flag = '-c' if (!-e "$ENV{_NTPostBld}\\build_logs\\cddata.txt.full");
  45. system("perl $ENV{RazzleToolPath}\\PostbuildScripts\\locag.pl " .
  46. "-l:$ENV{LANG} $clean_flag");
  47. if ($?) {
  48. errmsg "Aggregation step failed. Return code: " . ($? >> 8);
  49. }
  50. }