2013-10-18 06:35:54 +00:00
|
|
|
@ECHO OFF
|
2015-05-03 04:46:42 +00:00
|
|
|
REM Copyright 2015 Ben Vanik. All Rights Reserved.
|
2013-10-18 06:35:54 +00:00
|
|
|
|
|
|
|
SET DIR=%~dp0
|
|
|
|
|
2015-05-03 04:46:42 +00:00
|
|
|
REM ============================================================================
|
|
|
|
REM Environment Validation
|
|
|
|
REM ============================================================================
|
|
|
|
|
|
|
|
CALL :check_python
|
|
|
|
IF %_RESULT% NEQ 0 (
|
|
|
|
ECHO ERROR:
|
|
|
|
ECHO Python 2.7 must be installed and on PATH:
|
|
|
|
ECHO https://www.python.org/ftp/python/2.7.9/python-2.7.9.msi
|
|
|
|
GOTO :exit_error
|
|
|
|
)
|
|
|
|
|
2015-06-23 04:49:25 +00:00
|
|
|
|
2015-05-03 04:46:42 +00:00
|
|
|
REM ============================================================================
|
2015-08-01 06:48:24 +00:00
|
|
|
REM Trampoline into xenia-build
|
2015-05-03 04:46:42 +00:00
|
|
|
REM ============================================================================
|
|
|
|
|
2015-08-01 06:48:24 +00:00
|
|
|
python xenia-build %*
|
|
|
|
EXIT /b %ERRORLEVEL%
|
2015-05-03 04:46:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
REM ============================================================================
|
|
|
|
REM Utilities
|
|
|
|
REM ============================================================================
|
|
|
|
|
|
|
|
:check_python
|
|
|
|
SETLOCAL
|
|
|
|
1>NUL 2>NUL CMD /c where python
|
|
|
|
IF %ERRORLEVEL% NEQ 0 (
|
|
|
|
ENDLOCAL & SET _RESULT=1
|
|
|
|
GOTO :eof
|
|
|
|
)
|
2015-05-03 04:57:51 +00:00
|
|
|
CMD /c python -c "import sys; sys.exit(1 if not sys.version_info[:2] == (2, 7) else 0)"
|
2015-05-03 04:46:42 +00:00
|
|
|
IF %ERRORLEVEL% NEQ 0 (
|
|
|
|
ENDLOCAL & SET _RESULT=1
|
|
|
|
GOTO :eof
|
|
|
|
)
|
|
|
|
ENDLOCAL & SET _RESULT=0
|
|
|
|
GOTO :eof
|