Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,19 +106,24 @@ jobs:
ARM="$PWD/arm64/DFTFringe.app"
INTEL="$PWD/x86_64/DFTFringe.app"

diff <(cd "$ARM" && find . | sort) <(cd "$INTEL" && find . | sort) \
|| { echo "the two bundles do not contain the same files"; exit 1; }
rm -rf "$ARM/Contents/_CodeSignature" "$INTEL/Contents/_CodeSignature"

cp -R "$ARM" DFTFringe.app
UNIVERSAL="$PWD/DFTFringe.app"
find "$UNIVERSAL" -type f | while read -r f; do
rel="${f#$UNIVERSAL/}"
if file -b "$f" | grep -q "Mach-O"; then
cp -Rn "$INTEL/" DFTFringe.app/ || true

find DFTFringe.app -type f | while read -r f; do
rel="${f#DFTFringe.app/}"
if [ -f "$ARM/$rel" ] && [ -f "$INTEL/$rel" ] && file -b "$f" | grep -q "Mach-O"; then
lipo -create "$ARM/$rel" "$INTEL/$rel" -output "$f"
fi
done
echo "--- architectures in the merged executable:"
lipo -info "$UNIVERSAL/Contents/MacOS/DFTFringe"

ARCHS="$(lipo -archs DFTFringe.app/Contents/MacOS/DFTFringe)"
echo "--- architectures in the merged executable: $ARCHS"
case "$ARCHS" in
*arm64*x86_64*|*x86_64*arm64*) ;;
*) echo "the merged executable is not universal"; exit 1 ;;
esac

- name: Ad-hoc sign
run: |
Expand Down
Loading