From 33b4036fa02ae74dff98a02ca0501f09e24d4d86 Mon Sep 17 00:00:00 2001 From: Vlad Khorsun Date: Thu, 24 Oct 2024 13:27:22 +0300 Subject: [PATCH] Fixed bug #8292 : run_all PDB fails with "Error calling COPY_XTRA" --- builds/win32/setenvvar.bat | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/builds/win32/setenvvar.bat b/builds/win32/setenvvar.bat index 000c2d0b52..55d6a91402 100644 --- a/builds/win32/setenvvar.bat +++ b/builds/win32/setenvvar.bat @@ -118,8 +118,14 @@ rem version using the available env vars so we test to see if the runtime dir rem exists and if not we fall back to 3. rem NOTE 2 This code is likely to break again in the future !!!! set MSVC_RUNTIME_MINOR_VERSION=%VCToolsVersion:~3,1% - if not exist "%VCToolsRedistDir%%VSCMD_ARG_TGT_ARCH%\Microsoft.VC%MSVC_RUNTIME_MAJOR_VERSION%%MSVC_RUNTIME_MINOR_VERSION%.CRT" ( + + @setlocal EnableDelayedExpansion + + if not exist "!VCToolsRedistDir!!VSCMD_ARG_TGT_ARCH!\Microsoft.VC!MSVC_RUNTIME_MAJOR_VERSION!!MSVC_RUNTIME_MINOR_VERSION!.CRT" ( + @endlocal set MSVC_RUNTIME_MINOR_VERSION=3 + ) else ( + @endlocal ) set MSVC_RUNTIME_LIBRARY_VERSION=%MSVC_RUNTIME_MAJOR_VERSION%%MSVC_RUNTIME_MINOR_VERSION%