mirror of
https://github.com/servo/servo.git
synced 2025-06-06 00:25:37 +00:00
Add support for Visual Studio 2017
This commit is contained in:
parent
e6a89899b0
commit
9b35fd9472
2 changed files with 20 additions and 4 deletions
22
mach.bat
22
mach.bat
|
@ -1,6 +1,22 @@
|
|||
@echo off
|
||||
|
||||
SET VS_VCVARS=%VS140COMNTOOLS%..\..\VC\vcvarsall.bat
|
||||
IF EXIST "%ProgramFiles(x86)%" (
|
||||
set "ProgramFiles32=%ProgramFiles(x86)%"
|
||||
) ELSE (
|
||||
set "ProgramFiles32=%ProgramFiles%"
|
||||
)
|
||||
|
||||
set VC14VARS=%VS140COMNTOOLS%..\..\VC\vcvarsall.bat
|
||||
IF EXIST "%VC14VARS%" (
|
||||
set "VS_VCVARS=%VC14VARS%"
|
||||
) ELSE (
|
||||
for %%e in (Enterprise Professional Community) do (
|
||||
IF EXIST "%ProgramFiles32%\Microsoft Visual Studio\2017\%%e\VC\Auxiliary\Build\vcvarsall.bat" (
|
||||
set "VS_VCVARS=%ProgramFiles32%\Microsoft Visual Studio\2017\%%e\VC\Auxiliary\Build\vcvarsall.bat"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
IF EXIST "%VS_VCVARS%" (
|
||||
IF NOT DEFINED Platform (
|
||||
IF EXIST "%ProgramFiles(x86)%" (
|
||||
|
@ -11,8 +27,8 @@ IF EXIST "%VS_VCVARS%" (
|
|||
)
|
||||
)
|
||||
) ELSE (
|
||||
ECHO Visual Studio 2015 is not installed.
|
||||
ECHO Download and install Visual Studio 2015 from https://www.visualstudio.com/
|
||||
ECHO Visual Studio 2015 or 2017 is not installed.
|
||||
ECHO Download and install Visual Studio 2015 or 2017 from https://www.visualstudio.com/
|
||||
EXIT /B
|
||||
)
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ def host_triple():
|
|||
cpu_type = platform.machine().lower()
|
||||
if os_type.endswith("-msvc"):
|
||||
# vcvars*.bat should set it properly
|
||||
platform_env = os.environ.get("PLATFORM")
|
||||
platform_env = os.environ.get("PLATFORM").upper()
|
||||
if platform_env == "X86":
|
||||
cpu_type = "i686"
|
||||
elif platform_env == "X64":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue