Skip to content

Commit d95ce45

Browse files
IamEld3sttarehart
authored andcommitted
Add python version check and if python is even present on PATH. (#10)
1 parent 1d406c6 commit d95ce45

2 files changed

Lines changed: 34 additions & 0 deletions

File tree

run-gui.bat

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,23 @@ cd /D "%~dp0"
66
@rem Make sure the environment variables are up-to-date. This is useful if the user installed python a moment ago.
77
call ./RefreshEnv.cmd
88

9+
python -V >nul 2>&1 && (
10+
for /f "delims=" %%a in ('python -V') do @set pythonVer=%%a
11+
(echo %pythonVer% | findstr /i "3.6. 3.7." >nul) && (
12+
goto continue
13+
) || (
14+
echo It appears that version of the installed Python is not supported.
15+
echo Please install version 3.6.5!
16+
goto end
17+
)
18+
) || (
19+
echo Python was not found!
20+
echo If you recently installed Python reinstall it and check the "Add to PATH" during the installation.
21+
goto end
22+
)
23+
:continue
24+
925
python run.py gui
1026

27+
:end
1128
pause

run.bat

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,23 @@ cd /D "%~dp0"
66
@rem Make sure the environment variables are up-to-date. This is useful if the user installed python a moment ago.
77
call ./RefreshEnv.cmd
88

9+
python -V >nul 2>&1 && (
10+
for /f "delims=" %%a in ('python -V') do @set pythonVer=%%a
11+
(echo %pythonVer% | findstr /i "3.6. 3.7." >nul) && (
12+
goto continue
13+
) || (
14+
echo It appears that version of the installed Python is not supported.
15+
echo Please install version 3.6.5!
16+
goto end
17+
)
18+
) || (
19+
echo Python was not found!
20+
echo If you recently installed Python reinstall it and check the "Add to PATH" during the installation.
21+
goto end
22+
)
23+
:continue
24+
925
python run.py
1026

27+
:end
1128
pause

0 commit comments

Comments
 (0)