From db924f735286c58d8c3d048fbf1f9c6df21c3af6 Mon Sep 17 00:00:00 2001 From: Yuri Karamian Date: Thu, 11 Jun 2026 21:24:42 +0200 Subject: [PATCH] Disable in-app updater for repo builds (HELIXNOTES_INSTALL_TYPE), open tel:/sms: links in the system handler (#98), label AI button \"OpenAI Compatible\" --- src-tauri/src/commands.rs | 11 +++++++++++ src/lib/components/SettingsPanel.svelte | 11 +++++++++-- src/lib/stores/app.ts | 9 +++++++++ src/routes/+layout.svelte | 10 ++++++---- 4 files changed, 35 insertions(+), 6 deletions(-) diff --git a/src-tauri/src/commands.rs b/src-tauri/src/commands.rs index 06821d9..3e6d005 100644 --- a/src-tauri/src/commands.rs +++ b/src-tauri/src/commands.rs @@ -1740,8 +1740,12 @@ fn xdg_open(arg: &str) -> Result<(), String> { } #[cfg(target_os = "windows")] { + use std::os::windows::process::CommandExt; + // CREATE_NO_WINDOW: open the URL/path without flashing a console window. + const CREATE_NO_WINDOW: u32 = 0x0800_0000; std::process::Command::new("cmd") .args(["/C", "start", "", arg]) + .creation_flags(CREATE_NO_WINDOW) .spawn() .map_err(|e| format!("Failed to open {}: {}", arg, e))?; } @@ -2253,6 +2257,13 @@ fn save_app_config(config: &AppConfig) -> Result<(), String> { #[tauri::command] pub fn get_install_type() -> String { + // Build-time override for distro packagers (e.g. Solus): build with + // HELIXNOTES_INSTALL_TYPE=solus to report that type and suppress the in-app updater. + if let Some(forced) = option_env!("HELIXNOTES_INSTALL_TYPE") { + if !forced.is_empty() { + return forced.to_string(); + } + } if cfg!(target_os = "macos") { "macos".to_string() } else if cfg!(target_os = "windows") { diff --git a/src/lib/components/SettingsPanel.svelte b/src/lib/components/SettingsPanel.svelte index cc2d5cf..60b57d1 100644 --- a/src/lib/components/SettingsPanel.svelte +++ b/src/lib/components/SettingsPanel.svelte @@ -1,5 +1,5 @@