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.
|
| 8 | rem See http://code.google.com/p/skia/wiki/GettingStartedOnWindows
|
epoger@google.com | 877cfe3 | 2011-07-11 19:52:00 +0000 | [diff] [blame] | 9 |
|
bsalomon@google.com | c77256b | 2013-05-07 19:31:20 +0000 | [diff] [blame] | 10 | if "%DevEnvDir%"=="" goto setup_env_vars
|
epoger@google.com | 877cfe3 | 2011-07-11 19:52:00 +0000 | [diff] [blame] | 11 |
|
| 12 | :run_python
|
bsalomon@google.com | c77256b | 2013-05-07 19:31:20 +0000 | [diff] [blame] | 13 | rem Run make.py and propagate its return value.
|
epoger@google.com | 877cfe3 | 2011-07-11 19:52:00 +0000 | [diff] [blame] | 14 | python make.py %*
|
bsalomon@google.com | c77256b | 2013-05-07 19:31:20 +0000 | [diff] [blame] | 15 | exit /B %ERRORLEVEL%
|
epoger@google.com | 877cfe3 | 2011-07-11 19:52:00 +0000 | [diff] [blame] | 16 |
|
| 17 | :setup_env_vars
|
bsalomon@google.com | c77256b | 2013-05-07 19:31:20 +0000 | [diff] [blame] | 18 | rem Visual Studio environment variables aren't set yet, so run vcvars32.bat
|
| 19 | if DEFINED VS110COMNTOOLS (
|
| 20 | call "%VS110COMNTOOLS%..\..\VC\bin\vcvars32.bat"
|
| 21 | ) else if DEFINED VS100COMNTOOLS (
|
| 22 | call "%VS100COMNTOOLS%..\..\VC\bin\vcvars32.bat"
|
| 23 | ) else (
|
| 24 | goto error_no_VS
|
| 25 | )
|
| 26 | if %ERRORLEVEL% neq 0 exit /B %ERRORLEVEL%
|
| 27 | goto run_python
|
epoger@google.com | 877cfe3 | 2011-07-11 19:52:00 +0000 | [diff] [blame] | 28 |
|
bsalomon@google.com | c77256b | 2013-05-07 19:31:20 +0000 | [diff] [blame] | 29 | :error_no_VS
|
| 30 | echo ERROR: Neither VS100COMNTOOLS nor VS110COMNTOOLS environment variable is set.
|
| 31 | echo Are you sure Visual Studio 2010 or 2012 is installed?
|
| 32 | exit /B 1
|