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.

200 lines
5.6 KiB

  1. @echo off
  2. if "%OS%"=="Windows_NT" goto WinNT
  3. echo.
  4. echo This batch file does not support non-NT systems.
  5. echo.
  6. goto done
  7. :WinNT
  8. rem
  9. rem set the MSHTML environment variable to the name of the mshtml directory
  10. rem (:getmshtml is at the bottom of this file).
  11. rem
  12. call :getmshtml %~p0
  13. if "%MSHTML%" == "" set MSHTML=mshtml
  14. rem We can't call shift until we're done using %0!
  15. set __ia64=
  16. :nextarg
  17. if "%1"=="-ia64" goto :ia64
  18. if "%1"=="-axp64" goto :axp64
  19. goto :endargs
  20. :ia64
  21. set __ia64=1
  22. shift
  23. goto :nextarg
  24. :axp64
  25. set __axp64=1
  26. shift
  27. goto :nextarg
  28. :endargs
  29. if not "%1"=="" set _ntdrive=%1
  30. if not "%2"=="" set _ntroot=%2
  31. rem
  32. rem Extract _ntdrive and _ntroot from the path of this batch file.
  33. rem _ntroot is expected to be exactly three characters long (e.g. \nt, \ie)
  34. rem
  35. if "%_ntdrive%"=="" set _ntdrive=%~d0
  36. if NOT "%_ntroot%"=="" goto skip
  37. set _ntroot=%~f0
  38. set _ntroot=%_ntroot:~2,3%
  39. :skip
  40. set _ntbindir=%_ntdrive%%_ntroot%
  41. set _ieroot=%_ntroot%
  42. set use_switches_in_retail_build=1
  43. if not "%processor_architecture%" == "x86" set build_default_targets=-%processor_architecture%
  44. set mshtmenv=1
  45. set no_binplace=1
  46. rem
  47. rem Path trickyness (NT only): We want our final path to end up like this:
  48. rem path=<path1st>;<path set by ntenv.cmd>;<user's original path>;<mshtmenv additions>
  49. rem
  50. rem The problem is that duplicates end up in the list because ntenv.cmd
  51. rem requires some of the things it puts in to already be in the path. As a
  52. rem result, we save the user's path, substitute in a temporary path before
  53. rem calling ntenv.bat, and the pull out everything it added afterward. Then
  54. rem we have the luxury of constructing the path exactly as we want it.
  55. rem
  56. set userspath=%path%
  57. set path=%path%;%_ntbindir%\public\tools;c:\pathmarker
  58. call %_ntdrive%%_ntroot%\bin\ieenv.cmd
  59. set ntenvpath=%path:*c:\pathmarker;=%
  60. if "%ntenvpath%" == "" set ntenvpath=%path%
  61. set path=%_ntbindir%\idw\path1st;%ntenvpath%;%userspath%;%_ntbindir%\bin\%processor_architecture%;%_ntbindir%\private\inet\%mshtml%\perf\bin;%_ntbindir%\private\inet\%mshtml%\perf\bin\bbt30;%_ntbindir%\private\developr\%_ntuser%
  62. set ntenvpath=
  63. set userspath=
  64. :setenv
  65. set ntdebug=ntsd
  66. set ntdebugtype=both
  67. set ntdbgfiles=1
  68. set msc_optimization=/Odi
  69. set BUILD_OPTIONS=%BUILD_OPTIONS% -w
  70. set BUILD_DEFAULT=%BUILD_DEFAULT% %MSHTML%
  71. set BUILD_PRODUCT=IE
  72. set NTBBT=1
  73. if not "%__ia64%"=="1" goto :noia64env
  74. set host_tools="PATH=%PATH%"
  75. set build_default_targets=-ia64
  76. set host_targetcpu=i386
  77. set host_target_directory=ia64
  78. set host_target_defines=ia64=1 i386=0 genia64=1
  79. set ntia64default=1
  80. set ia64=1
  81. set ia64_warning_level=-W3 -D_M_IA64
  82. set ntdebug=ntsd
  83. set ntdebugtype=windbg
  84. set build_options=%build_options% -ia64
  85. set iebuild_options=%iebuild_options% ~iextag ~imgfilt
  86. path=%_NTDRIVE%%_NTROOT%\mstools\win64;%path%
  87. :noia64env
  88. if not "%__axp64%"=="1" goto :noaxp64env
  89. set host_tools="PATH=%PATH%"
  90. set build_default_targets=-axp64
  91. set host_targetcpu=alpha
  92. set host_target_directory=axp64
  93. set host_target_defines=axp64=1 alpha=0 genaxp64=1
  94. set ntaxp64default=1
  95. set ntalphadefault=
  96. set axp64=1
  97. set alpha=
  98. set axp64_warning_level=-W3 -D_M_AXP64
  99. set ntdebug=ntsd
  100. set ntdebugtype=windbg
  101. set build_options=%build_options% -axp64
  102. set iebuild_options=%iebuild_options% ~iextag
  103. path=%_NTDRIVE%%_NTROOT%\mstools\win64;%path%
  104. :noaxp64env
  105. rem UNCOMMENT THIS TO ACTIVATE NEW COMPILER
  106. rem if not "%processor_architecture%" == "x86" goto :nonewtools
  107. rem
  108. rem use new compiler (temporary, remove when mstools compiler gets upgraded)
  109. rem
  110. rem set path=%_ntbindir%\private\inet\%mshtml%\mstools\x86;%path%
  111. :nonewtools
  112. if "%use_mshtml_incremental_linking%"=="" set use_mshtml_incremental_linking=%3
  113. if %NUMBER_OF_PROCESSORS% GTR 1 if "%1" == "" set use_mshtml_incremental_linking=0
  114. if "%use_mshtml_incremental_linking%"=="" set use_mshtml_incremental_linking=1
  115. if "%use_mshtml_incremental_linking%"=="1" set use_mshtml_pdb_rules=1
  116. rem
  117. rem We no longer need to update the i386mk.inc or alphamk.inc files. But we need to make sure
  118. rem they are not checked out and that you have the latest version.
  119. rem
  120. copy %_ntdrive%%_ntroot%\public\oak\bin\i386mk.inc %temp%\i386mk.inc 1>nul: 2>nul:
  121. if errorlevel 1 goto nocopy1
  122. copy %temp%\i386mk.inc %_ntdrive%%_ntroot%\public\oak\bin\i386mk.inc 1>nul: 2>nul:
  123. if errorlevel 1 goto doalpha
  124. echo mshtmenv: i386mk.inc is read/write; performing "in -i & ssync"
  125. pushd %_ntdrive%%_ntroot%\public\oak\bin\
  126. in -!fi i386mk.inc
  127. ssync i386mk.inc
  128. popd
  129. goto :doalpha
  130. :nocopy1
  131. echo mshtmenv: Unable to copy i386mk.inc to %temp%\i386mk.inc
  132. goto :doalpha
  133. :doalpha
  134. copy %_ntdrive%%_ntroot%\public\oak\bin\alphamk.inc %temp%\alphamk.inc 1>nul: 2>nul:
  135. if errorlevel 1 goto nocopy2
  136. copy %temp%\alphamk.inc %_ntdrive%%_ntroot%\public\oak\bin\alphamk.inc 1>nul: 2>nul:
  137. if errorlevel 1 goto alphadone
  138. echo mshtmenv: alphamk.inc is read/write; performing "in -i & ssync"
  139. pushd %_ntdrive%%_ntroot%\public\oak\bin\
  140. in -!fi alphamk.inc
  141. ssync alphamk.inc
  142. popd
  143. goto :alphadone
  144. :nocopy2
  145. echo mshtmenv: Unable to copy alphamk.inc to %temp%\alphamk.inc
  146. goto :alphadone
  147. :alphadone
  148. goto :done
  149. :getmshtml
  150. rem
  151. rem Strip off one directory name at a time until we get to the last directory
  152. rem name. (e.g. d:\nt\private\inet\mshtml\ == mshtml) There's no way to
  153. rem strip off from the end, we have to get rid of one directory at a time
  154. rem from the beginning.
  155. rem
  156. set temppath=%1
  157. set temppath=%temppath:*\=%
  158. if NOT "%temppath%" == "" call :getmshtml %temppath% & goto :eof
  159. set MSHTML=%1
  160. rem Get rid of trailing slash
  161. set MSHTML=%MSHTML:\=%
  162. goto :eof
  163. :done
  164. set __ia64=
  165. set __axp64=