Fix hdCycles DLL init failure in install: exclude bundled CRTs, add python311.dll

Two independent fixes for the install layout:

1. Cycles bundles old MSVC CRT DLLs (MSVCP140 v14.34, VCRUNTIME140 v14.34)
   that are placed in install/bin/ via the CYCLES_INSTALL_DIR copy. These take
   precedence over System32 on the DLL search path. sycl8.dll (built with newer
   VS2022 CRT v14.42) calls functions that don't exist in the old version, causing
   ERROR_DLL_INIT_FAILED (1114) when hdCycles.dll loads embree4 -> sycl8. Fix:
   exclude MSVCP140*.dll, VCRUNTIME140*.dll, ucrtbase*.dll, api-ms-win-*.dll from
   the install(DIRECTORY cycles_install/) rule. The system VC++ Redistributable
   satisfies these at runtime.

2. usd_python.dll (the OpenUSD Python bindings DLL) was compiled against Python
   3.11 while our build targets Python 3.12. Add auto-detection of python311.dll
   from common install paths and deploy it to both the build output and install/bin/
   so the dependency chain hdCycles->usd_python->python311 is satisfied.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-25 09:07:38 +08:00
parent e85944ccb6
commit 4b7323c24c
2 changed files with 51 additions and 5 deletions
+3 -2
View File
@@ -13,7 +13,7 @@
"IMGUI_DIR": "${sourceDir}/third_party/imgui-1.92.7",
"CMAKE_CXX_STANDARD": "17",
"CMAKE_CXX_STANDARD_REQUIRED": "ON",
"BUILD_TESTS": "ON",
"BUILD_TESTS": "OFF",
"WITH_CYCLES": "ON",
"HDARNOLD_ROOT": "E:/library/hdArnold",
"ARNOLD_LOCATION": "C:/Autodesk/mtoa/5.5.0/2026",
@@ -68,7 +68,8 @@
"name": "release",
"displayName": "Release Build",
"configurePreset": "release",
"configuration": "Release"
"configuration": "Release",
"targets": ["install"]
},
{
"name": "no-tests",