servo/mach.bat
author Ryan VanderMeulen <ryanvm@gmail.com>
Tue, 27 Jun 2017 14:32:07 -0400
changeset 417258 8f80d594c08d5c7a112e5d4b9eb44ffca717eb7b
parent 402953 de39420cc624efdc9bfd620626211569d912ce2d
child 431873 d99e376e239caa2b86d219cad09f88cb4ddc439e
permissions -rw-r--r--
Backed out 3 changesets (bug 1364896) for causing bug 1376466. Backed out changeset 5c870a786e94 (bug 1364896) Backed out changeset 134d9ee1e545 (bug 1364896) Backed out changeset 8f52f28a9eaa (bug 1364896)

@echo off

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)%" (
      call "%VS_VCVARS%" x64
    ) ELSE (
      ECHO 32-bit Windows is currently unsupported.
      EXIT /B
    )
  )
) ELSE (
  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
)

python mach %*