From be969fe46ce9ad8463f17e6390e21e56fc72643d Mon Sep 17 00:00:00 2001 From: "John D. Bruner" Date: Sun, 1 Oct 2023 13:22:05 -1000 Subject: [PATCH] Visiual Studio Projects: handle missing XP tools when converting to VS2022 build_vstudio.bat converts the .vcproj files from Visual Studio 2008 to .vcxproj when used with newer versions of Visual Studio and configures it to build XP-compatible binaries using the v141_xp toolset. However, this toolset is deprecated and may not be present when using Visual Studio 2022. The script intends to edit the .vcxproj files only in the case where it exists; however, due to a logic error it actually does this unconditionally. This causes the build to fail on VS2022 when the XP toolset is not present. --- build_vstudio.bat | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build_vstudio.bat b/build_vstudio.bat index c401676b..f89a2c55 100644 --- a/build_vstudio.bat +++ b/build_vstudio.bat @@ -193,6 +193,8 @@ if not "%_VC_VER%" == "2022" goto _RunBuild if exist "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v150\Platforms\x64\PlatformToolsets\v141_xp" goto _DoXPConvert if exist "%ProgramFiles%\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VC\v150\Platforms\x64\PlatformToolsets\v141_xp" goto _DoXPConvert if exist "%ProgramFiles%\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v150\Platforms\x64\PlatformToolsets\v141_xp" goto _DoXPConvert +goto _RunBuild + :_DoXPConvert set _X_PROJS_CONVERTED= for /F "usebackq tokens=1" %%a in (`findstr /C:"10.0" "%_BUILD_PROJECT_DIR%BuildROMs.vcxproj"`) do set _X_PROJS_CONVERTED=%%a