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.

286 lines
11 KiB

  1. @if "%_echo%" == "" echo off
  2. setlocal enableextensions
  3. set _HIVEINI_FLAGS=
  4. set _HIVE_OPTIONS=
  5. set _HIVE_KEEP=
  6. set _HIVE_REASON=Unknown Purpose
  7. set _HIVE_DEFPROC=0
  8. set _ALT_TARGET=%1
  9. set _ORIGINAL_HIVE_OPTIONS=
  10. set _ORIGINAL_ORIGINAL_HIVE_OPTIONS=
  11. set _ENTERPRISEHACK=
  12. set _DTC64PROC=
  13. if "%HIVE_OUTPUT_DIR%" == "" set HIVE_OUTPUT_DIR=.
  14. if "%MPC_VALUE%" == "" set MPC_VALUE=55034
  15. shift
  16. if "%_ALT_TARGET%" == "NEC_98" set _HIVE_OPTIONS=-DNEC_98
  17. :loop
  18. if "%1" == "" goto doit
  19. if "%1" == "RETAIL" goto doretail
  20. if "%1" == "Retail" goto doretail
  21. if "%1" == "retail" goto doretail
  22. if "%1" == "KEEP" goto dokeep
  23. if "%1" == "Keep" goto dokeep
  24. if "%1" == "keep" goto dokeep
  25. if "%1" == "CAIRO" goto docairo
  26. if "%1" == "Cairo" goto docairo
  27. if "%1" == "cairo" goto docairo
  28. if "%1" == "suite" goto dosuite
  29. if "%1" == "suite" goto dosuite
  30. set _HIVEINI_FLAGS=%_HIVEINI_FLAGS% %1
  31. shift
  32. goto loop
  33. :doretail
  34. set _HIVE_OPTIONS=-D_GENERAL_PURPOSE_ -D_RETAIL_SETUP_ %_HIVE_OPTIONS%
  35. set _HIVE_REASON=Retail Setup
  36. shift
  37. goto loop
  38. :dokeep
  39. set _HIVE_KEEP=YES
  40. shift
  41. goto loop
  42. :dosuite
  43. shift
  44. set tmp_suite=%1
  45. if /i "%1"=="SMALLBIZ" set tmp_suite=1
  46. if /i "%1"=="ENTERPRISE" set tmp_suite=2
  47. if /i "%1"=="COMMUNICATIONSERVER" set tmp_suite=8
  48. if /i "%1"=="BACKOFFICE" set tmp_suite=4
  49. if /i "%1"=="SMALLBIZR" set tmp_suite=33
  50. if /i "%1"=="DATACENTER" set tmp_suite=130
  51. if /i "%1"=="PERSONAL" (
  52. set tmp_suite=512
  53. set _HIVE_DEFPROC=1
  54. )
  55. if /i "%1"=="BLADE" (
  56. set tmp_suite=1024
  57. set _HIVE_DEFPROC=2
  58. )
  59. set _HIVE_OPTIONS=%_HIVE_OPTIONS% -DSUITE_TYPE=%tmp_suite%
  60. rem
  61. rem a hack to make sure that the default retail hive (setupreg.hiv) has the correct number of procs for
  62. rem enterprise and datacenter. we never want a 1 proc datacenter or enterprise, so this is ok
  63. rem
  64. if /i "%1"=="ENTERPRISE" (
  65. set _HIVE_DEFPROC=8
  66. set _ENTERPRISEHACK=1
  67. )
  68. if /i "%1"=="DATACENTER" (
  69. set _HIVE_DEFPROC=32
  70. set _DTC64PROC=yes
  71. )
  72. shift
  73. goto loop
  74. :docairo
  75. if "%_HIVE_OPTIONS%" == "" goto usage
  76. set _HIVE_OPTIONS=%_HIVE_OPTIONS% -D_CAIRO_
  77. set _HIVE_REASON=%_HIVE_REASON% for Cairo
  78. set _CAIRO_HIVE=yes
  79. shift
  80. goto loop
  81. :doit
  82. if "%_ALT_TARGET%" == "NEC_98" set _ORIGINAL_ORIGINAL_HIVE_OPTIONS=-DNEC_98
  83. set _ORIGINAL_HIVE_OPTIONS=%_ORIGINAL_ORIGINAL_HIVE_OPTIONS% %_HIVE_OPTIONS%
  84. set _PREPROCESSOR=hivepp -R -P -I . -f
  85. rem
  86. rem note that we use HIVE_DEFPROC below instead of a hardcoded CPU limit
  87. rem see the note above -- this is so the "default" hive is set correctly
  88. rem
  89. echo Creating SETUPREG.HIV hive for %_HIVE_REASON%
  90. set _HIVE_OPTIONS=%_ORIGINAL_HIVE_OPTIONS% -DRESTRICT_CPU=%_HIVE_DEFPROC%
  91. call mkhive1.cmd %HIVE_OUTPUT_DIR%\SETUPREG.HIV System setupreg.ini %HIVE_OUTPUT_DIR%\setupreg.$$$ %HIVE_OUTPUT_DIR%\setupreg.log %HIVE_OUTPUT_DIR%\setuppreg.ini %MPC_VALUE%
  92. if ERRORLEVEL 1 goto done
  93. rem
  94. rem Generate the various restricted processor forms of the hives
  95. rem
  96. rem
  97. rem setupret.hiv allows 2p on NTW and 4p on NTS
  98. rem
  99. echo Creating SETUPRET.HIV hive for %_HIVE_REASON%
  100. set _HIVE_OPTIONS=%_ORIGINAL_HIVE_OPTIONS% -DRESTRICT_CPU=0
  101. call mkhive1.cmd %HIVE_OUTPUT_DIR%\SETUPRET.HIV System setupreg.ini %HIVE_OUTPUT_DIR%\setupret.$$$ %HIVE_OUTPUT_DIR%\setupret.log %HIVE_OUTPUT_DIR%\setuppret.ini %MPC_VALUE%
  102. if ERRORLEVEL 1 goto done
  103. rem
  104. rem setup2P.hiv allows 2p on NTW and NTS
  105. rem
  106. echo Creating SETUP2P.HIV hive for %_HIVE_REASON%
  107. set _HIVE_OPTIONS=%_ORIGINAL_HIVE_OPTIONS% -DRESTRICT_CPU=2
  108. call mkhive1.cmd %HIVE_OUTPUT_DIR%\SETUP2P.HIV System setupreg.ini %HIVE_OUTPUT_DIR%\setup2P.$$$ %HIVE_OUTPUT_DIR%\setup2P.log %HIVE_OUTPUT_DIR%\setupp2P.ini %MPC_VALUE%
  109. if ERRORLEVEL 1 goto done
  110. rem
  111. rem setup4P.hiv allows 4p on NTW and NTS
  112. rem
  113. echo Creating SETUP4P.HIV hive for %_HIVE_REASON%
  114. set _HIVE_OPTIONS=%_ORIGINAL_HIVE_OPTIONS% -DRESTRICT_CPU=4
  115. call mkhive1.cmd %HIVE_OUTPUT_DIR%\SETUP4P.HIV System setupreg.ini %HIVE_OUTPUT_DIR%\setup4P.$$$ %HIVE_OUTPUT_DIR%\setup4P.log %HIVE_OUTPUT_DIR%\setupp4P.ini %MPC_VALUE%
  116. if ERRORLEVEL 1 goto done
  117. rem
  118. rem setup8P.hiv allows 8p on NTW and NTS
  119. rem
  120. echo Creating SETUP8P.HIV hive for %_HIVE_REASON%
  121. set _HIVE_OPTIONS=%_ORIGINAL_HIVE_OPTIONS% -DRESTRICT_CPU=8
  122. call mkhive1.cmd %HIVE_OUTPUT_DIR%\SETUP8P.HIV System setupreg.ini %HIVE_OUTPUT_DIR%\setup8P.$$$ %HIVE_OUTPUT_DIR%\setup8P.log %HIVE_OUTPUT_DIR%\setupp8P.ini %MPC_VALUE%
  123. if ERRORLEVEL 1 goto done
  124. rem
  125. rem setup16P.hiv allows 16p on NTW and NTS
  126. rem
  127. echo Creating SETUP16P.HIV hive for %_HIVE_REASON%
  128. set _HIVE_OPTIONS=%_ORIGINAL_HIVE_OPTIONS% -DRESTRICT_CPU=16
  129. call mkhive1.cmd %HIVE_OUTPUT_DIR%\SETUP16P.HIV System setupreg.ini %HIVE_OUTPUT_DIR%\setup16P.$$$ %HIVE_OUTPUT_DIR%\setup16P.log %HIVE_OUTPUT_DIR%\setupp16P.ini %MPC_VALUE%
  130. if ERRORLEVEL 1 goto done
  131. rem
  132. rem setup32P.hiv allows 32p on NTW and NTS
  133. rem
  134. echo Creating SETUP32P.HIV hive for %_HIVE_REASON%
  135. set _HIVE_OPTIONS=%_ORIGINAL_HIVE_OPTIONS% -DRESTRICT_CPU=32
  136. call mkhive1.cmd %HIVE_OUTPUT_DIR%\SETUP32P.HIV System setupreg.ini %HIVE_OUTPUT_DIR%\setup32P.$$$ %HIVE_OUTPUT_DIR%\setup32P.log %HIVE_OUTPUT_DIR%\setupp32P.ini %MPC_VALUE%
  137. if ERRORLEVEL 1 goto done
  138. if /i "%_DTC64PROC%" == "yes" (
  139. rem
  140. rem setup64P.hiv allows 64P on NTS
  141. rem
  142. echo Creating SETUP64P.HIV hive for %_HIVE_REASON%
  143. set _HIVE_OPTIONS=%_ORIGINAL_HIVE_OPTIONS% -DRESTRICT_CPU=64
  144. call mkhive1.cmd %HIVE_OUTPUT_DIR%\SETUP64P.HIV System setupreg.ini %HIVE_OUTPUT_DIR%\setup64P.$$$ %HIVE_OUTPUT_DIR%\setup64P.log %HIVE_OUTPUT_DIR%\setupp64P.ini %MPC_VALUE%
  145. if ERRORLEVEL 1 goto done
  146. )
  147. rem
  148. rem Generate the 5, 30, 60, 90, 120, and 150 timebomb evaluation units. Only "retail" processor
  149. rem configurations are built (NTW=2p and NTW=4p)
  150. rem
  151. rem
  152. rem tbomb5.hiv is good for 5 days
  153. rem
  154. echo Creating TBOMB5.HIV hive for %_HIVE_REASON%
  155. set _HIVE_OPTIONS=%_ORIGINAL_HIVE_OPTIONS% -DRESTRICT_CPU=%_HIVE_DEFPROC% -DEVALTIME=7200
  156. call mkhive1.cmd %HIVE_OUTPUT_DIR%\TBOMB5.HIV System setupreg.ini %HIVE_OUTPUT_DIR%\tbomb5.$$$ %HIVE_OUTPUT_DIR%\tbomb5.log %HIVE_OUTPUT_DIR%\setupptb5.ini %MPC_VALUE%
  157. if ERRORLEVEL 1 goto done
  158. rem
  159. rem tbomb15.hiv is good for 15 days
  160. rem
  161. echo Creating TBOMB15.HIV hive for %_HIVE_REASON%
  162. set _HIVE_OPTIONS=%_ORIGINAL_HIVE_OPTIONS% -DRESTRICT_CPU=%_HIVE_DEFPROC% -DEVALTIME=21600
  163. call mkhive1.cmd %HIVE_OUTPUT_DIR%\TBOMB15.HIV System setupreg.ini %HIVE_OUTPUT_DIR%\tbomb15.$$$ %HIVE_OUTPUT_DIR%\tbomb15.log %HIVE_OUTPUT_DIR%\setupptb15.ini %MPC_VALUE%
  164. if ERRORLEVEL 1 goto done
  165. rem
  166. rem tbomb30.hiv is good for 30 days
  167. rem
  168. echo Creating TBOMB30.HIV hive for %_HIVE_REASON%
  169. set _HIVE_OPTIONS=%_ORIGINAL_HIVE_OPTIONS% -DRESTRICT_CPU=%_HIVE_DEFPROC% -DEVALTIME=43200
  170. call mkhive1.cmd %HIVE_OUTPUT_DIR%\TBOMB30.HIV System setupreg.ini %HIVE_OUTPUT_DIR%\tbomb30.$$$ %HIVE_OUTPUT_DIR%\tbomb30.log %HIVE_OUTPUT_DIR%\setupptb30.ini %MPC_VALUE%
  171. if ERRORLEVEL 1 goto done
  172. rem
  173. rem tbomb60.hiv is good for 60 days
  174. rem
  175. echo Creating TBOMB60.HIV hive for %_HIVE_REASON%
  176. set _HIVE_OPTIONS=%_ORIGINAL_HIVE_OPTIONS% -DRESTRICT_CPU=%_HIVE_DEFPROC% -DEVALTIME=86400
  177. call mkhive1.cmd %HIVE_OUTPUT_DIR%\TBOMB60.HIV System setupreg.ini %HIVE_OUTPUT_DIR%\tbomb60.$$$ %HIVE_OUTPUT_DIR%\tbomb60.log %HIVE_OUTPUT_DIR%\setupptb60.ini %MPC_VALUE%
  178. if ERRORLEVEL 1 goto done
  179. rem
  180. rem tbomb90.hiv is good for 90 days
  181. rem
  182. echo Creating TBOMB90.HIV hive for %_HIVE_REASON%
  183. set _HIVE_OPTIONS=%_ORIGINAL_HIVE_OPTIONS% -DRESTRICT_CPU=%_HIVE_DEFPROC% -DEVALTIME=129600
  184. call mkhive1.cmd %HIVE_OUTPUT_DIR%\TBOMB90.HIV System setupreg.ini %HIVE_OUTPUT_DIR%\tbomb90.$$$ %HIVE_OUTPUT_DIR%\tbomb90.log %HIVE_OUTPUT_DIR%\setupptb90.ini %MPC_VALUE%
  185. if ERRORLEVEL 1 goto done
  186. rem
  187. rem tbomb120.hiv is good for 120 days
  188. rem
  189. echo Creating TBOMB120.HIV hive for %_HIVE_REASON%
  190. set _HIVE_OPTIONS=%_ORIGINAL_HIVE_OPTIONS% -DRESTRICT_CPU=%_HIVE_DEFPROC% -DEVALTIME=172800
  191. call mkhive1.cmd %HIVE_OUTPUT_DIR%\TBOMB120.HIV System setupreg.ini %HIVE_OUTPUT_DIR%\tbomb120.$$$ %HIVE_OUTPUT_DIR%\tbomb120.log %HIVE_OUTPUT_DIR%\setupptb120.ini %MPC_VALUE%
  192. if ERRORLEVEL 1 goto done
  193. rem
  194. rem tbomb150.hiv is good for 150 days
  195. rem
  196. echo Creating TBOMB150.HIV hive for %_HIVE_REASON%
  197. set _HIVE_OPTIONS=%_ORIGINAL_HIVE_OPTIONS% -DRESTRICT_CPU=%_HIVE_DEFPROC% -DEVALTIME=216000
  198. call mkhive1.cmd %HIVE_OUTPUT_DIR%\TBOMB150.HIV System setupreg.ini %HIVE_OUTPUT_DIR%\tbomb150.$$$ %HIVE_OUTPUT_DIR%\tbomb150.log %HIVE_OUTPUT_DIR%\setupptb150.ini %MPC_VALUE%
  199. if ERRORLEVEL 1 goto done
  200. rem
  201. rem tbomb180.hiv is good for 180 days
  202. rem
  203. echo Creating TBOMB180.HIV hive for %_HIVE_REASON%
  204. set _HIVE_OPTIONS=%_ORIGINAL_HIVE_OPTIONS% -DRESTRICT_CPU=%_HIVE_DEFPROC% -DEVALTIME=259200
  205. call mkhive1.cmd %HIVE_OUTPUT_DIR%\TBOMB180.HIV System setupreg.ini %HIVE_OUTPUT_DIR%\tbomb180.$$$ %HIVE_OUTPUT_DIR%\tbomb180.log %HIVE_OUTPUT_DIR%\setupptb180.ini %MPC_VALUE%
  206. if ERRORLEVEL 1 goto done
  207. rem
  208. rem tbomb240.hiv is good for 240 days
  209. rem
  210. echo Creating TBOMB240.HIV hive for %_HIVE_REASON%
  211. set _HIVE_OPTIONS=%_ORIGINAL_HIVE_OPTIONS% -DRESTRICT_CPU=%_HIVE_DEFPROC% -DEVALTIME=345600
  212. call mkhive1.cmd %HIVE_OUTPUT_DIR%\TBOMB240.HIV System setupreg.ini %HIVE_OUTPUT_DIR%\tbomb240.$$$ %HIVE_OUTPUT_DIR%\tbomb240.log %HIVE_OUTPUT_DIR%\setupptb240.ini %MPC_VALUE%
  213. if ERRORLEVEL 1 goto done
  214. rem
  215. rem tbomb444.hiv is good for 444 days
  216. rem
  217. echo Creating TBOMB444.HIV hive for %_HIVE_REASON%
  218. set _HIVE_OPTIONS=%_ORIGINAL_HIVE_OPTIONS% -DRESTRICT_CPU=%_HIVE_DEFPROC% -DEVALTIME=639360
  219. call mkhive1.cmd %HIVE_OUTPUT_DIR%\TBOMB444.HIV System setupreg.ini %HIVE_OUTPUT_DIR%\tbomb444.$$$ %HIVE_OUTPUT_DIR%\tbomb444.log %HIVE_OUTPUT_DIR%\setupptb444.ini %MPC_VALUE%
  220. if ERRORLEVEL 1 goto done
  221. rem
  222. rem tb32p444.hiv has 32 processors and is good for 444 days
  223. rem
  224. echo Creating TB32p444.HIV hive for %_HIVE_REASON%
  225. set _HIVE_OPTIONS=%_ORIGINAL_HIVE_OPTIONS% -DRESTRICT_CPU=32 -DEVALTIME=639360
  226. call mkhive1.cmd %HIVE_OUTPUT_DIR%\TB32p444.HIV System setupreg.ini %HIVE_OUTPUT_DIR%\tb32p444.$$$ %HIVE_OUTPUT_DIR%\tb32p444.log %HIVE_OUTPUT_DIR%\setupp32ptb444.ini %MPC_VALUE%
  227. if ERRORLEVEL 1 goto done
  228. if /i "%_DTC64PROC%" == "yes" (
  229. rem
  230. rem tb64p444.hiv has 64 processors and is good for 444 days
  231. rem
  232. echo Creating TB64p444.HIV hive for %_HIVE_REASON%
  233. set _HIVE_OPTIONS=%_ORIGINAL_HIVE_OPTIONS% -DRESTRICT_CPU=64 -DEVALTIME=639360
  234. call mkhive1.cmd %HIVE_OUTPUT_DIR%\TB64p444.HIV System setupreg.ini %HIVE_OUTPUT_DIR%\tb64p444.$$$ %HIVE_OUTPUT_DIR%\tb64p444.log %HIVE_OUTPUT_DIR%\setupp64ptb444.ini %MPC_VALUE%
  235. if ERRORLEVEL 1 goto done
  236. )
  237. echo Creating SETUPUPG.HIV hive for %_HIVE_REASON%
  238. if not "%_ENTERPRISEHACK%"=="" set _HIVE_DEFPROC=8
  239. set _HIVE_OPTIONS=%_ORIGINAL_HIVE_OPTIONS% -D_STEPUP_ -DRESTRICT_CPU=%_HIVE_DEFPROC%
  240. call mkhive1.cmd %HIVE_OUTPUT_DIR%\SETUPUPG.HIV System setupreg.ini %HIVE_OUTPUT_DIR%\setupupg.$$$ %HIVE_OUTPUT_DIR%\setupupg.log %HIVE_OUTPUT_DIR%\setuppupg.ini %MPC_VALUE%
  241. if ERRORLEVEL 1 goto done
  242. set _HIVE_OPTIONS=%_ORIGINAL_HIVE_OPTIONS%
  243. Rem make retail setupp.ini
  244. call mkini %HIVE_OUTPUT_DIR%\setupp.ini %MPC_VALUE% r
  245. rem make volume licensing setupp.ini
  246. call mkini %HIVE_OUTPUT_DIR%\setuppv.ini %MPC_VALUE% s
  247. goto done
  248. :usage
  249. echo Usage: MKHIVES RETAIL [KEEP]
  250. :done
  251. endlocal