1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-08 22:26:51 +02:00

Ability to set custom UCRT Path

This commit is contained in:
George King
2025-01-04 09:27:09 +01:00
committed by GitHub
parent 2242caede6
commit 40e8a0f6cf

View File

@ -12,6 +12,9 @@ set "VCMIFolder=VCMI"
REM Define Inno Setup version REM Define Inno Setup version
set InnoSetupVer=6 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 Normally, there is no need to modify anything below this line.
REM Determine the base directory two levels up from the installer location REM Determine the base directory two levels up from the installer location
@ -37,13 +40,15 @@ if exist "%WinDir%\SysWow64" (
set "ProgFiles=%programfiles%" set "ProgFiles=%programfiles%"
) )
REM Dynamically locate the UCRT path REM Dynamically locate the UCRT path if not defined
set "UCRTBasePath=%ProgFiles%\Windows Kits\10\Redist" if not defined UCRTFilesPath (
set "UCRTFilesPath=" set "UCRTBasePath=!ProgFiles!\Windows Kits\10\Redist"
for /d %%d in ("%UCRTBasePath%\*") do ( set "UCRTFilesPath="
if exist "%%d\ucrt\DLLs" ( for /d %%d in ("!UCRTBasePath!\*") do (
set "UCRTFilesPath=%%d\ucrt\DLLs" if exist "%%d\ucrt\DLLs" (
) set "UCRTFilesPath=%%d\ucrt\DLLs"
)
)
) )
REM Verify Inno Setup is installed REM Verify Inno Setup is installed