mirror of
https://github.com/utmapp/UTM.git
synced 2026-10-12 02:24:01 +00:00
The macOS build embeds D3DMetal.framework when the sysroot ships it, but the framework is distributed separately and cannot be committed. When D3DM_DIST_DMG_URL is set, fetch the distribution DMG and stage the framework into the universal sysroot before it is packed into the artifact and saved to the cache, so downstream builds pick it up. Builds without the variable set are unaffected. We cannot ship a com.apple.* bundle, but D3DMetal loads its own default.metallib through [NSBundle bundleWithIdentifier:@"com.apple.D3DMetal"] using that identifier as a literal compiled into the framework binary, so the rebrand rewrites both the Info.plist and the binary. Rewriting only one makes the lookup return nil and every D3DMetal process aborts in -[MTLDevice newLibraryWithFile:nil error:]. Staging lives in scripts/install_d3dmetal.sh so it can also be run by hand. Assisted-by: Claude:claude-opus-5