diff --git a/crates/language/src/language.rs b/crates/language/src/language.rs index 786b158551da35c7f8baee240dc349e5c9d930a6..73de5af12c3db0b2c4d541700225e20d4f9b8e6e 100644 --- a/crates/language/src/language.rs +++ b/crates/language/src/language.rs @@ -260,15 +260,8 @@ impl Language { const ZED_BUNDLE: Option<&'static str> = option_env!("ZED_BUNDLE"); let binary_path = if ZED_BUNDLE.map_or(Ok(false), |b| b.parse())? { - let bundled_path = cx - .platform() - .path_for_resource(Some(&config.binary), None)?; - std::fs::set_permissions( - &bundled_path, - ::from_mode(0o755), - ) - .unwrap(); - bundled_path + cx.platform() + .path_for_resource(Some(&config.binary), None)? } else { Path::new(&config.binary).to_path_buf() }; diff --git a/script/bundle b/script/bundle index a9b0fe3ddea1d48463d29868428d7ed5e7685d5d..ecc295de9a76484fdbed475ec203cbcbfb903c99 100755 --- a/script/bundle +++ b/script/bundle @@ -23,7 +23,6 @@ lipo -create target/x86_64-apple-darwin/release/Zed target/aarch64-apple-darwin/ # Bundle rust-analyzer cp vendor/bin/rust-analyzer target/x86_64-apple-darwin/release/bundle/osx/Zed.app/Contents/Resources/ -chmod -x target/x86_64-apple-darwin/release/bundle/osx/Zed.app/Contents/Resources/rust-analyzer # 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. if [[ -n $MACOS_CERTIFICATE && -n $MACOS_CERTIFICATE_PASSWORD && -n $APPLE_NOTARIZATION_USERNAME && -n $APPLE_NOTARIZATION_PASSWORD ]]; then @@ -35,6 +34,7 @@ if [[ -n $MACOS_CERTIFICATE && -n $MACOS_CERTIFICATE_PASSWORD && -n $APPLE_NOTAR security import /tmp/zed-certificate.p12 -k zed.keychain -P $MACOS_CERTIFICATE_PASSWORD -T /usr/bin/codesign rm /tmp/zed-certificate.p12 security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $MACOS_CERTIFICATE_PASSWORD zed.keychain + /usr/bin/codesign --force --deep --timestamp --options runtime --sign "Zed Industries, Inc." target/x86_64-apple-darwin/release/bundle/osx/Zed.app/Contents/Resources/rust-analyzer -v /usr/bin/codesign --force --deep --timestamp --options runtime --sign "Zed Industries, Inc." target/x86_64-apple-darwin/release/bundle/osx/Zed.app -v security default-keychain -s login.keychain else