From af0c0cee6deda60edabb5138ee4443b584c9c90a Mon Sep 17 00:00:00 2001 From: rentu Date: Tue, 11 Jun 2019 08:10:47 +0100 Subject: [PATCH] Use wildcard to find crt dll in BuildWindowsBits.cmd --- BuildWindowsBits.cmd | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/BuildWindowsBits.cmd b/BuildWindowsBits.cmd index 00eef14..8bd0d51 100644 --- a/BuildWindowsBits.cmd +++ b/BuildWindowsBits.cmd @@ -4,24 +4,23 @@ SETLOCAL EnableDelayedExpansion set PROJECT_PATH=%1 set PROJECT_OUTPUT_PATH=%2 set PROJECT_CONFIGURATION="%3" -set VS_CRT_REDIST_REL[0]="%VcToolsRedistDir%onecore\x64\Microsoft.VC141.CRT" -set VS_CRT_REDIST_REL[1]="%VcToolsRedistDir%onecore\x64\Microsoft.VC150.CRT" - set UCRT_DLL_PATH="%WindowsSdkVerBinPath%\x64\ucrt" +set VS_CRT_REDIST_WILDCARD_FOLDER= ("%VcToolsRedistDir%onecore\x64\Microsoft.VC*.CRT") :: Check execution environment if "%VSINSTALLDIR%" == "" ( goto RunFromDevCmd ) -for /L %%n in (0,1,1) do ( - call robocopy.exe !VS_CRT_REDIST_REL[%%n]! %PROJECT_OUTPUT_PATH% /S /E >nul - if !ERRORLEVEL! LEQ 8 ( +for /D %%A in %VS_CRT_REDIST_WILDCARD_FOLDER% do ( + call robocopy.exe "%%~A" %PROJECT_OUTPUT_PATH% /S /E >nul + if !ERRORLEVEL! LEQ 8 ( goto StageResistRelOk ) ) echo Error while staging debugger binaries. Exiting... exit /b 1 + :StageResistRelOk call robocopy.exe %UCRT_DLL_PATH% %PROJECT_OUTPUT_PATH% /S /E >nul