blob: a9961074e347cdcc4abb42cfeb0559b234ee7cc0 [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.
8rem See http://code.google.com/p/skia/wiki/GettingStartedOnWindows
epoger@google.com877cfe32011-07-11 19:52:00 +00009
bsalomon@google.comc77256b2013-05-07 19:31:20 +000010if "%DevEnvDir%"=="" goto setup_env_vars
epoger@google.com877cfe32011-07-11 19:52:00 +000011
12:run_python
bsalomon@google.comc77256b2013-05-07 19:31:20 +000013rem Run make.py and propagate its return value.
epoger@google.com877cfe32011-07-11 19:52:00 +000014python make.py %*
bsalomon@google.comc77256b2013-05-07 19:31:20 +000015exit /B %ERRORLEVEL%
epoger@google.com877cfe32011-07-11 19:52:00 +000016
17:setup_env_vars
bsalomon@google.comc77256b2013-05-07 19:31:20 +000018rem 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
epoger@google.com877cfe32011-07-11 19:52:00 +000028
bsalomon@google.comc77256b2013-05-07 19:31:20 +000029: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