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.

266 lines
11 KiB

  1. @ECHO OFF
  2. REM %1 - Athena Enlistment
  3. REM %2 - Build Drop Root
  4. REM %3 - Build Number
  5. REM %4 - Build Flags
  6. REM %5 - NOSYNC or SYNC
  7. REM ----------------------------------------------------------------------------
  8. REM Setup some Enviroment Variables
  9. REM ----------------------------------------------------------------------------
  10. REM BUILD_LEVEL
  11. set SYNC_OPTION=%5
  12. REM BUILD_FLAGS
  13. set BUILD_FLAGS=%4
  14. REM e:\athena
  15. set ATHENABLD=%1
  16. REM bldxxxxx
  17. set BUILDNAME=bld%3
  18. REM \\oebuild\drops
  19. set OEBUILDDROP=%2
  20. REM drops\bldxxxx\alpha
  21. set DROPPOINT=%OEBUILDDROP%\%BUILDNAME%\%PROCESSOR_ARCHITECTURE%
  22. REM drops\bldxxxx
  23. set DROPROOT=%OEBUILDDROP%\%BUILDNAME%
  24. REM objd\i386 or objd\alpha
  25. set OBJDIR=
  26. if "%PROCESSOR_ARCHITECTURE%"=="ALPHA" set OBJDIR=Alpha
  27. if "%PROCESSOR_ARCHITECTURE%"=="x86" set OBJDIR=i386
  28. if not defined OBJDIR goto UNKNOWN_PROCESSOR_ARCHITECTURE
  29. set OBJDBG=objd\%OBJDIR%
  30. set OBJSHP=obj\%OBJDIR%
  31. REM ----------------------------------------------------------------------------
  32. REM Some Feedback
  33. REM ----------------------------------------------------------------------------
  34. ECHO:
  35. ECHO Athena Enlistment : %ATHENABLD%
  36. ECHO Build Drop Root : %OEBUILDDROP%
  37. ECHO Build Directory : %BUILDNAME%
  38. ECHO NT Build Tree Enlistment: %_NTBINDIR%
  39. ECHO Platform : %PROCESSOR_ARCHITECTURE%
  40. ECHO Propagation Location : %DROPPOINT%
  41. ECHO Object Directory : %OBJDIR%
  42. ECHO Build Flags : %BUILD_FLAGS%
  43. REM ----------------------------------------------------------------------------
  44. REM Make the Drop Point
  45. REM ----------------------------------------------------------------------------
  46. if not exist %OEBUILDDROP%\nul goto BUILD_DROP_ROOT_NOT_EXIST
  47. if not exist %DROPROOT% md %DROPROOT%
  48. if not exist %DROPROOT% goto CANT_MKDIR_BLDNUM_DIR
  49. if not exist %DROPPOINT% md %DROPPOINT%
  50. if not exist %DROPPOINT% goto CANT_MKDIR_DROPPOINT
  51. if not exist %DROPROOT%\inc md %DROPROOT%\inc
  52. if not exist %DROPROOT%\src md %DROPROOT%\src
  53. if not exist %DROPROOT%\src\inetcomm md %DROPROOT%\src\inetcomm
  54. if not exist %DROPROOT%\src\msoeacct md %DROPROOT%\src\msoeacct
  55. if not exist %DROPPOINT%\retail md %DROPPOINT%\retail
  56. if not exist %DROPPOINT%\debug md %DROPPOINT%\debug
  57. REM ----------------------------------------------------------------------------
  58. REM If no Sync, just build Athena Tree (Skip NT Build)
  59. REM ----------------------------------------------------------------------------
  60. if "%SYNC_OPTION%" == "NOSYNC" goto BUILD_ATHENA
  61. REM ----------------------------------------------------------------------------
  62. REM Sync NT Tree
  63. REM ----------------------------------------------------------------------------
  64. ECHO:
  65. ECHO Sync and build %_NTBINDIR%...
  66. cd /d %_NTBINDIR%
  67. call iesync
  68. REM ----------------------------------------------------------------------------
  69. REM Build NT Tree
  70. REM ----------------------------------------------------------------------------
  71. :BUILD_NT
  72. ECHO:
  73. cd /d %_NTBINDIR%\private\iedev
  74. del buildd.*
  75. del build.*
  76. call iebuild ~inet ~shell
  77. if exist buildd.err goto NT_BUILD_BREAK
  78. REM ----------------------------------------------------------------------------
  79. REM If no Sync, just build NT Tree
  80. REM ----------------------------------------------------------------------------
  81. if "%SYNC_OPTION%" == "NOSYNC" goto BUILD_ATHENA
  82. REM ----------------------------------------------------------------------------
  83. REM Sync Athena Tree
  84. REM ----------------------------------------------------------------------------
  85. ECHO:
  86. ECHO Sync and build %ATHENABLD%...
  87. cd /d %ATHENABLD%
  88. ssync -amf!$
  89. REM ----------------------------------------------------------------------------
  90. REM Build Debug Athena Tree
  91. REM ----------------------------------------------------------------------------
  92. :BUILD_ATHENA
  93. ECHO:
  94. ECHO Building Debug %ATHENABLD%...
  95. cd /d %ATHENABLD%
  96. del buildd.*
  97. call iebuild pdb nostrip %BUILD_FLAGS%
  98. if exist buildd.err goto ATHENA_DEBUG_BUILD_BREAK
  99. REM ----------------------------------------------------------------------------
  100. REM Build Retail Athena Tree
  101. REM ----------------------------------------------------------------------------
  102. ECHO:
  103. ECHO Building Retail %ATHENABLD%...
  104. cd /d %ATHENABLD%
  105. del build.*
  106. call iebuild free %BUILD_FLAGS%
  107. if exist build.err goto ATHENA_RETAIL_BUILD_BREAK
  108. REM ----------------------------------------------------------------------------
  109. REM Propagate Debug Build
  110. REM ----------------------------------------------------------------------------
  111. REM Binaries
  112. copy %_NTBINDIR%\drop\debug\inetcomm.dll %DROPPOINT%\debug
  113. copy %_NTBINDIR%\drop\debug\msoeacct.dll %DROPPOINT%\debug
  114. copy %_NTBINDIR%\drop\debug\msoert2.dll %DROPPOINT%\debug
  115. REM Debugging Stuff
  116. copy %_NTBINDIR%\drop\debug\inetcomm.pdb %DROPPOINT%\debug
  117. copy %_NTBINDIR%\drop\debug\msoeacct.pdb %DROPPOINT%\debug
  118. copy %_NTBINDIR%\drop\debug\msoert2.pdb %DROPPOINT%\debug
  119. REM Link Libs
  120. copy %ATHENABLD%\inetcomm\build\%OBJDBG%\inetcomm.lib %DROPPOINT%\debug
  121. copy %ATHENABLD%\msoeacct\%OBJDBG%\msoeacct.lib %DROPPOINT%\debug
  122. copy %ATHENABLD%\msoert\%OBJDBG%\msoert2.lib %DROPPOINT%\debug
  123. REM ----------------------------------------------------------------------------
  124. REM Propagate Retail Build
  125. REM ----------------------------------------------------------------------------
  126. REM Binaries
  127. copy %_NTBINDIR%\drop\retail\inetcomm.dll %DROPPOINT%\retail
  128. copy %_NTBINDIR%\drop\retail\msoeacct.dll %DROPPOINT%\retail
  129. copy %_NTBINDIR%\drop\retail\msoert2.dll %DROPPOINT%\retail
  130. REM Debugging Stuff
  131. copy %_NTBINDIR%\drop\retail\symbols\dll\inetcomm.dbg %DROPPOINT%\retail
  132. copy %_NTBINDIR%\drop\retail\symbols\dll\msoeacct.dbg %DROPPOINT%\retail
  133. copy %_NTBINDIR%\drop\retail\symbols\dll\msoert2.dbg %DROPPOINT%\retail
  134. REM Link Libs
  135. copy %ATHENABLD%\inetcomm\build\%OBJSHP%\inetcomm.lib %DROPPOINT%\retail
  136. copy %ATHENABLD%\msoeacct\%OBJSHP%\msoeacct.lib %DROPPOINT%\retail
  137. copy %ATHENABLD%\msoert\%OBJSHP%\msoert2.lib %DROPPOINT%\retail
  138. REM ----------------------------------------------------------------------------
  139. REM Propagate Includes
  140. REM ----------------------------------------------------------------------------
  141. copy %_NTBINDIR%\private\iedev\inc\mimeole.idl %DROPROOT%\inc
  142. copy %_NTBINDIR%\private\iedev\inc\imnact.idl %DROPROOT%\inc
  143. copy %_NTBINDIR%\private\iedev\inc\imnxport.idl %DROPROOT%\inc
  144. copy %_NTBINDIR%\public\sdk\inc\mimeole.h %DROPROOT%\inc
  145. copy %_NTBINDIR%\public\sdk\inc\imnact.h %DROPROOT%\inc
  146. copy %_NTBINDIR%\public\sdk\inc\imnxport.h %DROPROOT%\inc
  147. REM ----------------------------------------------------------------------------
  148. REM Propagate Source
  149. REM ----------------------------------------------------------------------------
  150. REM INETCOMMM
  151. xcopy %ATHENABLD%\inetcomm\*.cpp /s /v %DROPROOT%\src\inetcomm
  152. xcopy %ATHENABLD%\inetcomm\*.h /s /v %DROPROOT%\src\inetcomm
  153. xcopy %ATHENABLD%\inetcomm\*.rc /s /v %DROPROOT%\src\inetcomm
  154. xcopy %ATHENABLD%\inetcomm\*.def /s /v %DROPROOT%\src\inetcomm
  155. xcopy %ATHENABLD%\inetcomm\*.rcv /s /v %DROPROOT%\src\inetcomm
  156. xcopy %ATHENABLD%\inetcomm\*.dlg /s /v %DROPROOT%\src\inetcomm
  157. xcopy %ATHENABLD%\inetcomm\*.bmp /s /v %DROPROOT%\src\inetcomm
  158. xcopy %ATHENABLD%\inetcomm\*.inf /s /v %DROPROOT%\src\inetcomm
  159. xcopy %ATHENABLD%\inetcomm\*.inx /s /v %DROPROOT%\src\inetcomm
  160. xcopy %ATHENABLD%\inetcomm\*.ico /s /v %DROPROOT%\src\inetcomm
  161. REM MSOEACCT
  162. xcopy %ATHENABLD%\msoeacct\*.cpp /s /v %DROPROOT%\src\msoeacct
  163. xcopy %ATHENABLD%\msoeacct\*.h /s /v %DROPROOT%\src\msoeacct
  164. xcopy %ATHENABLD%\msoeacct\*.rc /s /v %DROPROOT%\src\msoeacct
  165. xcopy %ATHENABLD%\msoeacct\*.def /s /v %DROPROOT%\src\msoeacct
  166. xcopy %ATHENABLD%\msoeacct\*.rcv /s /v %DROPROOT%\src\msoeacct
  167. xcopy %ATHENABLD%\msoeacct\*.dlg /s /v %DROPROOT%\src\msoeacct
  168. xcopy %ATHENABLD%\msoeacct\*.bmp /s /v %DROPROOT%\src\msoeacct
  169. xcopy %ATHENABLD%\msoeacct\*.inf /s /v %DROPROOT%\src\msoeacct
  170. xcopy %ATHENABLD%\msoeacct\*.inx /s /v %DROPROOT%\src\msoeacct
  171. xcopy %ATHENABLD%\msoeacct\*.ico /s /v %DROPROOT%\src\msoeacct
  172. REM ----------------------------------------------------------------------------
  173. REM Success, were done
  174. REM ----------------------------------------------------------------------------
  175. goto SUCCESS
  176. REM ----------------------------------------------------------------------------
  177. REM NT Tree Build Break
  178. REM ----------------------------------------------------------------------------
  179. :NT_BUILD_BREAK
  180. net send %4 "Could not build %_NTBINDIR%\private\iedev." > nul
  181. goto EXIT
  182. REM ----------------------------------------------------------------------------
  183. REM Athena DEBUG Build Break
  184. REM ----------------------------------------------------------------------------
  185. :ATHENA_DEBUG_BUILD_BREAK
  186. net send %COMPUTERNAME% "Could not build DEBUG version of %ATHENABLD%." > nul
  187. goto EXIT
  188. REM ----------------------------------------------------------------------------
  189. REM Athena RETAIL Build Break
  190. REM ----------------------------------------------------------------------------
  191. :ATHENA_RETAIL_BUILD_BREAK
  192. net send %COMPUTERNAME% "Could not build RETAIL version of %ATHENABLD%." > nul
  193. goto EXIT
  194. REM ----------------------------------------------------------------------------
  195. REM Can't make drop point
  196. REM ----------------------------------------------------------------------------
  197. :CANT_MKDIR_DROPPOINT
  198. net send %COMPUTERNAME% "Can't create %DROPPOINT%." > nul
  199. goto EXIT
  200. REM ----------------------------------------------------------------------------
  201. REM Build Drop Root Does not Exist
  202. REM ----------------------------------------------------------------------------
  203. :BUILD_DROP_ROOT_NOT_EXIST
  204. net send %COMPUTERNAME% "%OEBUILDDROP% does not exist." > nul
  205. goto EXIT
  206. REM ----------------------------------------------------------------------------
  207. REM Can't create drops\bldxxxx
  208. REM ----------------------------------------------------------------------------
  209. :CANT_MKDIR_BLDNUM_DIR
  210. net send %COMPUTERNAME% "Can't create %DROPROOT%." > nul
  211. goto EXIT
  212. REM ----------------------------------------------------------------------------
  213. REM Unknown Processor
  214. REM ----------------------------------------------------------------------------
  215. :UNKNOWN_PROCESSOR_ARCHITECTURE
  216. net send %COMPUTERNAME% "%PROCESSOR_ARCHITECTURE% is an unknown Architecture." > nul
  217. goto EXIT
  218. REM ----------------------------------------------------------------------------
  219. REM Done
  220. REM ----------------------------------------------------------------------------
  221. :SUCCESS
  222. net send %COMPUTERNAME% "Build Successfuly Completed" > nul
  223. ECHO:
  224. ECHO Done
  225. ECHO:
  226. :EXIT
  227. ECHO: