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.

1239 lines
52 KiB

  1. @if "%_echo%" == "" echo off
  2. REM --------------------------------------------------------------------------
  3. REM --------------------------------------------------------------------------
  4. REM
  5. REM Batch file to build the NT DX Graphics DDK Image. This script should be
  6. REM run after a sucessful build of multimedia\published\dxg and
  7. REM multimedia\DirectX\dxg. It will pick up source and binary files,
  8. REM pre-process where neceassry and dump the results in the DDK directory
  9. REM strucutre. The root of the DDK directory structure is given by %2.
  10. REM
  11. REM --------------------------------------------------------------------------
  12. REM --------------------------------------------------------------------------
  13. setlocal ENABLEEXTENSIONS
  14. setlocal ENABLEDELAYEDEXPANSION
  15. REM --------------------------------------------------------------------------
  16. REM --------------------------------------------------------------------------
  17. REM
  18. REM Step 1: Initialize the log file
  19. REM
  20. REM --------------------------------------------------------------------------
  21. REM --------------------------------------------------------------------------
  22. echo Generating DirectX 8.0 NT DDK Image
  23. REM --------------------------------------------------------------------------
  24. REM --------------------------------------------------------------------------
  25. REM
  26. REM Step 2: Setup variables pointing to interesting source and target
  27. REM directories These variables are used for the source and destination of the
  28. REM files to be copied to the DDK target image
  29. REM
  30. REM --------------------------------------------------------------------------
  31. REM --------------------------------------------------------------------------
  32. echo Setting up environment variables
  33. REM
  34. REM DSTPATH is the root directory of the DDK target image. The directory
  35. REM structure pointed to by this variable is assumed to be the same as the
  36. REM NTDDK directory structure
  37. REM %1 must contain the target DDK location
  38. REM
  39. set DSTPATH=%1
  40. if "%DSTPATH%" == "" goto :Usage
  41. echo DSTPATH set to %DSTPATH%
  42. REM
  43. REM SRCPATH is the root directory of the NT source enlistment containing both
  44. REM the DirectX sources and the published header locations. The directory
  45. REM structure pointed to by this variable is assumed to be the same as the
  46. REM Win2K source directory structure. It assumes both a MultiMedia and Root
  47. REM enlistment and that MultiMedia has already been built and the appropriate
  48. REM header files generated.
  49. REM %2 can optionally contain the source location
  50. REM
  51. set SRCPATH=%2
  52. if "%SRCPATH%" == "" set goto :Usage
  53. echo SRCPATH set to %SRCPATH%
  54. REM
  55. REM BINSRCPATH is the root directory binary dump from where we pick up
  56. REM binaries built previously by the SDK build.
  57. REM Specification of this directory is optional. If it is not specified
  58. REM we simply don't pick up these binaries
  59. REM
  60. set BINSRCPATH=%3
  61. echo BINSRCPATH set to %BINSRCPATH%
  62. REM
  63. REM DInput Mapper Config path. This is the directory from which we pick
  64. REM up the DInput mapper config tool and the genre.ini file
  65. REM
  66. set DIMAPPATH=%BINSRCPATH%\bin
  67. REM
  68. REM Win9x DDRAW.LIB path. This is the directory from which we get the Win9x
  69. REM DDRAW.LIB (with the 9x specific exports).
  70. REM
  71. REM OLD LINE: set WIN9XDDRAWPATH=%BINSRCPATH%\win9x\lib
  72. REM
  73. REM This assumes the SDK will be built first and ddraw.lib will get created
  74. REM and placed in \public\sdk\lib\win9x . The process changed slightly in that
  75. REM the created binaries aren't placed in \binaries.x86fre anymore but in
  76. REM \Direct_X.binariesx86fre, so this change was required to fix the DDK build.
  77. REM
  78. set WIN9XDDRAWPATH=%SRCPATH%\public\sdk\lib\win9x
  79. REM
  80. REM DRVSRCPATH is the root directory of the NT source enlistment containing
  81. REM the driver sources.
  82. REM %3 can optionally contain the source location
  83. REM
  84. set DRVSRCPATH=%SRCPATH%\multimedia\DirectX\dxddk\video\3dlabs\perm3
  85. echo DRVSRCPATH set to %DRVSRCPATH%
  86. REM
  87. REM WIN9XDRVSRCPATH is the root directory of the Win9x source enlistment containing
  88. REM the driver sources.
  89. REM %4 can optionally contain the source location
  90. REM
  91. set WIN9XDRVSRCPATH=%SRCPATH%\multimedia\DirectX\dxddk\mill\display
  92. echo WIN9XDRVSRCPATH set to %WIN9XDRVSRCPATH%
  93. REM
  94. REM SDK_INC_PATH is the source of the SDK headers
  95. REM
  96. set SDK_INC_PATH=%SRCPATH%\public\sdk\inc
  97. echo SDK_INC_PATH set to %SDK_INC_PATH%
  98. REM
  99. REM DDK_INC_PATH is the source of the DDK headers
  100. REM
  101. set DDK_INC_PATH=%SRCPATH%\public\ddk\inc
  102. echo DDK_INC_PATH set to %DDK_INC_PATH%
  103. REM
  104. REM D3D_INC_PATH is the source for d3dtypes.h and d3dcaps.h.
  105. REM These files should not be necessary
  106. REM
  107. set D3D_INC_PATH=%SRCPATH%\MultiMedia\DirectX\dxg\d3d\dx7\inc
  108. echo D3D_INC_PATH set to %D3D_INC_PATH%
  109. REM
  110. REM D3D8_INC_PATH is the source for d3dhal.h. This is temporary
  111. REM this file really should be published to DDK_INC_PATH
  112. REM
  113. set D3D8_INC_PATH=%SRCPATH%\MultiMedia\DirectX\dxg\d3d8\inc
  114. echo D3D8_INC_PATH set to %D3D8_INC_PATH%
  115. REM
  116. REM DVP_INC_PATH is the path to the dvp.h source file. This path
  117. REM is strange as dvp.h is no longer being published to sdk\inc
  118. REM and the stripped version is simply dumped in the published
  119. REM obj directory so we pick it up from there.
  120. REM
  121. set DVP_INC_PATH=%SRCPATH%\MultiMedia\published\dxg\obj\i386
  122. echo DVP_INC_PATH set to %DVP_INC_PATH%
  123. REM
  124. REM OAK_INC_PATH is the path to the dmemmgr.h source file.
  125. REM
  126. set OAK_INC_PATH=%SRCPATH%\public\oak\inc
  127. echo OAK_INC_PATH set to %OAK_INC_PATH%
  128. REM
  129. REM DXG_INC_PATH is the source for d3d8p.h. This is temporary
  130. REM this file really shouldn't be necessary
  131. REM
  132. set DXG_INC_PATH=%SRCPATH%\MultiMedia\DirectX\dxg\inc
  133. echo DXG_INC_PATH set to %DXG_INC_PATH%
  134. REM
  135. REM MMI_INC_PATH is the source for ddrawi.h. This is temporary
  136. REM this file really should be published to DDK_INC_PATH
  137. REM
  138. set MMI_INC_PATH=%SRCPATH%\public\oak\inc
  139. echo MMI_INC_PATH set to %MMI_INC_PATH%
  140. REM
  141. REM MMDDK_INC_PATH is the source for files published internally
  142. REM to the multimedia depot only.
  143. REM Currently the NT specific DDK files go here but they should
  144. REM really go in DDK_INC_PATH. Currently, however, this will cause
  145. REM problems when we RI (due to GDI dependencies). Therefore,
  146. REM we publish them to this location temporarily only.
  147. REM
  148. set MMDDK_INC_PATH=%SRCPATH%\MultiMedia\inc\ddk
  149. echo MMDDK_INC_PATH set to %MMDDK_INC_PATH%
  150. REM
  151. REM REFRAST_SRC_PATH is the location of the reference rasterizer sources in the
  152. REM source tree
  153. REM
  154. set REFRAST_SRC_PATH=%SRCPATH%\MultiMedia\DirectX\dxg\ref8
  155. echo REFRAST_SRC_PATH set to %REFRAST_SRC_PATH%
  156. REM
  157. REM REFRAST_DST_PATH is the location of the reference rasterizer sources in the
  158. REM DDK tree
  159. REM
  160. set REFRAST_DST_PATH=%DSTPATH%\src\video\displays\d3dref8
  161. echo REFRAST_DST_PATH set to %REFRAST_DST_PATH%
  162. REM
  163. REM SAMPLEDLL_SRC_PATH is the location of the sample driver sources for the DLL
  164. REM part of the driver in the source tree
  165. REM
  166. set SAMPLEDLL_SRC_PATH=%DRVSRCPATH%\disp
  167. REM If you want to build the beta tree use this assignment instead.
  168. REM set SAMPLEDLL_SRC_PATH=%DRVSRCPATH%\p3samp\p3beta1
  169. echo SAMPLEDLL_SRC_PATH set to %SAMPLEDLL_SRC_PATH%
  170. REM
  171. REM SAMPLESYS_SRC_PATH is the location of the sample driver sources for the
  172. REM miniport part of the driver in the source tree
  173. REM
  174. set SAMPLESYS_SRC_PATH=%DRVSRCPATH%\mini
  175. echo SAMPLESYS_SRC_PATH set to %SAMPLESYS_SRC_PATH%
  176. REM
  177. REM SAMPLEDLL_DST_PATH is the location of the sample driver sources for the
  178. REM DLL part of the driver in the DDK tree
  179. REM
  180. set SAMPLEDLL_DST_PATH=%DSTPATH%\src\video\displays\p3samp
  181. echo SAMPLEDLL_DST_PATH set to %SAMPLEDLL_DST_PATH%
  182. REM
  183. REM SAMPLESYS_DST_PATH is the location of the sample driver sources for the
  184. REM DLL part of the driver in the DDK tree
  185. REM
  186. set SAMPLESYS_DST_PATH=%DSTPATH%\src\video\miniport\p3samp
  187. echo SAMPLESYS_DST_PATH set to %SAMPLESYS_DST_PATH%
  188. REM
  189. REM SAMPLEDISP_SRC_PATH is the location of the Win9x sample display driver
  190. REM sources for the DLL in the source tree
  191. REM
  192. set SAMPLEDISP_SRC_PATH=%WIN9XDRVSRCPATH%\mini\p3samp
  193. echo SAMPLEDISP_SRC_PATH set to %SAMPLEDISP_SRC_PATH%
  194. REM
  195. REM SAMPLEMVD_SRC_PATH is the location of the Win9x sample minivdd VXD
  196. REM sources in the source tree
  197. REM
  198. set SAMPLEMVD_SRC_PATH=%WIN9XDRVSRCPATH%\minivdd\p3samp
  199. echo SAMPLEMVD_SRC_PATH set to %SAMPLEMVD_SRC_PATH%
  200. REM
  201. REM SAMPLEDISP_DST_PATH is the location of the Win9x sample display driver's
  202. REM destination in the DDK tree
  203. REM
  204. set SAMPLEDISP_DST_PATH=%DSTPATH%\src\win_me\display\mini\p3samp
  205. echo SAMPLEDISP_DST_PATH set to %SAMPLEDISP_DST_PATH%
  206. REM
  207. REM SAMPLEMVD_DST_PATH is the location of the Win9x sample minivdd VXD's
  208. REM destination in the DDK tree
  209. REM
  210. set SAMPLEMVD_DST_PATH=%DSTPATH%\src\win_me\display\minivdd\p3samp
  211. echo SAMPLEMVD_DST_PATH set to %SAMPLEMVD_DST_PATH%
  212. REM
  213. REM DINPUT_SRC_PATH is the root directory of the DirectInput DDK files
  214. REM
  215. set DINPUT_SRC_PATH=%SRCPATH%\MultiMedia\DirectX\dxddk\DInput
  216. echo DINPUT_SRC_PATH set to %DINPUT_SRC_PATH%
  217. REM
  218. REM DINPUT_TOL_PATH is the root directory of the DirectInput DDK files
  219. REM
  220. set DINPUT_TOL_PATH=%SRCPATH%\MultiMedia\DirectX\DInput\dimapcfg
  221. echo DINPUT_TOL_PATH set to %DINPUT_TOL_PATH%
  222. REM
  223. REM DINPUT_DST_PATH is the root directory of the DirectInput DDK target files
  224. REM
  225. set DINPUT_DST_PATH=%DSTPATH%\input
  226. echo DINPUT_DST_PATH set to %DINPUT_DST_PATH%
  227. REM --------------------------------------------------------------------------
  228. REM --------------------------------------------------------------------------
  229. REM
  230. REM Step 2: Ensure the basic DDK directory structure exists
  231. REM
  232. REM --------------------------------------------------------------------------
  233. REM --------------------------------------------------------------------------
  234. echo Ensure the target DDK directory structure is in place
  235. if not exist %DSTPATH% md %DSTPATH%
  236. if not exist %DSTPATH%\built md %DSTPATH%\built
  237. if not exist %DSTPATH%\built\perm3 md %DSTPATH%\built\perm3
  238. if not exist %DSTPATH%\inc md %DSTPATH%\inc
  239. if not exist %DSTPATH%\inc\win_me md %DSTPATH%\inc\win_me
  240. if not exist %DSTPATH%\lib md %DSTPATH%\lib
  241. if not exist %DSTPATH%\src md %DSTPATH%\src
  242. if not exist %DSTPATH%\src\video md %DSTPATH%\src\video
  243. if not exist %DSTPATH%\src\video\miniport md %DSTPATH%\src\video\miniport
  244. if not exist %DSTPATH%\src\video\displays md %DSTPATH%\src\video\displays
  245. if not exist %DSTPATH%\src\win_me\display md %DSTPATH%\src\win_me\display
  246. if not exist %DSTPATH%\src\win_me\display\mini md %DSTPATH%\src\win_me\display\mini
  247. if not exist %DSTPATH%\src\win_me\display\minivdd md %DSTPATH%\src\win_me\display\minivdd
  248. if not exist %DSTPATH%\extras md %DSTPATH%\extras
  249. if not exist %DSTPATH%\extras\tools md %DSTPATH%\extras\tools
  250. REM --------------------------------------------------------------------------
  251. REM --------------------------------------------------------------------------
  252. REM
  253. REM Step 3: Copy the readme files (readme's, notes etc.)
  254. REM
  255. REM --------------------------------------------------------------------------
  256. REM --------------------------------------------------------------------------
  257. echo Process and copy the readme files to the target location
  258. call :GetReadmeFiles
  259. REM --------------------------------------------------------------------------
  260. REM --------------------------------------------------------------------------
  261. REM
  262. REM Step 4: Copy the necessary DDK include files from their various locations
  263. REM to the DDK target location
  264. REM
  265. REM --------------------------------------------------------------------------
  266. REM --------------------------------------------------------------------------
  267. echo Process and copy the include files to the target location
  268. call :GetIncludes
  269. REM --------------------------------------------------------------------------
  270. REM --------------------------------------------------------------------------
  271. REM
  272. REM Step 5: Copy the necessary DDK library files from their various locations
  273. REM to the DDK target location
  274. REM
  275. REM --------------------------------------------------------------------------
  276. REM --------------------------------------------------------------------------
  277. echo Copy the library files to the target location
  278. call :GetLibs
  279. REM --------------------------------------------------------------------------
  280. REM --------------------------------------------------------------------------
  281. REM
  282. REM Step 6: Copy (and preprocess) the reference rasterizer files from the
  283. REM source enlistment to the destination directory. The reference rasterizer
  284. REM lives in the src\video\displays directory of the NTDDK directory structure
  285. REM
  286. REM --------------------------------------------------------------------------
  287. REM --------------------------------------------------------------------------
  288. echo Process and copy the refrast source to the target location
  289. call :GetRefRast
  290. REM --------------------------------------------------------------------------
  291. REM --------------------------------------------------------------------------
  292. REM
  293. REM Step 7: Copy (and preprocess) the sample driver miniport sources from the
  294. REM source enlistment to the destination directory. The sample driver lives
  295. REM in the driver depot.
  296. REM
  297. REM NOTE: Currently pick the sample driver up from the SLM P3 enlistment
  298. REM as this is still where the majority of the development work happens.
  299. REM This should be transitioned to picking up the source from the SD drivers
  300. REM depot
  301. REM
  302. REM --------------------------------------------------------------------------
  303. REM --------------------------------------------------------------------------
  304. echo Process and copy the miniport source to the target location
  305. call :GetMiniportSample
  306. REM --------------------------------------------------------------------------
  307. REM --------------------------------------------------------------------------
  308. REM
  309. REM Step 8: Copy (and preprocess) the sample driver sources from the source
  310. REM enlistment to the destination directory. The sample driver lives in the
  311. REM driver depot.
  312. REM
  313. REM NOTE: Currently pick the sample driver up from the SLM P3 enlistment
  314. REM as this is still where the majority of the development work happens.
  315. REM This should be transitioned to picking up the source from the SD drivers
  316. REM depot
  317. REM
  318. REM --------------------------------------------------------------------------
  319. REM --------------------------------------------------------------------------
  320. echo Process and copy the driver source to the target location
  321. call :GetDriverSample
  322. REM --------------------------------------------------------------------------
  323. REM --------------------------------------------------------------------------
  324. REM
  325. REM Step 9: Copy the help files over
  326. REM
  327. REM --------------------------------------------------------------------------
  328. REM --------------------------------------------------------------------------
  329. echo Copy the help files to the target location
  330. call :GetHelpFiles
  331. REM --------------------------------------------------------------------------
  332. REM --------------------------------------------------------------------------
  333. REM
  334. REM Step 10: Copy the Win9x global files
  335. REM
  336. REM --------------------------------------------------------------------------
  337. REM --------------------------------------------------------------------------
  338. echo Copy the win9x global setting files
  339. call :GetWin9xGlobalFiles
  340. REM --------------------------------------------------------------------------
  341. REM --------------------------------------------------------------------------
  342. REM
  343. REM Step 11: Copy (and preprocess) the Win9x sample display driver
  344. REM
  345. REM --------------------------------------------------------------------------
  346. REM --------------------------------------------------------------------------
  347. echo Copy the Win9x sample display driver to the target location
  348. call :GetWin9xDisplaySample
  349. REM --------------------------------------------------------------------------
  350. REM --------------------------------------------------------------------------
  351. REM
  352. REM Step 12: Copy (and preprocess) the Win9x sample minivdd driver
  353. REM
  354. REM --------------------------------------------------------------------------
  355. REM --------------------------------------------------------------------------
  356. echo Copy the Win9x sample minivdd driver to the target location
  357. call :GetWin9xMiniVDDSample
  358. REM --------------------------------------------------------------------------
  359. REM --------------------------------------------------------------------------
  360. REM
  361. REM Step 13: Copy the KS headers and libs
  362. REM
  363. REM --------------------------------------------------------------------------
  364. REM --------------------------------------------------------------------------
  365. echo Copy the KS headers and libs
  366. call :GetKSFiles
  367. REM --------------------------------------------------------------------------
  368. REM --------------------------------------------------------------------------
  369. REM
  370. REM Step 14: Copy the BDA headers and libs
  371. REM
  372. REM --------------------------------------------------------------------------
  373. REM --------------------------------------------------------------------------
  374. echo Copy the BDA headers and libs
  375. call :GetBDAFiles
  376. REM --------------------------------------------------------------------------
  377. REM --------------------------------------------------------------------------
  378. REM
  379. REM Step 15: Copy the DirectVA headers and libs
  380. REM
  381. REM --------------------------------------------------------------------------
  382. REM --------------------------------------------------------------------------
  383. echo Copy the DirectVA headers and libs
  384. call :GetDXVAFiles
  385. REM --------------------------------------------------------------------------
  386. REM --------------------------------------------------------------------------
  387. REM
  388. REM Step 16: Copy the DInput files to the target locations
  389. REM
  390. REM --------------------------------------------------------------------------
  391. REM --------------------------------------------------------------------------
  392. echo Copy the DInput files to the target location
  393. rem call :GetDInputFiles
  394. REM --------------------------------------------------------------------------
  395. REM --------------------------------------------------------------------------
  396. REM
  397. REM Step 17: Copy the code coverage tool to the extras directory
  398. REM
  399. REM --------------------------------------------------------------------------
  400. REM --------------------------------------------------------------------------
  401. echo Copy the code coverage tool to the target location
  402. call :GetCodeCoverageTool
  403. goto :EOF
  404. REM --------------------------------------------------------------------------
  405. REM --------------------------------------------------------------------------
  406. REM
  407. REM GetReadmeFiles
  408. REM
  409. REM Routine to copy the readme files DDK installation.
  410. REM
  411. REM --------------------------------------------------------------------------
  412. REM --------------------------------------------------------------------------
  413. :GetReadmeFiles
  414. echo Copying readme files to target location %DSTPATH%
  415. copy %SRCPATH%\MultiMedia\DirectX\dxg\ddk\setup\readme.txt %DSTPATH%
  416. copy dxddkver.txt %DSTPATH%
  417. copy %SAMPLEDLL_SRC_PATH%\readme.htm %DSTPATH%\built\perm3
  418. goto :EOF
  419. REM --------------------------------------------------------------------------
  420. REM --------------------------------------------------------------------------
  421. REM
  422. REM GetIncludes
  423. REM
  424. REM Routine to get DDK include files from their published locations and place
  425. REM them in the target location for the DXDDK
  426. REM
  427. REM NOTE: We don't process them as we assume the publication phase of the
  428. REM build process has done this for us
  429. REM
  430. REM --------------------------------------------------------------------------
  431. REM --------------------------------------------------------------------------
  432. :GetIncludes
  433. echo Copying include files to target location %DSTPATH%\inc
  434. REM Ensure the target directory exists
  435. if not exist %DSTPATH%\inc md %DSTPATH%\inc
  436. if not exist %REFRAST_DST_PATH%\inc md %REFRAST_DST_PATH%\inc
  437. copy %SDK_INC_PATH%\d3d.h %DSTPATH%\inc
  438. copy %SDK_INC_PATH%\d3dcaps.h %DSTPATH%\inc
  439. findstr -v -c:"#pragma message" %SDK_INC_PATH%\d3dtypes.h > %DSTPATH%\inc\d3dtypes.h
  440. copy %SDK_INC_PATH%\d3d8.h %DSTPATH%\inc
  441. copy %SDK_INC_PATH%\d3d8caps.h %DSTPATH%\inc
  442. copy %SDK_INC_PATH%\d3d8types.h %DSTPATH%\inc
  443. copy %SDK_INC_PATH%\ddraw.h %DSTPATH%\inc
  444. copy %SDK_INC_PATH%\dx7todx8.h %DSTPATH%\inc
  445. copy %MMDDK_INC_PATH%\d3dnthal.h %DSTPATH%\inc
  446. copy %MMDDK_INC_PATH%\dx95type.h %DSTPATH%\inc
  447. copy %DDK_INC_PATH%\d3dhal.h %DSTPATH%\inc
  448. copy %DDK_INC_PATH%\d3dhalex.h %DSTPATH%\inc
  449. copy %DVP_INC_PATH%\dvp.h %DSTPATH%\inc
  450. copy %OAK_INC_PATH%\dmemmgr.h %DSTPATH%\inc
  451. copy %DVP_INC_PATH%\ddkernel.h %DSTPATH%\inc\win_me
  452. copy %D3D8_INC_PATH%\debugmon.hpp %REFRAST_DST_PATH%\inc
  453. copy %MMI_INC_PATH%\d3ddm.hpp %REFRAST_DST_PATH%\inc
  454. REM This file protects our dirs file from VCCHECK
  455. copy %MMDDK_INC_PATH%\BLOCKDIR %DSTPATH%\src\video\displays
  456. REM Files that need to be processed to strip MS internal stuff out
  457. call :ProcessMSFile %MMDDK_INC_PATH%\ddrawint.h %DSTPATH%\inc\ddrawint.h
  458. call :ProcessDDKFile %MMI_INC_PATH%\ddrawi.h %DSTPATH%\inc\ddrawi.h
  459. call :ProcessMSFile %D3D8_INC_PATH%\d3d8ddi.h %REFRAST_DST_PATH%\inc\d3d8ddi.h
  460. call :ProcessMSFile %MMI_INC_PATH%\d3d8sddi.h %REFRAST_DST_PATH%\inc\d3d8sddi.h
  461. goto :EOF
  462. REM --------------------------------------------------------------------------
  463. REM --------------------------------------------------------------------------
  464. REM
  465. REM GetLibs
  466. REM
  467. REM Routine to get DDK lib files from their built locations and place
  468. REM them in the target location for the DXDDK
  469. REM
  470. REM --------------------------------------------------------------------------
  471. REM --------------------------------------------------------------------------
  472. :GetLibs
  473. echo Copying lib files to target location %DSTPATH%\lib
  474. REM Ensure the target directory exists
  475. if not exist %DSTPATH%\lib md %DSTPATH%\lib
  476. if not exist %DSTPATH%\lib\win_me md %DSTPATH%\lib\win_me
  477. if "%BINSRCPATH%" == "" goto :Done
  478. copy %WIN9XDDRAWPATH%\ddraw.lib %DSTPATH%\lib\win_me
  479. :Done
  480. goto :EOF
  481. REM --------------------------------------------------------------------------
  482. REM --------------------------------------------------------------------------
  483. REM
  484. REM GetRefRast
  485. REM
  486. REM Routine to copy and pre-process the reference rasterizer sources to the
  487. REM target location in the DDK (the target directory being the location of
  488. REM display drivers in the NTDDK).
  489. REM
  490. REM --------------------------------------------------------------------------
  491. REM --------------------------------------------------------------------------
  492. :GetRefRast
  493. echo Publishing RefRast sources to %REFRAST_DST_PATH%
  494. REM ensure the target directories exist
  495. if not exist %REFRAST_DST_PATH% md %REFRAST_DST_PATH%
  496. if not exist %REFRAST_DST_PATH%\common md %REFRAST_DST_PATH%\common
  497. if not exist %REFRAST_DST_PATH%\common\daytona md %REFRAST_DST_PATH%\common\daytona
  498. if not exist %REFRAST_DST_PATH%\common\win9x md %REFRAST_DST_PATH%\common\win9x
  499. if not exist %REFRAST_DST_PATH%\drv md %REFRAST_DST_PATH%\drv
  500. if not exist %REFRAST_DST_PATH%\drv\daytona md %REFRAST_DST_PATH%\drv\daytona
  501. if not exist %REFRAST_DST_PATH%\drv\win9x md %REFRAST_DST_PATH%\drv\win9x
  502. if not exist %REFRAST_DST_PATH%\hop md %REFRAST_DST_PATH%\hop
  503. if not exist %REFRAST_DST_PATH%\hop\daytona md %REFRAST_DST_PATH%\hop\daytona
  504. if not exist %REFRAST_DST_PATH%\hop\win9x md %REFRAST_DST_PATH%\hop\win9x
  505. if not exist %REFRAST_DST_PATH%\tnl md %REFRAST_DST_PATH%\tnl
  506. if not exist %REFRAST_DST_PATH%\tnl\daytona md %REFRAST_DST_PATH%\tnl\daytona
  507. if not exist %REFRAST_DST_PATH%\tnl\win9x md %REFRAST_DST_PATH%\tnl\win9x
  508. if not exist %REFRAST_DST_PATH%\rast md %REFRAST_DST_PATH%\rast
  509. if not exist %REFRAST_DST_PATH%\rast\daytona md %REFRAST_DST_PATH%\rast\daytona
  510. if not exist %REFRAST_DST_PATH%\rast\win9x md %REFRAST_DST_PATH%\rast\win9x
  511. if not exist %REFRAST_DST_PATH%\link md %REFRAST_DST_PATH%\link
  512. if not exist %REFRAST_DST_PATH%\link\daytona md %REFRAST_DST_PATH%\link\daytona
  513. if not exist %REFRAST_DST_PATH%\link\win9x md %REFRAST_DST_PATH%\link\win9x
  514. REM inc directory
  515. for /F "usebackq" %%i in (`dir %REFRAST_SRC_PATH%\inc\*.hpp %REFRAST_SRC_PATH%\inc\*.h /b /a-d-h`) do (
  516. call :ProcessMSFile %REFRAST_SRC_PATH%\inc\%%i,%REFRAST_DST_PATH%\inc\%%i
  517. )
  518. REM common directory
  519. for /F "usebackq" %%i in (`dir %REFRAST_SRC_PATH%\common\*.cpp /b /a-d-h`) do (
  520. call :ProcessMSFile %REFRAST_SRC_PATH%\common\%%i,%REFRAST_DST_PATH%\common\%%i
  521. )
  522. copy %REFRAST_SRC_PATH%\common\sources.inc %REFRAST_DST_PATH%\common\sources.inc
  523. copy %REFRAST_SRC_PATH%\common\dirs %REFRAST_DST_PATH%\common\dirs
  524. copy %REFRAST_SRC_PATH%\common\daytona\makefile %REFRAST_DST_PATH%\common\daytona\makefile
  525. copy %REFRAST_SRC_PATH%\common\daytona\sources %REFRAST_DST_PATH%\common\daytona\sources
  526. copy %REFRAST_SRC_PATH%\common\win9x\makefile %REFRAST_DST_PATH%\common\win9x\makefile
  527. copy %REFRAST_SRC_PATH%\common\win9x\sources %REFRAST_DST_PATH%\common\win9x\sources
  528. REM drv directory
  529. for /F "usebackq" %%i in (`dir %REFRAST_SRC_PATH%\drv\*.cpp %REFRAST_SRC_PATH%\drv\*.hpp %REFRAST_SRC_PATH%\drv\*.c /b /a-d-h`) do (
  530. call :ProcessMSFile %REFRAST_SRC_PATH%\drv\%%i,%REFRAST_DST_PATH%\drv\%%i
  531. )
  532. copy %REFRAST_SRC_PATH%\drv\sources.inc %REFRAST_DST_PATH%\drv\sources.inc
  533. copy %REFRAST_SRC_PATH%\drv\dirs %REFRAST_DST_PATH%\drv\dirs
  534. copy %REFRAST_SRC_PATH%\drv\daytona\makefile %REFRAST_DST_PATH%\drv\daytona\makefile
  535. copy %REFRAST_SRC_PATH%\drv\daytona\sources %REFRAST_DST_PATH%\drv\daytona\sources
  536. copy %REFRAST_SRC_PATH%\drv\win9x\makefile %REFRAST_DST_PATH%\drv\win9x\makefile
  537. copy %REFRAST_SRC_PATH%\drv\win9x\sources %REFRAST_DST_PATH%\drv\win9x\sources
  538. REM hop directory
  539. for /F "usebackq" %%i in (`dir %REFRAST_SRC_PATH%\hop\*.cpp %REFRAST_SRC_PATH%\hop\*.hpp /b /a-d-h`) do (
  540. call :ProcessMSFile %REFRAST_SRC_PATH%\hop\%%i,%REFRAST_DST_PATH%\hop\%%i
  541. )
  542. copy %REFRAST_SRC_PATH%\hop\sources.inc %REFRAST_DST_PATH%\hop\sources.inc
  543. copy %REFRAST_SRC_PATH%\hop\dirs %REFRAST_DST_PATH%\hop\dirs
  544. copy %REFRAST_SRC_PATH%\hop\daytona\makefile %REFRAST_DST_PATH%\hop\daytona\makefile
  545. copy %REFRAST_SRC_PATH%\hop\daytona\sources %REFRAST_DST_PATH%\hop\daytona\sources
  546. copy %REFRAST_SRC_PATH%\hop\win9x\makefile %REFRAST_DST_PATH%\hop\win9x\makefile
  547. copy %REFRAST_SRC_PATH%\hop\win9x\sources %REFRAST_DST_PATH%\hop\win9x\sources
  548. REM tnl directory
  549. for /F "usebackq" %%i in (`dir %REFRAST_SRC_PATH%\tnl\*.cpp %REFRAST_SRC_PATH%\tnl\*.hpp %REFRAST_SRC_PATH%\tnl\*.h /b /a-d-h`) do (
  550. call :ProcessMSFile %REFRAST_SRC_PATH%\tnl\%%i,%REFRAST_DST_PATH%\tnl\%%i
  551. )
  552. copy %REFRAST_SRC_PATH%\tnl\sources.inc %REFRAST_DST_PATH%\tnl\sources.inc
  553. copy %REFRAST_SRC_PATH%\tnl\dirs %REFRAST_DST_PATH%\tnl\dirs
  554. copy %REFRAST_SRC_PATH%\tnl\daytona\makefile %REFRAST_DST_PATH%\tnl\daytona\makefile
  555. copy %REFRAST_SRC_PATH%\tnl\daytona\sources %REFRAST_DST_PATH%\tnl\daytona\sources
  556. copy %REFRAST_SRC_PATH%\tnl\win9x\makefile %REFRAST_DST_PATH%\tnl\win9x\makefile
  557. copy %REFRAST_SRC_PATH%\tnl\win9x\sources %REFRAST_DST_PATH%\tnl\win9x\sources
  558. REM rast directory
  559. for /F "usebackq" %%i in (`dir %REFRAST_SRC_PATH%\rast\*.cpp %REFRAST_SRC_PATH%\rast\*.hpp /b /a-d-h`) do (
  560. call :ProcessMSFile %REFRAST_SRC_PATH%\rast\%%i,%REFRAST_DST_PATH%\rast\%%i
  561. )
  562. copy %REFRAST_SRC_PATH%\rast\sources.inc %REFRAST_DST_PATH%\rast\sources.inc
  563. copy %REFRAST_SRC_PATH%\rast\dirs %REFRAST_DST_PATH%\rast\dirs
  564. copy %REFRAST_SRC_PATH%\rast\daytona\makefile %REFRAST_DST_PATH%\rast\daytona\makefile
  565. copy %REFRAST_SRC_PATH%\rast\daytona\sources %REFRAST_DST_PATH%\rast\daytona\sources
  566. copy %REFRAST_SRC_PATH%\rast\win9x\makefile %REFRAST_DST_PATH%\rast\win9x\makefile
  567. copy %REFRAST_SRC_PATH%\rast\win9x\sources %REFRAST_DST_PATH%\rast\win9x\sources
  568. REM link directory
  569. for /F "usebackq" %%i in (`dir %REFRAST_SRC_PATH%\link\*.rc %REFRAST_SRC_PATH%\link\*.def /b /a-d-h`) do (
  570. call :ProcessMSFile %REFRAST_SRC_PATH%\link\%%i,%REFRAST_DST_PATH%\link\%%i
  571. )
  572. copy %REFRAST_SRC_PATH%\link\sources.inc %REFRAST_DST_PATH%\link\sources.inc
  573. copy %REFRAST_SRC_PATH%\link\dirs %REFRAST_DST_PATH%\link\dirs
  574. copy %REFRAST_SRC_PATH%\link\daytona\makefile %REFRAST_DST_PATH%\link\daytona\makefile
  575. copy %REFRAST_SRC_PATH%\link\daytona\sources %REFRAST_DST_PATH%\link\daytona\sources
  576. copy %REFRAST_SRC_PATH%\link\win9x\makefile %REFRAST_DST_PATH%\link\win9x\makefile
  577. copy %REFRAST_SRC_PATH%\link\win9x\sources %REFRAST_DST_PATH%\link\win9x\sources
  578. REM root directory
  579. for /F "usebackq" %%i in (`dir %REFRAST_SRC_PATH%\*. /b /a-d-h`) do (
  580. call :ProcessMSFile %REFRAST_SRC_PATH%\%%i,%REFRAST_DST_PATH%\%%i
  581. )
  582. copy %REFRAST_SRC_PATH%\ddkref.mk %REFRAST_DST_PATH%\ref.mk
  583. copy %REFRAST_SRC_PATH%\ntref.mk %REFRAST_DST_PATH%\ntref.mk
  584. copy %REFRAST_SRC_PATH%\win9xref.mk %REFRAST_DST_PATH%\win9xref.mk
  585. goto :EOF
  586. REM --------------------------------------------------------------------------
  587. REM --------------------------------------------------------------------------
  588. REM
  589. REM GetMiniportSample
  590. REM
  591. REM Routine to copy and pre-process the sample minport sources to the
  592. REM target location in the DDK (the target directory being the location of
  593. REM display drivers in the NTDDK).
  594. REM
  595. REM --------------------------------------------------------------------------
  596. REM --------------------------------------------------------------------------
  597. :GetMiniportSample
  598. echo Publishing sample driver miniport sources to %SAMPLESYS_DST_PATH%
  599. REM ensure the target directories exist
  600. if not exist %SAMPLESYS_DST_PATH% md %SAMPLESYS_DST_PATH%
  601. REM the miniport sources
  602. for /F "usebackq" %%i in (`dir %SAMPLESYS_SRC_PATH%\*.c %SAMPLESYS_SRC_PATH%\*.h %SAMPLESYS_SRC_PATH%\*.inf %SAMPLESYS_SRC_PATH%\*.sys %SAMPLESYS_SRC_PATH%\*.rc /b /a-d-h`) do (
  603. call :ProcessDDKFile %SAMPLESYS_SRC_PATH%\%%i,%SAMPLESYS_DST_PATH%\%%i
  604. )
  605. REM get the makefile and sources file
  606. copy %SAMPLESYS_SRC_PATH%\makefile %SAMPLESYS_DST_PATH%\makefile
  607. copy %SAMPLESYS_SRC_PATH%\sources.ddk %SAMPLESYS_DST_PATH%\sources
  608. copy %SAMPLESYS_SRC_PATH%\perm3.ddk %SAMPLESYS_DST_PATH%\perm3.inf
  609. goto :EOF
  610. REM --------------------------------------------------------------------------
  611. REM --------------------------------------------------------------------------
  612. REM
  613. REM GetDriverSample
  614. REM
  615. REM Routine to copy and pre-process the sample drivers sources to the
  616. REM target location in the DDK (the target directory being the location of
  617. REM display drivers in the NTDDK).
  618. REM
  619. REM --------------------------------------------------------------------------
  620. REM --------------------------------------------------------------------------
  621. :GetDriverSample
  622. echo Publishing sample driver miniport sources to %SAMPLESYS_DST_PATH%
  623. REM ensure the target directories exist
  624. if not exist %SAMPLEDLL_DST_PATH% md %SAMPLEDLL_DST_PATH%
  625. if not exist %SAMPLEDLL_DST_PATH%\dx md %SAMPLEDLL_DST_PATH%\dx
  626. if not exist %SAMPLEDLL_DST_PATH%\dx\win9x md %SAMPLEDLL_DST_PATH%\dx\win9x
  627. if not exist %SAMPLEDLL_DST_PATH%\gdi md %SAMPLEDLL_DST_PATH%\gdi
  628. if not exist %SAMPLEDLL_DST_PATH%\inc md %SAMPLEDLL_DST_PATH%\inc
  629. if not exist %SAMPLEDLL_DST_PATH%\dbgdisp md %SAMPLEDLL_DST_PATH%\dbgdisp
  630. REM the readme
  631. copy %SAMPLEDLL_SRC_PATH%\perm3.htm %SAMPLEDLL_DST_PATH%
  632. REM the dx directory
  633. for /F "usebackq" %%i in (`dir %SAMPLEDLL_SRC_PATH%\dx\*.c %SAMPLEDLL_SRC_PATH%\dx\*.h /b /a-d-h`) do (
  634. call :ProcessDDKFile %SAMPLEDLL_SRC_PATH%\dx\%%i,%SAMPLEDLL_DST_PATH%\dx\%%i
  635. )
  636. REM get the makefile and sources file
  637. copy %SAMPLEDLL_SRC_PATH%\dx\makefile %SAMPLEDLL_DST_PATH%\dx\makefile
  638. copy %SAMPLEDLL_SRC_PATH%\dx\sources.ddk %SAMPLEDLL_DST_PATH%\dx\sources
  639. REM the gdi directory
  640. for /F "usebackq" %%i in (`dir %SAMPLEDLL_SRC_PATH%\gdi\*.c %SAMPLEDLL_SRC_PATH%\gdi\*.h %SAMPLEDLL_SRC_PATH%\gdi\*.rc /b /a-d-h`) do (
  641. call :ProcessDDKFile %SAMPLEDLL_SRC_PATH%\gdi\%%i,%SAMPLEDLL_DST_PATH%\gdi\%%i
  642. )
  643. REM get the makefile and sources file
  644. copy %SAMPLEDLL_SRC_PATH%\gdi\makefile %SAMPLEDLL_DST_PATH%\gdi\makefile
  645. copy %SAMPLEDLL_SRC_PATH%\gdi\sources.ddk %SAMPLEDLL_DST_PATH%\gdi\sources
  646. REM the inc directory
  647. for /F "usebackq" %%i in (`dir %SAMPLEDLL_SRC_PATH%\inc\*.h /b /a-d-h`) do (
  648. call :ProcessDDKFile %SAMPLEDLL_SRC_PATH%\inc\%%i,%SAMPLEDLL_DST_PATH%\inc\%%i
  649. )
  650. REM the dbgdisp directory
  651. for /F "usebackq" %%i in (`dir %SAMPLEDLL_SRC_PATH%\dbgdisp\*.c %SAMPLEDLL_SRC_PATH%\dbgdisp\*.rc /b /a-d-h`) do (
  652. call :ProcessDDKFile %SAMPLEDLL_SRC_PATH%\dbgdisp\%%i,%SAMPLEDLL_DST_PATH%\dbgdisp\%%i
  653. )
  654. REM get the makefile and sources file
  655. REM copy %SAMPLEDLL_SRC_PATH%\dbgdisp\makefile %SAMPLEDLL_DST_PATH%\dbgdisp\makefile
  656. REM copy %SAMPLEDLL_SRC_PATH%\dbgdisp\sources %SAMPLEDLL_DST_PATH%\dbgdisp\sources
  657. REM get the dirs file
  658. copy %SAMPLEDLL_SRC_PATH%\dirs %SAMPLEDLL_DST_PATH%\dirs
  659. REM get the win9x part
  660. for /F "usebackq" %%i in (`dir %SAMPLEDLL_SRC_PATH%\dx\win9x\*.c %SAMPLEDLL_SRC_PATH%\dx\win9x\*.h /b /a-d-h`) do (
  661. call :ProcessDDKFile %SAMPLEDLL_SRC_PATH%\dx\win9x\%%i,%SAMPLEDLL_DST_PATH%\dx\win9x\%%i
  662. )
  663. copy %SAMPLEDLL_SRC_PATH%\dx\win9x\makefile %SAMPLEDLL_DST_PATH%\dx\win9x\makefile
  664. copy %SAMPLEDLL_SRC_PATH%\dx\win9x\sources.ddk %SAMPLEDLL_DST_PATH%\dx\win9x\sources
  665. copy %SAMPLEDLL_SRC_PATH%\dx\win9x\perm3dd.def %SAMPLEDLL_DST_PATH%\dx\win9x\perm3dd.def
  666. copy %SAMPLEDLL_SRC_PATH%\dx\win9x\perm3dd.rc %SAMPLEDLL_DST_PATH%\dx\win9x\perm3dd.rc
  667. goto :EOF
  668. REM --------------------------------------------------------------------------
  669. REM --------------------------------------------------------------------------
  670. REM
  671. REM GetWin9xGlobalFiles
  672. REM
  673. REM Copy the help files to thier target locations
  674. REM
  675. REM --------------------------------------------------------------------------
  676. REM --------------------------------------------------------------------------
  677. :GetWin9xGlobalFiles
  678. echo Publishing Win9x global files
  679. if not exist %DSTPATH%\src\win_me\display\mini\res md %DSTPATH%\src\win_me\display\mini\res
  680. copy %WIN9XDRVSRCPATH%\mini\res\*.asm %DSTPATH%\src\win_me\display\mini\res
  681. copy %WIN9XDRVSRCPATH%\mini\res\*.bin %DSTPATH%\src\win_me\display\mini\res
  682. copy %WIN9XDRVSRCPATH%\mini\res\makefile %DSTPATH%\src\win_me\display\mini\res
  683. for /F "usebackq" %%i in (`dir %WIN9XDRVSRCPATH%\mini\*.mk /b /a-d-h`) do (
  684. call :ProcessMSFile %WIN9XDRVSRCPATH%\mini\%%i,%DSTPATH%\src\win_me\display\mini\%%i
  685. )
  686. for /F "usebackq" %%i in (`dir %WIN9XDRVSRCPATH%\minivdd\*.mk /b /a-d-h`) do (
  687. call :ProcessMSFile %WIN9XDRVSRCPATH%\minivdd\%%i,%DSTPATH%\src\win_me\display\minivdd\%%i
  688. )
  689. goto :EOF
  690. REM --------------------------------------------------------------------------
  691. REM --------------------------------------------------------------------------
  692. REM
  693. REM GetWin9xDisplaySample
  694. REM
  695. REM Copy the help files to thier target locations
  696. REM
  697. REM --------------------------------------------------------------------------
  698. REM --------------------------------------------------------------------------
  699. :GetWin9xDisplaySample
  700. echo Publishing sample Win9x display driver sources to %SAMPLEDISP_DST_PATH%
  701. REM ensure the target directories exist
  702. if not exist %SAMPLEDISP_DST_PATH% md %SAMPLEDISP_DST_PATH%
  703. if not exist %SAMPLEDISP_DST_PATH%\inc md %SAMPLEDISP_DST_PATH%\inc
  704. if not exist %SAMPLEDISP_DST_PATH%\drv md %SAMPLEDISP_DST_PATH%\drv
  705. if not exist %SAMPLEDISP_DST_PATH%\install md %SAMPLEDISP_DST_PATH%\install
  706. REM the inc directory
  707. for /F "usebackq" %%i in (`dir %SAMPLEDISP_SRC_PATH%\inc\*.h %SAMPLEDISP_SRC_PATH%\inc\*.inc /b /a-d-h`) do (
  708. call :ProcessDDKFile %SAMPLEDISP_SRC_PATH%\inc\%%i,%SAMPLEDISP_DST_PATH%\inc\%%i
  709. )
  710. REM the drv directory
  711. for /F "usebackq" %%i in (`dir %SAMPLEDISP_SRC_PATH%\drv\*.h %SAMPLEDISP_SRC_PATH%\drv\*.inc /b /a-d-h`) do (
  712. call :ProcessDDKFile %SAMPLEDISP_SRC_PATH%\drv\%%i,%SAMPLEDISP_DST_PATH%\drv\%%i
  713. )
  714. for /F "usebackq" %%i in (`dir %SAMPLEDISP_SRC_PATH%\drv\*.asm %SAMPLEDISP_SRC_PATH%\drv\*.c /b /a-d-h`) do (
  715. call :ProcessDDKFile %SAMPLEDISP_SRC_PATH%\drv\%%i,%SAMPLEDISP_DST_PATH%\drv\%%i
  716. )
  717. call :ProcessMSFile %SAMPLEDISP_SRC_PATH%\drv\makefile.ddk %SAMPLEDISP_DST_PATH%\drv\makefile
  718. copy %SAMPLEDISP_SRC_PATH%\drv\perm3gdi.rc %SAMPLEDISP_DST_PATH%\drv\perm3gdi.rc
  719. copy %SAMPLEDISP_SRC_PATH%\drv\perm3gdi.def %SAMPLEDISP_DST_PATH%\drv\perm3gdi.def
  720. REM the install directory
  721. copy %SAMPLEDISP_SRC_PATH%\install\perm3.inf %SAMPLEDISP_DST_PATH%\install\perm3.inf
  722. goto :EOF
  723. REM --------------------------------------------------------------------------
  724. REM --------------------------------------------------------------------------
  725. REM
  726. REM GetWin9xMiniVDDSample
  727. REM
  728. REM Copy the help files to thier target locations
  729. REM
  730. REM --------------------------------------------------------------------------
  731. REM --------------------------------------------------------------------------
  732. :GetWin9xMiniVDDSample
  733. echo Publishing sample Win9x minivdd sources to %SAMPLEMVD_DST_PATH%
  734. REM ensure the target directories exist
  735. if not exist %SAMPLEMVD_DST_PATH% md %SAMPLEMVD_DST_PATH%
  736. for /F "usebackq" %%i in (`dir %SAMPLEMVD_SRC_PATH%\*.h %SAMPLEMVD_SRC_PATH%\*.inc /b /a-d-h`) do (
  737. call :ProcessDDKFile %SAMPLEMVD_SRC_PATH%\%%i,%SAMPLEMVD_DST_PATH%\%%i
  738. )
  739. for /F "usebackq" %%i in (`dir %SAMPLEMVD_SRC_PATH%\*.asm %SAMPLEMVD_SRC_PATH%\*.c /b /a-d-h`) do (
  740. call :ProcessDDKFile %SAMPLEMVD_SRC_PATH%\%%i,%SAMPLEMVD_DST_PATH%\%%i
  741. )
  742. call :ProcessMSFile %SAMPLEMVD_SRC_PATH%\makefile.ddk %SAMPLEMVD_DST_PATH%\makefile
  743. copy %SAMPLEMVD_SRC_PATH%\perm3mvd.rc %SAMPLEMVD_DST_PATH%\perm3mvd.rc
  744. copy %SAMPLEMVD_SRC_PATH%\perm3mvd.def %SAMPLEMVD_DST_PATH%\perm3mvd.def
  745. goto :EOF
  746. REM --------------------------------------------------------------------------
  747. REM --------------------------------------------------------------------------
  748. REM
  749. REM GetDInputFiles
  750. REM
  751. REM Copy the DInput files to the target location
  752. REM
  753. REM --------------------------------------------------------------------------
  754. REM --------------------------------------------------------------------------
  755. :GetDInputFiles
  756. echo Copy DInput Files to %DSTPATH%\input
  757. REM ensure the target DInput directory structure exists
  758. if not exist %DINPUT_DST_PATH% md %DINPUT_DST_PATH%
  759. if not exist %DINPUT_DST_PATH%\Samples md %DINPUT_DST_PATH%\Samples
  760. if not exist %DINPUT_DST_PATH%\Samples\src md %DINPUT_DST_PATH%\Samples\src
  761. if not exist %DINPUT_DST_PATH%\Samples\src\cplsvr1 md %DINPUT_DST_PATH%\Samples\src\cplsvr1
  762. if not exist %DINPUT_DST_PATH%\Samples\src\digijoy md %DINPUT_DST_PATH%\Samples\src\digijoy
  763. if not exist %DINPUT_DST_PATH%\Samples\src\digijoy\i386 md %DINPUT_DST_PATH%\Samples\src\digijoy\i386
  764. if not exist %DINPUT_DST_PATH%\Samples\src\ffdrv1 md %DINPUT_DST_PATH%\Samples\src\ffdrv1
  765. if not exist %DINPUT_DST_PATH%\Samples\bin md %DINPUT_DST_PATH%\Samples\bin
  766. if not exist %DINPUT_DST_PATH%\Tools md %DINPUT_DST_PATH%\Tools
  767. if not exist %DINPUT_DST_PATH%\Doc md %DINPUT_DST_PATH%\Doc
  768. REM copy the DInput docs
  769. copy %DINPUT_SRC_PATH%\doc\di_ddk.doc %DINPUT_DST_PATH%\doc
  770. REM copy the DInput sample files
  771. copy %DINPUT_SRC_PATH%\Samples\dirs %DINPUT_DST_PATH%\Samples\src
  772. copy %DINPUT_SRC_PATH%\Samples\cplsvr1\*.ico %DINPUT_DST_PATH%\Samples\src\cplsvr1
  773. copy %DINPUT_SRC_PATH%\Samples\cplsvr1\*.cpp %DINPUT_DST_PATH%\Samples\src\cplsvr1
  774. copy %DINPUT_SRC_PATH%\Samples\cplsvr1\*.def %DINPUT_DST_PATH%\Samples\src\cplsvr1
  775. copy %DINPUT_SRC_PATH%\Samples\cplsvr1\*.dsp %DINPUT_DST_PATH%\Samples\src\cplsvr1
  776. copy %DINPUT_SRC_PATH%\Samples\cplsvr1\*.h %DINPUT_DST_PATH%\Samples\src\cplsvr1
  777. copy %DINPUT_SRC_PATH%\Samples\cplsvr1\*.htm %DINPUT_DST_PATH%\Samples\src\cplsvr1
  778. copy %DINPUT_SRC_PATH%\Samples\cplsvr1\*.inf %DINPUT_DST_PATH%\Samples\src\cplsvr1
  779. copy %DINPUT_SRC_PATH%\Samples\cplsvr1\*.mak %DINPUT_DST_PATH%\Samples\src\cplsvr1
  780. copy %DINPUT_SRC_PATH%\Samples\cplsvr1\*.plg %DINPUT_DST_PATH%\Samples\src\cplsvr1
  781. copy %DINPUT_SRC_PATH%\Samples\cplsvr1\*.rc %DINPUT_DST_PATH%\Samples\src\cplsvr1
  782. copy %DINPUT_SRC_PATH%\Samples\cplsvr1\*.txt %DINPUT_DST_PATH%\Samples\src\cplsvr1
  783. copy %DINPUT_SRC_PATH%\Samples\cplsvr1\makefile %DINPUT_DST_PATH%\Samples\src\cplsvr1
  784. copy %DINPUT_SRC_PATH%\Samples\cplsvr1\sources %DINPUT_DST_PATH%\Samples\src\cplsvr1
  785. copy %DINPUT_SRC_PATH%\Samples\ffdrv1\*.c %DINPUT_DST_PATH%\Samples\src\ffdrv1
  786. copy %DINPUT_SRC_PATH%\Samples\ffdrv1\*.mk %DINPUT_DST_PATH%\Samples\src\ffdrv1
  787. copy %DINPUT_SRC_PATH%\Samples\ffdrv1\*.h %DINPUT_DST_PATH%\Samples\src\ffdrv1
  788. copy %DINPUT_SRC_PATH%\Samples\ffdrv1\*.def %DINPUT_DST_PATH%\Samples\src\ffdrv1
  789. copy %DINPUT_SRC_PATH%\Samples\ffdrv1\*.inf %DINPUT_DST_PATH%\Samples\src\ffdrv1
  790. copy %DINPUT_SRC_PATH%\Samples\ffdrv1\*.rc %DINPUT_DST_PATH%\Samples\src\ffdrv1
  791. copy %DINPUT_SRC_PATH%\Samples\ffdrv1\*.wat %DINPUT_DST_PATH%\Samples\src\ffdrv1
  792. copy %DINPUT_SRC_PATH%\Samples\ffdrv1\*.txt %DINPUT_DST_PATH%\Samples\src\ffdrv1
  793. copy %DINPUT_SRC_PATH%\Samples\ffdrv1\makefile %DINPUT_DST_PATH%\Samples\src\ffdrv1
  794. copy %DINPUT_SRC_PATH%\Samples\ffdrv1\makefile1 %DINPUT_DST_PATH%\Samples\src\ffdrv1
  795. copy %DINPUT_SRC_PATH%\Samples\ffdrv1\sources %DINPUT_DST_PATH%\Samples\src\ffdrv1
  796. copy %DINPUT_SRC_PATH%\Samples\digijoy\*.inf %DINPUT_DST_PATH%\Samples\src\digijoy
  797. copy %DINPUT_SRC_PATH%\Samples\digijoy\*.inc %DINPUT_DST_PATH%\Samples\src\digijoy
  798. copy %DINPUT_SRC_PATH%\Samples\digijoy\*.txt %DINPUT_DST_PATH%\Samples\src\digijoy
  799. copy %DINPUT_SRC_PATH%\Samples\digijoy\*.h %DINPUT_DST_PATH%\Samples\src\digijoy
  800. copy %DINPUT_SRC_PATH%\Samples\digijoy\makefile %DINPUT_DST_PATH%\Samples\src\digijoy
  801. copy %DINPUT_SRC_PATH%\Samples\digijoy\sources %DINPUT_DST_PATH%\Samples\src\digijoy
  802. copy %DINPUT_SRC_PATH%\Samples\digijoy\i386\*.c %DINPUT_DST_PATH%\Samples\src\digijoy\i386
  803. copy %DINPUT_SRC_PATH%\Samples\digijoy\i386\*.asm %DINPUT_DST_PATH%\Samples\src\digijoy\i386
  804. copy %DINPUT_SRC_PATH%\Samples\digijoy\i386\*.h %DINPUT_DST_PATH%\Samples\src\digijoy\i386
  805. copy %DINPUT_SRC_PATH%\Samples\digijoy\i386\*.inc %DINPUT_DST_PATH%\Samples\src\digijoy\i386
  806. copy %DINPUT_TOL_PATH%\dimapcfg.doc %DINPUT_DST_PATH%\Tools
  807. if exist %BINSRCPATH%\diactfrd.dll copy /y %BINSRCPATH%\diactfrd.dll %BINSRCPATH%\diactfrm.dll
  808. if exist %BINSRCPATH%\win9x\diactfrd.dll copy /y %BINSRCPATH%\win9x\diactfrd.dll %BINSRCPATH%\win9x\diactfrm.dll
  809. if "%BINSRCPATH%" == "" goto :Done
  810. copy %DIMAPPATH%\dimapcfg.exe %DINPUT_DST_PATH%\Tools
  811. copy %DIMAPPATH%\genre.ini %DINPUT_DST_PATH%\Tools
  812. :Done
  813. goto :EOF
  814. REM --------------------------------------------------------------------------
  815. REM --------------------------------------------------------------------------
  816. REM
  817. REM GetHelpFiles
  818. REM
  819. REM Copy the help files to thier target locations
  820. REM
  821. REM --------------------------------------------------------------------------
  822. REM --------------------------------------------------------------------------
  823. :GetHelpFiles
  824. echo Copy help files to %DSTPATH%\help
  825. REM ensure the target directories exist
  826. if not exist %DSTPATH%\help md %DSTPATH%\help
  827. copy %SRCPATH%\MultiMedia\DirectX\dxg\ddk\help\dxddk.chm %DSTPATH%\help
  828. REM copy %SRCPATH%\MultiMedia\DirectX\dxg\ddk\help\D3D8FuncSpec81.doc %DSTPATH%\help
  829. REM Also copy the DDI Spec (at least until all this information is in the
  830. REM help files
  831. rem copy %SRCPATH%\MultiMedia\DirectX\dxg\ddk\spec\*.* %DSTPATH%\help
  832. REM Also copy the DInput Mapper Config docs.
  833. copy %SRCPATH%\MultiMedia\DirectX\DInput\DIMapCfg\dimapcfg.doc %DSTPATH%\help
  834. goto :EOF
  835. REM --------------------------------------------------------------------------
  836. REM --------------------------------------------------------------------------
  837. REM
  838. REM GetKSFiles
  839. REM
  840. REM Copy the KS headers and libraries to the target locations
  841. REM
  842. REM --------------------------------------------------------------------------
  843. REM --------------------------------------------------------------------------
  844. :GetKSFiles
  845. echo Copy KS files
  846. REM Copy the headers from published\genxddk
  847. call :ProcessDDKFile %SRCPATH%\multimedia\Directx\redist\dx8\Dx8Final\inc\ks.h %DSTPATH%\inc\ks.h
  848. copy %SRCPATH%\multimedia\Directx\redist\dx8\Dx8Final\inc\kcom.h %DSTPATH%\inc
  849. copy %SRCPATH%\multimedia\Directx\redist\dx8\Dx8Final\inc\ksguid.h %DSTPATH%\inc
  850. copy %SRCPATH%\multimedia\Directx\redist\dx8\Dx8Final\inc\ksmedia.h %DSTPATH%\inc
  851. copy %SRCPATH%\multimedia\Directx\redist\dx8\Dx8Final\inc\ksproxy.h %DSTPATH%\inc
  852. REM Copy the headers from public\sdk\inc
  853. copy %SRCPATH%\public\sdk\inc\ksuuids.h %DSTPATH%\inc
  854. REM Copy the headers from public\ddk\inc\wdm
  855. copy %SRCPATH%\published\ddk\inc\wdm\strmini.h %DSTPATH%\inc
  856. REM Copy the libs from public\ddk\lib
  857. copy %SRCPATH%\public\ddk\lib\i386\ks.lib %DSTPATH%\lib
  858. copy %SRCPATH%\public\ddk\lib\i386\ksguid.lib %DSTPATH%\lib
  859. copy %SRCPATH%\public\ddk\lib\i386\stream.lib %DSTPATH%\lib
  860. REM Copy the libs from public\sdk\lib
  861. copy %SRCPATH%\public\sdk\lib\i386\ksuser.lib %DSTPATH%\lib
  862. goto :EOF
  863. REM --------------------------------------------------------------------------
  864. REM --------------------------------------------------------------------------
  865. REM
  866. REM GetBDAFiles
  867. REM
  868. REM Copy the BDA headers, libraries and samples to the target locations
  869. REM
  870. REM --------------------------------------------------------------------------
  871. REM --------------------------------------------------------------------------
  872. :GetBDAFiles
  873. echo Copy BDA files
  874. REM ensure the target directories exist
  875. if not exist %DSTPATH%\src\wdm md %DSTPATH%\src\wdm
  876. if not exist %DSTPATH%\src\wdm\bda md %DSTPATH%\src\wdm\bda
  877. if not exist %DSTPATH%\src\wdm\bda\MauiTune md %DSTPATH%\src\wdm\bda\MauiTune
  878. REM Copy the headers from publicsdk\amovie\inc
  879. copy %SRCPATH%\public\sdk\amovie\inc\bdamedia.h %DSTPATH%\inc
  880. copy %SRCPATH%\public\sdk\amovie\inc\bdatypes.h %DSTPATH%\inc
  881. copy %SRCPATH%\public\sdk\amovie\inc\atsmedia.h %DSTPATH%\inc
  882. REM Copy files from public\sdk\inc
  883. copy %SRCPATH%\public\sdk\inc\macwin32.h %DSTPATH%\inc
  884. REM Copy files from public\ddk\inc\wdm
  885. copy %SRCPATH%\public\ddk\inc\wdm\bdasup.h %DSTPATH%\inc
  886. REM Copy the libs from public\ddk\lib
  887. copy %SRCPATH%\public\ddk\lib\i386\bdasup.lib %DSTPATH%\lib
  888. REM Copy the MauiTune sample
  889. copy %SRCPATH%\drivers\wdm\bda\samples\MauiTune\*.cpp %DSTPATH%\src\wdm\bda\MauiTune
  890. copy %SRCPATH%\drivers\wdm\bda\samples\MauiTune\*.c %DSTPATH%\src\wdm\bda\MauiTune
  891. copy %SRCPATH%\drivers\wdm\bda\samples\MauiTune\*.h %DSTPATH%\src\wdm\bda\MauiTune
  892. copy %SRCPATH%\drivers\wdm\bda\samples\MauiTune\*.rc %DSTPATH%\src\wdm\bda\MauiTune
  893. copy %SRCPATH%\drivers\wdm\bda\samples\MauiTune\*.inf %DSTPATH%\src\wdm\bda\MauiTune
  894. copy %SRCPATH%\drivers\wdm\bda\samples\MauiTune\makefile %DSTPATH%\src\wdm\bda\MauiTune
  895. copy %SRCPATH%\drivers\wdm\bda\samples\MauiTune\sources.ddk %DSTPATH%\src\wdm\bda\MauiTune\sources
  896. goto :EOF
  897. REM --------------------------------------------------------------------------
  898. REM --------------------------------------------------------------------------
  899. REM
  900. REM GetDXVAFiles
  901. REM
  902. REM Copy the DirectVA headers, libraries and samples to the target locations
  903. REM
  904. REM --------------------------------------------------------------------------
  905. REM --------------------------------------------------------------------------
  906. :GetDXVAFiles
  907. echo Copy DXVA files
  908. REM ensure the target directories exist
  909. if not exist %DSTPATH%\src\wdm md %DSTPATH%\src\wdm
  910. if not exist %DSTPATH%\src\wdm\dxva md %DSTPATH%\src\wdm\dxva
  911. if not exist %DSTPATH%\src\wdm\dxva\avstest md %DSTPATH%\src\wdm\dxva\avstest
  912. REM Copy the AVSTest sample
  913. copy %SRCPATH%\drivers\ksfilter\tests\avstest\*.cpp %DSTPATH%\src\wdm\dxva\avstest
  914. copy %SRCPATH%\drivers\ksfilter\tests\avstest\*.h %DSTPATH%\src\wdm\dxva\avstest
  915. copy %SRCPATH%\drivers\ksfilter\tests\avstest\*.rc %DSTPATH%\src\wdm\dxva\avstest
  916. copy %SRCPATH%\drivers\ksfilter\tests\avstest\*.inf %DSTPATH%\src\wdm\dxva\avstest
  917. copy %SRCPATH%\drivers\ksfilter\tests\avstest\sources.ddk %DSTPATH%\src\wdm\dxva\avstest\sources
  918. copy %SRCPATH%\drivers\ksfilter\tests\avstest\makefile %DSTPATH%\src\wdm\dxva\avstest
  919. goto :EOF
  920. REM --------------------------------------------------------------------------
  921. REM --------------------------------------------------------------------------
  922. REM
  923. REM GetCodeCoverageTool
  924. REM
  925. REM Copy the code coverage tool over to the extras directory
  926. REM
  927. REM --------------------------------------------------------------------------
  928. REM --------------------------------------------------------------------------
  929. :GetCodeCoverageTool
  930. echo Copy Code Coverage Tool
  931. REM ensure the target directories exist
  932. if not exist %DSTPATH%\extras\tools\codecover md %DSTPATH%\extras\tools\codecover
  933. REM Copy the code coverage tool
  934. copy %SRCPATH%\multimedia\DirectX\dxddk\extras\tools\codecover\debug.htm %DSTPATH%\extras\tools\codecover
  935. copy %SRCPATH%\multimedia\DirectX\dxddk\extras\tools\codecover\dispdbg.exe %DSTPATH%\extras\tools\codecover
  936. copy %SRCPATH%\multimedia\DirectX\dxddk\extras\tools\codecover\wdbgdsp.exe %DSTPATH%\extras\tools\codecover
  937. copy %SRCPATH%\multimedia\DirectX\dxddk\extras\tools\codecover\debugcvg.c %DSTPATH%\extras\tools\codecover
  938. copy %SRCPATH%\multimedia\DirectX\dxddk\extras\tools\codecover\debugcvg.h %DSTPATH%\extras\tools\codecover
  939. goto :EOF
  940. REM --------------------------------------------------------------------------
  941. REM --------------------------------------------------------------------------
  942. REM
  943. REM Routine to process one DDK file.
  944. REM Strips based on BEGIN_DDKSPLIT to END_DDKSPLIT
  945. REM
  946. REM %1 Source File
  947. REM %2 Destination directory
  948. REM
  949. REM --------------------------------------------------------------------------
  950. REM --------------------------------------------------------------------------
  951. :ProcessDDKFile
  952. echo Processing file %1 to target location %2
  953. hsplit -o %2 nul -bt2 BEGIN_DDKSPLIT END_DDKSPLIT -c @@ -i %1
  954. goto :EOF
  955. REM --------------------------------------------------------------------------
  956. REM --------------------------------------------------------------------------
  957. REM
  958. REM Routine to process one MS file.
  959. REM Strips based on BEGIN_MSINTERNAL to END_MSINTERNAL
  960. REM
  961. REM %1 Source File
  962. REM %2 Destination directory
  963. REM
  964. REM --------------------------------------------------------------------------
  965. REM --------------------------------------------------------------------------
  966. :ProcessMSFile
  967. echo Processing file %1 to target location %2
  968. hsplit -o %2 nul -bt2 BEGIN_MSINTERNAL END_MSINTERNAL -c @@ -i %1
  969. goto :EOF
  970. REM --------------------------------------------------------------------------
  971. REM --------------------------------------------------------------------------
  972. REM
  973. REM :Usage
  974. REM
  975. REM Routine to print usage information
  976. REM
  977. REM --------------------------------------------------------------------------
  978. REM --------------------------------------------------------------------------
  979. :Usage
  980. echo usage: cpntddk ^<Target Dir^> ^<Source Dir^> [^<DInput Mapper Bin Dir^>]
  981. echo where:
  982. echo ^<Target Dir^> is the target location of the DDK build
  983. echo ^<Source Dir^> is the root of the SD sources
  984. echo ^<SDK Bin Dir^> is the directory where binaries built by the SDK live