build.bat 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. @ECHO OFF
  2. if "%DEBUGTHEBUILD%"=="1" @ECHO ON
  3. call %FEDROOT%\src\build\init.bat
  4. rem
  5. rem Print out the last build number and input new build number.
  6. rem
  7. call %SCRIPTDIR%\util\nextbld.bat %PROPDIR% BUILD
  8. call %SCRIPTDIR%\util\maxbld.bat %DIRECTXDIR% DIRECTXBUILD
  9. set LOGDIR=%PROPDIR%\%BUILD%\BVTLog
  10. if not exist %LOGDIR% mkdir %LOGDIR%
  11. rem
  12. rem Send mail to everyone to indicate the build is starting.
  13. rem
  14. call %SCRIPTDIR%\mail\premail.bat %BUILD%
  15. if "%PAUSETHEBUILD%"=="1" pause
  16. rem
  17. rem Compile the code.
  18. rem
  19. call %SCRIPTDIR%\compile.bat %BUILD%
  20. if "%PAUSETHEBUILD%"=="1" pause
  21. if "%BUILDERROR%"=="1" goto Error
  22. rem
  23. rem Call installshield to build the client.
  24. rem
  25. call %SCRIPTDIR%\isbuild\isbuild.bat %BUILD% %DIRECTXDIR%\%DIRECTXBUILD%\retail
  26. if "%PAUSETHEBUILD%"=="1" pause
  27. if "%BUILDERROR%"=="1" goto Error
  28. rem
  29. rem Copy the built binaries and source to the prop locations.
  30. rem
  31. call %SCRIPTDIR%\copy\copy.bat %BUILD%
  32. if "%PAUSETHEBUILD%"=="1" pause
  33. if "%BUILDERROR%"=="1" goto Error
  34. echo Web pages not exported.
  35. goto NoWebExport
  36. rem
  37. rem Create web pages to point to the build.
  38. rem
  39. call %SCRIPTDIR%\setup\buildweb.bat %BUILD%
  40. if "%PAUSETHEBUILD%"=="1" pause
  41. if "%BUILDERROR%"=="1" goto Error
  42. :NoWebExport
  43. rem
  44. rem Create a batch file to point to the build.
  45. rem
  46. call %SCRIPTDIR%\setup\buildbat.bat %BUILD%
  47. if "%PAUSETHEBUILD%"=="1" pause
  48. if "%BUILDERROR%"=="1" goto Error
  49. rem
  50. rem Create the test pass in the SQL database.
  51. rem
  52. rem echomdy "~M/~D/~Y ~h:~m:~s" > %TEMP%\todaysdate.txt
  53. echomdy "~M-~D-~Y" > %TEMP%\todaysdate.txt
  54. call d:\fedsrc\src\build\util\todaysdate.bat %TEMP%\todaysdate.txt TODAYSDATE
  55. call d:\fedsrc\src\build\setup\testpass.bat 1 %TODAYSDATE% oblsql TestCaseMgr
  56. if "%PAUSETHEBUILD%"=="1" pause
  57. if "%BUILDERROR%"=="1" goto Error
  58. rem
  59. rem Send mail to everyone to indicate the build is over.
  60. rem
  61. call %SCRIPTDIR%\mail\postmail.bat %BUILD%
  62. if "%PAUSETHEBUILD%"=="1" pause
  63. echo Success. > %LOGDIR%\bldsucc.txt
  64. rem
  65. rem Call the server bvt.
  66. rem
  67. call %SCRIPTDIR%\server\server.bat %BUILD%
  68. if "%PAUSETHEBUILD%"=="1" pause
  69. if "%BUILDERROR%"=="1" goto Error
  70. echo Success. > %LOGDIR%\success.txt
  71. goto End
  72. :Error
  73. echo An error occurred!
  74. echo Failure. > %LOGDIR%\failure.txt
  75. rem
  76. rem Send out a page.
  77. rem
  78. pushd %FEDSOURCEROOT%\tools\build
  79. tinypage.exe marksn Build %BUILD% failed.
  80. popd
  81. goto End
  82. :End
  83. rem
  84. rem Generate a log indicating what happened during the build.
  85. rem
  86. call %SCRIPTDIR%\setup\buildlog.bat %BUILD%
  87. set BUILD=
  88. set DIRECTXBUILD=
  89. set LOGDIR=
  90. call %SCRIPTDIR%\term.bat
  91. pause