Skip to content

Commit

Permalink
Make make.bat and gyp_skia work with VS 2012.
Browse files Browse the repository at this point in the history
Review URL: https://codereview.chromium.org/14963005/


git-svn-id: http://skia.googlecode.com/svn/trunk@9045 2bbb7eff-a529-9590-31e7-b0007b416f81
  • Loading branch information
bsalomon@google.com committed May 7, 2013
1 parent 4bb235b commit c77256b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
7 changes: 0 additions & 7 deletions gyp_skia
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,6 @@ if __name__ == '__main__':
# By default, we build 'most' instead of 'all' or 'everything'. See skia.gyp.
args.extend(['-Gdefault_target=most'])

# Special arguments for generating Visual Studio projects:
# - msvs_version forces generation of Visual Studio 2010 project so that we
# can use msbuild.exe
# - msvs_abspath_output is a workaround for
# http://code.google.com/p/gyp/issues/detail?id=201
args.extend(['-Gmsvs_version=2010'])

print 'Updating projects from gyp files...'
sys.stdout.flush()

Expand Down
34 changes: 20 additions & 14 deletions make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,31 @@
@rem
@rem Use of this source code is governed by a BSD-style license that can be
@rem found in the LICENSE file.
@ECHO OFF

@rem Launches make.py on Windows, after setting Visual Studio environment variables.
@rem See http://code.google.com/p/skia/wiki/GettingStartedOnWindows
rem Launches make.py on Windows, after setting Visual Studio environment variables.
rem See http://code.google.com/p/skia/wiki/GettingStartedOnWindows

@if "%DevEnvDir%"=="" goto setup_env_vars
if "%DevEnvDir%"=="" goto setup_env_vars

:run_python
@rem Run make.py and propagate its return value.
rem Run make.py and propagate its return value.
python make.py %*
@exit /B %ERRORLEVEL%
exit /B %ERRORLEVEL%

:setup_env_vars
@rem Visual Studio environment variables aren't set yet, so run vcvars32.bat
@if "%VS100COMNTOOLS%"=="" goto error_no_VS100COMNTOOLS
call "%VS100COMNTOOLS%..\..\VC\bin\vcvars32.bat"
@if %ERRORLEVEL% neq 0 exit /B %ERRORLEVEL%
@goto run_python
rem Visual Studio environment variables aren't set yet, so run vcvars32.bat
if DEFINED VS110COMNTOOLS (
call "%VS110COMNTOOLS%..\..\VC\bin\vcvars32.bat"
) else if DEFINED VS100COMNTOOLS (
call "%VS100COMNTOOLS%..\..\VC\bin\vcvars32.bat"
) else (
goto error_no_VS
)
if %ERRORLEVEL% neq 0 exit /B %ERRORLEVEL%
goto run_python

:error_no_VS100COMNTOOLS
@echo ERROR: VS100COMNTOOLS environment variable not set.
@echo Are you sure Visual Studio 2010 is installed?
@exit /B 1
:error_no_VS
echo ERROR: Neither VS100COMNTOOLS nor VS110COMNTOOLS environment variable is set.
echo Are you sure Visual Studio 2010 or 2012 is installed?
exit /B 1

0 comments on commit c77256b

Please sign in to comment.