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.

58 lines
1.6 KiB

  1. @echo off
  2. REM ------------------------------------------------------------------
  3. REM
  4. REM newver.cmd
  5. REM This script is for a special case when the build lab wants to
  6. REM create daily incremental builds without doing a clean build.
  7. REM This will keep the same build number, but generate a new build date,
  8. REM and relink the kernels so that the new build date shows up.
  9. REM
  10. REM Copyright (c) Microsoft Corporation. All rights reserved.
  11. REM
  12. REM ------------------------------------------------------------------
  13. if defined _CPCMAGIC goto CPCBegin
  14. perl -x "%~f0" %*
  15. goto :EOF
  16. #!perl
  17. use strict;
  18. use lib $ENV{RAZZLETOOLPATH} . "\\PostBuildScripts";
  19. use lib $ENV{RAZZLETOOLPATH};
  20. use PbuildEnv;
  21. use ParseArgs;
  22. sub Usage { print<<USAGE; exit(1) }
  23. Run this before starting an incremental IDX build.
  24. It updates the build date.
  25. USAGE
  26. parseargs('?' => \&Usage);
  27. # *** NEXT FEW LINES ARE TEMPLATE ***
  28. $ENV{"_CPCMAGIC"}++;exit(system($0)>>8);
  29. __END__
  30. :CPCBegin
  31. set _CPCMAGIC=
  32. setlocal ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
  33. REM *** BEGIN YOUR CMD SCRIPT BELOW ***
  34. pushd %SDXROOT%
  35. call logmsg "Getting a new build date"
  36. nmake /f makefil0 set_builddate
  37. popd
  38. if exist %_NTPostBld%\build_logs\BuildName.txt (
  39. call logmsg "Making a new build name"
  40. del /f /q %_NTPostBld%\build_logs\BuildName.txt
  41. pushd %SDXROOT%
  42. nmake /f makefil0 set_buildname
  43. popd
  44. copy /y %_NTTREE%\build_logs\buildname.txt %_NTPostBld%\build_logs
  45. )
  46. pushd %SDXROOT%\base\ntos\init
  47. call logmsg "Rebuilding the kernels"
  48. build -cZ
  49. popd