awlsim-win.cmd 918 Bytes
Newer Older
1
@echo off
2 3
setlocal ENABLEDELAYEDEXPANSION

4
set PYPROG=awlsim-gui
5
for /D %%f in ( "progs\putty\*" ) do set PATH=%%f\putty;!PATH!
6 7


8
set PATH=%PATH%;C:\WINDOWS;C:\WINDOWS\SYSTEM32
9
for /D %%f in ( "C:\PYTHON*" ) do set PATH=!PATH!;%%f
10 11
for /D %%f in ( "%USERPROFILE%\AppData\Local\Programs\Python\Python*" ) do set PATH=!PATH!;%%f;%%f\Scripts

12

13
py -h >NUL 2>&1
14
if %ERRORLEVEL% EQU 0 goto exec_py
15 16

python3 -h >NUL 2>&1
17
if %ERRORLEVEL% EQU 0 goto exec_python3
18 19

python -h >NUL 2>&1
20
if %ERRORLEVEL% EQU 0 goto exec_python
21 22 23 24 25 26 27 28

echo Did not find Python 3.x in the PATH.
echo Please make sure Python 3.x is installed correctly.
pause
goto end


:exec_py
29
@echo on
30
py -3 -B %PYPROG% %1 %2 %3 %4 %5 %6 %7 %8 %9
31
@goto end
32 33 34


:exec_python3
35
@echo on
36
python3 -B %PYPROG% %1 %2 %3 %4 %5 %6 %7 %8 %9
37
@goto end
38 39 40


:exec_python
41
@echo on
42
python -B %PYPROG% %1 %2 %3 %4 %5 %6 %7 %8 %9
43
@goto end
44 45


46
:end