From 40e8a0f6cf58a0bc3c7139dbd5d0d0c8a532db3c Mon Sep 17 00:00:00 2001 From: George King <98261225+GeorgeK1ng@users.noreply.github.com> Date: Sat, 4 Jan 2025 09:27:09 +0100 Subject: [PATCH] Ability to set custom UCRT Path --- CI/wininstaller/build_installer.cmd | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/CI/wininstaller/build_installer.cmd b/CI/wininstaller/build_installer.cmd index 183ef8c0c..ecf798f50 100644 --- a/CI/wininstaller/build_installer.cmd +++ b/CI/wininstaller/build_installer.cmd @@ -12,6 +12,9 @@ set "VCMIFolder=VCMI" REM Define Inno Setup version set InnoSetupVer=6 +REM Uncomment this line and set custom UCRT source path, otherwise it will be detected automatically from installed Windows 10 SDK +REM set "UCRTFilesPath=%ProgFiles%\Windows Kits\10\Redist\10.0.22621.0\ucrt\DLLs" + REM Normally, there is no need to modify anything below this line. REM Determine the base directory two levels up from the installer location @@ -37,13 +40,15 @@ if exist "%WinDir%\SysWow64" ( set "ProgFiles=%programfiles%" ) -REM Dynamically locate the UCRT path -set "UCRTBasePath=%ProgFiles%\Windows Kits\10\Redist" -set "UCRTFilesPath=" -for /d %%d in ("%UCRTBasePath%\*") do ( - if exist "%%d\ucrt\DLLs" ( - set "UCRTFilesPath=%%d\ucrt\DLLs" - ) +REM Dynamically locate the UCRT path if not defined +if not defined UCRTFilesPath ( + set "UCRTBasePath=!ProgFiles!\Windows Kits\10\Redist" + set "UCRTFilesPath=" + for /d %%d in ("!UCRTBasePath!\*") do ( + if exist "%%d\ucrt\DLLs" ( + set "UCRTFilesPath=%%d\ucrt\DLLs" + ) + ) ) REM Verify Inno Setup is installed