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.

150 lines
3.9 KiB

  1. @echo off
  2. setlocal enableextensions
  3. set VERSION=%1
  4. if '%VERSION%' EQU '' goto Usage
  5. set PERLCMD=C:\Perl\Bin\Perl.exe
  6. set ROOTDIR=E:\EaBuild.Raptor
  7. set ARCHIVEDIR=E:\Raptor
  8. set LOG=%ROOTDIR%\Build.log
  9. set FETCHLOG=%ROOTDIR%\Fetch.log
  10. set stars=********************************************************************************
  11. echo %stars% > %LOG% 2>&1
  12. echo Build Process started at: >> %LOG% 2>&1
  13. date /t >> %LOG% 2>&1
  14. time /t >> %LOG% 2>&1
  15. echo %stars% >> %LOG% 2>&1
  16. echo Changing drive to E: >> %LOG% 2>&1
  17. E: >> %LOG% 2>&1
  18. echo Changing directory to \BuildTools >> %LOG% 2>&1
  19. cd \BuildTools >> %LOG% 2>&1
  20. if /I '%VERSION%' EQU '/AUTO' goto GetBuildNumber
  21. goto StartBuild
  22. :GetBuildNumber
  23. echo Getting last build directory... >> %LOG% 2>&1
  24. GetLastBuildDir.pl %ARCHIVEDIR% >> %LOG% 2>&1
  25. echo Setting next build number... >> %LOG% 2>&1
  26. set /A VERSION=%ERRORLEVEL% + 1
  27. echo Set build number to %VERSION%. >> %LOG% 2>&1
  28. :StartBuild
  29. echo Deleting T: >> %LOG% 2>&1
  30. subst t: /d >> %LOG% 2>&1
  31. echo Mapping T: to %ROOTDIR% >> %LOG% 2>&1
  32. subst t: %ROOTDIR% >> %LOG% 2>&1
  33. if ERRORLEVEL 0 goto Build
  34. goto Finish
  35. :Build
  36. echo Deleting T:\
  37. echo Deleting T:\ >> %LOG% 2>&1
  38. Call DeleteFiles.cmd T: >> %LOG% 2>&1
  39. if %VERSION% == 0 goto Fetch
  40. echo %stars% >> %LOG% 2>&1
  41. echo Labeling projects...
  42. echo Labeling projects... >> %LOG% 2>&1
  43. Call RaptorLabelProjects.cmd "Raptor (Build %VERSION%)" >> %LOG% 2>&1
  44. :Fetch
  45. echo %stars% >> %LOG% 2>&1
  46. echo Fetching projects...
  47. echo Fetching projects... >> %LOG% 2>&1
  48. %PERLCMD% FetchProjects.pl "-s\\MCSVSS\VSS\MCS Development" -d%ROOTDIR% -fRaptorProjects.ini >> %FETCHLOG% 2>&1
  49. echo %stars% >> %LOG% 2>&1
  50. echo Updating versions...
  51. echo Updating versions... >> %LOG% 2>&1
  52. %PERLCMD% UpdateBuild.pl -n%VERSION% -dT: -fRaptorProjects.ini -pIntel >> %LOG% 2>&1
  53. echo %stars% >> %LOG% 2>&1
  54. echo Building common projects...
  55. echo Building common projects... >> %LOG% 2>&1
  56. %PERLCMD% BuildProjects.pl -dT: -fRaptorProjects.ini -pCommon >> %LOG% 2>&1
  57. echo %stars% >> %LOG% 2>&1
  58. echo Starting Alpha build...
  59. echo Starting Alpha build... >> %LOG% 2>&1
  60. McsBuildServer\McsBuildClient.exe MCSALPHA2 \\DEVRDTBOX\E$\BuildTools\RaptorAlphaBuild.cmd %VERSION%
  61. echo %stars% >> %LOG% 2>&1
  62. echo Building projects...
  63. echo Building projects... >> %LOG% 2>&1
  64. %PERLCMD% BuildProjects.pl -dT: -fRaptorProjects.ini -pIntel >> %LOG% 2>&1
  65. rem echo %stars% >> %LOG% 2>&1
  66. rem echo Building Help...
  67. rem echo Building Help... >> %LOG% 2>&1
  68. rem Call RaptorBuildHelp.cmd \EaBuild.Raptor %ROOTDIR%\BuildHelp.log >> %LOG% 2>&1
  69. echo %stars% >> %LOG% 2>&1
  70. echo Waiting for Alpha build to finish...
  71. echo Waiting for Alpha build to finish... >> %LOG% 2>&1
  72. echo. > %ROOTDIR%\IntelBuildFinished.out
  73. :Loop
  74. if exist %ROOTDIR%\AlphaBuildFinished.out goto EndLoop
  75. E:\BuildTools\Sleep 5
  76. goto Loop
  77. :EndLoop
  78. echo %stars% >> %LOG% 2>&1
  79. echo Checking projects...
  80. echo Checking projects... >> %LOG% 2>&1
  81. %PERLCMD% CheckProjects.pl -dT: -fRaptorProjects.ini >> %LOG% 2>&1
  82. if ERRORLEVEL 1 goto Archive
  83. echo %stars% >> %LOG% 2>&1
  84. echo Deleting temporary files...
  85. echo Deleting temporary files... >> %LOG% 2>&1
  86. Call DeleteTempFiles.cmd T: >> %LOG% 2>&1
  87. echo %stars% >> %LOG% 2>&1
  88. echo Creating installation...
  89. echo Creating installation... >> %LOG% 2>&1
  90. Call RaptorCreateInstall.cmd 6.0 >> %LOG% 2>&1
  91. :Post
  92. if %VERSION% == 0 goto Finish
  93. if %VERSION% LSS 10 set VERSION=0%VERSION%
  94. if not exist %ROOTDIR%\Bin\IntelRelease\ADMigration.msi goto Archive
  95. echo %stars% >> %LOG% 2>&1
  96. echo Posting build...
  97. echo Posting build... >> %LOG% 2>&1
  98. Call RaptorPostBuild.cmd %VERSION% >> %LOG% 2>&1
  99. :Archive
  100. if %VERSION% == 0 goto Finish
  101. echo %stars% >> %LOG% 2>&1
  102. echo Archiving build...
  103. echo Archiving build... >> %LOG% 2>&1
  104. Call RaptorArchiveBuild.cmd %ARCHIVEDIR%\Build%VERSION% >> %LOG% 2>&1
  105. :Finish
  106. echo %stars% >> %LOG% 2>&1
  107. echo Build Process ended at: >> %LOG% 2>&1
  108. date /t >> %LOG% 2>&1
  109. time /t >> %LOG% 2>&1
  110. echo %stars% >> %LOG% 2>&1
  111. goto End
  112. :Usage
  113. echo Usage: "RaptorStartBuild.cmd <Build Number>"
  114. :End
  115. endlocal