servo/mach.bat
author Andrew Halberstadt <ahalberstadt@mozilla.com>
Thu, 12 Oct 2017 12:24:05 -0400
changeset 386806 5a44c9c16c21e3d1a285a97be2447c9c9e2f1f98
parent 379950 d99e376e239caa2b86d219cad09f88cb4ddc439e
child 393081 6852799cc7b07174bdf3493e5227148d1d447a02
permissions -rw-r--r--
Bug 1297515 - Always use the mozharness vendored copy of virtualenv, r=jlund This removes the option to pass in a custom virtualenv binary and gets mozharness to always use the copy in 'external_tools'. Because this is now deterministic, we don't need to do things like check what version of pip is being used. MozReview-Commit-ID: GWxkmaZVpsZ

@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 BuildTools) 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 %*