aboutsummaryrefslogtreecommitdiffhomepage
path: root/make.bat
diff options
context:
space:
mode:
authorGravatar epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-07-11 19:52:00 +0000
committerGravatar epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-07-11 19:52:00 +0000
commit877cfe380d396ffe688125ee55f541930b1f5a21 (patch)
treefea4b11193ba048a53fca7e4350502f80a4c6894 /make.bat
parente74e28df11abbe069d82221ee029d281a81ea328 (diff)
"make" script to enable command-line build on Windows
Diffstat (limited to 'make.bat')
-rw-r--r--make.bat38
1 files changed, 38 insertions, 0 deletions
diff --git a/make.bat b/make.bat
new file mode 100644
index 0000000000..5ae789815b
--- /dev/null
+++ b/make.bat
@@ -0,0 +1,38 @@
+@rem Copyright 2011 Google Inc.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem http://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+
+@rem Launches make.py on Windows, after setting Visual Studio environment variables.
+@rem See http://code.google.com/p/skia/wiki/GettingStartedOnWindows
+
+@rem Force gyp to generate .vcxproj files, as needed for msbuild.exe
+set GYP_MSVS_VERSION=2010
+
+@if "%DevEnvDir%"=="" goto setup_env_vars
+
+:run_python
+@rem Run make.py and propagate its return value.
+python make.py %*
+@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
+
+:error_no_VS100COMNTOOLS
+@echo ERROR: VS100COMNTOOLS environment variable not set.
+@echo Are you sure Visual Studio 2010 is installed?
+@exit /B 1