make.bat revision c77256b83b92fef3a796ea7036bf725d51194c08
1@rem    Copyright 2011 Google Inc.
2@rem
3@rem    Use of this source code is governed by a BSD-style license that can be
4@rem    found in the LICENSE file.
5@ECHO OFF
6
7rem Launches make.py on Windows, after setting Visual Studio environment variables.
8rem See http://code.google.com/p/skia/wiki/GettingStartedOnWindows
9
10if "%DevEnvDir%"=="" goto setup_env_vars
11
12:run_python
13rem Run make.py and propagate its return value.
14python make.py %*
15exit /B %ERRORLEVEL%
16
17:setup_env_vars
18rem Visual Studio environment variables aren't set yet, so run vcvars32.bat
19if 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)
26if %ERRORLEVEL% neq 0 exit /B %ERRORLEVEL%
27goto run_python
28
29:error_no_VS
30echo ERROR: Neither VS100COMNTOOLS nor VS110COMNTOOLS environment variable is set.
31echo Are you sure Visual Studio 2010 or 2012 is installed?
32exit /B 1
33