mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-24 11:01:54 +00:00
cli: Fix support for older macOS versions (#22515)
Close #22419 Release Notes: - Fixed `zed` cli crash by `ScreenCaptureKit` library not loaded error on macOS lower versions. <img width="843" alt="image" src="https://github.com/user-attachments/assets/9e0b615e-933f-4808-bf20-3e37e9e8bc6d" /> --- The main reason is the `cli` depends on `release_channel`, and it depends on `gpui`. ``` $ cargo tree -p cli ├── release_channel v0.1.0 (/Users/jason/github/zed/crates/release_channel) │ └── gpui v0.1.0 (/Users/jason/github/zed/crates/gpui) │ ├── anyhow v1.0.95 │ ├── async-task v4.7.1 │ ├── block v0.1.6 │ ├── cocoa v0.26.0 ```
This commit is contained in:
parent
e25789893d
commit
72057e5716
1 changed files with 6 additions and 0 deletions
|
@ -2,4 +2,10 @@ fn main() {
|
||||||
if std::env::var("ZED_UPDATE_EXPLANATION").is_ok() {
|
if std::env::var("ZED_UPDATE_EXPLANATION").is_ok() {
|
||||||
println!(r#"cargo:rustc-cfg=feature="no-bundled-uninstall""#);
|
println!(r#"cargo:rustc-cfg=feature="no-bundled-uninstall""#);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if cfg!(target_os = "macos") {
|
||||||
|
println!("cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET=10.15.7");
|
||||||
|
// Weakly link ScreenCaptureKit to ensure can be used on macOS 10.15+.
|
||||||
|
println!("cargo:rustc-link-arg=-Wl,-weak_framework,ScreenCaptureKit");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue