Skip to content

Play your own Switch games on iPhone/iPad — one-click macOS app, no terminal. | 把 Switch 游戏装进 iPhone:图形界面一键构建,不用命令行。Bring your own game.

Do not sign spirv-cross again when the app bundles the engine

v0lumehi9d21dbb1ba5c
diff --git a/.github/workflows/build-mac-app.yml b/.github/workflows/build-mac-app.yml
index 9ab37ed4..7c2c4c42 100644
--- a/.github/workflows/build-mac-app.yml
+++ b/.github/workflows/build-mac-app.yml
@@ -232,11 +232,15 @@ jobs:
tools/bundle_tools.sh "$APP/Contents/Resources" "$RUNNER_TEMP/bundle-tools-work"
# The engine tree (Contents/ is read-only once signed: the launcher copies it to ~/Library/Application Support/NX2Apple/ on first
# use). Its Mach-O files (the shader translator, spirv-cross) are signed on their own like the bundled tools: --deep does not reach
- # code in Resources. The zip asset keeps them as upstream built them.
+ # code in Resources. The zip asset keeps them as upstream built them. spirv-cross stays as built (the linker signed it already):
+ # dmsh_chain.lock records its exact bytes, and signing it again changes them, so every build in the app stopped with
+ # "translation chain tools do not match the lock file".
ditto "$RUNNER_TEMP/engine-tree" "$APP/Contents/Resources/engine"
while IFS= read -r -d '' f; do
+ case "$f" in */dm/gfx/tools/spirv_cross_bin/spirv-cross) continue ;; esac
if file -b "$f" | grep -q 'Mach-O'; then codesign --force --sign - "$f" 2> /dev/null; fi
done < <(find "$APP/Contents/Resources/engine" -type f -perm -u+x -print0)
+ cmp "$RUNNER_TEMP/engine-tree/dm/gfx/tools/spirv_cross_bin/spirv-cross" "$APP/Contents/Resources/engine/dm/gfx/tools/spirv_cross_bin/spirv-cross"
V="${{ steps.ver.outputs.version }}"
cat > "$APP/Contents/Info.plist" <<PLIST
<?xml version="1.0" encoding="UTF-8"?>