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.

178 lines
6.6 KiB

  1. rem @echo off
  2. rem BUILDALL.CMD
  3. rem This file is the key driver for the automated build process.
  4. rem
  5. setlocal
  6. rem This is required for InstallShield to work correctly
  7. subst s: %sapiroot%
  8. set LOGPATH=s:\builder\logs
  9. set BUILDSTORE=\\iking-dubbel\sapi5
  10. set MAILTO=iking
  11. rem Clear temp directory - VSI tends to flood it
  12. rem del /q %temp%\*.*
  13. rem ssync requires the real path
  14. cd %sapiroot%
  15. rem ensure that environment variables are set
  16. call "%ProgramFiles%\micros~1\vc98\bin\vcvars32"
  17. call setvars
  18. rem Implements command line option
  19. goto %1
  20. :all
  21. rem NOTE that first redirect into the log overwrites (clears) it
  22. rem This is done here so that a restart that does not use the 'all'
  23. rem option appends to the previous log
  24. rem All other lines APPEND to it
  25. echo Beginning buildall process at > %LOGPATH%\buildall.log
  26. date /T >> %LOGPATH%\buildall.log
  27. time /T >> %LOGPATH%\buildall.log
  28. echo Command-line option was %* >> %LOGPATH%\buildall.log
  29. rem Before ssync, ensure that all old files are gone
  30. del /s /q *.obj
  31. del /s /q *.dll
  32. del /s /q *.exe
  33. del /s /q data.cab
  34. echo Beginning ssync... >> %LOGPATH%\buildall.log
  35. cookie -w -c "Locked for build process."
  36. if not errorlevel 0 goto :ssyncerr
  37. ssync -a -r -f 2> s:\builder\logs\ssync.log
  38. echo Completed ssync with errorlevel %errorlevel% >> %LOGPATH%\buildall.log
  39. log -a -i -z -t .-1 > s:\builder\logs\change.log
  40. cookie -f
  41. rem if not errorlevel 0 goto :ssyncerr
  42. :nosync
  43. rem call script to calculate build number
  44. echo Calculating build number.... >> %LOGPATH%\buildall.log
  45. rem Overwrite default currver.inc
  46. attrib -r build\currver.inc
  47. cscript builder\makebldnum.vbs //Nologo >> %LOGPATH%\buildall.log
  48. echo Completed build number calculation, build number = %errorlevel% >> %LOGPATH%\buildall.log
  49. rem if errorlevel -1 goto buildnumerr
  50. set BUILDNUM=%errorlevel%
  51. :makebin
  52. :makebinonly
  53. echo Beginning build of C++ binaries.... >> %LOGPATH%\buildall.log
  54. msdev s:\workspaces\everything.dsw /make "All - Win32 Debug x86" /rebuild /out "s:\builder\logs\chkbld.log"
  55. msdev s:\workspaces\everything.dsw /make "All - Win32 Release x86" /rebuild /out "s:\builder\logs\frebld.log"
  56. cscript builder\getblderrs.vbs //Nologo >> %LOGPATH%\buildall.log
  57. echo Completed build of C++ binaries >> %LOGPATH%\buildall.log
  58. if not errorlevel 0 goto :buildfail
  59. :makebvt
  60. rem Build BVT project
  61. echo Beginning build of BVT binaries.... >> %LOGPATH%\buildall.log
  62. msdev s:\QA\SAPI\workspaces\bvt.dsw /make "All - Win32 Debug" /rebuild /out "s:\builder\logs\bvtbuild.log"
  63. echo Completed build of BVT binaries with errorlevel %errorlevel% >> %LOGPATH%\buildall.log
  64. rem if we only want bvts, don't do the rest of it
  65. if %1 == "makebvt" goto :docopy
  66. rem This is a special build of the prompt engine - does not fail build
  67. msdev s:\src\tts\truetalk\truetalk.dsw /make "All - Win32 Debug x86" /rebuild /out "s:\builder\logs\truetalkchk.log"
  68. msdev s:\src\tts\truetalk\truetalk.dsw /make "All - Win32 Release x86" /rebuild /out "s:\builder\logs\truetalkfre.log"
  69. :makelm
  70. if %1 == "makebinonly" goto :docopy
  71. echo Building acoustic models.... >> %LOGPATH%\buildall.log
  72. cd /D s:\Src\SR\engine\datafiles
  73. nmake clean > s:\builder\logs\lmmake.log
  74. nmake >> s:\builder\logs\lmmake.log 2>&1
  75. echo Completed building language models with errorlevel %errorlevel% >> %LOGPATH%\buildall.log
  76. rem verify that acoustic models are up to date
  77. call verify\verify.bat
  78. cd /D s:\
  79. :makemsm
  80. echo Beginning build of merge modules.... >> %LOGPATH%\buildall.log
  81. rem echo Building debug merge modules.... >> %LOGPATH%\buildall.log
  82. call builder\makemsm debug
  83. rem echo Completed debug merge module build with errorlevel %errorlevel% >> %LOGPATH%\buildall.log
  84. echo Building release merge modules.... >> %LOGPATH%\buildall.log
  85. call builder\makemsm release
  86. echo Completed release merge module build with errorlevel %errorlevel% >> %LOGPATH%\buildall.log
  87. :makemsi
  88. echo Beginning build of install modules.... >> %LOGPATH%\buildall.log
  89. rem echo Building debug install modules.... >> %LOGPATH%\buildall.log
  90. call builder\makemsi debug
  91. rem echo Completed build of debug install modules with errorlevel %errorlevel% >> %LOGPATH%\buildall.log
  92. set CHKMSIERR=%errorlevel%
  93. echo Building release install modules.... >> %LOGPATH%\buildall.log
  94. call builder\makemsi release > %LOGPATH%\makemsi.log
  95. echo Completed build of release install modules with errorlevel %errorlevel% >> %LOGPATH%\buildall.log
  96. if errorlevel 0 goto :fremsiOK
  97. if not %CHKMSIERR%==0 goto :msifail
  98. :fremsiOK
  99. rem Special step for TrueTalk modules
  100. attrib -r spg-ta-tts.ism /s
  101. iscmdbld -p "s:\src\tts\truetalk\spg-ta-tts.ism" -d "TrueTalk" -r "Release" -a "Output" -c COMP
  102. attrib -r spg-ta-tts.ism /s
  103. rem Strip tables Office doesn't want
  104. call builder\cleanmsm >> %LOGPATH%\buildall.log
  105. :makecabs
  106. echo Beginning build of language model cabs.... >> %LOGPATH%\buildall.log
  107. cd /D s:\build
  108. iexpress /n /q srd1033.sed
  109. iexpress /n /q srd1041.sed
  110. iexpress /n /q srd2052.sed
  111. echo Completed build of cabs with errorlevel %errorlevel% >> %LOGPATH%\buildall.log
  112. cd /D s:\
  113. :docopy
  114. rem Copy files to their destination
  115. echo Copying files to target machine.... >> %LOGPATH%\buildall.log
  116. cscript builder\docopy.vbs //Nologo >> %LOGPATH%\buildall.log
  117. echo Completed copy operations with errorlevel %errorlevel% >> %LOGPATH%\buildall.log
  118. echo Ending buildall process at >> %LOGPATH%\buildall.log
  119. date /T >> %LOGPATH%\buildall.log
  120. time /T >> %LOGPATH%\buildall.log
  121. copy /y builder\buildmsg.txt+"%LOGPATH%\buildall.log" buildmail.txt
  122. tools\sndmail "default" "spgmake" "M3 build %BUILDNUM% of SAPI 5.0 completed!" @"s:\builder\buildmail.txt"
  123. subst s: /d
  124. rem BVT call process
  125. goto :eof
  126. :ssyncerr
  127. echo Failure in ssync, build cannot continue >> %LOGPATH%\buildall.log
  128. cookie -f
  129. tools\sndmail "default" "spgmake" "M3 build failed - SLM error, build halted!" "SLM ssync log attached" /a:"%LOGPATH%\ssync.log"
  130. subst s: /d
  131. goto :eof
  132. :buildnumerr
  133. echo Could not generate build number >> %LOGPATH%\buildall.log
  134. tools\sndmail "default" "spgmake" "M3 build failed - internal error!" "Build log attached" /a:"%LOGPATH%\buildall.log"
  135. subst s: /d
  136. goto :eof
  137. :msifail
  138. echo Failure of one or both msi builds >> %LOGPATH%\buildall.log
  139. tools\sndmail "default" "spgmake" "M3 build failed - building MSI!" "Build log attached" /a:"%LOGPATH%\buildall.log"
  140. subst s: /d
  141. goto :eof
  142. :buildfail
  143. echo Build failed in MSDEV, build cannot continue >> %LOGPATH%\buildall.log
  144. tools\sndmail "default" "spgmake" "M3 build failed in MSDEV, build halted!" "MSDEV build logs and change log attached" /a:"%LOGPATH%\chkbld.log;%LOGPATH%\frebld.log;%LOGPATH%\change.log"
  145. subst s: /d
  146. goto :eof
  147. endlocal