windows: Implement cli and handle open_urls (#25412)

Closes #ISSUE

Release Notes:

- N/A
This commit is contained in:
张小白 2025-02-27 08:27:19 +08:00 committed by GitHub
parent 9822d9673c
commit 672a472a23
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 290 additions and 33 deletions

View file

@ -23,6 +23,15 @@ pub static RELEASE_CHANNEL: LazyLock<ReleaseChannel> =
_ => panic!("invalid release channel {}", *RELEASE_CHANNEL_NAME),
});
/// The app identifier for the current release channel, Windows only.
#[cfg(target_os = "windows")]
pub static APP_IDENTIFIER: LazyLock<&str> = LazyLock::new(|| match *RELEASE_CHANNEL {
ReleaseChannel::Dev => "Zed-Editor-Dev",
ReleaseChannel::Nightly => "Zed-Editor-Nightly",
ReleaseChannel::Preview => "Zed-Editor-Preview",
ReleaseChannel::Stable => "Zed-Editor-Stable",
});
/// The Git commit SHA that Zed was built at.
#[derive(Clone)]
pub struct AppCommitSha(pub String);