blob: 94d0755912a10682cb9146331ca3482952d5a6f1 [file] [log] [blame]
epoger@google.com877cfe32011-07-11 19:52:00 +00001@rem Copyright 2011 Google Inc.
2@rem
epoger@google.comfd03db02011-07-28 14:24:55 +00003@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.comc77256b2013-05-07 19:31:20 +00005@ECHO OFF
epoger@google.com877cfe32011-07-11 19:52:00 +00006
bsalomon@google.comc77256b2013-05-07 19:31:20 +00007rem Launches make.py on Windows, after setting Visual Studio environment variables.
Thiago Farinabe234182014-10-13 17:56:30 -03008rem See https://sites.google.com/site/skiadocs/user-documentation/quick-start-guides/windows
epoger@google.com877cfe32011-07-11 19:52:00 +00009
Eric Boren91184132014-06-16 10:02:42 -040010rem Skip environment setup on bots.
11if "%CHROME_HEADLESS%"=="1" goto run_python
12
bsalomon@google.comc77256b2013-05-07 19:31:20 +000013if "%DevEnvDir%"=="" goto setup_env_vars
epoger@google.com877cfe32011-07-11 19:52:00 +000014
15:run_python
bsalomon@google.comc77256b2013-05-07 19:31:20 +000016rem Run make.py and propagate its return value.
epoger@google.com877cfe32011-07-11 19:52:00 +000017python make.py %*
bsalomon@google.comc77256b2013-05-07 19:31:20 +000018exit /B %ERRORLEVEL%
epoger@google.com877cfe32011-07-11 19:52:00 +000019
20:setup_env_vars
bsalomon@google.comc77256b2013-05-07 19:31:20 +000021rem Visual Studio environment variables aren't set yet, so run vcvars32.bat
22if 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)
29if %ERRORLEVEL% neq 0 exit /B %ERRORLEVEL%
30goto run_python
epoger@google.com877cfe32011-07-11 19:52:00 +000031
bsalomon@google.comc77256b2013-05-07 19:31:20 +000032:error_no_VS
33echo ERROR: Neither VS100COMNTOOLS nor VS110COMNTOOLS environment variable is set.
34echo Are you sure Visual Studio 2010 or 2012 is installed?
35exit /B 1