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.

223 lines
5.9 KiB

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