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.

256 lines
6.7 KiB

  1. rem @echo off
  2. :start
  3. if not exist ielocenv.bat copy iesetenv.bat ielocenv.bat
  4. call ielocenv.bat
  5. rem set PATH=%PATH%;%AP_ROOT%\tools\x86\msvc50\vc\bin;%AP_ROOT%\tools\x86\msvc50\bin;%AP_ROOT%\tools\x86\msvc50\SharedIDE\bin;
  6. cd %AP_ROOT%
  7. if %PROCESSOR_ARCHITECTURE% == ALPHA set NOJAVA=1
  8. REM Let's create the build number and update version.h
  9. call iebldno.bat
  10. cd %AP_ROOT%
  11. set Log_Dir=%AP_ROOT%\bldlog
  12. set VisualSSDir=%AP_ROOT%\tools\%PROCESSOR_ARCHITECTURE%\vss
  13. set PATH=%PATH%;%VisualSSDir%
  14. echo Build %BUILDNO% started > %Log_Dir%\%BUILDNO%Result.txt
  15. date /t >> %Log_Dir%\%BUILDNO%Result.txt
  16. time /t >> %Log_Dir%\%BUILDNO%Result.txt
  17. goto skipit1
  18. REM
  19. REM if a local setenv does not exist, let's make one
  20. REM
  21. if exist setenvus.bat goto environset
  22. copy setenv.bat setenvus.bat
  23. echo Please edit setenvus.bat - you only need to do this once
  24. pause
  25. notepad setenvus.bat
  26. :environset
  27. REM this sets the local environment
  28. call setenvus.bat
  29. call bckupsrc.bat
  30. cd %AP_ROOT%
  31. :skipit1
  32. echo Build number is %BUILDNO%
  33. echo current root is %AP_ROOT%
  34. echo Log_Dir is %Log_Dir%
  35. echo VisualSSDir is %VisualSSDir%
  36. echo Build number is %BUILDNO% >> %Log_Dir%\%BUILDNO%Result.txt
  37. echo Current root is %AP_ROOT% >> %Log_Dir%\%BUILDNO%Result.txt
  38. echo Log_Dir is %Log_Dir% >> %Log_Dir%\%BUILDNO%Result.txt
  39. echo VisualSSDir is %VisualSSDir% >> %Log_Dir%\%BUILDNO%Result.txt
  40. goto skipit2
  41. echo Erasing old results .......>> %Log_Dir%\%BUILDNO%Result.txt
  42. echo Erasing old results .......
  43. REM Delete all leftovers from debug\bin directory
  44. cd %AP_ROOT%\build\win\debug\bin
  45. del /Q *.*
  46. %AP_ROOT%\tools\x86\utils\delnode /q com
  47. REM Delete all leftovers from ship\bin directory
  48. cd %AP_ROOT%\build\win\ship\bin
  49. del /Q *.*
  50. %AP_ROOT%\tools\x86\utils\delnode /q com
  51. :skipit2
  52. if "%NOSYNC%" == "1" goto skipsync
  53. echo Ssyncing ........ >> %Log_Dir%\%BUILDNO%Result.txt
  54. echo Ssyncing .......
  55. echo Ssyncing.......
  56. cd %AP_ROOT%
  57. echo Syncing to appel tree >> %Log_Dir%\%BUILDNO%Result.txt
  58. echo. Syncing to appel tree
  59. ssync -rf
  60. cd %AP_ROOT%\src
  61. echo Syncing to Visual Source Safe >> %Log_Dir%\%BUILDNO%Result.txt
  62. echo. Syncing to Visual Source Safe
  63. %VisualSSDir%\ss GET $/src -R
  64. echo Ssyncing - done >> %Log_Dir%\%BUILDNO%Result.txt
  65. :skipsync
  66. goto skipexpand
  67. echo Expanding Headers >> %Log_Dir%\%BUILDNO%Result.txt
  68. echo Expanding Headers
  69. cd tools
  70. call expand
  71. echo Expanded Headers - done >> %Log_Dir%\%BUILDNO%Result.txt
  72. :skipexpand
  73. REM
  74. REM Now let's update the version.h file
  75. REM
  76. cd %AP_ROOT%\src\include
  77. echo Updating version for header >> %Log_Dir%\%BUILDNO%Result.txt
  78. echo Updating version for header
  79. REM
  80. REM change version.h to be writeable so we can modify its contents
  81. REM
  82. attrib -r version.h
  83. type verhead.h > version.h
  84. echo #define VERSION "4.02.10.%BUILDNO%" >> version.h
  85. echo #define VER_FILEVERSION_STR "4.02.10.%BUILDNO%\0" >> version.h
  86. echo #define VER_FILEVERSION 4,02,10,%BUILDNO% >> version.h
  87. echo #define VER_PRODUCTVERSION_STR "4.02.10.%BUILDNO%\0" >> version.h
  88. echo #define VER_PRODUCTVERSION 4,02,10,%BUILDNO% >> version.h
  89. type vertail.h >> version.h
  90. cd %AP_ROOT%
  91. echo Building Debug Project >> %Log_Dir%\%BUILDNO%Result.txt
  92. echo Building Debug project..............
  93. if '%1'=='retail' goto retail
  94. if '%1'=='debug' goto DEBUG
  95. :DEBUG
  96. cd %AP_ROOT%
  97. call dabuild -c debug
  98. if not exist buildd.err goto debug_success
  99. REM goto debug_success will only be evaluated if nmake succeeds
  100. echo There were PROBLEMS building the debug version..... >> %Log_Dir%\%BUILDNO%Result.txt
  101. echo There were problems building the debug version .................
  102. :debug_success
  103. echo Debug build completed successfully >> %Log_Dir%\%BUILDNO%Result.txt
  104. echo Debug build completed successfully
  105. goto skipit3
  106. echo truncate debug danim.map file >> %Log_Dir%\%BUILDNO%Result.txt
  107. echo truncate debug danim.map file
  108. cd %AP_ROOT%\build\win\debug\bin
  109. del da.sym
  110. del da.map
  111. ren danim.map da.map
  112. ren danim.sym da.sym
  113. cd %AP_ROOT%\tools\x86\utils
  114. call trunc.bat %AP_ROOT%\build\win\debug\bin\da.map > %AP_ROOT%\build\win\debug\bin\danim.map
  115. cd %AP_ROOT%\build\win\debug\bin
  116. mapsym -o danim.sym danim.map
  117. :skipit3
  118. if "%NOJAVA%" == 1 goto skipdebugjava
  119. echo Creating zip file for java classes - Debug >> %Log_Dir%\%BUILDNO%Result.txt
  120. echo Creating zip file for java classes - Debug...
  121. cd %AP_ROOT%
  122. :skipdebugjava
  123. goto skipit4
  124. REM this is done by the make file: call creatzip debug
  125. cd %AP_ROOT%\setup
  126. echo Building self extracting exe - Debug >> %Log_Dir%\%BUILDNO%Result.txt
  127. echo Building self extracting exe - Debug...
  128. call bldsetup debug
  129. :skipit4
  130. if '%1'=='debug' goto finish
  131. :retail
  132. echo Building Retail project >> %Log_Dir%\%BUILDNO%Result.txt
  133. echo Building Retail project .......
  134. cd %AP_ROOT%
  135. rem New path line added here, needed for splitsym.exe
  136. rem path=%path%;%AP_ROOT%\tools\x86\utils;%AP_ROOT%\tools\x86\msvc50\vc\bin
  137. call dabuild -c retail
  138. if not exist build.err goto success_retail
  139. rem goto retail will only be evaluated if nmake succeeds
  140. echo There were PROBLEMS building the retail version...... >> %Log_Dir%\%BUILDNO%Result.txt
  141. echo There were problems building the retail version
  142. goto finish
  143. :success_retail
  144. echo Retail build completed successfully >> %Log_Dir%\%BUILDNO%Result.txt
  145. echo Retail build completed successfully
  146. goto skipit5
  147. echo truncate retail danim.map file >> %Log_Dir%\%BUILDNO%Result.txt
  148. echo truncate retail danim.map file
  149. cd %AP_ROOT%\build\win\ship\bin
  150. del da.sym
  151. del da.map
  152. ren danim.map da.map
  153. ren danim.sym da.sym
  154. cd %AP_ROOT%\tools\x86\utils
  155. call trunc.bat %AP_ROOT%\build\win\ship\bin\da.map > %AP_ROOT%\build\win\ship\bin\danim.map
  156. cd %AP_ROOT%\build\win\ship\bin
  157. mapsym -o danim.sym danim.map
  158. echo Splitting symbols from retail binaries >> %Log_Dir%\%BUILDNO%Result.txt
  159. echo Spliting symbols from retail binaries
  160. splitsym -v -a *.dll
  161. splitsym -v -a *.exe
  162. echo Creating zip file for java classes - Retail >> %Log_Dir%\%BUILDNO%Result.txt
  163. echo Creating zip file for java classes - Retail
  164. cd %AP_ROOT%
  165. REM this is done by the make file: call creatzip retail
  166. echo Creating self extracting exe - Retail >> %Log_Dir%\%BUILDNO%Result.txt
  167. echo Creating self extracting exe - Retail
  168. cd %AP_ROOT%\setup
  169. call bldsetup retail
  170. echo Creating self extracting exe IE4 - Retail >> %Log_Dir%\%BUILDNO%Result.txt
  171. echo Creating self extracting exe IE4 - Retail
  172. cd %AP_ROOT%\setup
  173. call bldsetup ie4
  174. :skipit5
  175. :finish
  176. echo Build finished >> %Log_Dir%\%BUILDNO%Result.txt
  177. date /t >> %Log_Dir%\%BUILDNO%Result.txt
  178. time /t >> %Log_Dir%\%BUILDNO%Result.txt
  179. date /t
  180. time /t