awlsim-win.cmd 918 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. @echo off
  2. setlocal ENABLEDELAYEDEXPANSION
  3. set PYPROG=awlsim-gui
  4. for /D %%f in ( "progs\putty\*" ) do set PATH=%%f\putty;!PATH!
  5. set PATH=%PATH%;C:\WINDOWS;C:\WINDOWS\SYSTEM32
  6. for /D %%f in ( "C:\PYTHON*" ) do set PATH=!PATH!;%%f
  7. for /D %%f in ( "%USERPROFILE%\AppData\Local\Programs\Python\Python*" ) do set PATH=!PATH!;%%f;%%f\Scripts
  8. py -h >NUL 2>&1
  9. if %ERRORLEVEL% EQU 0 goto exec_py
  10. python3 -h >NUL 2>&1
  11. if %ERRORLEVEL% EQU 0 goto exec_python3
  12. python -h >NUL 2>&1
  13. if %ERRORLEVEL% EQU 0 goto exec_python
  14. echo Did not find Python 3.x in the PATH.
  15. echo Please make sure Python 3.x is installed correctly.
  16. pause
  17. goto end
  18. :exec_py
  19. @echo on
  20. py -3 -B %PYPROG% %1 %2 %3 %4 %5 %6 %7 %8 %9
  21. @goto end
  22. :exec_python3
  23. @echo on
  24. python3 -B %PYPROG% %1 %2 %3 %4 %5 %6 %7 %8 %9
  25. @goto end
  26. :exec_python
  27. @echo on
  28. python -B %PYPROG% %1 %2 %3 %4 %5 %6 %7 %8 %9
  29. @goto end
  30. :end