epoger@google.com | 877cfe3 | 2011-07-11 19:52:00 +0000 | [diff] [blame] | 1 | @rem Copyright 2011 Google Inc.
|
| 2 | @rem
|
epoger@google.com | fd03db0 | 2011-07-28 14:24:55 +0000 | [diff] [blame] | 3 | @rem Use of this source code is governed by a BSD-style license that can be
|
| 4 | @rem found in the LICENSE file.
|
bsalomon@google.com | c77256b | 2013-05-07 19:31:20 +0000 | [diff] [blame] | 5 | @ECHO OFF
|
epoger@google.com | 877cfe3 | 2011-07-11 19:52:00 +0000 | [diff] [blame] | 6 |
|
bsalomon@google.com | c77256b | 2013-05-07 19:31:20 +0000 | [diff] [blame] | 7 | rem Launches make.py on Windows, after setting Visual Studio environment variables.
|
Thiago Farina | be23418 | 2014-10-13 17:56:30 -0300 | [diff] [blame] | 8 | rem See https://sites.google.com/site/skiadocs/user-documentation/quick-start-guides/windows
|
epoger@google.com | 877cfe3 | 2011-07-11 19:52:00 +0000 | [diff] [blame] | 9 |
|
Eric Boren | 9118413 | 2014-06-16 10:02:42 -0400 | [diff] [blame] | 10 | rem Skip environment setup on bots.
|
| 11 | if "%CHROME_HEADLESS%"=="1" goto run_python
|
| 12 |
|
bsalomon@google.com | c77256b | 2013-05-07 19:31:20 +0000 | [diff] [blame] | 13 | if "%DevEnvDir%"=="" goto setup_env_vars
|
epoger@google.com | 877cfe3 | 2011-07-11 19:52:00 +0000 | [diff] [blame] | 14 |
|
| 15 | :run_python
|
bsalomon@google.com | c77256b | 2013-05-07 19:31:20 +0000 | [diff] [blame] | 16 | rem Run make.py and propagate its return value.
|
epoger@google.com | 877cfe3 | 2011-07-11 19:52:00 +0000 | [diff] [blame] | 17 | python make.py %*
|
bsalomon@google.com | c77256b | 2013-05-07 19:31:20 +0000 | [diff] [blame] | 18 | exit /B %ERRORLEVEL%
|
epoger@google.com | 877cfe3 | 2011-07-11 19:52:00 +0000 | [diff] [blame] | 19 |
|
| 20 | :setup_env_vars
|
bsalomon@google.com | c77256b | 2013-05-07 19:31:20 +0000 | [diff] [blame] | 21 | rem Visual Studio environment variables aren't set yet, so run vcvars32.bat
|
| 22 | if DEFINED VS110COMNTOOLS (
|
| 23 | call "%VS110COMNTOOLS%..\..\VC\bin\vcvars32.bat"
|
| 24 | ) else if DEFINED VS100COMNTOOLS (
|
| 25 | call "%VS100COMNTOOLS%..\..\VC\bin\vcvars32.bat"
|
| 26 | ) else (
|
| 27 | goto error_no_VS
|
| 28 | )
|
| 29 | if %ERRORLEVEL% neq 0 exit /B %ERRORLEVEL%
|
| 30 | goto run_python
|
epoger@google.com | 877cfe3 | 2011-07-11 19:52:00 +0000 | [diff] [blame] | 31 |
|
bsalomon@google.com | c77256b | 2013-05-07 19:31:20 +0000 | [diff] [blame] | 32 | :error_no_VS
|
| 33 | echo ERROR: Neither VS100COMNTOOLS nor VS110COMNTOOLS environment variable is set.
|
| 34 | echo Are you sure Visual Studio 2010 or 2012 is installed?
|
| 35 | exit /B 1
|