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.

63 lines
1.8 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. # Psuedoloc will eventually do aggregation here
  41. elsif ($ENV{LANG} =~ /FE/i) {
  42. logmsg "Add FE aggregation step here.";
  43. }
  44. # all other languages call locag to perfrom aggregation
  45. else {
  46. logmsg "Start localize build's aggregation step ...";
  47. my $clean_flag = '';
  48. $clean_flag = '-c' if (!-e "$ENV{_NTPostBld}\\build_logs\\cddata.txt.full");
  49. system("perl $ENV{RazzleToolPath}\\PostbuildScripts\\locag.pl " .
  50. "-l:$ENV{LANG} $clean_flag");
  51. if ($?) {
  52. errmsg "Aggregation step failed. Return code: " . ($? >> 8);
  53. }
  54. }