Skip to content

Commit

Permalink
windows: adjust msvcprep.bat for VS 2022 in "Program Files"
Browse files Browse the repository at this point in the history
  • Loading branch information
mflatt committed Jan 30, 2022
1 parent 0a43737 commit d567391
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions racket/src/worksp/msvcprep.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@ REM Expects something like "x86", "amd64", or "x86_amd64" as an argument.

set VCMODE=%1

set Applications=%ProgramFiles(x86)%
if "%Applications%" == "" set Applications=%ProgramFiles%
REM For 2022 and later, look in "Program Files"
set Applications=%ProgramFiles%

set VCVARBAT=%Applications%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat

if not exist "%VCVARBAT%" set VCVARBAT=%Applications%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat
if not exist "%VCVARBAT%" set VCVARBAT=%Applications%\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvarsall.bat
if not exist "%VCVARBAT%" set VCVARBAT=%Applications%\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvarsall.bat

REM For 2019 and earlier, look in "Program Files (x86)"
set Applications=%ProgramFiles(x86)%
if "%Applications%" == "" set Applications=%ProgramFiles%

if not exist "%VCVARBAT%" set VCVARBAT=%Applications%\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat
if not exist "%VCVARBAT%" set VCVARBAT=%Applications%\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsall.bat
if not exist "%VCVARBAT%" set VCVARBAT=%Applications%\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat
Expand Down

0 comments on commit d567391

Please sign in to comment.