[ROSBE-Windows] Revert part of changes to give back the vs command. Looks like at least one popular demand exists.

This commit is contained in:
Daniel Reimer 2020-06-04 20:15:06 +02:00
parent 6b285c6ee8
commit 7e92295155

View File

@ -18,13 +18,52 @@ if %_ROSBE_DEBUG% == 1 (
title ReactOS Build Environment %_ROSBE_VERSION% title ReactOS Build Environment %_ROSBE_VERSION%
set platform=false set platform=false
set _ROSBE_MSVCARCH=%2
if /i "%PROCESSOR_ARCHITECTURE%" == "amd64" set platform=true if /i "%PROCESSOR_ARCHITECTURE%" == "amd64" set platform=true
if /i "%PROCESSOR_ARCHITEW6432%" == "amd64" set platform=true if /i "%PROCESSOR_ARCHITEW6432%" == "amd64" set platform=true
if defined VS90COMNTOOLS (
if exist "%VS90COMNTOOLS%\..\..\VC\vcvarsall.bat" (
set _ROSBE_MSVCVERS=%_ROSBE_MSVCVERS% 9.0
)
)
if defined VS100COMNTOOLS (
if exist "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" (
set _ROSBE_MSVCVERS=%_ROSBE_MSVCVERS% 10.0
)
)
if defined VS110COMNTOOLS (
if exist "%VS110COMNTOOLS%\..\..\VC\vcvarsall.bat" (
set _ROSBE_MSVCVERS=%_ROSBE_MSVCVERS% 11.0
)
)
if defined VS120COMNTOOLS (
if exist "%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat" (
set _ROSBE_MSVCVERS=%_ROSBE_MSVCVERS% 12.0
)
)
if defined VS140COMNTOOLS (
if exist "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" (
set _ROSBE_MSVCVERS=%_ROSBE_MSVCVERS% 14.0
)
)
for %%A in (%_ROSBE_MSVCVERS%) do set _ROSBE_MSVCVER=%%A
if "%1" == "vs" (
if "%platform%" == "true" (
for /f "usebackq skip=2 tokens=2,*" %%A in (`"reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\%_ROSBE_MSVCVER% /v ShellFolder"`) do set VSINSTALLDIR=%%B
) else (
for /f "usebackq skip=2 tokens=2,*" %%A in (`"reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\%_ROSBE_MSVCVER% /v ShellFolder"`) do set VSINSTALLDIR=%%B
)
)
:: Set defaults to work with and override them if edited by :: Set defaults to work with and override them if edited by
:: the options utility. :: the options utility.
if "%1" == "" ( if "%1" == "" (
set ROS_ARCH=i386 set ROS_ARCH=i386
) else if "%1" == "vs" (
set ROS_ARCH=
call "%VSINSTALLDIR%\VC\vcvarsall.bat" %_ROSBE_MSVCARCH%
) else ( ) else (
set ROS_ARCH=%1 set ROS_ARCH=%1
) )