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.

115 lines
3.9 KiB

  1. @if "%_echo%" == "" echo off
  2. REM --------------------------------------------------------------------------
  3. REM --------------------------------------------------------------------------
  4. REM
  5. REM Build the Wise Installer Setup program for the DX8 DDK.
  6. REM
  7. REM --------------------------------------------------------------------------
  8. REM --------------------------------------------------------------------------
  9. setlocal ENABLEEXTENSIONS
  10. setlocal ENABLEDELAYEDEXPANSION
  11. REM --------------------------------------------------------------------------
  12. REM --------------------------------------------------------------------------
  13. REM
  14. REM Step 1: Setup the environment variables pointing to interesting things
  15. REM like the location of the Wise installer program, the source file of the
  16. REM installer script, the source of the DDK image and the target of the
  17. REM Window's Installer file for the DDK install.
  18. REM
  19. REM --------------------------------------------------------------------------
  20. REM --------------------------------------------------------------------------
  21. echo Setting up environment variables
  22. REM
  23. REM TOOLPATH is the location where the setup generatation tool lives.
  24. REM Currently this is where the Wise installer program is installed.
  25. REM %1 must contain the location of the Wise installer program
  26. REM
  27. set TOOLPATH="%1"
  28. if "%TOOLPATH%" == "" goto :Usage
  29. echo TOOLPATH set to %TOOLPATH%
  30. REM
  31. REM SCRIPTPATH is the location where the setup script is located. Note,
  32. REM this is just the directory. The name is currently fixed.
  33. REM %2 must contain the location of the setup script file.
  34. REM
  35. set SCRIPTPATH="%2"
  36. if "%SCRIPTPATH%" == "" goto :Usage
  37. echo SCRIPTPATH set to %SCRIPTPATH%
  38. REM
  39. REM IMAGEPATH is the location where the DDK image is located.
  40. REM This directory should be the root of the complete DDK image
  41. REM which the setup should install.
  42. REM %3 must contain the location of DDK image
  43. REM
  44. set IMAGEPATH="%3"
  45. if "%IMAGEPATH%" == "" goto :Usage
  46. echo IMAGEPATH set to %IMAGEPATH%
  47. REM
  48. REM TARGETPATH is the location where the generated setup file
  49. REM should be placed.
  50. REM %4 must contain the location of target DDK setup file
  51. REM
  52. set TARGETPATH=%4
  53. if "%TARGETPATH%" == "" goto :Usage
  54. echo TARGETPATH set to %TARGETPATH%
  55. REM --------------------------------------------------------------------------
  56. REM --------------------------------------------------------------------------
  57. REM
  58. REM Step 2: Actually generate the setup file
  59. REM
  60. REM --------------------------------------------------------------------------
  61. REM --------------------------------------------------------------------------
  62. REM Change directory to the location of the installer tool
  63. pushd %TOOLPATH%
  64. REM Invoke the installer to do the actual work
  65. wfwi %SCRIPTPATH%\dx8ddk.wsi /c /p srcfiles=%IMAGEPATH% /o %TARGETPATH%\dx8ddk.msi
  66. cd /d %SRCPATH%\multimedia\DirectX\public\tools\bldscripts
  67. perl ddk_bvt.pl
  68. cd /d %SRCPATH%\Multimedia\DirectX\dxg\ddk
  69. REM Restore the directory
  70. popd
  71. REM Done
  72. goto :EOF
  73. REM --------------------------------------------------------------------------
  74. REM --------------------------------------------------------------------------
  75. REM
  76. REM :Usage
  77. REM
  78. REM Routine to display usage information for this batch file
  79. REM
  80. REM --------------------------------------------------------------------------
  81. REM --------------------------------------------------------------------------
  82. :Usage
  83. echo usage: ntsetup ^<Setup Tool Dir^> ^<Setup Script Dir^>
  84. ^<DDK Image Dir^> ^<Setup File Target Dir^>
  85. echo where:
  86. echo ^<Setup Tool Dir ^> is the location where the setup generation tool
  87. echo is installer
  88. echo ^<Setup Script Dir^> is the location where the setup script is located
  89. echo ^<DDK Image Dir^> is the location where the DDK image source for
  90. echo the setup is located
  91. echo ^<Setup Target Dir^> is the location where the generated setup file is
  92. echo to be placed