2011-07-11 23:52:00 +04:00
|
|
|
@rem Copyright 2011 Google Inc.
|
|
|
|
@rem
|
2011-07-28 18:24:55 +04:00
|
|
|
@rem Use of this source code is governed by a BSD-style license that can be
|
|
|
|
@rem found in the LICENSE file.
|
2013-05-07 23:31:20 +04:00
|
|
|
@ECHO OFF
|
2011-07-11 23:52:00 +04:00
|
|
|
|
2013-05-07 23:31:20 +04:00
|
|
|
rem Launches make.py on Windows, after setting Visual Studio environment variables.
|
|
|
|
rem See http://code.google.com/p/skia/wiki/GettingStartedOnWindows
|
2011-07-11 23:52:00 +04:00
|
|
|
|
2014-06-16 18:02:42 +04:00
|
|
|
rem Skip environment setup on bots.
|
|
|
|
if "%CHROME_HEADLESS%"=="1" goto run_python
|
|
|
|
|
2013-05-07 23:31:20 +04:00
|
|
|
if "%DevEnvDir%"=="" goto setup_env_vars
|
2011-07-11 23:52:00 +04:00
|
|
|
|
|
|
|
:run_python
|
2013-05-07 23:31:20 +04:00
|
|
|
rem Run make.py and propagate its return value.
|
2011-07-11 23:52:00 +04:00
|
|
|
python make.py %*
|
2013-05-07 23:31:20 +04:00
|
|
|
exit /B %ERRORLEVEL%
|
2011-07-11 23:52:00 +04:00
|
|
|
|
|
|
|
:setup_env_vars
|
2013-05-07 23:31:20 +04:00
|
|
|
rem Visual Studio environment variables aren't set yet, so run vcvars32.bat
|
|
|
|
if DEFINED VS110COMNTOOLS (
|
|
|
|
call "%VS110COMNTOOLS%..\..\VC\bin\vcvars32.bat"
|
|
|
|
) else if DEFINED VS100COMNTOOLS (
|
|
|
|
call "%VS100COMNTOOLS%..\..\VC\bin\vcvars32.bat"
|
|
|
|
) else (
|
|
|
|
goto error_no_VS
|
|
|
|
)
|
|
|
|
if %ERRORLEVEL% neq 0 exit /B %ERRORLEVEL%
|
|
|
|
goto run_python
|
2011-07-11 23:52:00 +04:00
|
|
|
|
2013-05-07 23:31:20 +04:00
|
|
|
:error_no_VS
|
|
|
|
echo ERROR: Neither VS100COMNTOOLS nor VS110COMNTOOLS environment variable is set.
|
|
|
|
echo Are you sure Visual Studio 2010 or 2012 is installed?
|
|
|
|
exit /B 1
|