) -> AnyElement {
+ if cfg!(feature = "app-store") {
+ return v_flex()
+ .gap_3()
+ .child(div().font_weight(FontWeight::MEDIUM).child("Mac App Store"))
+ .child(hint("Updates are managed by the Mac App Store.", cx))
+ .child(
+ Button::new("app-store-updates")
+ .small()
+ .outline()
+ .label(crate::i18n::text("Open App Store"))
+ .on_click(|_, _, cx| cx.open_url("macappstore://showUpdates")),
+ )
+ .into_any_element();
+ }
let Some(store) = crate::updates::maybe_store(cx) else {
return div().into_any_element();
};
diff --git a/crates/beacon-ui/src/sources.rs b/crates/beacon-ui/src/sources.rs
index 1c79a54..19dc8ed 100644
--- a/crates/beacon-ui/src/sources.rs
+++ b/crates/beacon-ui/src/sources.rs
@@ -42,6 +42,8 @@ pub(crate) fn kubeconfig_path(id: &beacon_kube::ClusterId, cx: &App) -> Option) {
+ if cfg!(feature = "app-store") {
+ if kind == CheckKind::Manual {
+ cx.open_url("macappstore://showUpdates");
+ }
+ return;
+ }
if matches!(self.status, Status::Checking) {
// A manual request may reuse the running background check, but its
// result must now report errors to the user who requested it.
diff --git a/crates/beacon-updater/Cargo.toml b/crates/beacon-updater/Cargo.toml
index 4e3935e..e801686 100644
--- a/crates/beacon-updater/Cargo.toml
+++ b/crates/beacon-updater/Cargo.toml
@@ -5,6 +5,9 @@ edition.workspace = true
rust-version.workspace = true
license.workspace = true
+[features]
+app-store = []
+
[dependencies]
anyhow.workspace = true
base64.workspace = true
diff --git a/crates/beacon-updater/src/install.rs b/crates/beacon-updater/src/install.rs
index 5f8182d..4ab7dc7 100644
--- a/crates/beacon-updater/src/install.rs
+++ b/crates/beacon-updater/src/install.rs
@@ -26,6 +26,9 @@ pub enum Installation {
}
impl Installation {
pub fn detect() -> Self {
+ if cfg!(feature = "app-store") {
+ return Self::Managed;
+ }
let Ok(executable) = std::env::current_exe() else {
return Self::Managed;
};
@@ -51,7 +54,7 @@ impl Installation {
Self::Managed
}
pub fn can_install(&self) -> bool {
- !matches!(self, Self::Managed)
+ !cfg!(feature = "app-store") && !matches!(self, Self::Managed)
}
pub fn platform(&self) -> String {
let format = match self {
@@ -177,6 +180,9 @@ pub fn prepare_install(
}
/// Must be called before logging workers, Tokio or GPUI are initialized.
pub fn helper_main() -> Option> {
+ if cfg!(feature = "app-store") {
+ return None;
+ }
let mut args = std::env::args_os().skip(1);
if args.next().as_deref() != Some(std::ffi::OsStr::new("--beacon-update")) {
return None;
diff --git a/crates/beacon-updater/src/lib.rs b/crates/beacon-updater/src/lib.rs
index b1fdd01..bd18066 100644
--- a/crates/beacon-updater/src/lib.rs
+++ b/crates/beacon-updater/src/lib.rs
@@ -156,6 +156,9 @@ impl Client {
channel: Channel,
installation: &Installation,
) -> Result