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.

151 lines
4.0 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.DMA
  7. set ARCHIVEDIR=E:\DMA
  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 DmaLabelProjects.cmd "DMA 6.1 (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% -fDmaProjects.ini >> %FETCHLOG% 2>&1
  49. echo %stars% >> %LOG% 2>&1
  50. echo Updating versions...
  51. echo Updating versions... >> %LOG% 2>&1
  52. rem %PERLCMD% UpdateBuild.pl -n%VERSION% -dT: -fDmaProjects.ini -pIntel >> %LOG% 2>&1
  53. %PERLCMD% UpdateVersion.pl -Version:6,10,0,%VERSION% "-ProductName:OnePoint Domain Migrator" "-Company:Mission Critical Software, Inc." -TargetDir:T: -ProjectFile:DmaProjects.ini >> %LOG% 2>&1
  54. echo %stars% >> %LOG% 2>&1
  55. echo Building common projects...
  56. echo Building common projects... >> %LOG% 2>&1
  57. %PERLCMD% BuildProjects.pl -dT: -fDmaProjects.ini -pCommon >> %LOG% 2>&1
  58. echo %stars% >> %LOG% 2>&1
  59. echo Starting Alpha build...
  60. echo Starting Alpha build... >> %LOG% 2>&1
  61. McsBuildServer\McsBuildClient.exe MCSALPHA2 \\DEVRDTBOX\E$\BuildTools\DmaAlphaBuild.cmd %VERSION%
  62. echo %stars% >> %LOG% 2>&1
  63. echo Building projects...
  64. echo Building projects... >> %LOG% 2>&1
  65. %PERLCMD% BuildProjects.pl -dT: -fDmaProjects.ini -pIntel >> %LOG% 2>&1
  66. echo %stars% >> %LOG% 2>&1
  67. echo Building Help...
  68. echo Building Help... >> %LOG% 2>&1
  69. Call DmaBuildHelp.cmd \EaBuild.DMA %ROOTDIR%\BuildHelp.log >> %LOG% 2>&1
  70. echo %stars% >> %LOG% 2>&1
  71. echo Waiting for Alpha build to finish...
  72. echo Waiting for Alpha build to finish... >> %LOG% 2>&1
  73. echo. > %ROOTDIR%\IntelBuildFinished.out
  74. :Loop
  75. if exist %ROOTDIR%\AlphaBuildFinished.out goto EndLoop
  76. E:\BuildTools\Sleep 5
  77. goto Loop
  78. :EndLoop
  79. echo %stars% >> %LOG% 2>&1
  80. echo Checking projects...
  81. echo Checking projects... >> %LOG% 2>&1
  82. %PERLCMD% CheckProjects.pl -dT: -fDmaProjects.ini >> %LOG% 2>&1
  83. if ERRORLEVEL 1 goto Archive
  84. echo %stars% >> %LOG% 2>&1
  85. echo Deleting temporary files...
  86. echo Deleting temporary files... >> %LOG% 2>&1
  87. Call DeleteTempFiles.cmd T: >> %LOG% 2>&1
  88. echo %stars% >> %LOG% 2>&1
  89. echo Creating installation...
  90. echo Creating installation... >> %LOG% 2>&1
  91. Call DmaCreateInstall.cmd 6.0 >> %LOG% 2>&1
  92. :Post
  93. if %VERSION% == 0 goto Finish
  94. if %VERSION% LSS 10 set VERSION=0%VERSION%
  95. if not exist %ROOTDIR%\Bin\IntelRelease\DMA.msi goto Archive
  96. echo %stars% >> %LOG% 2>&1
  97. echo Posting build...
  98. echo Posting build... >> %LOG% 2>&1
  99. Call DmaPostBuild.cmd %VERSION% >> %LOG% 2>&1
  100. :Archive
  101. if %VERSION% == 0 goto Finish
  102. echo %stars% >> %LOG% 2>&1
  103. echo Archiving build...
  104. echo Archiving build... >> %LOG% 2>&1
  105. Call DmaArchiveBuild.cmd %ARCHIVEDIR%\Build%VERSION% >> %LOG% 2>&1
  106. :Finish
  107. echo %stars% >> %LOG% 2>&1
  108. echo Build Process ended at: >> %LOG% 2>&1
  109. date /t >> %LOG% 2>&1
  110. time /t >> %LOG% 2>&1
  111. echo %stars% >> %LOG% 2>&1
  112. goto End
  113. :Usage
  114. echo Usage: "DmaStartBuild.cmd <Build Number>"
  115. :End
  116. endlocal