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.

63 lines
1.5 KiB

  1. @REM
  2. @REM turn echo off unless Verbose is defined
  3. @REM
  4. @echo off
  5. if DEFINED _echo echo on
  6. if DEFINED verbose echo on
  7. goto start
  8. :start
  9. setlocal
  10. @REM
  11. @REM figure out the home path for SDX.CMD so we can
  12. @REM prepend %PATH% correctly and work without a drive letter
  13. @REM and find support files without being in the home dir
  14. @REM
  15. set SCRIPT=%0
  16. set SCRIPT=%SCRIPT:.cmd=%
  17. for %%i in (%SCRIPT%.cmd) do set STARTPATH=%%~dp$PATH:i
  18. set STARTPATHPA=%STARTPATH%%PROCESSOR_ARCHITECTURE%
  19. @REM
  20. @REM first argument is always the operation. let the perl script
  21. @REM check it
  22. @REM
  23. set SDCMD=%1
  24. shift
  25. if "%SDCMD%"=="" (
  26. echo.
  27. echo.
  28. echo No arguments.
  29. set SDCMD=usage
  30. )
  31. :script
  32. @REM
  33. @REM always use our tools
  34. @REM
  35. @REM append a final ';' so any trailing '\' don't confuse Perl
  36. @REM
  37. set PATH=%STARTPATH%;%STARTPATHPA%;%PATH%;
  38. @REM
  39. @REM call the script
  40. @REM
  41. @REM -S helps perl find the .PL script in %PATH%
  42. @REM -I helps it find .PM modules
  43. @REM % * is all args
  44. @REM
  45. perl -I"%PATH%" -I"%STARTPATHPA%\perl\lib" -I"%STARTPATHPA%\perl\site\lib" -S sdx.pl %SDCMD% %*
  46. echo.
  47. echo.
  48. goto :end
  49. :end
  50. endlocal