2020-01-19 15:04:59 +01:00
|
|
|
@echo off
|
|
|
|
|
|
|
|
rem Invokes a tool within a Visual Studio prompt
|
|
|
|
rem Uses %PLATFORM% to set architecture of prompt
|
|
|
|
|
2021-04-13 00:01:15 +02:00
|
|
|
set "vspath=%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise"
|
2020-01-19 15:04:59 +01:00
|
|
|
if exist "%vspath%" goto found
|
2021-04-13 00:01:15 +02:00
|
|
|
set "vspath=%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community"
|
2020-01-19 15:04:59 +01:00
|
|
|
if exist "%vspath%" goto found
|
|
|
|
|
|
|
|
:notfound
|
|
|
|
echo Visual Studio directory not found
|
|
|
|
exit /b 1
|
|
|
|
|
|
|
|
:found
|
|
|
|
if "%platform%"=="x64" (
|
|
|
|
call "%vspath%\Common7\Tools\VsDevCmd.bat" -no_logo -arch=x64
|
|
|
|
) else (
|
|
|
|
call "%vspath%\Common7\Tools\VsDevCmd.bat" -no_logo
|
|
|
|
)
|
|
|
|
|
|
|
|
%*
|
|
|
|
exit /b %errorlevel%
|