Deps_builder: Win: X64: Fix msys2 setup

on a freshly installed environment diff.exe requires newer runtime
dll's. For now only fix this on X64 as on windows on arm there's
issues with newer msys2 versions (but I do now know exactly what
they are anthony has brought it up in the past) this can however
not remain in a broken state, so fixing it for X64 only.

Also fix typo in download_package function

These two fixes together should bring a fresh vmprep install back
to working order.
This commit is contained in:
Ray Molenkamp
2025-05-19 14:43:49 -06:00
parent 867256f4c8
commit 73c751afaf

View File

@@ -24,7 +24,7 @@ macro(download_package package_name)
set(MSYS2_${package_name}_FILE ${_final_filename})
if(NOT EXISTS "${_final_filename}")
if(MSYS2_USE_UPSTREAM_PACKAGES)
set(_final_url ${URI})
set(_final_url ${URL})
else()
set(_final_url "https://projects.blender.org/blender/lib-windows_x64/media/branch/build_environment/${_file_name}")
endif()
@@ -132,6 +132,20 @@ if(NOT EXISTS "${DOWNLOAD_DIR}/msys2/msys64/usr/bin/m4.exe")
)
message(STATUS "Installing required packages")
if(NOT BLENDER_PLATFORM_WINDOWS_ARM)
# A newer runtime package is required since the tools downloaded in the next step
# depend on it, we however cannot update the runtime from a msys2_shell.cmd since
# bash.exe will lock the runtime dlls so we execute pacman directly.
#
# For now only run this on X64 as there are some known issues (but unknown to me)
# with newer msys2 on Windows on ARM.
execute_process(
COMMAND ${DOWNLOAD_DIR}/msys2/msys64/usr/bin/pacman -S msys2-runtime --noconfirm
WORKING_DIRECTORY ${DOWNLOAD_DIR}/msys2/msys64
)
endif()
execute_process(
COMMAND ${DOWNLOAD_DIR}/msys2/msys64/msys2_shell.cmd -defterm -no-start -clang64 -c
"pacman -S patch m4 coreutils pkgconf make diffutils autoconf-wrapper --noconfirm && exit"