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.

97 lines
2.6 KiB

  1. @echo off
  2. goto :Main
  3. :Usage
  4. ECHO.
  5. ECHO %0
  6. ECHO.
  7. REM Created July 2000 Jay Krell (a-JayK)
  8. REM Updated September 2000 Jay Krell (a-JayK) checks for .man, .manifest, .dll
  9. REM All child install.cmds are identical.
  10. REM
  11. ECHO With no parameters, install children directories that contain install.cmd.
  12. ECHO With one parameter, install that child directory.
  13. ECHO Installation of children installs *.[.manifest,.man,.dll] in obj\*.
  14. REM
  15. goto :eof
  16. :Main
  17. rem echo. %*
  18. if "%1" == "" (
  19. for /f %%i in ('dir /b/ad %~p0') do if exist %~p0%%i\install.cmd call :Func1 %~dp0 %~dp0. %%i
  20. ) else if "%2" == "" (
  21. call :Func1 %~dp0 %~dp0. %1
  22. ) else (
  23. goto :Usage
  24. )
  25. goto :eof
  26. :Func1
  27. rem echo. %*
  28. call :Func2 %1 %~dp2. %~n3
  29. goto :eof
  30. :Func2
  31. call :Func3 %1 %~dp2 %3
  32. goto :eof
  33. :Func3
  34. @REM
  35. @REM %1 directory of argv0
  36. @REM %2 \nt\base\win32\fusion\tests\sxstest (argv0\..\..)
  37. @REM %3 directory and maybe basename of manifest
  38. @REM
  39. @REM i extension to install
  40. @REM REM j processor architecture to install, always install both
  41. @REM REM k processor architecture of sxstest.exe, make sure we try i386 on ia64
  42. @REM
  43. @REM for %%i in (.manifest .man .dll) do for %%j in (i386 ia64) do for %%k in (%processor_architecture:x86=i386% i386) do call :Func2 %1 %2 %%i %%j %%k
  44. @REM
  45. @REM i processor architecture to install, install both on ia64
  46. @REM j extension to install
  47. @REM k processor architecture of sxstest.exe, make sure we try i386 on ia64
  48. @REM
  49. rem echo. %*
  50. echo off
  51. rem echo on
  52. for %%i in (i386 %processor_architecture:x86=%) do (
  53. call :Func5 %1 %2 %3 %%i
  54. )
  55. echo off
  56. goto :eof
  57. :Func5
  58. @REM %1 directory of argv0
  59. @REM %2 \nt\base\win32\fusion\tests\sxstest (argv0\..\..)
  60. @REM %3 directory and maybe basename of manifest
  61. @REM %4 is processor architecture to install
  62. for %%j in (%1%3\obj\%4\*.manifest %1%3\obj\%4\*.man %1%3\obj\%4\*.dll) do (
  63. if exist %%j (
  64. for %%k in (%4) do (
  65. REM call :Func4 %1 %2whistler\obj\%%k\sxstest %3 %4 %%j %%k
  66. call :EchoAndExecute %2whistler\obj\%%k\sxstest -begin-install-replace-existing %%j
  67. )
  68. goto :eof
  69. )
  70. )
  71. goto :eof
  72. :Func4
  73. REM
  74. REM %1 directory of argv[0]
  75. REM %2 sxstest.exe
  76. REM %3 directory and basename of manifest
  77. REM %4 processor archictecture to install, always install both
  78. REM %5 extension to install
  79. REM %6 processor architecture of sxstext.exe, make sure we try i386 on ia64
  80. REM
  81. REM echo :Func2 %1 %2 %3 %4 %5 %6
  82. REM echo on
  83. if exist %1%3\obj\%5\%3%4 call :EchoAndExecute %2 -begin-install-replace-existing %1%3\obj\%5\%3%4
  84. REM echo off
  85. goto :eof
  86. :EchoAndExecute
  87. @echo %*
  88. call %*
  89. goto :eof