From 1c867a1b7f5e7a9803166e357e9aa2982c40e4e9 Mon Sep 17 00:00:00 2001 From: IamEld3st Date: Wed, 21 Nov 2018 08:22:18 +0000 Subject: [PATCH] Add python version check and if python is even present on PATH. --- run-gui.bat | 17 +++++++++++++++++ run.bat | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/run-gui.bat b/run-gui.bat index a1c00d9..700dc28 100644 --- a/run-gui.bat +++ b/run-gui.bat @@ -6,6 +6,23 @@ cd /D "%~dp0" @rem Make sure the environment variables are up-to-date. This is useful if the user installed python a moment ago. call ./RefreshEnv.cmd +python -V >nul 2>&1 && ( + for /f "delims=" %%a in ('python -V') do @set pythonVer=%%a + (echo %pythonVer% | findstr /i "3.6. 3.7." >nul) && ( + goto continue + ) || ( + echo It appears that version of the installed Python is not supported. + echo Please install version 3.6.5! + goto end + ) +) || ( + echo Python was not found! + echo If you recently installed Python reinstall it and check the "Add to PATH" during the installation. + goto end +) +:continue + python run.py gui +:end pause diff --git a/run.bat b/run.bat index b3318d9..9995643 100644 --- a/run.bat +++ b/run.bat @@ -6,6 +6,23 @@ cd /D "%~dp0" @rem Make sure the environment variables are up-to-date. This is useful if the user installed python a moment ago. call ./RefreshEnv.cmd +python -V >nul 2>&1 && ( + for /f "delims=" %%a in ('python -V') do @set pythonVer=%%a + (echo %pythonVer% | findstr /i "3.6. 3.7." >nul) && ( + goto continue + ) || ( + echo It appears that version of the installed Python is not supported. + echo Please install version 3.6.5! + goto end + ) +) || ( + echo Python was not found! + echo If you recently installed Python reinstall it and check the "Add to PATH" during the installation. + goto end +) +:continue + python run.py +:end pause