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.

39 lines
911 B

  1. @echo off
  2. REM ------------------------------------------------------------------
  3. REM
  4. REM build_number.cmd
  5. REM Prints the build number of the current set of 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 BuildName;
  19. sub Usage { print<<USAGE; exit(1) }
  20. build_number.cmd [-m] [-l <language>]
  21. Prints the build number of the current set of binaries.
  22. -m major portion of the build number only
  23. Reads from %_NTPostBld%\\build_logs\\BuildName.txt
  24. USAGE
  25. my $major = 0;
  26. parseargs('?' => \&Usage,
  27. 'm' => \$major);
  28. my $number = $major ? build_number_major : build_number;
  29. if (!defined $number) {
  30. exit(1);
  31. }
  32. print "$number\n";