Slightly better python-finding.

This commit is contained in:
Dr. Chat 2016-09-28 18:30:45 -05:00
parent 3b7002e945
commit 880835d9b5
1 changed files with 3 additions and 4 deletions

7
xb.bat
View File

@ -36,16 +36,15 @@ IF NOT ERRORLEVEL 1 (
ECHO FOUND PYTHON 2
SET FOUND_PYTHON_EXE=python2
)
IF %FOUND_PYTHON_EXE% EQU "" (
IF EXIST c:\\python27\\python.exe SET FOUND_PYTHON_EXE=C:\\python27\\python.exe
)
IF %FOUND_PYTHON_EXE% EQU "" (
1>NUL 2>NUL CMD /c where python
IF NOT ERRORLEVEL 1 (
SET FOUND_PYTHON_EXE=python
)
)
IF %FOUND_PYTHON_EXE% EQU "" (
ECHO Found from fs
IF EXIST c:\python27\python.exe SET FOUND_PYTHON_EXE=C:\python27\python.exe
)
IF %FOUND_PYTHON_EXE% EQU "" (
ECHO ERROR: no Python executable found on PATH.
ECHO Make sure you can run 'python' or 'python2' in a Command Prompt.