anchor.diff:  @cd "%mesa%mesa"
   @RD /S /Q build\windows-%longabi%
   @set /p openswr=Do you want to build OpenSWR drivers? (y=yes):
  -@set buildswr=
  -@if /i %openswr%==y @set buildswr=swr=1
  +@set buildswr=0
  +@if /i %openswr%==y @set buildswr=1
   @set mingw=n
   @set mingwtest=0
   @if EXIST "%gcc%" @set mingwtest=1
  
positive.code: @if %abi%==x64 set minabi=64
  @set vsenv=%ProgramFiles%
  @if NOT "%ProgramW6432%"=="" set vsenv=%vsenv% (x86)
  @set vsenv=%vsenv%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars%minabi%.bat
  @if EXIST "%vsenv%" @set toolchain=Visual Studio 15 2017
  @if NOT EXIST "%vsenv%" @set toolchain=Visual Studio 14
  @if NOT EXIST "%vsenv%" @set vsenv=%VS140COMNTOOLS%..\..\VC\bin\vcvars%minabi%.bat
  @if %abi%==x64 @set toolchain=%toolchain% Win64
  @set gcc=%mesa%mingw-w64-%abi%\mingw%minabi%\bin
  @set vsenvloaded=0
  
negative.code: pip install -r requirements.txt --upgrade
  cd $mesa
  cd mesa
  @GOTO build_mesa_exec
  
  :build_with_vs
  @if %vsenvloaded%==0 call "%vsenv14%"
  @if %vsenvloaded%==1 @set restartcond=1
  @if EXIST "%vsenv15%" @set restartcond=%restartcond%2
  @if %restartcond%==12 (
  @echo "A Visual Studio build environment is already loaded. The script will now restart to flush loaded environment.
  @pause
  @GOTO exit
  )
  
  :build_mesa_exec
  @cmd /k "scons build=release platform=windows machine=%longabi% toolchain=%mesatoolchain% swr=%buildswr% libgl-gdi"
  
  :exit
  exit