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.

265 lines
12 KiB

  1. @if "%_echo%" == "" echo off
  2. REM --------------------------------------------------------------------------
  3. REM --------------------------------------------------------------------------
  4. REM
  5. REM Copy the built binaries (refrast and sample driver) from thier built
  6. REM locations in a DDK directory structure to their final position in the
  7. REM NT DDK target directory structure.
  8. REM
  9. REM NOTE: This files doesn't actually build the binaries. It simply copies
  10. REM them across from thier built locations to thier target locations.
  11. REM
  12. REM --------------------------------------------------------------------------
  13. REM --------------------------------------------------------------------------
  14. setlocal ENABLEEXTENSIONS
  15. setlocal ENABLEDELAYEDEXPANSION
  16. REM --------------------------------------------------------------------------
  17. REM --------------------------------------------------------------------------
  18. REM
  19. REM Step 1: Initialize the log file
  20. REM
  21. REM --------------------------------------------------------------------------
  22. REM --------------------------------------------------------------------------
  23. echo Copying Built Binaries to NT DDK Image
  24. REM --------------------------------------------------------------------------
  25. REM --------------------------------------------------------------------------
  26. REM
  27. REM Step 2: Setup variables pointing to interesting source and target
  28. REM directories These variables are used for the source and destination of the
  29. REM files to be copied to the DDK target image
  30. REM
  31. REM --------------------------------------------------------------------------
  32. REM --------------------------------------------------------------------------
  33. echo Setting up environment variables
  34. REM
  35. REM DSTPATH is the root directory of the DDK target image. The directory
  36. REM structure pointed to by this variable is assumed to be the same as the
  37. REM NTDDK directory structure
  38. REM %1 must contain the target DDK location
  39. REM
  40. set DSTPATH=%1
  41. if "%DSTPATH%" == "" goto :Usage
  42. echo DSTPATH set to %DSTPATH%
  43. REM
  44. REM SRCPATH is the root directory of the source DDK target image. The
  45. REM directory structure pointed to by this variable is assumed to be the
  46. REM same as the standard NTDDK directory structure
  47. REM %1 must contain the source DDK location
  48. REM
  49. set SRCPATH=%2
  50. if "%SRCPATH%" == "" goto :Usage
  51. echo SRCPATH set to %SRCPATH%
  52. REM
  53. REM REFRAST_PATH is the relative path of the refrast directory
  54. REM
  55. set REFRAST_PATH=%SRCPATH%\src\video\displays\d3dref8
  56. echo REFRAST_PATH set to %REFRAST_PATH%
  57. REM
  58. REM DISPLAY_PATH is the relative path of the p3 sample display directory
  59. REM
  60. set DISPLAY_PATH=%SRCPATH%\src\video\displays\p3samp
  61. echo DISPLAY_PATH set to %DISPLAY_PATH%
  62. REM
  63. REM MINIPORT_PATH is the relative path of the p3 sample miniport directory
  64. REM
  65. set MINIPORT_PATH=%SRCPATH%\src\video\miniport\p3samp
  66. echo MINIPORT_PATH set to %MINIPORT_PATH%
  67. REM
  68. REM WIN9XDISP_PATH is the relative path of the Win9x p3 sample display directory
  69. REM
  70. set WIN9XDISP_PATH=%SRCPATH%\src\win_me\display\mini\p3samp
  71. echo WIN9XDISP_PATH set to %WIN9XDISP_PATH%
  72. REM
  73. REM WIN9XMINIVDD_PATH is the relative path of the p3 sample miniport directory
  74. REM
  75. set WIN9XMINIVDD_PATH=%SRCPATH%\src\win_me\display\minivdd\p3samp
  76. echo WIN9XMINIVDD_PATH set to %WIN9XMINIVDD_PATH%
  77. REM
  78. REM DINPUT_PATH is the relative path of the dinput samples
  79. REM
  80. set DINPUT_PATH=%SRCPATH%\input\Samples\src
  81. echo DINPUT_PATH set to %DINPUT_PATH%
  82. REM
  83. REM BDA_PATH is the relative path of the BDA samples
  84. REM
  85. set BDA_PATH=%SRCPATH%\src\wdm\bda
  86. echo BDA_PATH set to %BDA_PATH%
  87. REM
  88. REM DXVA_PATH is the relative path of the DirectVA samples
  89. REM
  90. set DXVA_PATH=%SRCPATH%\src\wdm\dxva
  91. echo DXVA_PATH set to %DXVA_PATH%
  92. REM --------------------------------------------------------------------------
  93. REM --------------------------------------------------------------------------
  94. REM
  95. REM Step 2: Ensure the basic DDK directory structure exists
  96. REM
  97. REM --------------------------------------------------------------------------
  98. REM --------------------------------------------------------------------------
  99. echo Ensure the target DDK directory structure is in place
  100. if not exist %DSTPATH% md %DSTPATH%
  101. if not exist %DSTPATH%\Built md %DSTPATH%\Built
  102. if not exist %DSTPATH%\Built\d3dref8 md %DSTPATH%\Built\d3dref8
  103. if not exist %DSTPATH%\Built\d3dref8\win2k md %DSTPATH%\Built\d3dref8\win2k
  104. if not exist %DSTPATH%\Built\d3dref8\win2k\debug md %DSTPATH%\Built\d3dref8\win2k\debug
  105. if not exist %DSTPATH%\Built\d3dref8\win2k\retail md %DSTPATH%\Built\d3dref8\win2k\retail
  106. if not exist %DSTPATH%\Built\d3dref8\win9x md %DSTPATH%\Built\d3dref8\win9x
  107. if not exist %DSTPATH%\Built\d3dref8\win9x\debug md %DSTPATH%\Built\d3dref8\win9x\debug
  108. if not exist %DSTPATH%\Built\d3dref8\win9x\retail md %DSTPATH%\Built\d3dref8\win9x\retail
  109. if not exist %DSTPATH%\Built\perm3 md %DSTPATH%\Built\perm3
  110. if not exist %DSTPATH%\Built\perm3\win2k md %DSTPATH%\Built\perm3\win2k
  111. if not exist %DSTPATH%\Built\perm3\win2k\debug md %DSTPATH%\Built\perm3\win2k\debug
  112. if not exist %DSTPATH%\Built\perm3\win2k\retail md %DSTPATH%\Built\perm3\win2k\retail
  113. if not exist %DSTPATH%\Built\perm3\win9x md %DSTPATH%\Built\perm3\win9x
  114. if not exist %DSTPATH%\Built\perm3\win9x\debug md %DSTPATH%\Built\perm3\win9x\debug
  115. if not exist %DSTPATH%\Built\perm3\win9x\retail md %DSTPATH%\Built\perm3\win9x\retail
  116. if not exist %DSTPATH%\input md %DSTPATH%\input
  117. if not exist %DSTPATH%\input\bin md %DSTPATH%\input\Samples\bin
  118. if not exist %DSTPATH%\input\bin md %DSTPATH%\input\Samples\bin
  119. if not exist %DSTPATH%\input\bin\cplsvr1 md %DSTPATH%\input\Samples\bin\cplsvr1
  120. if not exist %DSTPATH%\input\bin\cplsvr1\debug md %DSTPATH%\input\Samples\bin\cplsvr1\debug
  121. if not exist %DSTPATH%\input\bin\cplsvr1\retail md %DSTPATH%\input\Samples\bin\cplsvr1\retail
  122. if not exist %DSTPATH%\input\bin\digijoy md %DSTPATH%\input\Samples\bin\digijoy
  123. if not exist %DSTPATH%\input\bin\digijoy\debug md %DSTPATH%\input\Samples\bin\digijoy\debug
  124. if not exist %DSTPATH%\input\bin\digijoy\retail md %DSTPATH%\input\Samples\bin\digijoy\retail
  125. if not exist %DSTPATH%\input\bin\ffdrv1 md %DSTPATH%\input\Samples\bin\ffdrv1
  126. if not exist %DSTPATH%\input\bin\ffdrv1\debug md %DSTPATH%\input\Samples\bin\ffdrv1\debug
  127. if not exist %DSTPATH%\input\bin\ffdrv1\retail md %DSTPATH%\input\Samples\bin\ffdrv1\retail
  128. if not exist %DSTPATH%\Built\wdm md %DSTPATH%\Built\wdm
  129. if not exist %DSTPATH%\Built\wdm\bda md %DSTPATH%\Built\wdm\bda
  130. if not exist %DSTPATH%\Built\wdm\bda\MauiTune md %DSTPATH%\Built\wdm\bda\MauiTune
  131. if not exist %DSTPATH%\Built\wdm\bda\MauiTune\debug md %DSTPATH%\Built\wdm\bda\MauiTune\debug
  132. if not exist %DSTPATH%\Built\wdm\bda\MauiTune\retail md %DSTPATH%\Built\wdm\bda\MauiTune\retail
  133. if not exist %DSTPATH%\Built\wdm\dxva\avstest md %DSTPATH%\Built\wdm\bda\MauiTune
  134. if not exist %DSTPATH%\Built\wdm\dxva\avstest\debug md %DSTPATH%\Built\wdm\dxva\avstest\debug
  135. if not exist %DSTPATH%\Built\wdm\dxva\avstest\retail md %DSTPATH%\Built\wdm\dxva\avstest\retail
  136. REM --------------------------------------------------------------------------
  137. REM --------------------------------------------------------------------------
  138. REM
  139. REM Step 3: Copy the files form source to target
  140. REM
  141. REM --------------------------------------------------------------------------
  142. REM --------------------------------------------------------------------------
  143. echo Copy the built binaries files to the target location
  144. copy %REFRAST_PATH%\link\daytona\objchk\i386\d3dref8.dll %DSTPATH%\Built\d3dref8\win2k\Debug
  145. copy %REFRAST_PATH%\link\daytona\objfre\i386\d3dref8.dll %DSTPATH%\Built\d3dref8\win2k\Retail
  146. copy %REFRAST_PATH%\link\win9x\objchk\i386\d3dref8.dll %DSTPATH%\Built\d3dref8\win9x\Debug
  147. copy %REFRAST_PATH%\link\win9x\objfre\i386\d3dref8.dll %DSTPATH%\Built\d3dref8\win9x\Retail
  148. copy %REFRAST_PATH%\link\daytona\objchk\i386\d3dref8.pdb %DSTPATH%\Built\d3dref8\win2k\Debug
  149. copy %REFRAST_PATH%\link\daytona\objfre\i386\d3dref8.pdb %DSTPATH%\Built\d3dref8\win2k\Retail
  150. copy %REFRAST_PATH%\link\win9x\objchk\i386\d3dref8.sym %DSTPATH%\Built\d3dref8\win9x\Debug
  151. copy %REFRAST_PATH%\link\win9x\objfre\i386\d3dref8.sym %DSTPATH%\Built\d3dref8\win9x\Retail
  152. copy %DISPLAY_PATH%\gdi\objchk\i386\perm3dd.dll %DSTPATH%\Built\perm3\win2k\Debug
  153. copy %DISPLAY_PATH%\gdi\objchk\i386\perm3dd.pdb %DSTPATH%\Built\perm3\win2k\Debug
  154. copy %DISPLAY_PATH%\gdi\objfre\i386\perm3dd.dll %DSTPATH%\Built\perm3\win2k\Retail
  155. copy %DISPLAY_PATH%\gdi\objfre\i386\perm3dd.pdb %DSTPATH%\Built\perm3\win2k\Retail
  156. copy %MINIPORT_PATH%\perm3.inf %DSTPATH%\Built\perm3\win2k\Debug
  157. copy %MINIPORT_PATH%\perm3.inf %DSTPATH%\Built\perm3\win2k\Retail
  158. copy %MINIPORT_PATH%\objchk\i386\perm3.sys %DSTPATH%\Built\perm3\win2k\Debug
  159. copy %MINIPORT_PATH%\objchk\i386\perm3.pdb %DSTPATH%\Built\perm3\win2k\Debug
  160. copy %MINIPORT_PATH%\objfre\i386\perm3.sys %DSTPATH%\Built\perm3\win2k\Retail
  161. copy %MINIPORT_PATH%\objfre\i386\perm3.pdb %DSTPATH%\Built\perm3\win2k\Retail
  162. copy %DISPLAY_PATH%\dx\win9x\objchk\i386\perm3dd.dll %DSTPATH%\Built\perm3\win9x\Debug
  163. copy %DISPLAY_PATH%\dx\win9x\objchk\i386\perm3dd.sym %DSTPATH%\Built\perm3\win9x\Debug
  164. copy %DISPLAY_PATH%\dx\win9x\objfre\i386\perm3dd.dll %DSTPATH%\Built\perm3\win9x\Retail
  165. copy %DISPLAY_PATH%\dx\win9x\objfre\i386\perm3dd.sym %DSTPATH%\Built\perm3\win9x\Retail
  166. copy %WIN9XDISP_PATH%\drv\debug\*.drv %DSTPATH%\Built\perm3\win9x\Debug
  167. copy %WIN9XDISP_PATH%\drv\debug\*.sym %DSTPATH%\Built\perm3\win9x\Debug
  168. copy %WIN9XDISP_PATH%\drv\retail\*.drv %DSTPATH%\Built\perm3\win9x\Retail
  169. copy %WIN9XDISP_PATH%\drv\retail\*.sym %DSTPATH%\Built\perm3\win9x\Retail
  170. copy %WIN9XMINIVDD_PATH%\debug\*.vxd %DSTPATH%\Built\perm3\win9x\Debug
  171. copy %WIN9XMINIVDD_PATH%\debug\*.sym %DSTPATH%\Built\perm3\win9x\Debug
  172. copy %WIN9XMINIVDD_PATH%\retail\*.vxd %DSTPATH%\Built\perm3\win9x\Retail
  173. copy %WIN9XMINIVDD_PATH%\retail\*.sym %DSTPATH%\Built\perm3\win9x\Retail
  174. copy %WIN9XDISP_PATH%\install\perm3.inf %DSTPATH%\Built\perm3\win9x\Debug
  175. copy %WIN9XDISP_PATH%\install\perm3.inf %DSTPATH%\Built\perm3\win9x\Retail
  176. copy %DINPUT_PATH%\cplsvr1\objchk\i386\cplsvr1.dll %DSTPATH%\input\Samples\bin\cplsvr1\debug
  177. copy %DINPUT_PATH%\cplsvr1\objfre\i386\cplsvr1.dll %DSTPATH%\input\Samples\bin\cplsvr1\retail
  178. copy %DINPUT_PATH%\digijoy\objchk\i386\digijoy.vxd %DSTPATH%\input\Samples\bin\digijoy\debug
  179. copy %DINPUT_PATH%\digijoy\objfre\i386\digijoy.vxd %DSTPATH%\input\Samples\bin\digijoy\retail
  180. copy %DINPUT_PATH%\ffdrv1\objchk\i386\ffdrv1.dll %DSTPATH%\input\Samples\bin\ffdrv1\debug
  181. copy %DINPUT_PATH%\ffdrv1\objfre\i386\ffdrv1.dll %DSTPATH%\input\Samples\bin\ffdrv1\retail
  182. copy %BDA_PATH%\MauiTune\objchk\i386\philtune.sys %DSTPATH%\Built\wdm\bda\MauiTune\debug
  183. copy %BDA_PATH%\MauiTune\philtune.inf %DSTPATH%\Built\wdm\bda\MauiTune\debug
  184. copy %BDA_PATH%\MauiTune\objfre\i386\philtune.sys %DSTPATH%\Built\wdm\bda\MauiTune\retail
  185. copy %BDA_PATH%\MauiTune\philtune.inf %DSTPATH%\Built\wdm\bda\MauiTune\retail
  186. copy %DXVA_PATH%\avstest\objchk\i386\avstest.sys %DSTPATH%\Built\wdm\dxva\avstest\debug
  187. copy %DXVA_PATH%\avstest\avstest.inf %DSTPATH%\Built\wdm\dxva\avstest\debug
  188. copy %DXVA_PATH%\avstest\objfre\i386\avstest.sys %DSTPATH%\Built\wdm\dxva\avstest\retail
  189. copy %DXVA_PATH%\avstest\avstest.inf %DSTPATH%\Built\wdm\dxva\avstest\retail
  190. REM --------------------------------------------------------------------------
  191. REM --------------------------------------------------------------------------
  192. REM
  193. REM Step 4: Done
  194. REM
  195. REM --------------------------------------------------------------------------
  196. REM --------------------------------------------------------------------------
  197. echo Built binaries copied to target location
  198. goto :EOF
  199. REM --------------------------------------------------------------------------
  200. REM --------------------------------------------------------------------------
  201. REM
  202. REM :Usage
  203. REM
  204. REM Routine to display usage information for this batch file
  205. REM
  206. REM --------------------------------------------------------------------------
  207. REM --------------------------------------------------------------------------
  208. :Usage
  209. echo usage: cpntbin ^<Target Dir^> ^<Src Dir^>
  210. echo where:
  211. echo ^<Target Dir ^> is the root of the target DX DDK location
  212. echo ^<DX DDK^> is the root of the DX DDK where the binaries were built