anchor.diff:  
   cd %JASP_BASE_DIR%\%JASP_WIX_DIR%
   
  -SET MERGEMODULENAME=Microsoft_VC142_CRT_%WIXARCH%.msm
  -
  -REM a workaround because for some reason they decided nobody needs VCToolsRedistDir in vs 2019...  https://developercommunity.visualstudio.com/content/problem/544305/vs2019-vctoolsredistdir-environment-variable-incor.html
  -if "%VCToolsRedistDir%"=="" (
  -    set VCToolsRedistDir="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Redist\MSVC\14.24.28127"
  -)
  -
  +SET MERGEMODULENAME=Microsoft_VC141_CRT_%WIXARCH%.msm
   
   COPY "%VCToolsRedistDir%\MergeModules\%MERGEMODULENAME%" /Y
   "%WIX%\bin\heat.exe" dir .\%JASP_INSTALL_DIR% -cg JASPFiles -gg -scom -sreg -sfrag -srd -dr INSTALLLOCATION -var var.JASP_INSTALL_DIR -out JASPFilesFragment.wxs || exit /B 7
  
positive.code: rem --- default values ---
  SET JASP_BASE_DIR_DEFAULT=%STARTDIR%\..\..
  SET QTDIR_DEFAULT=C:\Qt
  SET QTVER_DEFAULT=5.15.0
  SET RTOOLSDIR_DEFAULT=C:\Rtools
  SET WIX_DEFAULT=C:\Program Files (x86)\WiX Toolset v3.11
  SET MSVCDIR_DEFAULT=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community
  
negative.code: 
  if "%ARCH%" == "64" (
  SET MINGWDIR=%RTOOLSDIR%\mingw_64\bin
  SET QTVCDIR=%QTDIR%\%QTVER%\msvc2017_64\bin
  SET WIXARCH="x64"
  SET COPY_R_ARCH="x64"
  ) else (
  SET MINGWDIR=%RTOOLSDIR%\mingw_32\bin
  SET QTVCDIR=%QTDIR%\%QTVER%\msvc2017\bin
  SET WIXARCH="x86"
  SET COPY_R_ARCH="i386"
  )
  