From 5cf65ed6b78c877a27911db1fd3001f8dbbdba4f Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Tue, 4 May 2021 17:29:39 -0600 Subject: [PATCH] Ad hoc code-sign the app bundle Apparently this is necessary to run on the M1 macs --- script/bundle | 3 +++ 1 file changed, 3 insertions(+) diff --git a/script/bundle b/script/bundle index ac13d903ff..197bc7821c 100755 --- a/script/bundle +++ b/script/bundle @@ -13,6 +13,9 @@ cargo build --release --target aarch64-apple-darwin # Replace the bundle's binary with a "fat binary" that combines the two architecture-specific binaries lipo -create target/x86_64-apple-darwin/release/Zed target/aarch64-apple-darwin/release/Zed -output target/x86_64-apple-darwin/release/bundle/osx/Zed.app/Contents/MacOS/zed +# Sign the app bundle with an ad-hoc signature so it runs on the M1. We need a real certificate but this works for now. +codesign --force --deep -s - target/x86_64-apple-darwin/release/bundle/osx/Zed.app + # Create a DMG mkdir -p target/release hdiutil create -volname Zed -srcfolder target/x86_64-apple-darwin/release/bundle/osx -ov -format UDZO target/release/Zed.dmg