From 8aa131a11dd8e40cedc943a58a1401615748dcf2 Mon Sep 17 00:00:00 2001 From: Krzysztof Andrelczyk Date: Fri, 21 Feb 2025 00:31:10 +0100 Subject: [PATCH 01/25] fallback targets --- .../process/permissions/schemas/schema.json | 2 +- plugins/updater/src/error.rs | 6 + plugins/updater/src/updater.rs | 54 ++++++--- .../updater/tests/app-updater/tests/update.rs | 106 +++++++++++++----- 4 files changed, 126 insertions(+), 42 deletions(-) diff --git a/plugins/process/permissions/schemas/schema.json b/plugins/process/permissions/schemas/schema.json index 1243c7d3..95f67149 100644 --- a/plugins/process/permissions/schemas/schema.json +++ b/plugins/process/permissions/schemas/schema.json @@ -322,4 +322,4 @@ ] } } -} +} \ No newline at end of file diff --git a/plugins/updater/src/error.rs b/plugins/updater/src/error.rs index d6d9b0ce..2d508a2e 100644 --- a/plugins/updater/src/error.rs +++ b/plugins/updater/src/error.rs @@ -30,6 +30,9 @@ pub enum Error { /// Operating system is not supported. #[error("Unsupported OS, expected one of `linux`, `darwin` or `windows`.")] UnsupportedOs, + /// Can't determine which type of installer was used for the app + #[error("Couldn't determinet installation method")] + UnknownInstaller, /// Failed to determine updater package extract path #[error("Failed to determine updater package extract path.")] FailedToDetermineExtractPath, @@ -42,6 +45,9 @@ pub enum Error { /// The platform was not found on the updater JSON response. #[error("the platform `{0}` was not found on the response `platforms` object")] TargetNotFound(String), + /// Neither the platform not the fallback platform was not found on the updater JSON response. + #[error("the platform `{0}` and `{1}` were not found on the response `platforms` object")] + TargetsNotFound(String, String), /// Download failed #[error("`{0}`")] Network(String), diff --git a/plugins/updater/src/updater.rs b/plugins/updater/src/updater.rs index e93f093a..de4cd40c 100644 --- a/plugins/updater/src/updater.rs +++ b/plugins/updater/src/updater.rs @@ -68,26 +68,30 @@ pub struct RemoteRelease { impl RemoteRelease { /// The release's download URL for the given target. - pub fn download_url(&self, target: &str) -> Result<&Url> { + pub fn download_url(&self, target: &str, fallback_target: &Option) -> Result<&Url> { match self.data { RemoteReleaseInner::Dynamic(ref platform) => Ok(&platform.url), RemoteReleaseInner::Static { ref platforms } => platforms .get(target) - .map_or(Err(Error::TargetNotFound(target.to_string())), |p| { - Ok(&p.url) - }), + .map_or_else( + || match fallback_target { + Some(fallback) => platforms.get(fallback).map_or(Err(Error::TargetsNotFound(target.to_string(), fallback.to_string())), |p| Ok(&p.url)), + None => Err(Error::TargetNotFound(target.to_string())) + }, |p| { Ok(&p.url) }) } } /// The release's signature for the given target. - pub fn signature(&self, target: &str) -> Result<&String> { + pub fn signature(&self, target: &str, fallback_target: &Option) -> Result<&String> { match self.data { RemoteReleaseInner::Dynamic(ref platform) => Ok(&platform.signature), RemoteReleaseInner::Static { ref platforms } => platforms .get(target) - .map_or(Err(Error::TargetNotFound(target.to_string())), |platform| { - Ok(&platform.signature) - }), + .map_or_else( + || match fallback_target { + Some(fallback) => platforms.get(fallback).map_or(Err(Error::TargetsNotFound(target.to_string(), fallback.to_string())), |p| Ok(&p.signature)), + None => Err(Error::TargetNotFound(target.to_string())) + }, |p| { Ok(&p.signature) }) } } } @@ -242,11 +246,16 @@ impl UpdaterBuilder { }; let arch = get_updater_arch().ok_or(Error::UnsupportedArch)?; - let (target, json_target) = if let Some(target) = self.target { - (target.clone(), target) + let (target, json_target, fallback_target) = if let Some(target) = self.target { + (target.clone(), target, None) } else { let target = get_updater_target().ok_or(Error::UnsupportedOs)?; - (target.to_string(), format!("{target}-{arch}")) + let installer = get_updater_installer()?; + let json_target = format!("{target}-{arch}"); + match installer { + Some(installer) => (target.to_owned(), format!("{json_target}-{installer}"), Some(json_target)), + None => (target.to_owned(), json_target, None) + } }; let executable_path = self.executable_path.clone().unwrap_or(current_exe()?); @@ -271,6 +280,7 @@ impl UpdaterBuilder { arch, target, json_target, + fallback_target, headers: self.headers, extract_path, on_before_exit: self.on_before_exit, @@ -299,10 +309,12 @@ pub struct Updater { proxy: Option, endpoints: Vec, arch: &'static str, - // The `{{target}}` variable we replace in the endpoint + // The `{{target}}` variable we replace in the endpoint and serach for in the JSON target: String, // The value we search if the updater server returns a JSON with the `platforms` object json_target: String, + // If target doesn't exist in the JSON check for this one + fallback_target: Option, headers: HeaderMap, extract_path: PathBuf, on_before_exit: Option, @@ -317,7 +329,6 @@ impl Updater { // we want JSON only let mut headers = self.headers.clone(); headers.insert("Accept", HeaderValue::from_str("application/json").unwrap()); - // Set SSL certs for linux if they aren't available. #[cfg(target_os = "linux")] { @@ -420,9 +431,9 @@ impl Updater { extract_path: self.extract_path.clone(), version: release.version.to_string(), date: release.pub_date, - download_url: release.download_url(&self.json_target)?.to_owned(), + download_url: release.download_url(&self.json_target, &self.fallback_target)?.to_owned(), body: release.notes.clone(), - signature: release.signature(&self.json_target)?.to_owned(), + signature: release.signature(&self.json_target, &self.fallback_target)?.to_owned(), raw_json: raw_json.unwrap(), timeout: self.timeout, proxy: self.proxy.clone(), @@ -1099,6 +1110,7 @@ pub(crate) fn get_updater_target() -> Option<&'static str> { } } + pub(crate) fn get_updater_arch() -> Option<&'static str> { if cfg!(target_arch = "x86") { Some("i686") @@ -1113,6 +1125,18 @@ pub(crate) fn get_updater_arch() -> Option<&'static str> { } } +pub(crate) fn get_updater_installer() -> Result> { + if cfg!(target_os = "linux") { + Ok(Some("deb")) + } else if cfg!(target_os = "windows") { + Ok(Some("wix")) + } else if cfg!(target_os = "macos") { + Ok(None) + } else { + Err(Error::UnknownInstaller) + } +} + pub fn extract_path_from_executable(executable_path: &Path) -> Result { // Return the path of the current executable by default // Example C:\Program Files\My App\ diff --git a/plugins/updater/tests/app-updater/tests/update.rs b/plugins/updater/tests/app-updater/tests/update.rs index 230ab376..bb248426 100644 --- a/plugins/updater/tests/app-updater/tests/update.rs +++ b/plugins/updater/tests/app-updater/tests/update.rs @@ -17,6 +17,7 @@ use tauri::utils::config::{Updater, V1Compatible}; const UPDATER_PRIVATE_KEY: &str = "dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5TlFOMFpXYzJFOUdjeHJEVXY4WE1TMUxGNDJVUjNrMmk1WlR3UVJVUWwva0FBQkFBQUFBQUFBQUFBQUlBQUFBQUpVK3ZkM3R3eWhyN3hiUXhQb2hvWFVzUW9FbEs3NlNWYjVkK1F2VGFRU1FEaGxuRUtlell5U0gxYS9DbVRrS0YyZVJGblhjeXJibmpZeGJjS0ZKSUYwYndYc2FCNXpHalM3MHcrODMwN3kwUG9SOWpFNVhCSUd6L0E4TGRUT096TEtLR1JwT1JEVFU9Cg=="; const UPDATED_EXIT_CODE: i32 = 0; +const ERROR_EXIT_CODE: i32 = 1; const UP_TO_DATE_EXIT_CODE: i32 = 2; #[derive(Serialize)] @@ -45,7 +46,7 @@ struct Update { platforms: HashMap, } -fn build_app(cwd: &Path, config: &Config, bundle_updater: bool, target: BundleTarget) { +fn build_app(cwd: &Path, config: &Config, bundle_updater: bool, targets: Vec) { let mut command = Command::new("cargo"); command .args(["tauri", "build", "--debug", "--verbose"]) @@ -55,19 +56,20 @@ fn build_app(cwd: &Path, config: &Config, bundle_updater: bool, target: BundleTa .env("TAURI_SIGNING_PRIVATE_KEY_PASSWORD", "") .current_dir(cwd); + command.args(["--bundles"]); #[cfg(target_os = "linux")] - command.args(["--bundles", target.name()]); + command.args(targets.into_iter().map(|t| t.name()).collect::>()); #[cfg(target_os = "macos")] - command.args(["--bundles", target.name()]); + command.args([target.name()]); if bundle_updater { #[cfg(windows)] - command.args(["--bundles", "msi", "nsis"]); + command.args(["msi", "nsis"]); - command.args(["--bundles", "updater"]); + command.args(["updater"]); } else { #[cfg(windows)] - command.args(["--bundles", target.name()]); + command.args([target.name()]); } let status = command @@ -82,6 +84,8 @@ fn build_app(cwd: &Path, config: &Config, bundle_updater: bool, target: BundleTa #[derive(Copy, Clone)] enum BundleTarget { AppImage, + Deb, + Rpm, App, @@ -93,6 +97,8 @@ impl BundleTarget { fn name(self) -> &'static str { match self { Self::AppImage => "appimage", + Self::Deb => "deb", + Self::Rpm => "rpm", Self::App => "app", Self::Msi => "msi", Self::Nsis => "nsis", @@ -100,25 +106,73 @@ impl BundleTarget { } } -impl Default for BundleTarget { - fn default() -> Self { +impl BundleTarget { + fn get_targets() -> Vec { #[cfg(any(target_os = "macos", target_os = "ios"))] - return Self::App; + return vec![Self::App]; #[cfg(target_os = "linux")] - return Self::AppImage; + return vec![Self::AppImage, Self::Deb, Self::Rpm]; #[cfg(windows)] - return Self::Nsis; + return vec![Self::Nsis]; + } +} + +fn insert_plaforms( + bundle_target: BundleTarget, + platforms: &mut HashMap, + target: String, + signature: String, +) { + match bundle_target { + // Should use deb, no fallback + BundleTarget::Deb => { + platforms.insert( + format!("{target}-deb"), + PlatformUpdate { + signature, + url: "http://localhost:3007/download", + with_elevated_task: false, + }, + ); + } + // Should fail + BundleTarget::Rpm => {} + // AppImage should use fallback + _ => { + platforms.insert( + target, + PlatformUpdate { + signature, + url: "http://localhost:3007/download", + with_elevated_task: false, + }, + ); + } } } #[cfg(target_os = "linux")] fn bundle_paths(root_dir: &Path, version: &str) -> Vec<(BundleTarget, PathBuf)> { - vec![( - BundleTarget::AppImage, - root_dir.join(format!( - "target/debug/bundle/appimage/app-updater_{version}_amd64.AppImage" - )), - )] + vec![ + ( + BundleTarget::AppImage, + root_dir.join(format!( + "target/debug/bundle/appimage/app-updater_{version}_amd64.AppImage" + )), + ), + ( + BundleTarget::Deb, + root_dir.join(format!( + "target/debug/bundle/deb/app-updater_{version}_amd64.deb" + )), + ), + ( + BundleTarget::Rpm, + root_dir.join(format!( + "target/debug/bundle/rpm/app-updater_{version}_amd64.rpm" + )), + ), + ] } #[cfg(target_os = "macos")] @@ -161,7 +215,6 @@ fn bundle_paths(root_dir: &Path, version: &str) -> Vec<(BundleTarget, PathBuf)> } #[test] -#[ignore] fn update_app() { let target = tauri_plugin_updater::target().expect("running updater test in an unsupported platform"); @@ -188,7 +241,7 @@ fn update_app() { ); // bundle app update - build_app(&manifest_dir, &config, true, Default::default()); + build_app(&manifest_dir, &config, true, BundleTarget::get_targets()); let updater_zip_ext = if v1_compatible { if cfg!(windows) { @@ -249,14 +302,13 @@ fn update_app() { "/" => { let mut platforms = HashMap::new(); - platforms.insert( + insert_plaforms( + bundle_target, + &mut platforms, target.clone(), - PlatformUpdate { - signature: signature.clone(), - url: "http://localhost:3007/download", - with_elevated_task: false, - }, + signature.clone(), ); + let body = serde_json::to_vec(&Update { version: "1.0.0", date: time::OffsetDateTime::now_utc() @@ -293,11 +345,13 @@ fn update_app() { config.version = "0.1.0"; // bundle initial app version - build_app(&manifest_dir, &config, false, bundle_target); + build_app(&manifest_dir, &config, false, vec![bundle_target]); let status_checks = if matches!(bundle_target, BundleTarget::Msi) { // for msi we can't really check if the app was updated, because we can't change the install path vec![UPDATED_EXIT_CODE] + } else if matches!(bundle_target, BundleTarget::Rpm) { + vec![ERROR_EXIT_CODE] } else { vec![UPDATED_EXIT_CODE, UP_TO_DATE_EXIT_CODE] }; From 6ae53cfeaeab684c4f21ea880bfc41cbf0566c8e Mon Sep 17 00:00:00 2001 From: Krzysztof Andrelczyk Date: Sat, 1 Mar 2025 18:03:10 +0100 Subject: [PATCH 02/25] linux test --- plugins/updater/src/updater.rs | 144 +++++++++++------- .../updater/tests/app-updater/tests/update.rs | 143 ++++++++--------- 2 files changed, 163 insertions(+), 124 deletions(-) diff --git a/plugins/updater/src/updater.rs b/plugins/updater/src/updater.rs index de4cd40c..dacb15af 100644 --- a/plugins/updater/src/updater.rs +++ b/plugins/updater/src/updater.rs @@ -34,6 +34,31 @@ use crate::{ const UPDATER_USER_AGENT: &str = concat!(env!("CARGO_PKG_NAME"), "/", env!("CARGO_PKG_VERSION"),); +#[derive(Clone)] +pub enum Installer { + AppImage, + Deb, + Rpm, + + App, + + Msi, + Nsis, +} + +impl Installer{ + fn suffix(self) -> &'static str { + match self { + Self::AppImage => "appimage", + Self::Deb => "deb", + Self::Rpm => "rpm", + Self::App => "app", + Self::Msi => "msi", + Self::Nsis => "nsis", + } + } +} + #[derive(Debug, Deserialize, Serialize, Clone)] pub struct ReleaseManifestPlatform { /// Download URL for the platform @@ -68,28 +93,32 @@ pub struct RemoteRelease { impl RemoteRelease { /// The release's download URL for the given target. - pub fn download_url(&self, target: &str, fallback_target: &Option) -> Result<&Url> { + pub fn download_url(&self, target: &str, installer: Option) -> Result<&Url> { + + let fallback_target = installer.map(|installer| format!("{target}-{}", installer.suffix())); match self.data { RemoteReleaseInner::Dynamic(ref platform) => Ok(&platform.url), RemoteReleaseInner::Static { ref platforms } => platforms .get(target) .map_or_else( || match fallback_target { - Some(fallback) => platforms.get(fallback).map_or(Err(Error::TargetsNotFound(target.to_string(), fallback.to_string())), |p| Ok(&p.url)), + Some(fallback) => platforms.get(&fallback).map_or(Err(Error::TargetsNotFound(target.to_string(), fallback)), |p| Ok(&p.url)), None => Err(Error::TargetNotFound(target.to_string())) }, |p| { Ok(&p.url) }) } } /// The release's signature for the given target. - pub fn signature(&self, target: &str, fallback_target: &Option) -> Result<&String> { + pub fn signature(&self, target: &str, installer: Option) -> Result<&String> { + let fallback_target = installer.map(|installer| format!("{target}-{}", installer.suffix())); + match self.data { RemoteReleaseInner::Dynamic(ref platform) => Ok(&platform.signature), RemoteReleaseInner::Static { ref platforms } => platforms .get(target) .map_or_else( || match fallback_target { - Some(fallback) => platforms.get(fallback).map_or(Err(Error::TargetsNotFound(target.to_string(), fallback.to_string())), |p| Ok(&p.signature)), + Some(fallback) => platforms.get(&fallback).map_or(Err(Error::TargetsNotFound(target.to_string(), fallback)), |p| Ok(&p.signature)), None => Err(Error::TargetNotFound(target.to_string())) }, |p| { Ok(&p.signature) }) } @@ -246,16 +275,12 @@ impl UpdaterBuilder { }; let arch = get_updater_arch().ok_or(Error::UnsupportedArch)?; - let (target, json_target, fallback_target) = if let Some(target) = self.target { - (target.clone(), target, None) + let (target, json_target) = if let Some(target) = self.target { + (target.clone(), target ) } else { let target = get_updater_target().ok_or(Error::UnsupportedOs)?; - let installer = get_updater_installer()?; let json_target = format!("{target}-{arch}"); - match installer { - Some(installer) => (target.to_owned(), format!("{json_target}-{installer}"), Some(json_target)), - None => (target.to_owned(), json_target, None) - } + (target.to_owned(), json_target) }; let executable_path = self.executable_path.clone().unwrap_or(current_exe()?); @@ -280,7 +305,6 @@ impl UpdaterBuilder { arch, target, json_target, - fallback_target, headers: self.headers, extract_path, on_before_exit: self.on_before_exit, @@ -313,8 +337,6 @@ pub struct Updater { target: String, // The value we search if the updater server returns a JSON with the `platforms` object json_target: String, - // If target doesn't exist in the JSON check for this one - fallback_target: Option, headers: HeaderMap, extract_path: PathBuf, on_before_exit: Option, @@ -325,6 +347,7 @@ pub struct Updater { } impl Updater { + pub async fn check(&self) -> Result> { // we want JSON only let mut headers = self.headers.clone(); @@ -420,6 +443,8 @@ impl Updater { Some(comparator) => comparator(self.current_version.clone(), release.clone()), None => release.version > self.current_version, }; + + let installer = get_updater_installer(&self.extract_path)?; let update = if should_update { Some(Update { @@ -431,9 +456,10 @@ impl Updater { extract_path: self.extract_path.clone(), version: release.version.to_string(), date: release.pub_date, - download_url: release.download_url(&self.json_target, &self.fallback_target)?.to_owned(), + download_url: release.download_url(&self.json_target, installer.clone())?.to_owned(), body: release.notes.clone(), - signature: release.signature(&self.json_target, &self.fallback_target)?.to_owned(), + signature: release.signature(&self.json_target, installer.clone())?.to_owned(), + installer, raw_json: raw_json.unwrap(), timeout: self.timeout, proxy: self.proxy.clone(), @@ -464,6 +490,8 @@ pub struct Update { pub date: Option, /// Target pub target: String, + /// Current installer + pub installer: Option, /// Download URL announced pub download_url: Url, /// Signature announced @@ -791,11 +819,9 @@ impl Update { /// └── ... /// fn install_inner(&self, bytes: &[u8]) -> Result<()> { - if self.is_deb_package() { - self.install_deb(bytes) - } else { - // Handle AppImage or other formats - self.install_appimage(bytes) + match self.installer { + Some(Installer::Deb) => self.install_deb(bytes), + _ =>self.install_appimage(bytes) } } @@ -870,38 +896,6 @@ impl Update { Err(Error::TempDirNotOnSameMountPoint) } - fn is_deb_package(&self) -> bool { - // First check if we're in a typical Debian installation path - let in_system_path = self - .extract_path - .to_str() - .map(|p| p.starts_with("/usr")) - .unwrap_or(false); - - if !in_system_path { - return false; - } - - // Then verify it's actually a Debian-based system by checking for dpkg - let dpkg_exists = std::path::Path::new("/var/lib/dpkg").exists(); - let apt_exists = std::path::Path::new("/etc/apt").exists(); - - // Additional check for the package in dpkg database - let package_in_dpkg = if let Ok(output) = std::process::Command::new("dpkg") - .args(["-S", &self.extract_path.to_string_lossy()]) - .output() - { - output.status.success() - } else { - false - }; - - // Consider it a deb package only if: - // 1. We're in a system path AND - // 2. We have Debian package management tools AND - // 3. The binary is tracked by dpkg - dpkg_exists && apt_exists && package_in_dpkg - } fn install_deb(&self, bytes: &[u8]) -> Result<()> { // First verify the bytes are actually a .deb package @@ -1125,11 +1119,49 @@ pub(crate) fn get_updater_arch() -> Option<&'static str> { } } -pub(crate) fn get_updater_installer() -> Result> { +fn is_deb_package(extract_path: &PathBuf) -> bool { + // First check if we're in a typical Debian installation path + let in_system_path = extract_path + .to_str() + .map(|p| p.starts_with("/usr")) + .unwrap_or(false); + + if !in_system_path { + return false; + } + + // Then verify it's actually a Debian-based system by checking for dpkg + let dpkg_exists = std::path::Path::new("/var/lib/dpkg").exists(); + let apt_exists = std::path::Path::new("/etc/apt").exists(); + + // Additional check for the package in dpkg database + let package_in_dpkg = if let Ok(output) = std::process::Command::new("dpkg") + .args(["-S", &extract_path.to_string_lossy()]) + .output() + { + output.status.success() + } else { + false + }; + + // Consider it a deb package only if: + // 1. We're in a system path AND + // 2. We have Debian package management tools AND + // 3. The binary is tracked by dpkg + dpkg_exists && apt_exists && package_in_dpkg +} + +pub(crate) fn get_updater_installer(extract_path: &PathBuf) -> Result> { if cfg!(target_os = "linux") { - Ok(Some("deb")) + if std::env::var_os("APPIMAGE").is_some() { + Ok(Some(Installer::AppImage)) + } else if is_deb_package(extract_path) { + Ok(Some(Installer::Deb)) + } else { + Err(Error::UnknownInstaller) + } } else if cfg!(target_os = "windows") { - Ok(Some("wix")) + Ok(Some(Installer::Msi)) } else if cfg!(target_os = "macos") { Ok(None) } else { diff --git a/plugins/updater/tests/app-updater/tests/update.rs b/plugins/updater/tests/app-updater/tests/update.rs index bb248426..748b11d7 100644 --- a/plugins/updater/tests/app-updater/tests/update.rs +++ b/plugins/updater/tests/app-updater/tests/update.rs @@ -71,7 +71,6 @@ fn build_app(cwd: &Path, config: &Config, bundle_updater: bool, targets: Vec, - target: String, +fn target_to_platforms( + update_platform: Option, signature: String, -) { - match bundle_target { - // Should use deb, no fallback - BundleTarget::Deb => { - platforms.insert( - format!("{target}-deb"), - PlatformUpdate { - signature, - url: "http://localhost:3007/download", - with_elevated_task: false, - }, - ); - } - // Should fail - BundleTarget::Rpm => {} - // AppImage should use fallback - _ => { - platforms.insert( - target, - PlatformUpdate { - signature, - url: "http://localhost:3007/download", - with_elevated_task: false, - }, - ); - } +) -> HashMap { + let mut platforms = HashMap::new(); + if let Some(platform) = update_platform { + platforms.insert( + platform, + PlatformUpdate { + signature, + url: "http://localhost:3007/download", + with_elevated_task: false, + }, + ); } + + platforms } #[cfg(target_os = "linux")] -fn bundle_paths(root_dir: &Path, version: &str) -> Vec<(BundleTarget, PathBuf)> { +fn test_cases( + root_dir: &Path, + version: &str, + target: String, +) -> Vec<(BundleTarget, PathBuf, Option, Vec)> { vec![ + // update using fallback ( BundleTarget::AppImage, root_dir.join(format!( "target/debug/bundle/appimage/app-updater_{version}_amd64.AppImage" )), + Some(target.clone()), + vec![UPDATED_EXIT_CODE, UP_TO_DATE_EXIT_CODE], ), + // update using full name ( - BundleTarget::Deb, + BundleTarget::AppImage, root_dir.join(format!( - "target/debug/bundle/deb/app-updater_{version}_amd64.deb" + "target/debug/bundle/appimage/app-updater_{version}_amd64.AppImage" )), + Some(format!("{target}-{}", BundleTarget::AppImage.name())), + vec![UPDATED_EXIT_CODE, UP_TO_DATE_EXIT_CODE], ), + // no update ( - BundleTarget::Rpm, + BundleTarget::AppImage, root_dir.join(format!( - "target/debug/bundle/rpm/app-updater_{version}_amd64.rpm" + "target/debug/bundle/appimage/app-updater_{version}_amd64.AppImage" )), + None, + vec![ERROR_EXIT_CODE], ), ] } #[cfg(target_os = "macos")] -fn bundle_paths(root_dir: &Path, _version: &str) -> Vec<(BundleTarget, PathBuf)> { +fn bundle_paths( + root_dir: &Path, + _version: &str, + v1compatible: bool, +) -> Vec<(BundleTarget, PathBuf)> { vec![( BundleTarget::App, root_dir.join("target/debug/bundle/macos/app-updater.app"), @@ -184,7 +185,11 @@ fn bundle_paths(root_dir: &Path, _version: &str) -> Vec<(BundleTarget, PathBuf)> } #[cfg(target_os = "ios")] -fn bundle_paths(root_dir: &Path, _version: &str) -> Vec<(BundleTarget, PathBuf)> { +fn bundle_paths( + root_dir: &Path, + _version: &str, + v1compatible: bool, +) -> Vec<(BundleTarget, PathBuf)> { vec![( BundleTarget::App, root_dir.join("target/debug/bundle/ios/app-updater.ipa"), @@ -192,12 +197,16 @@ fn bundle_paths(root_dir: &Path, _version: &str) -> Vec<(BundleTarget, PathBuf)> } #[cfg(target_os = "android")] -fn bundle_path(root_dir: &Path, _version: &str) -> PathBuf { +fn bundle_path(root_dir: &Path, _version: &str, v1compatible: bool) -> PathBuf { root_dir.join("target/debug/bundle/android/app-updater.apk") } #[cfg(windows)] -fn bundle_paths(root_dir: &Path, version: &str) -> Vec<(BundleTarget, PathBuf)> { +fn bundle_paths( + root_dir: &Path, + version: &str, + v1compatible: bool, +) -> Vec<(BundleTarget, PathBuf)> { vec![ ( BundleTarget::Nsis, @@ -240,8 +249,6 @@ fn update_app() { Updater::String(V1Compatible::V1Compatible) ); - // bundle app update - build_app(&manifest_dir, &config, true, BundleTarget::get_targets()); let updater_zip_ext = if v1_compatible { if cfg!(windows) { @@ -255,7 +262,13 @@ fn update_app() { None }; - for (bundle_target, out_bundle_path) in bundle_paths(&root_dir, "1.0.0") { + for (bundle_target, out_bundle_path, update_platform, status_checks) in + test_cases(&root_dir, "1.0.0", target.clone()) + { + // bundle app update + config.version = "1.0.0"; + build_app(&manifest_dir, &config, true, BundleTarget::get_targets()); + let bundle_updater_ext = if v1_compatible { out_bundle_path .extension() @@ -288,8 +301,6 @@ fn update_app() { )); std::fs::rename(&out_updater_path, &updater_path).expect("failed to rename bundle"); - let target = target.clone(); - // start the updater server let server = Arc::new( tiny_http::Server::http("localhost:3007").expect("failed to start updater server"), @@ -300,14 +311,8 @@ fn update_app() { for request in server_.incoming_requests() { match request.url() { "/" => { - let mut platforms = HashMap::new(); - - insert_plaforms( - bundle_target, - &mut platforms, - target.clone(), - signature.clone(), - ); + let platforms = + target_to_platforms(update_platform.clone(), signature.clone()); let body = serde_json::to_vec(&Update { version: "1.0.0", @@ -347,21 +352,12 @@ fn update_app() { // bundle initial app version build_app(&manifest_dir, &config, false, vec![bundle_target]); - let status_checks = if matches!(bundle_target, BundleTarget::Msi) { - // for msi we can't really check if the app was updated, because we can't change the install path - vec![UPDATED_EXIT_CODE] - } else if matches!(bundle_target, BundleTarget::Rpm) { - vec![ERROR_EXIT_CODE] - } else { - vec![UPDATED_EXIT_CODE, UP_TO_DATE_EXIT_CODE] - }; - for expected_exit_code in status_checks { let mut binary_cmd = if cfg!(windows) { Command::new(root_dir.join("target/debug/app-updater.exe")) } else if cfg!(target_os = "macos") { Command::new( - bundle_paths(&root_dir, "0.1.0") + test_cases(&root_dir, "0.1.0", target.clone()) .first() .unwrap() .1 @@ -369,11 +365,22 @@ fn update_app() { ) } else if std::env::var("CI").map(|v| v == "true").unwrap_or_default() { let mut c = Command::new("xvfb-run"); - c.arg("--auto-servernum") - .arg(&bundle_paths(&root_dir, "0.1.0").first().unwrap().1); + c.arg("--auto-servernum").arg( + &test_cases(&root_dir, "0.1.0", target.clone()) + .first() + .unwrap() + .1, + ); c + } else if matches!(bundle_target, BundleTarget::AppImage) { + Command::new( + &test_cases(&root_dir, "0.1.0", target.clone()) + .first() + .unwrap() + .1, + ) } else { - Command::new(&bundle_paths(&root_dir, "0.1.0").first().unwrap().1) + Command::new(root_dir.join("target/debug/app-updater")) }; binary_cmd.env("TARGET", bundle_target.name()); @@ -383,7 +390,7 @@ fn update_app() { if code != expected_exit_code { panic!( - "failed to run app, expected exit code {expected_exit_code}, got {code}" + "failed to run app bundled as {}, expected exit code {expected_exit_code}, got {code}", bundle_target.name() ); } #[cfg(windows)] From ae7a2e3198eae980943b6f94cf6097be44a6ba39 Mon Sep 17 00:00:00 2001 From: Krzysztof Andrelczyk Date: Sat, 1 Mar 2025 20:57:35 +0100 Subject: [PATCH 03/25] linux ready --- plugins/updater/src/updater.rs | 153 ++++++++++++++++++++++----------- 1 file changed, 104 insertions(+), 49 deletions(-) diff --git a/plugins/updater/src/updater.rs b/plugins/updater/src/updater.rs index 787c0450..dad086fd 100644 --- a/plugins/updater/src/updater.rs +++ b/plugins/updater/src/updater.rs @@ -356,6 +356,109 @@ pub struct Updater { current_exe_args: Vec, } +/// Linux (AppImage and Deb) +#[cfg(any( + target_os = "linux", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "netbsd", + target_os = "openbsd" +))] +impl Updater { + + fn is_deb_package(&self) -> bool { + // First check if we're in a typical Debian installation path + let in_system_path = self.extract_path + .to_str() + .map(|p| p.starts_with("/usr")) + .unwrap_or(false); + + if !in_system_path { + return false; + } + + // Then verify it's actually a Debian-based system by checking for dpkg + let dpkg_exists = std::path::Path::new("/var/lib/dpkg").exists(); + let apt_exists = std::path::Path::new("/etc/apt").exists(); + + // Additional check for the package in dpkg database + let package_in_dpkg = if let Ok(output) = std::process::Command::new("dpkg") + .args(["-S", &self.extract_path.to_string_lossy()]) + .output() + { + output.status.success() + } else { + false + }; + + // Consider it a deb package only if: + // 1. We're in a system path AND + // 2. We have Debian package management tools AND + // 3. The binary is tracked by dpkg + dpkg_exists && apt_exists && package_in_dpkg + } + + fn is_rpm_package(&self) -> bool { + // First check if we're in a typical RPM installation path + let in_system_path = self.extract_path + .to_str() + .map(|p| p.starts_with("/usr")) + .unwrap_or(false); + + if !in_system_path { + return false; + } + + // Then verify it's actually a Debian-based system by checking for dpkg + let rpm_exists = std::path::Path::new("/var/lib/rpm").exists(); + let etc_rpm_exists = std::path::Path::new("/etc/rpm").exists(); + + // Additional check for the package in dpkg database + let package_in_rpm = if let Ok(output) = std::process::Command::new("rpm") + .args(["-qf", &self.extract_path.to_string_lossy()]) + .output() + { + output.status.success() + } else { + false + }; + + // Consider it a deb package only if: + // 1. We're in a system path AND + // 2. We have RPM package management tools AND + // 3. The binary is tracked by rpm + rpm_exists && etc_rpm_exists && package_in_rpm + } + + fn get_updater_installer(&self) -> Result> { + if std::env::var_os("APPIMAGE").is_some() { + Ok(Some(Installer::AppImage)) + } else if self.is_deb_package() { + Ok(Some(Installer::Deb)) + } else if self.is_rpm_package() { + Ok(Some(Installer::Rpm)) + } else { + Err(Error::UnknownInstaller) + } + } +} + +#[cfg(target_os = "windows")] +impl Updater { + fn get_updater_installer(&self) -> Result> { + Ok(Some(Installer::Msi)) + } + +} + +#[cfg(target_os = "macos")] +impl Updater { + fn get_updater_installer(&self) -> Result> { + Ok(None) + } + +} + impl Updater { pub async fn check(&self) -> Result> { @@ -457,7 +560,7 @@ impl Updater { None => release.version > self.current_version, }; - let installer = get_updater_installer(&self.extract_path)?; + let installer = self.get_updater_installer()?; let update = if should_update { Some(Update { @@ -1178,55 +1281,7 @@ pub(crate) fn get_updater_arch() -> Option<&'static str> { } } -fn is_deb_package(extract_path: &PathBuf) -> bool { - // First check if we're in a typical Debian installation path - let in_system_path = extract_path - .to_str() - .map(|p| p.starts_with("/usr")) - .unwrap_or(false); - - if !in_system_path { - return false; - } - - // Then verify it's actually a Debian-based system by checking for dpkg - let dpkg_exists = std::path::Path::new("/var/lib/dpkg").exists(); - let apt_exists = std::path::Path::new("/etc/apt").exists(); - // Additional check for the package in dpkg database - let package_in_dpkg = if let Ok(output) = std::process::Command::new("dpkg") - .args(["-S", &extract_path.to_string_lossy()]) - .output() - { - output.status.success() - } else { - false - }; - - // Consider it a deb package only if: - // 1. We're in a system path AND - // 2. We have Debian package management tools AND - // 3. The binary is tracked by dpkg - dpkg_exists && apt_exists && package_in_dpkg -} - -pub(crate) fn get_updater_installer(extract_path: &PathBuf) -> Result> { - if cfg!(target_os = "linux") { - if std::env::var_os("APPIMAGE").is_some() { - Ok(Some(Installer::AppImage)) - } else if is_deb_package(extract_path) { - Ok(Some(Installer::Deb)) - } else { - Err(Error::UnknownInstaller) - } - } else if cfg!(target_os = "windows") { - Ok(Some(Installer::Msi)) - } else if cfg!(target_os = "macos") { - Ok(None) - } else { - Err(Error::UnknownInstaller) - } -} pub fn extract_path_from_executable(executable_path: &Path) -> Result { // Return the path of the current executable by default From dc75b76c0a0be7f7c50260fc6a437b582794ce1e Mon Sep 17 00:00:00 2001 From: Krzysztof Andrelczyk Date: Mon, 3 Mar 2025 23:57:48 +0100 Subject: [PATCH 04/25] RPM installation --- plugins/updater/src/error.rs | 4 +- plugins/updater/src/updater.rs | 49 ++++++++++++------- .../updater/tests/app-updater/tests/update.rs | 4 +- 3 files changed, 35 insertions(+), 22 deletions(-) diff --git a/plugins/updater/src/error.rs b/plugins/updater/src/error.rs index 2d508a2e..49e14264 100644 --- a/plugins/updater/src/error.rs +++ b/plugins/updater/src/error.rs @@ -73,8 +73,8 @@ pub enum Error { TempDirNotFound, #[error("Authentication failed or was cancelled")] AuthenticationFailed, - #[error("Failed to install .deb package")] - DebInstallFailed, + #[error("Failed to install package")] + PackageInstallFailed, #[error("invalid updater binary format")] InvalidUpdaterFormat, #[error(transparent)] diff --git a/plugins/updater/src/updater.rs b/plugins/updater/src/updater.rs index dad086fd..955a22e6 100644 --- a/plugins/updater/src/updater.rs +++ b/plugins/updater/src/updater.rs @@ -940,6 +940,7 @@ impl Update { fn install_inner(&self, bytes: &[u8]) -> Result<()> { match self.installer { Some(Installer::Deb) => self.install_deb(bytes), + Some(Installer::Rpm) => self.install_rpm(bytes), _ =>self.install_appimage(bytes) } } @@ -1022,6 +1023,19 @@ impl Update { return Err(Error::InvalidUpdaterFormat); } + self.try_tmp_locations(bytes, "dpkg", "-i") + + } + + fn install_rpm(&self, bytes: &[u8]) -> Result<()> { + // First verify the bytes are actually a .rpm package + if !infer::archive::is_rpm(bytes) { + return Err(Error::InvalidUpdaterFormat); + } + self.try_tmp_locations(bytes, "rpm", "-U") + } + + fn try_tmp_locations(&self, bytes: &[u8], install_cmd: &str, install_arg: &str) -> Result<()> { // Try different temp directories let tmp_dir_locations = vec![ Box::new(|| Some(std::env::temp_dir())) as Box Option>, @@ -1033,15 +1047,15 @@ impl Update { for tmp_dir_location in tmp_dir_locations { if let Some(path) = tmp_dir_location() { if let Ok(tmp_dir) = tempfile::Builder::new() - .prefix("tauri_deb_update") + .prefix("tauri_rpm_update") .tempdir_in(path) { - let deb_path = tmp_dir.path().join("package.deb"); + let pkg_path = tmp_dir.path().join("package.rpm"); // Try writing the .deb file - if std::fs::write(&deb_path, bytes).is_ok() { + if std::fs::write(&pkg_path, bytes).is_ok() { // If write succeeds, proceed with installation - return self.try_install_with_privileges(&deb_path); + return self.try_install_with_privileges(&pkg_path, install_cmd, install_arg); } // If write fails, continue to next temp location } @@ -1050,14 +1064,15 @@ impl Update { // If we get here, all temp locations failed Err(Error::TempDirNotFound) + } - fn try_install_with_privileges(&self, deb_path: &Path) -> Result<()> { + fn try_install_with_privileges(&self, pkg_path: &Path, install_cmd: &str, install_arg: &str) -> Result<()> { // 1. First try using pkexec (graphical sudo prompt) if let Ok(status) = std::process::Command::new("pkexec") - .arg("dpkg") - .arg("-i") - .arg(deb_path) + .arg(install_cmd) + .arg(install_arg) + .arg(pkg_path) .status() { if status.success() { @@ -1067,22 +1082,22 @@ impl Update { // 2. Try zenity or kdialog for a graphical sudo experience if let Ok(password) = self.get_password_graphically() { - if self.install_with_sudo(deb_path, &password)? { + if self.install_with_sudo(pkg_path, &password, install_cmd, install_arg)? { return Ok(()); } } // 3. Final fallback: terminal sudo let status = std::process::Command::new("sudo") - .arg("dpkg") - .arg("-i") - .arg(deb_path) + .arg(install_cmd) + .arg(install_arg) + .arg(pkg_path) .status()?; if status.success() { Ok(()) } else { - Err(Error::DebInstallFailed) + Err(Error::PackageInstallFailed) } } @@ -1116,15 +1131,15 @@ impl Update { Err(Error::AuthenticationFailed) } - fn install_with_sudo(&self, deb_path: &Path, password: &str) -> Result { + fn install_with_sudo(&self, pkg_path: &Path, password: &str, install_cmd: &str, install_arg: &str) -> Result { use std::io::Write; use std::process::{Command, Stdio}; let mut child = Command::new("sudo") .arg("-S") // read password from stdin - .arg("dpkg") - .arg("-i") - .arg(deb_path) + .arg(install_cmd) + .arg(install_arg) + .arg(pkg_path) .stdin(Stdio::piped()) .stdout(Stdio::piped()) .stderr(Stdio::piped()) diff --git a/plugins/updater/tests/app-updater/tests/update.rs b/plugins/updater/tests/app-updater/tests/update.rs index 748b11d7..58e9594e 100644 --- a/plugins/updater/tests/app-updater/tests/update.rs +++ b/plugins/updater/tests/app-updater/tests/update.rs @@ -372,15 +372,13 @@ fn update_app() { .1, ); c - } else if matches!(bundle_target, BundleTarget::AppImage) { + } else { Command::new( &test_cases(&root_dir, "0.1.0", target.clone()) .first() .unwrap() .1, ) - } else { - Command::new(root_dir.join("target/debug/app-updater")) }; binary_cmd.env("TARGET", bundle_target.name()); From 199a52b3440fa6f394fdea59b9945f5c6ca20bbd Mon Sep 17 00:00:00 2001 From: Krzysztof Andrelczyk Date: Wed, 5 Mar 2025 22:08:44 +0100 Subject: [PATCH 05/25] small error fix --- plugins/updater/src/error.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/updater/src/error.rs b/plugins/updater/src/error.rs index 49e14264..f62a017c 100644 --- a/plugins/updater/src/error.rs +++ b/plugins/updater/src/error.rs @@ -42,11 +42,11 @@ pub enum Error { /// `reqwest` crate errors. #[error(transparent)] Reqwest(#[from] reqwest::Error), - /// The platform was not found on the updater JSON response. - #[error("the platform `{0}` was not found on the response `platforms` object")] + /// The platform was not found in the updater JSON response. + #[error("the platform `{0}` was not found in the response `platforms` object")] TargetNotFound(String), - /// Neither the platform not the fallback platform was not found on the updater JSON response. - #[error("the platform `{0}` and `{1}` were not found on the response `platforms` object")] + /// Neither the platform not the fallback platform was not found in the updater JSON response. + #[error("the platform `{0}` and `{1}` were not found in the response `platforms` object")] TargetsNotFound(String, String), /// Download failed #[error("`{0}`")] From ede0c686224c859ade8b0ad92d1294966b487d04 Mon Sep 17 00:00:00 2001 From: Krzysztof Andrelczyk Date: Fri, 7 Mar 2025 20:33:00 +0100 Subject: [PATCH 06/25] fix windows build --- .../updater/tests/app-updater/tests/update.rs | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/plugins/updater/tests/app-updater/tests/update.rs b/plugins/updater/tests/app-updater/tests/update.rs index 58e9594e..8c308bb3 100644 --- a/plugins/updater/tests/app-updater/tests/update.rs +++ b/plugins/updater/tests/app-updater/tests/update.rs @@ -46,7 +46,7 @@ struct Update { platforms: HashMap, } -fn build_app(cwd: &Path, config: &Config, bundle_updater: bool, targets: Vec) { +fn build_app(cwd: &Path, config: &Config, bundle_updater: bool, target: BundleTarget) { let mut command = Command::new("cargo"); command .args(["tauri", "build", "--debug", "--verbose"]) @@ -56,21 +56,19 @@ fn build_app(cwd: &Path, config: &Config, bundle_updater: bool, targets: Vec>()); + command.args(["--bundles", target.name()]); #[cfg(target_os = "macos")] - command.args([target.name()]); + command.args(["--bundles", target.name()]); if bundle_updater { #[cfg(windows)] - command.args(["msi", "nsis"]); - - command.args(["updater"]); + command.args(["--bundles", "msi", "nsis"]); } else { #[cfg(windows)] - command.args([target.name()]); + command.args(["--bundles", target.name()]); } + let status = command .status() .expect("failed to run Tauri CLI to bundle app"); @@ -80,6 +78,7 @@ fn build_app(cwd: &Path, config: &Config, bundle_updater: bool, targets: Vec Vec { + fn default() -> Self { #[cfg(any(target_os = "macos", target_os = "ios"))] - return vec![Self::App]; + return Self::App; #[cfg(target_os = "linux")] - return vec![Self::AppImage]; + return Self::AppImage; #[cfg(windows)] - return vec![Self::Nsis]; + return Self::Nsis; } } @@ -267,7 +266,7 @@ fn update_app() { { // bundle app update config.version = "1.0.0"; - build_app(&manifest_dir, &config, true, BundleTarget::get_targets()); + build_app(&manifest_dir, &config, true, BundleTarget::default()); let bundle_updater_ext = if v1_compatible { out_bundle_path @@ -350,7 +349,7 @@ fn update_app() { config.version = "0.1.0"; // bundle initial app version - build_app(&manifest_dir, &config, false, vec![bundle_target]); + build_app(&manifest_dir, &config, false, bundle_target); for expected_exit_code in status_checks { let mut binary_cmd = if cfg!(windows) { From d50947cde1231ecf2cd3349f89d9bc001d71dfd2 Mon Sep 17 00:00:00 2001 From: Krzysztof Andrelczyk Date: Fri, 7 Mar 2025 20:38:11 +0100 Subject: [PATCH 07/25] windows tests --- .../updater/tests/app-updater/tests/update.rs | 51 ++++++++++++++++--- 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/plugins/updater/tests/app-updater/tests/update.rs b/plugins/updater/tests/app-updater/tests/update.rs index 58e9594e..924fe6ec 100644 --- a/plugins/updater/tests/app-updater/tests/update.rs +++ b/plugins/updater/tests/app-updater/tests/update.rs @@ -56,20 +56,19 @@ fn build_app(cwd: &Path, config: &Config, bundle_updater: bool, targets: Vec>(); command.args(["--bundles"]); #[cfg(target_os = "linux")] - command.args(targets.into_iter().map(|t| t.name()).collect::>()); + command.args(cmd_args); #[cfg(target_os = "macos")] - command.args([target.name()]); + command.args(cmd_args); if bundle_updater { #[cfg(windows)] command.args(["msi", "nsis"]); - - command.args(["updater"]); } else { #[cfg(windows)] - command.args([target.name()]); + command.args(cmd_args); } let status = command .status() @@ -202,24 +201,60 @@ fn bundle_path(root_dir: &Path, _version: &str, v1compatible: bool) -> PathBuf { } #[cfg(windows)] -fn bundle_paths( +fn test_cases( root_dir: &Path, version: &str, - v1compatible: bool, -) -> Vec<(BundleTarget, PathBuf)> { + target: String +) -> Vec<(BundleTarget, PathBuf, Option, Vec)> { vec![ ( BundleTarget::Nsis, root_dir.join(format!( "target/debug/bundle/nsis/app-updater_{version}_x64-setup.exe" )), + Some(target.clone()), + vec![UPDATED_EXIT_CODE] + ), + ( + BundleTarget::Nsis, + root_dir.join(format!( + "target/debug/bundle/nsis/app-updater_{version}_x64-setup.exe" + )), + Some(format!("{target}-{}", BundleTarget::Nsis.name())), + vec![UPDATED_EXIT_CODE] + ), + ( + BundleTarget::Nsis, + root_dir.join(format!( + "target/debug/bundle/nsis/app-updater_{version}_x64-setup.exe" + )), + None, + vec![ERROR_EXIT_CODE] + ), + ( + BundleTarget::Msi, + root_dir.join(format!( + "target/debug/bundle/msi/app-updater_{version}_x64_en-US.msi" + )), + Some(target.clone()), + vec![UPDATED_EXIT_CODE] ), ( BundleTarget::Msi, root_dir.join(format!( "target/debug/bundle/msi/app-updater_{version}_x64_en-US.msi" )), + Some(format!("{target}-{}", BundleTarget::Msi.name())), + vec![UPDATED_EXIT_CODE] ), + ( + BundleTarget::Msi, + root_dir.join(format!( + "target/debug/bundle/msi/app-updater_{version}_x64_en-US.msi" + )), + None, + vec![ERROR_EXIT_CODE] + ) ] } From 012f6334aa95c325fb7239ef176b2e54237c84be Mon Sep 17 00:00:00 2001 From: Krzysztof Andrelczyk Date: Sun, 9 Mar 2025 21:06:52 +0100 Subject: [PATCH 08/25] add aider files to .gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 72e5a397..0abc00bd 100644 --- a/.gitignore +++ b/.gitignore @@ -55,4 +55,5 @@ pids *.sublime* .idea debug.log -TODO.md \ No newline at end of file +TODO.md +.aider.* From c2877ec3e3bb5f56147d5c51dbb0a1a3078e0e8c Mon Sep 17 00:00:00 2001 From: Krzysztof Andrelczyk Date: Tue, 18 Mar 2025 23:28:34 +0100 Subject: [PATCH 09/25] get bundle type out of patched variable --- plugins/updater/src/updater.rs | 105 ++---------------- plugins/updater/tests/app-updater/src/main.rs | 1 - 2 files changed, 8 insertions(+), 98 deletions(-) diff --git a/plugins/updater/src/updater.rs b/plugins/updater/src/updater.rs index 955a22e6..d7a2e547 100644 --- a/plugins/updater/src/updater.rs +++ b/plugins/updater/src/updater.rs @@ -356,111 +356,22 @@ pub struct Updater { current_exe_args: Vec, } -/// Linux (AppImage and Deb) -#[cfg(any( - target_os = "linux", - target_os = "dragonfly", - target_os = "freebsd", - target_os = "netbsd", - target_os = "openbsd" -))] -impl Updater { - - fn is_deb_package(&self) -> bool { - // First check if we're in a typical Debian installation path - let in_system_path = self.extract_path - .to_str() - .map(|p| p.starts_with("/usr")) - .unwrap_or(false); - - if !in_system_path { - return false; - } - - // Then verify it's actually a Debian-based system by checking for dpkg - let dpkg_exists = std::path::Path::new("/var/lib/dpkg").exists(); - let apt_exists = std::path::Path::new("/etc/apt").exists(); - - // Additional check for the package in dpkg database - let package_in_dpkg = if let Ok(output) = std::process::Command::new("dpkg") - .args(["-S", &self.extract_path.to_string_lossy()]) - .output() - { - output.status.success() - } else { - false - }; - - // Consider it a deb package only if: - // 1. We're in a system path AND - // 2. We have Debian package management tools AND - // 3. The binary is tracked by dpkg - dpkg_exists && apt_exists && package_in_dpkg - } - - fn is_rpm_package(&self) -> bool { - // First check if we're in a typical RPM installation path - let in_system_path = self.extract_path - .to_str() - .map(|p| p.starts_with("/usr")) - .unwrap_or(false); - - if !in_system_path { - return false; - } - // Then verify it's actually a Debian-based system by checking for dpkg - let rpm_exists = std::path::Path::new("/var/lib/rpm").exists(); - let etc_rpm_exists = std::path::Path::new("/etc/rpm").exists(); - // Additional check for the package in dpkg database - let package_in_rpm = if let Ok(output) = std::process::Command::new("rpm") - .args(["-qf", &self.extract_path.to_string_lossy()]) - .output() - { - output.status.success() - } else { - false - }; - - // Consider it a deb package only if: - // 1. We're in a system path AND - // 2. We have RPM package management tools AND - // 3. The binary is tracked by rpm - rpm_exists && etc_rpm_exists && package_in_rpm - } - - fn get_updater_installer(&self) -> Result> { - if std::env::var_os("APPIMAGE").is_some() { - Ok(Some(Installer::AppImage)) - } else if self.is_deb_package() { - Ok(Some(Installer::Deb)) - } else if self.is_rpm_package() { - Ok(Some(Installer::Rpm)) - } else { - Err(Error::UnknownInstaller) - } - } -} -#[cfg(target_os = "windows")] impl Updater { - fn get_updater_installer(&self) -> Result> { - Ok(Some(Installer::Msi)) - } - -} -#[cfg(target_os = "macos")] -impl Updater { fn get_updater_installer(&self) -> Result> { - Ok(None) + match tauri::__TAURI_BUNDLE_TYPE { + "DEB_BUNDLE" => Ok(Some(Installer::Deb)), + "RPM_BUNDLE" => Ok(Some(Installer::Rpm)), + "APP_BUNDLE" => Ok(Some(Installer::AppImage)), + "MSI_BUNDLE" => Ok(Some(Installer::Msi)), + "NSS_BUNDLE" => Ok(Some(Installer::Nsis)), + _ => Err(Error::UnknownInstaller) + } } -} - -impl Updater { - pub async fn check(&self) -> Result> { // we want JSON only let mut headers = self.headers.clone(); diff --git a/plugins/updater/tests/app-updater/src/main.rs b/plugins/updater/tests/app-updater/src/main.rs index bbe398b5..5f5566f8 100644 --- a/plugins/updater/tests/app-updater/src/main.rs +++ b/plugins/updater/tests/app-updater/src/main.rs @@ -9,7 +9,6 @@ use tauri_plugin_updater::UpdaterExt; fn main() { #[allow(unused_mut)] let mut context = tauri::generate_context!(); - tauri::Builder::default() .plugin(tauri_plugin_updater::Builder::new().build()) .setup(|app| { From c9d0a6c397a2f90d5779b5cddae31c21b340167f Mon Sep 17 00:00:00 2001 From: Krzysztof Andrelczyk Date: Tue, 18 Mar 2025 23:36:25 +0100 Subject: [PATCH 10/25] windows tests --- plugins/updater/src/updater.rs | 1 + plugins/updater/tests/app-updater/tests/update.rs | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/plugins/updater/src/updater.rs b/plugins/updater/src/updater.rs index 955a22e6..9e568ceb 100644 --- a/plugins/updater/src/updater.rs +++ b/plugins/updater/src/updater.rs @@ -446,6 +446,7 @@ impl Updater { #[cfg(target_os = "windows")] impl Updater { fn get_updater_installer(&self) -> Result> { + Ok(Some(Installer::Msi)) } diff --git a/plugins/updater/tests/app-updater/tests/update.rs b/plugins/updater/tests/app-updater/tests/update.rs index 78b65db6..a36ae90e 100644 --- a/plugins/updater/tests/app-updater/tests/update.rs +++ b/plugins/updater/tests/app-updater/tests/update.rs @@ -119,8 +119,11 @@ fn target_to_platforms( update_platform: Option, signature: String, ) -> HashMap { + let mut platforms = HashMap::new(); if let Some(platform) = update_platform { + println!("TARGET: {}", platform.clone()); + platforms.insert( platform, PlatformUpdate { @@ -201,11 +204,11 @@ fn bundle_path(root_dir: &Path, _version: &str, v1compatible: bool) -> PathBuf { } #[cfg(windows)] -fn bundle_paths( +fn test_cases( root_dir: &Path, version: &str, - v1compatible: bool, -) -> Vec<(BundleTarget, PathBuf)> { + target: String +) -> Vec<(BundleTarget, PathBuf, Option, Vec)> { vec![ ( BundleTarget::Nsis, @@ -302,7 +305,7 @@ fn update_app() { { // bundle app update config.version = "1.0.0"; - build_app(&manifest_dir, &config, true, BundleTarget::get_targets()); + build_app(&manifest_dir, &config, true, BundleTarget::default()); let bundle_updater_ext = if v1_compatible { out_bundle_path From 8cb79a350fd61244040b9042c0b5fd91907dd85e Mon Sep 17 00:00:00 2001 From: Krzysztof Andrelczyk Date: Sun, 6 Apr 2025 23:39:11 +0200 Subject: [PATCH 11/25] patch windows binary --- Cargo.lock | 726 +++-- Cargo.toml | 82 +- plugins/updater/src/updater.rs | 2868 ++++++++--------- plugins/updater/tests/app-updater/src/main.rs | 113 +- 4 files changed, 2010 insertions(+), 1779 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0e1f2448..da9b2bcf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -212,7 +212,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.0.5", "tauri-plugin-barcode-scanner", "tauri-plugin-biometric", "tauri-plugin-cli", @@ -243,7 +243,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.0.5", "tauri-plugin-updater", "time", "tiny_http", @@ -256,7 +256,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.0.5", "tauri-plugin-updater", "tiny_http", ] @@ -268,7 +268,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.0.5", "tauri-plugin-store", ] @@ -291,9 +291,9 @@ dependencies = [ "core-graphics 0.23.2", "image", "log", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.5.2", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", "parking_lot", "windows-sys 0.48.0", "x11rb", @@ -701,7 +701,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e58aa60e59d8dbfcc36138f5f18be5f24394d33b38b24f7fd0b1caa33095f22f" dependencies = [ "block-sys", - "objc2", + "objc2 0.5.2", ] [[package]] @@ -710,7 +710,16 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" dependencies = [ - "objc2", + "objc2 0.5.2", +] + +[[package]] +name = "block2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d59b4c170e16f0405a2e95aff44432a0d41aa97675f3d52623effe95792a037" +dependencies = [ + "objc2 0.6.0", ] [[package]] @@ -903,6 +912,16 @@ dependencies = [ "toml 0.8.19", ] +[[package]] +name = "cargo_toml" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02260d489095346e5cafd04dea8e8cb54d1d74fcd759022a9b72986ebe9a1257" +dependencies = [ + "serde", + "toml 0.8.19", +] + [[package]] name = "cc" version = "1.2.2" @@ -1041,36 +1060,6 @@ dependencies = [ "error-code", ] -[[package]] -name = "cocoa" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f79398230a6e2c08f5c9760610eb6924b52aa9e7950a619602baba59dcbbdbb2" -dependencies = [ - "bitflags 2.7.0", - "block", - "cocoa-foundation", - "core-foundation 0.10.0", - "core-graphics 0.24.0", - "foreign-types 0.5.0", - "libc", - "objc", -] - -[[package]] -name = "cocoa-foundation" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14045fb83be07b5acf1c0884b2180461635b433455fa35d1cd6f17f1450679d" -dependencies = [ - "bitflags 2.7.0", - "block", - "core-foundation 0.10.0", - "core-graphics-types 0.2.0", - "libc", - "objc", -] - [[package]] name = "color-backtrace" version = "0.6.1" @@ -1492,7 +1481,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.0.5", "tauri-plugin-deep-link", "tauri-plugin-log", "tauri-plugin-single-instance", @@ -1833,6 +1822,20 @@ dependencies = [ "winreg 0.52.0", ] +[[package]] +name = "embed-resource" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fbc6e0d8e0c03a655b53ca813f0463d2c956bc4db8138dbc89f120b066551e3" +dependencies = [ + "cc", + "memchr", + "rustc_version", + "toml 0.8.19", + "vswhom", + "winreg 0.52.0", +] + [[package]] name = "embed_plist" version = "1.2.2" @@ -2509,8 +2512,8 @@ checksum = "b00d88f1be7bf4cd2e61623ce08e84be2dfa4eab458e5d632d3dab95f16c1f64" dependencies = [ "crossbeam-channel", "keyboard-types", - "objc2", - "objc2-app-kit", + "objc2 0.5.2", + "objc2-app-kit 0.2.2", "once_cell", "serde", "thiserror 1.0.69", @@ -2870,6 +2873,16 @@ dependencies = [ "png", ] +[[package]] +name = "ico" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc50b891e4acf8fe0e71ef88ec43ad82ee07b3810ad09de10f1d01f072ed4b98" +dependencies = [ + "byteorder", + "png", +] + [[package]] name = "icrate" version = "0.1.2" @@ -2877,7 +2890,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fb69199826926eb864697bddd27f73d9fddcffc004f5733131e15b465e30642" dependencies = [ "block2 0.4.0", - "objc2", + "objc2 0.5.2", ] [[package]] @@ -3069,6 +3082,15 @@ dependencies = [ "cfb", ] +[[package]] +name = "infer" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a588916bfdfd92e71cacef98a63d9b1f0d74d6599980d11894290e7ddefffcf7" +dependencies = [ + "cfb", +] + [[package]] name = "inotify" version = "0.11.0" @@ -3675,21 +3697,22 @@ dependencies = [ [[package]] name = "muda" -version = "0.15.3" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdae9c00e61cc0579bcac625e8ad22104c60548a025bfc972dc83868a28e1484" +checksum = "4de14a9b5d569ca68d7c891d613b390cf5ab4f851c77aaa2f9e435555d3d9492" dependencies = [ "crossbeam-channel", "dpi", "gtk", "keyboard-types", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.6.0", + "objc2-app-kit 0.3.0", + "objc2-core-foundation", + "objc2-foundation 0.3.0", "once_cell", "png", "serde", - "thiserror 1.0.69", + "thiserror 2.0.9", "windows-sys 0.59.0", ] @@ -3949,9 +3972,6 @@ name = "objc-sys" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" -dependencies = [ - "cc", -] [[package]] name = "objc2" @@ -3963,6 +3983,16 @@ dependencies = [ "objc2-encode", ] +[[package]] +name = "objc2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3531f65190d9cff863b77a99857e74c314dd16bf56c538c4b57c7cbc3f3a6e59" +dependencies = [ + "objc2-encode", + "objc2-exception-helper", +] + [[package]] name = "objc2-app-kit" version = "0.2.2" @@ -3972,35 +4002,41 @@ dependencies = [ "bitflags 2.7.0", "block2 0.5.1", "libc", - "objc2", - "objc2-core-data", - "objc2-core-image", - "objc2-foundation", - "objc2-quartz-core", + "objc2 0.5.2", + "objc2-core-data 0.2.2", + "objc2-core-image 0.2.2", + "objc2-foundation 0.2.2", + "objc2-quartz-core 0.2.2", ] [[package]] -name = "objc2-cloud-kit" -version = "0.2.2" +name = "objc2-app-kit" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" +checksum = "5906f93257178e2f7ae069efb89fbd6ee94f0592740b5f8a1512ca498814d0fb" dependencies = [ "bitflags 2.7.0", - "block2 0.5.1", - "objc2", - "objc2-core-location", - "objc2-foundation", + "block2 0.6.0", + "libc", + "objc2 0.6.0", + "objc2-cloud-kit", + "objc2-core-data 0.3.0", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-core-image 0.3.0", + "objc2-foundation 0.3.0", + "objc2-quartz-core 0.3.0", ] [[package]] -name = "objc2-contacts" -version = "0.2.2" +name = "objc2-cloud-kit" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" +checksum = "6c1948a9be5f469deadbd6bcb86ad7ff9e47b4f632380139722f7d9840c0d42c" dependencies = [ - "block2 0.5.1", - "objc2", - "objc2-foundation", + "bitflags 2.7.0", + "objc2 0.6.0", + "objc2-foundation 0.3.0", ] [[package]] @@ -4011,8 +4047,41 @@ checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" dependencies = [ "bitflags 2.7.0", "block2 0.5.1", - "objc2", - "objc2-foundation", + "objc2 0.5.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-core-data" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f860f8e841f6d32f754836f51e6bc7777cd7e7053cf18528233f6811d3eceb4" +dependencies = [ + "bitflags 2.7.0", + "objc2 0.6.0", + "objc2-foundation 0.3.0", +] + +[[package]] +name = "objc2-core-foundation" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daeaf60f25471d26948a1c2f840e3f7d86f4109e3af4e8e4b5cd70c39690d925" +dependencies = [ + "bitflags 2.7.0", + "objc2 0.6.0", +] + +[[package]] +name = "objc2-core-graphics" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dca602628b65356b6513290a21a6405b4d4027b8b250f0b98dddbb28b7de02" +dependencies = [ + "bitflags 2.7.0", + "objc2 0.6.0", + "objc2-core-foundation", + "objc2-io-surface", ] [[package]] @@ -4022,28 +4091,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" dependencies = [ "block2 0.5.1", - "objc2", - "objc2-foundation", + "objc2 0.5.2", + "objc2-foundation 0.2.2", "objc2-metal", ] [[package]] -name = "objc2-core-location" -version = "0.2.2" +name = "objc2-core-image" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" +checksum = "6ffa6bea72bf42c78b0b34e89c0bafac877d5f80bf91e159a5d96ea7f693ca56" dependencies = [ - "block2 0.5.1", - "objc2", - "objc2-contacts", - "objc2-foundation", + "objc2 0.6.0", + "objc2-foundation 0.3.0", ] [[package]] name = "objc2-encode" -version = "4.0.3" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7891e71393cd1f227313c9379a26a584ff3d7e6e7159e988851f0934c993f0f8" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + +[[package]] +name = "objc2-exception-helper" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7a1c5fbb72d7735b076bb47b578523aedc40f3c439bea6dfd595c089d79d98a" +dependencies = [ + "cc", +] [[package]] name = "objc2-foundation" @@ -4055,19 +4131,31 @@ dependencies = [ "block2 0.5.1", "dispatch", "libc", - "objc2", + "objc2 0.5.2", ] [[package]] -name = "objc2-link-presentation" -version = "0.2.2" +name = "objc2-foundation" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" +checksum = "3a21c6c9014b82c39515db5b396f91645182611c97d24637cf56ac01e5f8d998" dependencies = [ - "block2 0.5.1", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "bitflags 2.7.0", + "block2 0.6.0", + "libc", + "objc2 0.6.0", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-io-surface" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "161a8b87e32610086e1a7a9e9ec39f84459db7b3a0881c1f16ca5a2605581c19" +dependencies = [ + "bitflags 2.7.0", + "objc2 0.6.0", + "objc2-core-foundation", ] [[package]] @@ -4078,8 +4166,8 @@ checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ "bitflags 2.7.0", "block2 0.5.1", - "objc2", - "objc2-foundation", + "objc2 0.5.2", + "objc2-foundation 0.2.2", ] [[package]] @@ -4089,9 +4177,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6788b04a18ea31e3dc3ab256b8546639e5bbae07c1a0dc4ea8615252bc6aee9a" dependencies = [ "bitflags 2.7.0", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.5.2", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", ] [[package]] @@ -4102,77 +4190,46 @@ checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ "bitflags 2.7.0", "block2 0.5.1", - "objc2", - "objc2-foundation", + "objc2 0.5.2", + "objc2-foundation 0.2.2", "objc2-metal", ] [[package]] -name = "objc2-symbols" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" -dependencies = [ - "objc2", - "objc2-foundation", -] - -[[package]] -name = "objc2-ui-kit" -version = "0.2.2" +name = "objc2-quartz-core" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" +checksum = "6fb3794501bb1bee12f08dcad8c61f2a5875791ad1c6f47faa71a0f033f20071" dependencies = [ "bitflags 2.7.0", - "block2 0.5.1", - "objc2", - "objc2-cloud-kit", - "objc2-core-data", - "objc2-core-image", - "objc2-core-location", - "objc2-foundation", - "objc2-link-presentation", - "objc2-quartz-core", - "objc2-symbols", - "objc2-uniform-type-identifiers", - "objc2-user-notifications", + "objc2 0.6.0", + "objc2-foundation 0.3.0", ] [[package]] -name = "objc2-uniform-type-identifiers" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" -dependencies = [ - "block2 0.5.1", - "objc2", - "objc2-foundation", -] - -[[package]] -name = "objc2-user-notifications" -version = "0.2.2" +name = "objc2-ui-kit" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" +checksum = "777a571be14a42a3990d4ebedaeb8b54cd17377ec21b92e8200ac03797b3bee1" dependencies = [ "bitflags 2.7.0", - "block2 0.5.1", - "objc2", - "objc2-core-location", - "objc2-foundation", + "objc2 0.6.0", + "objc2-core-foundation", + "objc2-foundation 0.3.0", ] [[package]] name = "objc2-web-kit" -version = "0.2.2" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68bc69301064cebefc6c4c90ce9cba69225239e4b8ff99d445a2b5563797da65" +checksum = "b717127e4014b0f9f3e8bba3d3f2acec81f1bde01f656823036e823ed2c94dce" dependencies = [ "bitflags 2.7.0", - "block2 0.5.1", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "block2 0.6.0", + "objc2 0.6.0", + "objc2-app-kit 0.3.0", + "objc2-core-foundation", + "objc2-foundation 0.3.0", ] [[package]] @@ -4324,7 +4381,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35366a452fce3f8947eb2f33226a133aaf0cacedef2af67ade348d58be7f85d0" dependencies = [ "icrate", - "objc2-foundation", + "objc2-foundation 0.2.2", "objc2-osa-kit", "serde", "serde_json", @@ -5141,9 +5198,9 @@ dependencies = [ "gtk-sys", "js-sys", "log", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.5.2", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", "raw-window-handle", "wasm-bindgen", "wasm-bindgen-futures", @@ -5770,7 +5827,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.0.5", "tauri-plugin-cli", "tauri-plugin-single-instance", ] @@ -5821,9 +5878,9 @@ dependencies = [ "foreign-types 0.5.0", "js-sys", "log", - "objc2", - "objc2-foundation", - "objc2-quartz-core", + "objc2 0.5.2", + "objc2-foundation 0.2.2", + "objc2-quartz-core 0.2.2", "raw-window-handle", "redox_syscall", "wasm-bindgen", @@ -6327,12 +6384,11 @@ dependencies = [ [[package]] name = "tao" -version = "0.31.1" +version = "0.32.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3731d04d4ac210cd5f344087733943b9bfb1a32654387dad4d1c70de21aee2c9" +checksum = "63c8b1020610b9138dd7b1e06cf259ae91aa05c30f3bd0d6b42a03997b92dec1" dependencies = [ "bitflags 2.7.0", - "cocoa", "core-foundation 0.10.0", "core-graphics 0.24.0", "crossbeam-channel", @@ -6349,7 +6405,9 @@ dependencies = [ "ndk", "ndk-context", "ndk-sys", - "objc", + "objc2 0.6.0", + "objc2-app-kit 0.3.0", + "objc2-foundation 0.3.0", "once_cell", "parking_lot", "raw-window-handle", @@ -6357,8 +6415,8 @@ dependencies = [ "tao-macros", "unicode-segmentation", "url", - "windows 0.58.0", - "windows-core 0.58.0", + "windows 0.60.0", + "windows-core 0.60.1", "windows-version", "x11-dl", ] @@ -6399,13 +6457,11 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tauri" -version = "2.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2979ec5ec5a9310b15d1548db3b8de98d8f75abf2b5b00fec9cd5c0553ecc09c" +version = "2.3.1" dependencies = [ "anyhow", "bytes", - "dirs 5.0.1", + "dirs 6.0.0", "dunce", "embed_plist", "futures-util", @@ -6421,9 +6477,9 @@ dependencies = [ "log", "mime", "muda", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.6.0", + "objc2-app-kit 0.3.0", + "objc2-foundation 0.3.0", "percent-encoding", "plist", "raw-window-handle", @@ -6434,11 +6490,11 @@ dependencies = [ "serialize-to-javascript", "specta", "swift-rs", - "tauri-build", + "tauri-build 2.0.6", "tauri-macros", "tauri-runtime", "tauri-runtime-wry", - "tauri-utils", + "tauri-utils 2.2.0", "thiserror 2.0.9", "tokio", "tray-icon", @@ -6448,7 +6504,7 @@ dependencies = [ "webkit2gtk", "webview2-com", "window-vibrancy", - "windows 0.58.0", + "windows 0.60.0", ] [[package]] @@ -6458,7 +6514,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e950124f6779c6cf98e3260c7a6c8488a74aa6350dd54c6950fdaa349bca2df" dependencies = [ "anyhow", - "cargo_toml", + "cargo_toml 0.21.0", "dirs 5.0.1", "glob", "heck 0.5.0", @@ -6468,9 +6524,29 @@ dependencies = [ "semver", "serde", "serde_json", - "tauri-codegen", - "tauri-utils", - "tauri-winres", + "tauri-codegen 2.0.4", + "tauri-utils 2.1.1", + "tauri-winres 0.1.1", + "toml 0.8.19", + "walkdir", +] + +[[package]] +name = "tauri-build" +version = "2.0.6" +dependencies = [ + "anyhow", + "cargo_toml 0.22.1", + "dirs 6.0.0", + "glob", + "heck 0.5.0", + "json-patch", + "schemars", + "semver", + "serde", + "serde_json", + "tauri-utils 2.2.0", + "tauri-winres 0.3.0", "toml 0.8.19", "walkdir", ] @@ -6480,10 +6556,34 @@ name = "tauri-codegen" version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f77894f9ddb5cb6c04fcfe8c8869ebe0aded4dabf19917118d48be4a95599ab5" +dependencies = [ + "base64 0.22.1", + "ico 0.3.0", + "json-patch", + "plist", + "png", + "proc-macro2", + "quote", + "semver", + "serde", + "serde_json", + "sha2", + "syn 2.0.90", + "tauri-utils 2.1.1", + "thiserror 2.0.9", + "time", + "url", + "uuid", + "walkdir", +] + +[[package]] +name = "tauri-codegen" +version = "2.0.5" dependencies = [ "base64 0.22.1", "brotli", - "ico", + "ico 0.4.0", "json-patch", "plist", "png", @@ -6494,7 +6594,7 @@ dependencies = [ "serde_json", "sha2", "syn 2.0.90", - "tauri-utils", + "tauri-utils 2.2.0", "thiserror 2.0.9", "time", "url", @@ -6504,16 +6604,14 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3240a5caed760a532e8f687be6f05b2c7d11a1d791fb53ccc08cfeb3e5308736" +version = "2.0.5" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", "syn 2.0.90", - "tauri-codegen", - "tauri-utils", + "tauri-codegen 2.0.5", + "tauri-utils 2.2.0", ] [[package]] @@ -6528,7 +6626,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "tauri-utils", + "tauri-utils 2.1.1", "toml 0.8.19", "walkdir", ] @@ -6606,12 +6704,12 @@ dependencies = [ "serde_json", "tauri", "tauri-plugin", - "tauri-utils", + "tauri-utils 2.1.1", "thiserror 2.0.9", "tracing", "url", "windows-registry 0.4.0", - "windows-result 0.3.0", + "windows-result 0.3.2", ] [[package]] @@ -6646,7 +6744,7 @@ dependencies = [ "serde_repr", "tauri", "tauri-plugin", - "tauri-utils", + "tauri-utils 2.1.1", "thiserror 2.0.9", "toml 0.8.19", "url", @@ -6734,8 +6832,8 @@ dependencies = [ "byte-unit", "fern", "log", - "objc2", - "objc2-foundation", + "objc2 0.5.2", + "objc2-foundation 0.2.2", "serde", "serde_json", "serde_repr", @@ -6787,8 +6885,8 @@ version = "2.2.5" dependencies = [ "dunce", "glob", - "objc2-app-kit", - "objc2-foundation", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", "open", "schemars", "serde", @@ -6947,7 +7045,7 @@ dependencies = [ "flate2", "futures-util", "http", - "infer", + "infer 0.16.0", "minisign-verify", "osakit", "percent-encoding", @@ -7017,10 +7115,9 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2274ef891ccc0a8d318deffa9d70053f947664d12d58b9c0d1ae5e89237e01f7" +version = "2.4.0" dependencies = [ + "cookie", "dpi", "gtk", "http", @@ -7028,35 +7125,34 @@ dependencies = [ "raw-window-handle", "serde", "serde_json", - "tauri-utils", + "tauri-utils 2.2.0", "thiserror 2.0.9", "url", - "windows 0.58.0", + "windows 0.60.0", ] [[package]] name = "tauri-runtime-wry" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3707b40711d3b9f6519150869e358ffbde7c57567fb9b5a8b51150606939b2a0" +version = "2.4.1" dependencies = [ "gtk", "http", "jni", "log", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.6.0", + "objc2-app-kit 0.3.0", + "objc2-foundation 0.3.0", + "once_cell", "percent-encoding", "raw-window-handle", "softbuffer", "tao", "tauri-runtime", - "tauri-utils", + "tauri-utils 2.2.0", "url", "webkit2gtk", "webview2-com", - "windows 0.58.0", + "windows 0.60.0", "wry", ] @@ -7067,6 +7163,44 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96fb10e7cc97456b2d5b9c03e335b5de5da982039a303a20d10006885e4523a0" dependencies = [ "aes-gcm", + "cargo_metadata", + "ctor", + "dunce", + "getrandom 0.2.15", + "glob", + "html5ever", + "http", + "infer 0.16.0", + "json-patch", + "kuchikiki", + "log", + "memchr", + "phf 0.11.2", + "proc-macro2", + "quote", + "regex", + "schemars", + "semver", + "serde", + "serde-untagged", + "serde_json", + "serde_with", + "serialize-to-javascript", + "swift-rs", + "thiserror 2.0.9", + "toml 0.8.19", + "url", + "urlpattern", + "uuid", + "walkdir", +] + +[[package]] +name = "tauri-utils" +version = "2.2.0" +dependencies = [ + "aes-gcm", + "anyhow", "brotli", "cargo_metadata", "ctor", @@ -7075,7 +7209,7 @@ dependencies = [ "glob", "html5ever", "http", - "infer", + "infer 0.19.0", "json-patch", "kuchikiki", "log", @@ -7106,10 +7240,20 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5993dc129e544393574288923d1ec447c857f3f644187f4fbf7d9a875fbfc4fb" dependencies = [ - "embed-resource", + "embed-resource 2.5.1", "toml 0.7.8", ] +[[package]] +name = "tauri-winres" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56eaa45f707bedf34d19312c26d350bc0f3c59a47e58e8adbeecdc850d2c13a0" +dependencies = [ + "embed-resource 3.0.2", + "toml 0.8.19", +] + [[package]] name = "tauri-winrt-notification" version = "0.2.1" @@ -7506,22 +7650,23 @@ dependencies = [ [[package]] name = "tray-icon" -version = "0.19.2" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d48a05076dd272615d03033bf04f480199f7d1b66a8ac64d75c625fc4a70c06b" +checksum = "d433764348e7084bad2c5ea22c96c71b61b17afe3a11645710f533bd72b6a2b5" dependencies = [ - "core-graphics 0.24.0", "crossbeam-channel", - "dirs 5.0.1", + "dirs 6.0.0", "libappindicator", "muda", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.6.0", + "objc2-app-kit 0.3.0", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation 0.3.0", "once_cell", "png", "serde", - "thiserror 1.0.69", + "thiserror 2.0.9", "windows-sys 0.59.0", ] @@ -7690,7 +7835,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.0.5", "tauri-plugin-updater", "time", "tiny_http", @@ -8084,7 +8229,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.0.5", "tauri-plugin-websocket", "tokio", "tokio-tungstenite", @@ -8092,16 +8237,16 @@ dependencies = [ [[package]] name = "webview2-com" -version = "0.34.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "823e7ebcfaea51e78f72c87fc3b65a1e602c321f407a0b36dbb327d7bb7cd921" +checksum = "b0d606f600e5272b514dbb66539dd068211cc20155be8d3958201b4b5bd79ed3" dependencies = [ "webview2-com-macros", "webview2-com-sys", - "windows 0.58.0", - "windows-core 0.58.0", - "windows-implement 0.58.0", - "windows-interface 0.58.0", + "windows 0.60.0", + "windows-core 0.60.1", + "windows-implement 0.59.0", + "windows-interface 0.59.1", ] [[package]] @@ -8117,13 +8262,13 @@ dependencies = [ [[package]] name = "webview2-com-sys" -version = "0.34.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a82bce72db6e5ee83c68b5de1e2cd6ea195b9fbff91cb37df5884cbe3222df4" +checksum = "bfb27fccd3c27f68e9a6af1bcf48c2d82534b8675b83608a4d81446d095a17ac" dependencies = [ - "thiserror 1.0.69", - "windows 0.58.0", - "windows-core 0.58.0", + "thiserror 2.0.9", + "windows 0.60.0", + "windows-core 0.60.1", ] [[package]] @@ -8185,13 +8330,14 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "window-vibrancy" -version = "0.5.2" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ea403deff7b51fff19e261330f71608ff2cdef5721d72b64180bb95be7c4150" +checksum = "d9bec5a31f3f9362f2258fd0e9c9dd61a9ca432e7306cc78c444258f0dce9a9c" dependencies = [ - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.6.0", + "objc2-app-kit 0.3.0", + "objc2-core-foundation", + "objc2-foundation 0.3.0", "raw-window-handle", "windows-sys 0.59.0", "windows-version", @@ -8230,6 +8376,28 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows" +version = "0.60.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddf874e74c7a99773e62b1c671427abf01a425e77c3d3fb9fb1e4883ea934529" +dependencies = [ + "windows-collections", + "windows-core 0.60.1", + "windows-future", + "windows-link", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5467f79cc1ba3f52ebb2ed41dbb459b8e7db636cc3429458d9a852e15bc24dec" +dependencies = [ + "windows-core 0.60.1", +] + [[package]] name = "windows-core" version = "0.52.0" @@ -8264,6 +8432,29 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-core" +version = "0.60.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca21a92a9cae9bf4ccae5cf8368dce0837100ddf6e6d57936749e85f152f6247" +dependencies = [ + "windows-implement 0.59.0", + "windows-interface 0.59.1", + "windows-link", + "windows-result 0.3.2", + "windows-strings 0.3.1", +] + +[[package]] +name = "windows-future" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a787db4595e7eb80239b74ce8babfb1363d8e343ab072f2ffe901400c03349f0" +dependencies = [ + "windows-core 0.60.1", + "windows-link", +] + [[package]] name = "windows-implement" version = "0.56.0" @@ -8286,6 +8477,17 @@ dependencies = [ "syn 2.0.90", ] +[[package]] +name = "windows-implement" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83577b051e2f49a058c308f17f273b570a6a758386fc291b5f6a934dd84e48c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "windows-interface" version = "0.56.0" @@ -8308,6 +8510,33 @@ dependencies = [ "syn 2.0.90", ] +[[package]] +name = "windows-interface" +version = "0.59.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "windows-link" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" + +[[package]] +name = "windows-numerics" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "005dea54e2f6499f2cee279b8f703b3cf3b5734a2d8d21867c8f44003182eeed" +dependencies = [ + "windows-core 0.60.1", + "windows-link", +] + [[package]] name = "windows-registry" version = "0.2.0" @@ -8325,8 +8554,8 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3" dependencies = [ - "windows-result 0.3.0", - "windows-strings 0.3.0", + "windows-result 0.3.2", + "windows-strings 0.3.1", "windows-targets 0.53.0", ] @@ -8350,11 +8579,11 @@ dependencies = [ [[package]] name = "windows-result" -version = "0.3.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d08106ce80268c4067c0571ca55a9b4e9516518eaa1a1fe9b37ca403ae1d1a34" +checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" dependencies = [ - "windows-targets 0.53.0", + "windows-link", ] [[package]] @@ -8369,11 +8598,11 @@ dependencies = [ [[package]] name = "windows-strings" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b888f919960b42ea4e11c2f408fadb55f78a9f236d5eef084103c8ce52893491" +checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319" dependencies = [ - "windows-targets 0.53.0", + "windows-link", ] [[package]] @@ -8744,12 +8973,12 @@ checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" [[package]] name = "wry" -version = "0.48.0" +version = "0.50.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e644bf458e27b11b0ecafc9e5633d1304fdae82baca1d42185669752fe6ca4f" +checksum = "b19b78efae8b853c6c817e8752fc1dbf9cab8a8ffe9c30f399bd750ccf0f0730" dependencies = [ "base64 0.22.1", - "block2 0.5.1", + "block2 0.6.0", "cookie", "crossbeam-channel", "dpi", @@ -8763,9 +8992,10 @@ dependencies = [ "kuchikiki", "libc", "ndk", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.6.0", + "objc2-app-kit 0.3.0", + "objc2-core-foundation", + "objc2-foundation 0.3.0", "objc2-ui-kit", "objc2-web-kit", "once_cell", @@ -8779,8 +9009,8 @@ dependencies = [ "webkit2gtk", "webkit2gtk-sys", "webview2-com", - "windows 0.58.0", - "windows-core 0.58.0", + "windows 0.60.0", + "windows-core 0.60.1", "windows-version", "x11-dl", ] diff --git a/Cargo.toml b/Cargo.toml index d85be889..afcccb69 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,41 +1,41 @@ -[workspace] -members = [ - "plugins/*", - "plugins/*/tests/*", - "plugins/updater/tests/updater-migration/v2-app", - "plugins/*/examples/*/src-tauri", - "examples/*/src-tauri", -] -resolver = "2" - -[workspace.dependencies] -serde = { version = "1", features = ["derive"] } -tracing = "0.1" -log = "0.4" -tauri = { version = "2", default-features = false } -tauri-build = "2" -tauri-plugin = "2" -tauri-utils = "2" -serde_json = "1" -thiserror = "2" -url = "2" -schemars = "0.8" -dunce = "1" -specta = "^2.0.0-rc.16" -glob = "0.3" -zbus = "5" - -[workspace.package] -edition = "2021" -authors = ["Tauri Programme within The Commons Conservancy"] -license = "Apache-2.0 OR MIT" -rust-version = "1.77.2" -repository = "https://github.com/tauri-apps/plugins-workspace" - -# default to small, optimized release binaries -[profile.release] -panic = "abort" -codegen-units = 1 -lto = true -incremental = false -opt-level = "s" +[workspace] +members = [ + "plugins/*", + "plugins/*/tests/*", + "plugins/updater/tests/updater-migration/v2-app", + "plugins/*/examples/*/src-tauri", + "examples/*/src-tauri", +] +resolver = "2" + +[workspace.dependencies] +serde = { version = "1", features = ["derive"] } +tracing = "0.1" +log = "0.4" +tauri = { path = "../tauri/crates/tauri", default-features = false } +tauri-build = "2" +tauri-plugin = "2" +tauri-utils = "2" +serde_json = "1" +thiserror = "2" +url = "2" +schemars = "0.8" +dunce = "1" +specta = "^2.0.0-rc.16" +glob = "0.3" +zbus = "5" + +[workspace.package] +edition = "2021" +authors = ["Tauri Programme within The Commons Conservancy"] +license = "Apache-2.0 OR MIT" +rust-version = "1.77.2" +repository = "https://github.com/tauri-apps/plugins-workspace" + +# default to small, optimized release binaries +[profile.release] +panic = "abort" +codegen-units = 1 +lto = true +incremental = false +opt-level = "s" diff --git a/plugins/updater/src/updater.rs b/plugins/updater/src/updater.rs index d7a2e547..fd62c8bf 100644 --- a/plugins/updater/src/updater.rs +++ b/plugins/updater/src/updater.rs @@ -1,1434 +1,1434 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -use std::{ - collections::HashMap, - ffi::{OsStr, OsString}, - io::Cursor, - path::{Path, PathBuf}, - str::FromStr, - sync::Arc, - time::Duration, -}; - -use base64::Engine; -use futures_util::StreamExt; -use http::HeaderName; -use minisign_verify::{PublicKey, Signature}; -use percent_encoding::{AsciiSet, CONTROLS}; -use reqwest::{ - header::{HeaderMap, HeaderValue}, - ClientBuilder, StatusCode, -}; -use semver::Version; -use serde::{de::Error as DeError, Deserialize, Deserializer, Serialize}; -use tauri::{utils::platform::current_exe, AppHandle, Resource, Runtime}; -use time::OffsetDateTime; -use url::Url; - -use crate::{ - error::{Error, Result}, - Config, -}; - -const UPDATER_USER_AGENT: &str = concat!(env!("CARGO_PKG_NAME"), "/", env!("CARGO_PKG_VERSION"),); - -#[derive(Clone)] -pub enum Installer { - AppImage, - Deb, - Rpm, - - App, - - Msi, - Nsis, -} - -impl Installer{ - fn suffix(self) -> &'static str { - match self { - Self::AppImage => "appimage", - Self::Deb => "deb", - Self::Rpm => "rpm", - Self::App => "app", - Self::Msi => "msi", - Self::Nsis => "nsis", - } - } -} - -#[derive(Debug, Deserialize, Serialize, Clone)] -pub struct ReleaseManifestPlatform { - /// Download URL for the platform - pub url: Url, - /// Signature for the platform - pub signature: String, -} - -#[derive(Debug, Deserialize, Serialize, Clone)] -#[serde(untagged)] -pub enum RemoteReleaseInner { - Dynamic(ReleaseManifestPlatform), - Static { - platforms: HashMap, - }, -} - -/// Information about a release returned by the remote update server. -/// -/// This type can have one of two shapes: Server Format (Dynamic Format) and Static Format. -#[derive(Debug, Clone)] -pub struct RemoteRelease { - /// Version to install. - pub version: Version, - /// Release notes. - pub notes: Option, - /// Release date. - pub pub_date: Option, - /// Release data. - pub data: RemoteReleaseInner, -} - -impl RemoteRelease { - /// The release's download URL for the given target. - pub fn download_url(&self, target: &str, installer: Option) -> Result<&Url> { - - let fallback_target = installer.map(|installer| format!("{target}-{}", installer.suffix())); - match self.data { - RemoteReleaseInner::Dynamic(ref platform) => Ok(&platform.url), - RemoteReleaseInner::Static { ref platforms } => platforms - .get(target) - .map_or_else( - || match fallback_target { - Some(fallback) => platforms.get(&fallback).map_or(Err(Error::TargetsNotFound(target.to_string(), fallback)), |p| Ok(&p.url)), - None => Err(Error::TargetNotFound(target.to_string())) - }, |p| { Ok(&p.url) }) - } - } - - /// The release's signature for the given target. - pub fn signature(&self, target: &str, installer: Option) -> Result<&String> { - let fallback_target = installer.map(|installer| format!("{target}-{}", installer.suffix())); - - match self.data { - RemoteReleaseInner::Dynamic(ref platform) => Ok(&platform.signature), - RemoteReleaseInner::Static { ref platforms } => platforms - .get(target) - .map_or_else( - || match fallback_target { - Some(fallback) => platforms.get(&fallback).map_or(Err(Error::TargetsNotFound(target.to_string(), fallback)), |p| Ok(&p.signature)), - None => Err(Error::TargetNotFound(target.to_string())) - }, |p| { Ok(&p.signature) }) - } - } -} - -pub type OnBeforeExit = Arc; -pub type VersionComparator = Arc bool + Send + Sync>; -type MainThreadClosure = Box; -type RunOnMainThread = - Box std::result::Result<(), tauri::Error> + Send + Sync + 'static>; - -pub struct UpdaterBuilder { - #[allow(dead_code)] - run_on_main_thread: RunOnMainThread, - app_name: String, - current_version: Version, - config: Config, - pub(crate) version_comparator: Option, - executable_path: Option, - target: Option, - endpoints: Option>, - headers: HeaderMap, - timeout: Option, - proxy: Option, - installer_args: Vec, - current_exe_args: Vec, - on_before_exit: Option, -} - -impl UpdaterBuilder { - pub(crate) fn new(app: &AppHandle, config: crate::Config) -> Self { - let app_ = app.clone(); - let run_on_main_thread = - move |f: Box| app_.run_on_main_thread(f); - Self { - run_on_main_thread: Box::new(run_on_main_thread), - installer_args: config - .windows - .as_ref() - .map(|w| w.installer_args.clone()) - .unwrap_or_default(), - current_exe_args: Vec::new(), - app_name: app.package_info().name.clone(), - current_version: app.package_info().version.clone(), - config, - version_comparator: None, - executable_path: None, - target: None, - endpoints: None, - headers: Default::default(), - timeout: None, - proxy: None, - on_before_exit: None, - } - } - - pub fn version_comparator bool + Send + Sync + 'static>( - mut self, - f: F, - ) -> Self { - self.version_comparator = Some(Arc::new(f)); - self - } - - pub fn target(mut self, target: impl Into) -> Self { - self.target.replace(target.into()); - self - } - - pub fn endpoints(mut self, endpoints: Vec) -> Result { - crate::config::validate_endpoints( - &endpoints, - self.config.dangerous_insecure_transport_protocol, - )?; - - self.endpoints.replace(endpoints); - Ok(self) - } - - pub fn executable_path>(mut self, p: P) -> Self { - self.executable_path.replace(p.as_ref().into()); - self - } - - pub fn header(mut self, key: K, value: V) -> Result - where - HeaderName: TryFrom, - >::Error: Into, - HeaderValue: TryFrom, - >::Error: Into, - { - let key: std::result::Result = key.try_into().map_err(Into::into); - let value: std::result::Result = - value.try_into().map_err(Into::into); - self.headers.insert(key?, value?); - - Ok(self) - } - - pub fn headers(mut self, headers: HeaderMap) -> Self { - self.headers = headers; - self - } - - pub fn clear_headers(mut self) -> Self { - self.headers.clear(); - self - } - - pub fn timeout(mut self, timeout: Duration) -> Self { - self.timeout = Some(timeout); - self - } - - pub fn proxy(mut self, proxy: Url) -> Self { - self.proxy.replace(proxy); - self - } - - pub fn pubkey>(mut self, pubkey: S) -> Self { - self.config.pubkey = pubkey.into(); - self - } - - pub fn installer_arg(mut self, arg: S) -> Self - where - S: Into, - { - self.installer_args.push(arg.into()); - self - } - - pub fn installer_args(mut self, args: I) -> Self - where - I: IntoIterator, - S: Into, - { - let args = args.into_iter().map(|a| a.into()).collect::>(); - self.installer_args.extend_from_slice(&args); - self - } - - pub fn clear_installer_args(mut self) -> Self { - self.installer_args.clear(); - self - } - - pub fn on_before_exit(mut self, f: F) -> Self { - self.on_before_exit.replace(Arc::new(f)); - self - } - - pub fn build(self) -> Result { - let endpoints = self - .endpoints - .unwrap_or_else(|| self.config.endpoints.clone()); - - if endpoints.is_empty() { - return Err(Error::EmptyEndpoints); - }; - - let arch = get_updater_arch().ok_or(Error::UnsupportedArch)?; - let (target, json_target) = if let Some(target) = self.target { - (target.clone(), target ) - } else { - let target = get_updater_target().ok_or(Error::UnsupportedOs)?; - let json_target = format!("{target}-{arch}"); - (target.to_owned(), json_target) - }; - - let executable_path = self.executable_path.clone().unwrap_or(current_exe()?); - - // Get the extract_path from the provided executable_path - let extract_path = if cfg!(target_os = "linux") { - executable_path - } else { - extract_path_from_executable(&executable_path)? - }; - - Ok(Updater { - run_on_main_thread: Arc::new(self.run_on_main_thread), - config: self.config, - app_name: self.app_name, - current_version: self.current_version, - version_comparator: self.version_comparator, - timeout: self.timeout, - proxy: self.proxy, - endpoints, - installer_args: self.installer_args, - current_exe_args: self.current_exe_args, - arch, - target, - json_target, - headers: self.headers, - extract_path, - on_before_exit: self.on_before_exit, - }) - } -} - -impl UpdaterBuilder { - pub(crate) fn current_exe_args(mut self, args: I) -> Self - where - I: IntoIterator, - S: Into, - { - let args = args.into_iter().map(|a| a.into()).collect::>(); - self.current_exe_args.extend_from_slice(&args); - self - } -} - -pub struct Updater { - #[allow(dead_code)] - run_on_main_thread: Arc, - config: Config, - app_name: String, - current_version: Version, - version_comparator: Option, - timeout: Option, - proxy: Option, - endpoints: Vec, - arch: &'static str, - // The `{{target}}` variable we replace in the endpoint and serach for in the JSON - target: String, - // The value we search if the updater server returns a JSON with the `platforms` object - json_target: String, - headers: HeaderMap, - extract_path: PathBuf, - on_before_exit: Option, - #[allow(unused)] - installer_args: Vec, - #[allow(unused)] - current_exe_args: Vec, -} - - - - -impl Updater { - - fn get_updater_installer(&self) -> Result> { - match tauri::__TAURI_BUNDLE_TYPE { - "DEB_BUNDLE" => Ok(Some(Installer::Deb)), - "RPM_BUNDLE" => Ok(Some(Installer::Rpm)), - "APP_BUNDLE" => Ok(Some(Installer::AppImage)), - "MSI_BUNDLE" => Ok(Some(Installer::Msi)), - "NSS_BUNDLE" => Ok(Some(Installer::Nsis)), - _ => Err(Error::UnknownInstaller) - } - } - - pub async fn check(&self) -> Result> { - // we want JSON only - let mut headers = self.headers.clone(); - headers.insert("Accept", HeaderValue::from_str("application/json").unwrap()); - // Set SSL certs for linux if they aren't available. - #[cfg(target_os = "linux")] - { - if std::env::var_os("SSL_CERT_FILE").is_none() { - std::env::set_var("SSL_CERT_FILE", "/etc/ssl/certs/ca-certificates.crt"); - } - if std::env::var_os("SSL_CERT_DIR").is_none() { - std::env::set_var("SSL_CERT_DIR", "/etc/ssl/certs"); - } - } - - let mut remote_release: Option = None; - let mut raw_json: Option = None; - let mut last_error: Option = None; - for url in &self.endpoints { - // replace {{current_version}}, {{target}} and {{arch}} in the provided URL - // this is useful if we need to query example - // https://releases.myapp.com/update/{{target}}/{{arch}}/{{current_version}} - // will be translated into -> - // https://releases.myapp.com/update/darwin/aarch64/1.0.0 - // The main objective is if the update URL is defined via the Cargo.toml - // the URL will be generated dynamically - let version = self.current_version.to_string(); - let version = version.as_bytes(); - const CONTROLS_ADD: &AsciiSet = &CONTROLS.add(b'+'); - let encoded_version = percent_encoding::percent_encode(version, CONTROLS_ADD); - let encoded_version = encoded_version.to_string(); - - let url: Url = url - .to_string() - // url::Url automatically url-encodes the path components - .replace("%7B%7Bcurrent_version%7D%7D", &encoded_version) - .replace("%7B%7Btarget%7D%7D", &self.target) - .replace("%7B%7Barch%7D%7D", self.arch) - // but not query parameters - .replace("{{current_version}}", &encoded_version) - .replace("{{target}}", &self.target) - .replace("{{arch}}", self.arch) - .parse()?; - - let mut request = ClientBuilder::new().user_agent(UPDATER_USER_AGENT); - if let Some(timeout) = self.timeout { - request = request.timeout(timeout); - } - if let Some(ref proxy) = self.proxy { - let proxy = reqwest::Proxy::all(proxy.as_str())?; - request = request.proxy(proxy); - } - let response = request - .build()? - .get(url) - .headers(headers.clone()) - .send() - .await; - - match response { - Ok(res) => { - if res.status().is_success() { - // no updates found! - if StatusCode::NO_CONTENT == res.status() { - return Ok(None); - }; - - raw_json = Some(res.json().await?); - match serde_json::from_value::(raw_json.clone().unwrap()) - .map_err(Into::into) - { - Ok(release) => { - last_error = None; - remote_release = Some(release); - // we found a relase, break the loop - break; - } - Err(err) => last_error = Some(err), - } - } - } - Err(err) => last_error = Some(err.into()), - } - } - - // Last error is cleaned on success. - // Shouldn't be triggered if we had a successfull call - if let Some(error) = last_error { - return Err(error); - } - - // Extracted remote metadata - let release = remote_release.ok_or(Error::ReleaseNotFound)?; - - let should_update = match self.version_comparator.as_ref() { - Some(comparator) => comparator(self.current_version.clone(), release.clone()), - None => release.version > self.current_version, - }; - - let installer = self.get_updater_installer()?; - - let update = if should_update { - Some(Update { - run_on_main_thread: self.run_on_main_thread.clone(), - config: self.config.clone(), - on_before_exit: self.on_before_exit.clone(), - app_name: self.app_name.clone(), - current_version: self.current_version.to_string(), - target: self.target.clone(), - extract_path: self.extract_path.clone(), - version: release.version.to_string(), - date: release.pub_date, - download_url: release.download_url(&self.json_target, installer.clone())?.to_owned(), - body: release.notes.clone(), - signature: release.signature(&self.json_target, installer.clone())?.to_owned(), - installer, - raw_json: raw_json.unwrap(), - timeout: self.timeout, - proxy: self.proxy.clone(), - headers: self.headers.clone(), - installer_args: self.installer_args.clone(), - current_exe_args: self.current_exe_args.clone(), - }) - } else { - None - }; - - Ok(update) - } -} - -#[derive(Clone)] -pub struct Update { - #[allow(dead_code)] - run_on_main_thread: Arc, - config: Config, - #[allow(unused)] - on_before_exit: Option, - /// Update description - pub body: Option, - /// Version used to check for update - pub current_version: String, - /// Version announced - pub version: String, - /// Update publish date - pub date: Option, - /// Target - pub target: String, - /// Current installer - pub installer: Option, - /// Download URL announced - pub download_url: Url, - /// Signature announced - pub signature: String, - /// The raw version of server's JSON response. Useful if the response contains additional fields that the updater doesn't handle. - pub raw_json: serde_json::Value, - /// Request timeout - pub timeout: Option, - /// Request proxy - pub proxy: Option, - /// Request headers - pub headers: HeaderMap, - /// Extract path - #[allow(unused)] - extract_path: PathBuf, - /// App name, used for creating named tempfiles on Windows - #[allow(unused)] - app_name: String, - #[allow(unused)] - installer_args: Vec, - #[allow(unused)] - current_exe_args: Vec, -} - -impl Resource for Update {} - -impl Update { - /// Downloads the updater package, verifies it then return it as bytes. - /// - /// Use [`Update::install`] to install it - pub async fn download), D: FnOnce()>( - &self, - mut on_chunk: C, - on_download_finish: D, - ) -> Result> { - // set our headers - let mut headers = self.headers.clone(); - headers.insert( - "Accept", - HeaderValue::from_str("application/octet-stream").unwrap(), - ); - - let mut request = ClientBuilder::new().user_agent(UPDATER_USER_AGENT); - if let Some(timeout) = self.timeout { - request = request.timeout(timeout); - } - if let Some(ref proxy) = self.proxy { - let proxy = reqwest::Proxy::all(proxy.as_str())?; - request = request.proxy(proxy); - } - let response = request - .build()? - .get(self.download_url.clone()) - .headers(headers) - .send() - .await?; - - if !response.status().is_success() { - return Err(Error::Network(format!( - "Download request failed with status: {}", - response.status() - ))); - } - - let content_length: Option = response - .headers() - .get("Content-Length") - .and_then(|value| value.to_str().ok()) - .and_then(|value| value.parse().ok()); - - let mut buffer = Vec::new(); - - let mut stream = response.bytes_stream(); - while let Some(chunk) = stream.next().await { - let chunk = chunk?; - on_chunk(chunk.len(), content_length); - buffer.extend(chunk); - } - on_download_finish(); - - verify_signature(&buffer, &self.signature, &self.config.pubkey)?; - - Ok(buffer) - } - - /// Installs the updater package downloaded by [`Update::download`] - pub fn install(&self, bytes: impl AsRef<[u8]>) -> Result<()> { - self.install_inner(bytes.as_ref()) - } - - /// Downloads and installs the updater package - pub async fn download_and_install), D: FnOnce()>( - &self, - on_chunk: C, - on_download_finish: D, - ) -> Result<()> { - let bytes = self.download(on_chunk, on_download_finish).await?; - self.install(bytes) - } - - #[cfg(mobile)] - fn install_inner(&self, _bytes: &[u8]) -> Result<()> { - Ok(()) - } -} - -#[cfg(windows)] -enum WindowsUpdaterType { - Nsis { - path: PathBuf, - #[allow(unused)] - temp: Option, - }, - Msi { - path: PathBuf, - #[allow(unused)] - temp: Option, - }, -} - -#[cfg(windows)] -impl WindowsUpdaterType { - fn nsis(path: PathBuf, temp: Option) -> Self { - Self::Nsis { path, temp } - } - - fn msi(path: PathBuf, temp: Option) -> Self { - Self::Msi { - path: path.wrap_in_quotes(), - temp, - } - } -} - -#[cfg(windows)] -impl Config { - fn install_mode(&self) -> crate::config::WindowsUpdateInstallMode { - self.windows - .as_ref() - .map(|w| w.install_mode.clone()) - .unwrap_or_default() - } -} - -/// Windows -#[cfg(windows)] -impl Update { - /// ### Expected structure: - /// ├── [AppName]_[version]_x64.msi # Application MSI - /// ├── [AppName]_[version]_x64-setup.exe # NSIS installer - /// ├── [AppName]_[version]_x64.msi.zip # ZIP generated by tauri-bundler - /// │ └──[AppName]_[version]_x64.msi # Application MSI - /// ├── [AppName]_[version]_x64-setup.exe.zip # ZIP generated by tauri-bundler - /// │ └──[AppName]_[version]_x64-setup.exe # NSIS installer - /// └── ... - fn install_inner(&self, bytes: &[u8]) -> Result<()> { - use std::iter::once; - use windows_sys::{ - w, - Win32::UI::{Shell::ShellExecuteW, WindowsAndMessaging::SW_SHOW}, - }; - - let updater_type = self.extract(bytes)?; - - let install_mode = self.config.install_mode(); - let current_args = &self.current_exe_args()[1..]; - let msi_args; - - let installer_args: Vec<&OsStr> = match &updater_type { - WindowsUpdaterType::Nsis { .. } => install_mode - .nsis_args() - .iter() - .map(OsStr::new) - .chain(once(OsStr::new("/UPDATE"))) - .chain(once(OsStr::new("/ARGS"))) - .chain(current_args.to_vec()) - .chain(self.installer_args()) - .collect(), - WindowsUpdaterType::Msi { path, .. } => { - let escaped_args = current_args - .iter() - .map(escape_msi_property_arg) - .collect::>() - .join(" "); - msi_args = OsString::from(format!("LAUNCHAPPARGS=\"{escaped_args}\"")); - - [OsStr::new("/i"), path.as_os_str()] - .into_iter() - .chain(install_mode.msiexec_args().iter().map(OsStr::new)) - .chain(once(OsStr::new("/promptrestart"))) - .chain(self.installer_args()) - .chain(once(OsStr::new("AUTOLAUNCHAPP=True"))) - .chain(once(msi_args.as_os_str())) - .collect() - } - }; - - if let Some(on_before_exit) = self.on_before_exit.as_ref() { - on_before_exit(); - } - - let file = match &updater_type { - WindowsUpdaterType::Nsis { path, .. } => path.as_os_str().to_os_string(), - WindowsUpdaterType::Msi { .. } => std::env::var("SYSTEMROOT").as_ref().map_or_else( - |_| OsString::from("msiexec.exe"), - |p| OsString::from(format!("{p}\\System32\\msiexec.exe")), - ), - }; - let file = encode_wide(file); - - let parameters = installer_args.join(OsStr::new(" ")); - let parameters = encode_wide(parameters); - - unsafe { - ShellExecuteW( - std::ptr::null_mut(), - w!("open"), - file.as_ptr(), - parameters.as_ptr(), - std::ptr::null(), - SW_SHOW, - ) - }; - - std::process::exit(0); - } - - fn installer_args(&self) -> Vec<&OsStr> { - self.installer_args - .iter() - .map(OsStr::new) - .collect::>() - } - - fn current_exe_args(&self) -> Vec<&OsStr> { - self.current_exe_args - .iter() - .map(OsStr::new) - .collect::>() - } - - fn extract(&self, bytes: &[u8]) -> Result { - #[cfg(feature = "zip")] - if infer::archive::is_zip(bytes) { - return self.extract_zip(bytes); - } - - self.extract_exe(bytes) - } - - fn make_temp_dir(&self) -> Result { - Ok(tempfile::Builder::new() - .prefix(&format!("{}-{}-updater-", self.app_name, self.version)) - .tempdir()? - .into_path()) - } - - #[cfg(feature = "zip")] - fn extract_zip(&self, bytes: &[u8]) -> Result { - let temp_dir = self.make_temp_dir()?; - - let archive = Cursor::new(bytes); - let mut extractor = zip::ZipArchive::new(archive)?; - extractor.extract(&temp_dir)?; - - let paths = std::fs::read_dir(&temp_dir)?; - for path in paths { - let path = path?.path(); - let ext = path.extension(); - if ext == Some(OsStr::new("exe")) { - return Ok(WindowsUpdaterType::nsis(path, None)); - } else if ext == Some(OsStr::new("msi")) { - return Ok(WindowsUpdaterType::msi(path, None)); - } - } - - Err(crate::Error::BinaryNotFoundInArchive) - } - - fn extract_exe(&self, bytes: &[u8]) -> Result { - if infer::app::is_exe(bytes) { - let (path, temp) = self.write_to_temp(bytes, ".exe")?; - Ok(WindowsUpdaterType::nsis(path, temp)) - } else if infer::archive::is_msi(bytes) { - let (path, temp) = self.write_to_temp(bytes, ".msi")?; - Ok(WindowsUpdaterType::msi(path, temp)) - } else { - Err(crate::Error::InvalidUpdaterFormat) - } - } - - fn write_to_temp( - &self, - bytes: &[u8], - ext: &str, - ) -> Result<(PathBuf, Option)> { - use std::io::Write; - - let temp_dir = self.make_temp_dir()?; - let mut temp_file = tempfile::Builder::new() - .prefix(&format!("{}-{}-installer", self.app_name, self.version)) - .suffix(ext) - .rand_bytes(0) - .tempfile_in(temp_dir)?; - temp_file.write_all(bytes)?; - - let temp = temp_file.into_temp_path(); - Ok((temp.to_path_buf(), Some(temp))) - } -} - -/// Linux (AppImage and Deb) -#[cfg(any( - target_os = "linux", - target_os = "dragonfly", - target_os = "freebsd", - target_os = "netbsd", - target_os = "openbsd" -))] -impl Update { - /// ### Expected structure: - /// ├── [AppName]_[version]_amd64.AppImage.tar.gz # GZ generated by tauri-bundler - /// │ └──[AppName]_[version]_amd64.AppImage # Application AppImage - /// ├── [AppName]_[version]_amd64.deb # Debian package - /// └── ... - /// - fn install_inner(&self, bytes: &[u8]) -> Result<()> { - match self.installer { - Some(Installer::Deb) => self.install_deb(bytes), - Some(Installer::Rpm) => self.install_rpm(bytes), - _ =>self.install_appimage(bytes) - } - } - - fn install_appimage(&self, bytes: &[u8]) -> Result<()> { - use std::os::unix::fs::{MetadataExt, PermissionsExt}; - let extract_path_metadata = self.extract_path.metadata()?; - - let tmp_dir_locations = vec![ - Box::new(|| Some(std::env::temp_dir())) as Box Option>, - Box::new(dirs::cache_dir), - Box::new(|| Some(self.extract_path.parent().unwrap().to_path_buf())), - ]; - - for tmp_dir_location in tmp_dir_locations { - if let Some(tmp_dir_location) = tmp_dir_location() { - let tmp_dir = tempfile::Builder::new() - .prefix("tauri_current_app") - .tempdir_in(tmp_dir_location)?; - let tmp_dir_metadata = tmp_dir.path().metadata()?; - - if extract_path_metadata.dev() == tmp_dir_metadata.dev() { - let mut perms = tmp_dir_metadata.permissions(); - perms.set_mode(0o700); - std::fs::set_permissions(tmp_dir.path(), perms)?; - - let tmp_app_image = &tmp_dir.path().join("current_app.AppImage"); - - let permissions = std::fs::metadata(&self.extract_path)?.permissions(); - - // create a backup of our current app image - std::fs::rename(&self.extract_path, tmp_app_image)?; - - #[cfg(feature = "zip")] - if infer::archive::is_gz(bytes) { - // extract the buffer to the tmp_dir - // we extract our signed archive into our final directory without any temp file - let archive = Cursor::new(bytes); - let decoder = flate2::read::GzDecoder::new(archive); - let mut archive = tar::Archive::new(decoder); - for mut entry in archive.entries()?.flatten() { - if let Ok(path) = entry.path() { - if path.extension() == Some(OsStr::new("AppImage")) { - // if something went wrong during the extraction, we should restore previous app - if let Err(err) = entry.unpack(&self.extract_path) { - std::fs::rename(tmp_app_image, &self.extract_path)?; - return Err(err.into()); - } - // early finish we have everything we need here - return Ok(()); - } - } - } - // if we have not returned early we should restore the backup - std::fs::rename(tmp_app_image, &self.extract_path)?; - return Err(Error::BinaryNotFoundInArchive); - } - - return match std::fs::write(&self.extract_path, bytes) - .and_then(|_| std::fs::set_permissions(&self.extract_path, permissions)) - { - Err(err) => { - // if something went wrong during the extraction, we should restore previous app - std::fs::rename(tmp_app_image, &self.extract_path)?; - Err(err.into()) - } - Ok(_) => Ok(()), - }; - } - } - } - - Err(Error::TempDirNotOnSameMountPoint) - } - - - fn install_deb(&self, bytes: &[u8]) -> Result<()> { - // First verify the bytes are actually a .deb package - if !infer::archive::is_deb(bytes) { - return Err(Error::InvalidUpdaterFormat); - } - - self.try_tmp_locations(bytes, "dpkg", "-i") - - } - - fn install_rpm(&self, bytes: &[u8]) -> Result<()> { - // First verify the bytes are actually a .rpm package - if !infer::archive::is_rpm(bytes) { - return Err(Error::InvalidUpdaterFormat); - } - self.try_tmp_locations(bytes, "rpm", "-U") - } - - fn try_tmp_locations(&self, bytes: &[u8], install_cmd: &str, install_arg: &str) -> Result<()> { - // Try different temp directories - let tmp_dir_locations = vec![ - Box::new(|| Some(std::env::temp_dir())) as Box Option>, - Box::new(dirs::cache_dir), - Box::new(|| Some(self.extract_path.parent().unwrap().to_path_buf())), - ]; - - // Try writing to multiple temp locations until one succeeds - for tmp_dir_location in tmp_dir_locations { - if let Some(path) = tmp_dir_location() { - if let Ok(tmp_dir) = tempfile::Builder::new() - .prefix("tauri_rpm_update") - .tempdir_in(path) - { - let pkg_path = tmp_dir.path().join("package.rpm"); - - // Try writing the .deb file - if std::fs::write(&pkg_path, bytes).is_ok() { - // If write succeeds, proceed with installation - return self.try_install_with_privileges(&pkg_path, install_cmd, install_arg); - } - // If write fails, continue to next temp location - } - } - } - - // If we get here, all temp locations failed - Err(Error::TempDirNotFound) - - } - - fn try_install_with_privileges(&self, pkg_path: &Path, install_cmd: &str, install_arg: &str) -> Result<()> { - // 1. First try using pkexec (graphical sudo prompt) - if let Ok(status) = std::process::Command::new("pkexec") - .arg(install_cmd) - .arg(install_arg) - .arg(pkg_path) - .status() - { - if status.success() { - return Ok(()); - } - } - - // 2. Try zenity or kdialog for a graphical sudo experience - if let Ok(password) = self.get_password_graphically() { - if self.install_with_sudo(pkg_path, &password, install_cmd, install_arg)? { - return Ok(()); - } - } - - // 3. Final fallback: terminal sudo - let status = std::process::Command::new("sudo") - .arg(install_cmd) - .arg(install_arg) - .arg(pkg_path) - .status()?; - - if status.success() { - Ok(()) - } else { - Err(Error::PackageInstallFailed) - } - } - - fn get_password_graphically(&self) -> Result { - // Try zenity first - let zenity_result = std::process::Command::new("zenity") - .args([ - "--password", - "--title=Authentication Required", - "--text=Enter your password to install the update:", - ]) - .output(); - - if let Ok(output) = zenity_result { - if output.status.success() { - return Ok(String::from_utf8_lossy(&output.stdout).trim().to_string()); - } - } - - // Fall back to kdialog if zenity fails or isn't available - let kdialog_result = std::process::Command::new("kdialog") - .args(["--password", "Enter your password to install the update:"]) - .output(); - - if let Ok(output) = kdialog_result { - if output.status.success() { - return Ok(String::from_utf8_lossy(&output.stdout).trim().to_string()); - } - } - - Err(Error::AuthenticationFailed) - } - - fn install_with_sudo(&self, pkg_path: &Path, password: &str, install_cmd: &str, install_arg: &str) -> Result { - use std::io::Write; - use std::process::{Command, Stdio}; - - let mut child = Command::new("sudo") - .arg("-S") // read password from stdin - .arg(install_cmd) - .arg(install_arg) - .arg(pkg_path) - .stdin(Stdio::piped()) - .stdout(Stdio::piped()) - .stderr(Stdio::piped()) - .spawn()?; - - if let Some(mut stdin) = child.stdin.take() { - // Write password to stdin - writeln!(stdin, "{}", password)?; - } - - let status = child.wait()?; - Ok(status.success()) - } -} - -/// MacOS -#[cfg(target_os = "macos")] -impl Update { - /// ### Expected structure: - /// ├── [AppName]_[version]_x64.app.tar.gz # GZ generated by tauri-bundler - /// │ └──[AppName].app # Main application - /// │ └── Contents # Application contents... - /// │ └── ... - /// └── ... - fn install_inner(&self, bytes: &[u8]) -> Result<()> { - use flate2::read::GzDecoder; - - let cursor = Cursor::new(bytes); - let mut extracted_files: Vec = Vec::new(); - - // Create temp directories for backup and extraction - let tmp_backup_dir = tempfile::Builder::new() - .prefix("tauri_current_app") - .tempdir()?; - - let tmp_extract_dir = tempfile::Builder::new() - .prefix("tauri_updated_app") - .tempdir()?; - - let decoder = GzDecoder::new(cursor); - let mut archive = tar::Archive::new(decoder); - - // Extract files to temporary directory - for entry in archive.entries()? { - let mut entry = entry?; - let collected_path: PathBuf = entry.path()?.iter().skip(1).collect(); - let extraction_path = tmp_extract_dir.path().join(&collected_path); - - // Ensure parent directories exist - if let Some(parent) = extraction_path.parent() { - std::fs::create_dir_all(parent)?; - } - - if let Err(err) = entry.unpack(&extraction_path) { - // Cleanup on error - std::fs::remove_dir_all(tmp_extract_dir.path()).ok(); - return Err(err.into()); - } - extracted_files.push(extraction_path); - } - - // Try to move the current app to backup - let move_result = std::fs::rename( - &self.extract_path, - tmp_backup_dir.path().join("current_app"), - ); - let need_authorization = if let Err(err) = move_result { - if err.kind() == std::io::ErrorKind::PermissionDenied { - true - } else { - std::fs::remove_dir_all(tmp_extract_dir.path()).ok(); - return Err(err.into()); - } - } else { - false - }; - - if need_authorization { - // Use AppleScript to perform moves with admin privileges - let apple_script = format!( - "do shell script \"rm -rf '{src}' && mv -f '{new}' '{src}'\" with administrator privileges", - src = self.extract_path.display(), - new = tmp_extract_dir.path().display() - ); - - let (tx, rx) = std::sync::mpsc::channel(); - let res = (self.run_on_main_thread)(Box::new(move || { - let mut script = - osakit::Script::new_from_source(osakit::Language::AppleScript, &apple_script); - script.compile().expect("invalid AppleScript"); - let r = script.execute(); - tx.send(r).unwrap(); - })); - let result = rx.recv().unwrap(); - - if res.is_err() || result.is_err() { - std::fs::remove_dir_all(tmp_extract_dir.path()).ok(); - return Err(Error::Io(std::io::Error::new( - std::io::ErrorKind::PermissionDenied, - "Failed to move the new app into place", - ))); - } - } else { - // Remove existing directory if it exists - if self.extract_path.exists() { - std::fs::remove_dir_all(&self.extract_path)?; - } - // Move the new app to the target path - std::fs::rename(tmp_extract_dir.path(), &self.extract_path)?; - } - - let _ = std::process::Command::new("touch") - .arg(&self.extract_path) - .status(); - - Ok(()) - } -} - -/// Gets the target string used on the updater. -pub fn target() -> Option { - if let (Some(target), Some(arch)) = (get_updater_target(), get_updater_arch()) { - Some(format!("{target}-{arch}")) - } else { - None - } -} - -pub(crate) fn get_updater_target() -> Option<&'static str> { - if cfg!(target_os = "linux") { - Some("linux") - } else if cfg!(target_os = "macos") { - // TODO shouldn't this be macos instead? - Some("darwin") - } else if cfg!(target_os = "windows") { - Some("windows") - } else { - None - } -} - - -pub(crate) fn get_updater_arch() -> Option<&'static str> { - if cfg!(target_arch = "x86") { - Some("i686") - } else if cfg!(target_arch = "x86_64") { - Some("x86_64") - } else if cfg!(target_arch = "arm") { - Some("armv7") - } else if cfg!(target_arch = "aarch64") { - Some("aarch64") - } else { - None - } -} - - - -pub fn extract_path_from_executable(executable_path: &Path) -> Result { - // Return the path of the current executable by default - // Example C:\Program Files\My App\ - let extract_path = executable_path - .parent() - .map(PathBuf::from) - .ok_or(Error::FailedToDetermineExtractPath)?; - - // MacOS example binary is in /Applications/TestApp.app/Contents/MacOS/myApp - // We need to get /Applications/.app - // TODO(lemarier): Need a better way here - // Maybe we could search for <*.app> to get the right path - #[cfg(target_os = "macos")] - if extract_path - .display() - .to_string() - .contains("Contents/MacOS") - { - return extract_path - .parent() - .map(PathBuf::from) - .ok_or(Error::FailedToDetermineExtractPath)? - .parent() - .map(PathBuf::from) - .ok_or(Error::FailedToDetermineExtractPath); - } - - Ok(extract_path) -} - -impl<'de> Deserialize<'de> for RemoteRelease { - fn deserialize(deserializer: D) -> std::result::Result - where - D: Deserializer<'de>, - { - #[derive(Deserialize)] - struct InnerRemoteRelease { - #[serde(alias = "name", deserialize_with = "parse_version")] - version: Version, - notes: Option, - pub_date: Option, - platforms: Option>, - // dynamic platform response - url: Option, - signature: Option, - } - - let release = InnerRemoteRelease::deserialize(deserializer)?; - - let pub_date = if let Some(date) = release.pub_date { - Some( - OffsetDateTime::parse(&date, &time::format_description::well_known::Rfc3339) - .map_err(|e| DeError::custom(format!("invalid value for `pub_date`: {e}")))?, - ) - } else { - None - }; - - Ok(RemoteRelease { - version: release.version, - notes: release.notes, - pub_date, - data: if let Some(platforms) = release.platforms { - RemoteReleaseInner::Static { platforms } - } else { - RemoteReleaseInner::Dynamic(ReleaseManifestPlatform { - url: release.url.ok_or_else(|| { - DeError::custom("the `url` field was not set on the updater response") - })?, - signature: release.signature.ok_or_else(|| { - DeError::custom("the `signature` field was not set on the updater response") - })?, - }) - }, - }) - } -} - -fn parse_version<'de, D>(deserializer: D) -> std::result::Result -where - D: serde::Deserializer<'de>, -{ - let str = String::deserialize(deserializer)?; - - Version::from_str(str.trim_start_matches('v')).map_err(serde::de::Error::custom) -} - -// Validate signature -fn verify_signature(data: &[u8], release_signature: &str, pub_key: &str) -> Result { - // we need to convert the pub key - let pub_key_decoded = base64_to_string(pub_key)?; - let public_key = PublicKey::decode(&pub_key_decoded)?; - let signature_base64_decoded = base64_to_string(release_signature)?; - let signature = Signature::decode(&signature_base64_decoded)?; - - // Validate signature or bail out - public_key.verify(data, &signature, true)?; - Ok(true) -} - -fn base64_to_string(base64_string: &str) -> Result { - let decoded_string = &base64::engine::general_purpose::STANDARD.decode(base64_string)?; - let result = std::str::from_utf8(decoded_string) - .map_err(|_| Error::SignatureUtf8(base64_string.into()))? - .to_string(); - Ok(result) -} - -#[cfg(windows)] -fn encode_wide(string: impl AsRef) -> Vec { - use std::os::windows::ffi::OsStrExt; - - string - .as_ref() - .encode_wide() - .chain(std::iter::once(0)) - .collect() -} - -#[cfg(windows)] -trait PathExt { - fn wrap_in_quotes(&self) -> Self; -} - -#[cfg(windows)] -impl PathExt for PathBuf { - fn wrap_in_quotes(&self) -> Self { - let mut msi_path = OsString::from("\""); - msi_path.push(self.as_os_str()); - msi_path.push("\""); - PathBuf::from(msi_path) - } -} - -#[cfg(windows)] -fn escape_msi_property_arg(arg: impl AsRef) -> String { - let mut arg = arg.as_ref().to_string_lossy().to_string(); - - // Otherwise this argument will get lost in ShellExecute - if arg.is_empty() { - return "\"\"\"\"".to_string(); - } else if !arg.contains(' ') && !arg.contains('"') { - return arg; - } - - if arg.contains('"') { - arg = arg.replace('"', r#""""""#) - } - - if arg.starts_with('-') { - if let Some((a1, a2)) = arg.split_once('=') { - format!("{a1}=\"\"{a2}\"\"") - } else { - format!("\"\"{arg}\"\"") - } - } else { - format!("\"\"{arg}\"\"") - } -} - -#[cfg(test)] -mod tests { - - #[test] - #[cfg(windows)] - fn it_wraps_correctly() { - use super::PathExt; - use std::path::PathBuf; - - assert_eq!( - PathBuf::from("C:\\Users\\Some User\\AppData\\tauri-example.exe").wrap_in_quotes(), - PathBuf::from("\"C:\\Users\\Some User\\AppData\\tauri-example.exe\"") - ) - } - - #[test] - #[cfg(windows)] - fn it_escapes_correctly() { - use crate::updater::escape_msi_property_arg; - - // Explanation for quotes: - // The output of escape_msi_property_args() will be used in `LAUNCHAPPARGS=\"{HERE}\"`. This is the first quote level. - // To escape a quotation mark we use a second quotation mark, so "" is interpreted as " later. - // This means that the escaped strings can't ever have a single quotation mark! - // Now there are 3 major things to look out for to not break the msiexec call: - // 1) Wrap spaces in quotation marks, otherwise it will be interpreted as the end of the msiexec argument. - // 2) Escape escaping quotation marks, otherwise they will either end the msiexec argument or be ignored. - // 3) Escape emtpy args in quotation marks, otherwise the argument will get lost. - let cases = [ - "something", - "--flag", - "--empty=", - "--arg=value", - "some space", // This simulates `./my-app "some string"`. - "--arg value", // -> This simulates `./my-app "--arg value"`. Same as above but it triggers the startsWith(`-`) logic. - "--arg=unwrapped space", // `./my-app --arg="unwrapped space"` - "--arg=\"wrapped\"", // `./my-app --args=""wrapped""` - "--arg=\"wrapped space\"", // `./my-app --args=""wrapped space""` - "--arg=midword\"wrapped space\"", // `./my-app --args=midword""wrapped""` - "", // `./my-app '""'` - ]; - let cases_escaped = [ - "something", - "--flag", - "--empty=", - "--arg=value", - "\"\"some space\"\"", - "\"\"--arg value\"\"", - "--arg=\"\"unwrapped space\"\"", - r#"--arg=""""""wrapped"""""""#, - r#"--arg=""""""wrapped space"""""""#, - r#"--arg=""midword""""wrapped space"""""""#, - "\"\"\"\"", - ]; - - // Just to be sure we didn't mess that up - assert_eq!(cases.len(), cases_escaped.len()); - - for (orig, escaped) in cases.iter().zip(cases_escaped) { - assert_eq!(escape_msi_property_arg(orig), escaped); - } - } -} +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +use std::{ + collections::HashMap, + ffi::{OsStr, OsString}, + io::Cursor, + path::{Path, PathBuf}, + str::FromStr, + sync::Arc, + time::Duration, +}; + +use base64::Engine; +use futures_util::StreamExt; +use http::HeaderName; +use minisign_verify::{PublicKey, Signature}; +use percent_encoding::{AsciiSet, CONTROLS}; +use reqwest::{ + header::{HeaderMap, HeaderValue}, + ClientBuilder, StatusCode, +}; +use semver::Version; +use serde::{de::Error as DeError, Deserialize, Deserializer, Serialize}; +use tauri::{utils::platform::current_exe, AppHandle, Resource, Runtime}; +use time::OffsetDateTime; +use url::Url; + +use crate::{ + error::{Error, Result}, + Config, +}; + +const UPDATER_USER_AGENT: &str = concat!(env!("CARGO_PKG_NAME"), "/", env!("CARGO_PKG_VERSION"),); + +#[derive(Clone)] +pub enum Installer { + AppImage, + Deb, + Rpm, + + App, + + Msi, + Nsis, +} + +impl Installer{ + fn suffix(self) -> &'static str { + match self { + Self::AppImage => "appimage", + Self::Deb => "deb", + Self::Rpm => "rpm", + Self::App => "app", + Self::Msi => "msi", + Self::Nsis => "nsis", + } + } +} + +#[derive(Debug, Deserialize, Serialize, Clone)] +pub struct ReleaseManifestPlatform { + /// Download URL for the platform + pub url: Url, + /// Signature for the platform + pub signature: String, +} + +#[derive(Debug, Deserialize, Serialize, Clone)] +#[serde(untagged)] +pub enum RemoteReleaseInner { + Dynamic(ReleaseManifestPlatform), + Static { + platforms: HashMap, + }, +} + +/// Information about a release returned by the remote update server. +/// +/// This type can have one of two shapes: Server Format (Dynamic Format) and Static Format. +#[derive(Debug, Clone)] +pub struct RemoteRelease { + /// Version to install. + pub version: Version, + /// Release notes. + pub notes: Option, + /// Release date. + pub pub_date: Option, + /// Release data. + pub data: RemoteReleaseInner, +} + +impl RemoteRelease { + /// The release's download URL for the given target. + pub fn download_url(&self, target: &str, installer: Option) -> Result<&Url> { + + let fallback_target = installer.map(|installer| format!("{target}-{}", installer.suffix())); + match self.data { + RemoteReleaseInner::Dynamic(ref platform) => Ok(&platform.url), + RemoteReleaseInner::Static { ref platforms } => platforms + .get(target) + .map_or_else( + || match fallback_target { + Some(fallback) => platforms.get(&fallback).map_or(Err(Error::TargetsNotFound(target.to_string(), fallback)), |p| Ok(&p.url)), + None => Err(Error::TargetNotFound(target.to_string())) + }, |p| { Ok(&p.url) }) + } + } + + /// The release's signature for the given target. + pub fn signature(&self, target: &str, installer: Option) -> Result<&String> { + let fallback_target = installer.map(|installer| format!("{target}-{}", installer.suffix())); + + match self.data { + RemoteReleaseInner::Dynamic(ref platform) => Ok(&platform.signature), + RemoteReleaseInner::Static { ref platforms } => platforms + .get(target) + .map_or_else( + || match fallback_target { + Some(fallback) => platforms.get(&fallback).map_or(Err(Error::TargetsNotFound(target.to_string(), fallback)), |p| Ok(&p.signature)), + None => Err(Error::TargetNotFound(target.to_string())) + }, |p| { Ok(&p.signature) }) + } + } +} + +pub type OnBeforeExit = Arc; +pub type VersionComparator = Arc bool + Send + Sync>; +type MainThreadClosure = Box; +type RunOnMainThread = + Box std::result::Result<(), tauri::Error> + Send + Sync + 'static>; + +pub struct UpdaterBuilder { + #[allow(dead_code)] + run_on_main_thread: RunOnMainThread, + app_name: String, + current_version: Version, + config: Config, + pub(crate) version_comparator: Option, + executable_path: Option, + target: Option, + endpoints: Option>, + headers: HeaderMap, + timeout: Option, + proxy: Option, + installer_args: Vec, + current_exe_args: Vec, + on_before_exit: Option, +} + +impl UpdaterBuilder { + pub(crate) fn new(app: &AppHandle, config: crate::Config) -> Self { + let app_ = app.clone(); + let run_on_main_thread = + move |f: Box| app_.run_on_main_thread(f); + Self { + run_on_main_thread: Box::new(run_on_main_thread), + installer_args: config + .windows + .as_ref() + .map(|w| w.installer_args.clone()) + .unwrap_or_default(), + current_exe_args: Vec::new(), + app_name: app.package_info().name.clone(), + current_version: app.package_info().version.clone(), + config, + version_comparator: None, + executable_path: None, + target: None, + endpoints: None, + headers: Default::default(), + timeout: None, + proxy: None, + on_before_exit: None, + } + } + + pub fn version_comparator bool + Send + Sync + 'static>( + mut self, + f: F, + ) -> Self { + self.version_comparator = Some(Arc::new(f)); + self + } + + pub fn target(mut self, target: impl Into) -> Self { + self.target.replace(target.into()); + self + } + + pub fn endpoints(mut self, endpoints: Vec) -> Result { + crate::config::validate_endpoints( + &endpoints, + self.config.dangerous_insecure_transport_protocol, + )?; + + self.endpoints.replace(endpoints); + Ok(self) + } + + pub fn executable_path>(mut self, p: P) -> Self { + self.executable_path.replace(p.as_ref().into()); + self + } + + pub fn header(mut self, key: K, value: V) -> Result + where + HeaderName: TryFrom, + >::Error: Into, + HeaderValue: TryFrom, + >::Error: Into, + { + let key: std::result::Result = key.try_into().map_err(Into::into); + let value: std::result::Result = + value.try_into().map_err(Into::into); + self.headers.insert(key?, value?); + + Ok(self) + } + + pub fn headers(mut self, headers: HeaderMap) -> Self { + self.headers = headers; + self + } + + pub fn clear_headers(mut self) -> Self { + self.headers.clear(); + self + } + + pub fn timeout(mut self, timeout: Duration) -> Self { + self.timeout = Some(timeout); + self + } + + pub fn proxy(mut self, proxy: Url) -> Self { + self.proxy.replace(proxy); + self + } + + pub fn pubkey>(mut self, pubkey: S) -> Self { + self.config.pubkey = pubkey.into(); + self + } + + pub fn installer_arg(mut self, arg: S) -> Self + where + S: Into, + { + self.installer_args.push(arg.into()); + self + } + + pub fn installer_args(mut self, args: I) -> Self + where + I: IntoIterator, + S: Into, + { + let args = args.into_iter().map(|a| a.into()).collect::>(); + self.installer_args.extend_from_slice(&args); + self + } + + pub fn clear_installer_args(mut self) -> Self { + self.installer_args.clear(); + self + } + + pub fn on_before_exit(mut self, f: F) -> Self { + self.on_before_exit.replace(Arc::new(f)); + self + } + + pub fn build(self) -> Result { + let endpoints = self + .endpoints + .unwrap_or_else(|| self.config.endpoints.clone()); + + if endpoints.is_empty() { + return Err(Error::EmptyEndpoints); + }; + + let arch = get_updater_arch().ok_or(Error::UnsupportedArch)?; + let (target, json_target) = if let Some(target) = self.target { + (target.clone(), target ) + } else { + let target = get_updater_target().ok_or(Error::UnsupportedOs)?; + let json_target = format!("{target}-{arch}"); + (target.to_owned(), json_target) + }; + + let executable_path = self.executable_path.clone().unwrap_or(current_exe()?); + + // Get the extract_path from the provided executable_path + let extract_path = if cfg!(target_os = "linux") { + executable_path + } else { + extract_path_from_executable(&executable_path)? + }; + + Ok(Updater { + run_on_main_thread: Arc::new(self.run_on_main_thread), + config: self.config, + app_name: self.app_name, + current_version: self.current_version, + version_comparator: self.version_comparator, + timeout: self.timeout, + proxy: self.proxy, + endpoints, + installer_args: self.installer_args, + current_exe_args: self.current_exe_args, + arch, + target, + json_target, + headers: self.headers, + extract_path, + on_before_exit: self.on_before_exit, + }) + } +} + +impl UpdaterBuilder { + pub(crate) fn current_exe_args(mut self, args: I) -> Self + where + I: IntoIterator, + S: Into, + { + let args = args.into_iter().map(|a| a.into()).collect::>(); + self.current_exe_args.extend_from_slice(&args); + self + } +} + +pub struct Updater { + #[allow(dead_code)] + run_on_main_thread: Arc, + config: Config, + app_name: String, + current_version: Version, + version_comparator: Option, + timeout: Option, + proxy: Option, + endpoints: Vec, + arch: &'static str, + // The `{{target}}` variable we replace in the endpoint and serach for in the JSON + target: String, + // The value we search if the updater server returns a JSON with the `platforms` object + json_target: String, + headers: HeaderMap, + extract_path: PathBuf, + on_before_exit: Option, + #[allow(unused)] + installer_args: Vec, + #[allow(unused)] + current_exe_args: Vec, +} + + + + +impl Updater { + + fn get_updater_installer(&self) -> Result> { + match tauri::__TAURI_BUNDLE_TYPE { + "DEB_BUNDLE" => Ok(Some(Installer::Deb)), + "RPM_BUNDLE" => Ok(Some(Installer::Rpm)), + "APP_BUNDLE" => Ok(Some(Installer::AppImage)), + "MSI_BUNDLE" => Ok(Some(Installer::Msi)), + "NSS_BUNDLE" => Ok(Some(Installer::Nsis)), + _ => Err(Error::UnknownInstaller) + } + } + + pub async fn check(&self) -> Result> { + // we want JSON only + let mut headers = self.headers.clone(); + headers.insert("Accept", HeaderValue::from_str("application/json").unwrap()); + // Set SSL certs for linux if they aren't available. + #[cfg(target_os = "linux")] + { + if std::env::var_os("SSL_CERT_FILE").is_none() { + std::env::set_var("SSL_CERT_FILE", "/etc/ssl/certs/ca-certificates.crt"); + } + if std::env::var_os("SSL_CERT_DIR").is_none() { + std::env::set_var("SSL_CERT_DIR", "/etc/ssl/certs"); + } + } + + let mut remote_release: Option = None; + let mut raw_json: Option = None; + let mut last_error: Option = None; + for url in &self.endpoints { + // replace {{current_version}}, {{target}} and {{arch}} in the provided URL + // this is useful if we need to query example + // https://releases.myapp.com/update/{{target}}/{{arch}}/{{current_version}} + // will be translated into -> + // https://releases.myapp.com/update/darwin/aarch64/1.0.0 + // The main objective is if the update URL is defined via the Cargo.toml + // the URL will be generated dynamically + let version = self.current_version.to_string(); + let version = version.as_bytes(); + const CONTROLS_ADD: &AsciiSet = &CONTROLS.add(b'+'); + let encoded_version = percent_encoding::percent_encode(version, CONTROLS_ADD); + let encoded_version = encoded_version.to_string(); + + let url: Url = url + .to_string() + // url::Url automatically url-encodes the path components + .replace("%7B%7Bcurrent_version%7D%7D", &encoded_version) + .replace("%7B%7Btarget%7D%7D", &self.target) + .replace("%7B%7Barch%7D%7D", self.arch) + // but not query parameters + .replace("{{current_version}}", &encoded_version) + .replace("{{target}}", &self.target) + .replace("{{arch}}", self.arch) + .parse()?; + + let mut request = ClientBuilder::new().user_agent(UPDATER_USER_AGENT); + if let Some(timeout) = self.timeout { + request = request.timeout(timeout); + } + if let Some(ref proxy) = self.proxy { + let proxy = reqwest::Proxy::all(proxy.as_str())?; + request = request.proxy(proxy); + } + let response = request + .build()? + .get(url) + .headers(headers.clone()) + .send() + .await; + + match response { + Ok(res) => { + if res.status().is_success() { + // no updates found! + if StatusCode::NO_CONTENT == res.status() { + return Ok(None); + }; + + raw_json = Some(res.json().await?); + match serde_json::from_value::(raw_json.clone().unwrap()) + .map_err(Into::into) + { + Ok(release) => { + last_error = None; + remote_release = Some(release); + // we found a relase, break the loop + break; + } + Err(err) => last_error = Some(err), + } + } + } + Err(err) => last_error = Some(err.into()), + } + } + + // Last error is cleaned on success. + // Shouldn't be triggered if we had a successfull call + if let Some(error) = last_error { + return Err(error); + } + + // Extracted remote metadata + let release = remote_release.ok_or(Error::ReleaseNotFound)?; + + let should_update = match self.version_comparator.as_ref() { + Some(comparator) => comparator(self.current_version.clone(), release.clone()), + None => release.version > self.current_version, + }; + + let installer = self.get_updater_installer()?; + + let update = if should_update { + Some(Update { + run_on_main_thread: self.run_on_main_thread.clone(), + config: self.config.clone(), + on_before_exit: self.on_before_exit.clone(), + app_name: self.app_name.clone(), + current_version: self.current_version.to_string(), + target: self.target.clone(), + extract_path: self.extract_path.clone(), + version: release.version.to_string(), + date: release.pub_date, + download_url: release.download_url(&self.json_target, installer.clone())?.to_owned(), + body: release.notes.clone(), + signature: release.signature(&self.json_target, installer.clone())?.to_owned(), + installer, + raw_json: raw_json.unwrap(), + timeout: self.timeout, + proxy: self.proxy.clone(), + headers: self.headers.clone(), + installer_args: self.installer_args.clone(), + current_exe_args: self.current_exe_args.clone(), + }) + } else { + None + }; + + Ok(update) + } +} + +#[derive(Clone)] +pub struct Update { + #[allow(dead_code)] + run_on_main_thread: Arc, + config: Config, + #[allow(unused)] + on_before_exit: Option, + /// Update description + pub body: Option, + /// Version used to check for update + pub current_version: String, + /// Version announced + pub version: String, + /// Update publish date + pub date: Option, + /// Target + pub target: String, + /// Current installer + pub installer: Option, + /// Download URL announced + pub download_url: Url, + /// Signature announced + pub signature: String, + /// The raw version of server's JSON response. Useful if the response contains additional fields that the updater doesn't handle. + pub raw_json: serde_json::Value, + /// Request timeout + pub timeout: Option, + /// Request proxy + pub proxy: Option, + /// Request headers + pub headers: HeaderMap, + /// Extract path + #[allow(unused)] + extract_path: PathBuf, + /// App name, used for creating named tempfiles on Windows + #[allow(unused)] + app_name: String, + #[allow(unused)] + installer_args: Vec, + #[allow(unused)] + current_exe_args: Vec, +} + +impl Resource for Update {} + +impl Update { + /// Downloads the updater package, verifies it then return it as bytes. + /// + /// Use [`Update::install`] to install it + pub async fn download), D: FnOnce()>( + &self, + mut on_chunk: C, + on_download_finish: D, + ) -> Result> { + // set our headers + let mut headers = self.headers.clone(); + headers.insert( + "Accept", + HeaderValue::from_str("application/octet-stream").unwrap(), + ); + + let mut request = ClientBuilder::new().user_agent(UPDATER_USER_AGENT); + if let Some(timeout) = self.timeout { + request = request.timeout(timeout); + } + if let Some(ref proxy) = self.proxy { + let proxy = reqwest::Proxy::all(proxy.as_str())?; + request = request.proxy(proxy); + } + let response = request + .build()? + .get(self.download_url.clone()) + .headers(headers) + .send() + .await?; + + if !response.status().is_success() { + return Err(Error::Network(format!( + "Download request failed with status: {}", + response.status() + ))); + } + + let content_length: Option = response + .headers() + .get("Content-Length") + .and_then(|value| value.to_str().ok()) + .and_then(|value| value.parse().ok()); + + let mut buffer = Vec::new(); + + let mut stream = response.bytes_stream(); + while let Some(chunk) = stream.next().await { + let chunk = chunk?; + on_chunk(chunk.len(), content_length); + buffer.extend(chunk); + } + on_download_finish(); + + verify_signature(&buffer, &self.signature, &self.config.pubkey)?; + + Ok(buffer) + } + + /// Installs the updater package downloaded by [`Update::download`] + pub fn install(&self, bytes: impl AsRef<[u8]>) -> Result<()> { + self.install_inner(bytes.as_ref()) + } + + /// Downloads and installs the updater package + pub async fn download_and_install), D: FnOnce()>( + &self, + on_chunk: C, + on_download_finish: D, + ) -> Result<()> { + let bytes = self.download(on_chunk, on_download_finish).await?; + self.install(bytes) + } + + #[cfg(mobile)] + fn install_inner(&self, _bytes: &[u8]) -> Result<()> { + Ok(()) + } +} + +#[cfg(windows)] +enum WindowsUpdaterType { + Nsis { + path: PathBuf, + #[allow(unused)] + temp: Option, + }, + Msi { + path: PathBuf, + #[allow(unused)] + temp: Option, + }, +} + +#[cfg(windows)] +impl WindowsUpdaterType { + fn nsis(path: PathBuf, temp: Option) -> Self { + Self::Nsis { path, temp } + } + + fn msi(path: PathBuf, temp: Option) -> Self { + Self::Msi { + path: path.wrap_in_quotes(), + temp, + } + } +} + +#[cfg(windows)] +impl Config { + fn install_mode(&self) -> crate::config::WindowsUpdateInstallMode { + self.windows + .as_ref() + .map(|w| w.install_mode.clone()) + .unwrap_or_default() + } +} + +/// Windows +#[cfg(windows)] +impl Update { + /// ### Expected structure: + /// ├── [AppName]_[version]_x64.msi # Application MSI + /// ├── [AppName]_[version]_x64-setup.exe # NSIS installer + /// ├── [AppName]_[version]_x64.msi.zip # ZIP generated by tauri-bundler + /// │ └──[AppName]_[version]_x64.msi # Application MSI + /// ├── [AppName]_[version]_x64-setup.exe.zip # ZIP generated by tauri-bundler + /// │ └──[AppName]_[version]_x64-setup.exe # NSIS installer + /// └── ... + fn install_inner(&self, bytes: &[u8]) -> Result<()> { + use std::iter::once; + use windows_sys::{ + w, + Win32::UI::{Shell::ShellExecuteW, WindowsAndMessaging::SW_SHOW}, + }; + + let updater_type = self.extract(bytes)?; + + let install_mode = self.config.install_mode(); + let current_args = &self.current_exe_args()[1..]; + let msi_args; + + let installer_args: Vec<&OsStr> = match &updater_type { + WindowsUpdaterType::Nsis { .. } => install_mode + .nsis_args() + .iter() + .map(OsStr::new) + .chain(once(OsStr::new("/UPDATE"))) + .chain(once(OsStr::new("/ARGS"))) + .chain(current_args.to_vec()) + .chain(self.installer_args()) + .collect(), + WindowsUpdaterType::Msi { path, .. } => { + let escaped_args = current_args + .iter() + .map(escape_msi_property_arg) + .collect::>() + .join(" "); + msi_args = OsString::from(format!("LAUNCHAPPARGS=\"{escaped_args}\"")); + + [OsStr::new("/i"), path.as_os_str()] + .into_iter() + .chain(install_mode.msiexec_args().iter().map(OsStr::new)) + .chain(once(OsStr::new("/promptrestart"))) + .chain(self.installer_args()) + .chain(once(OsStr::new("AUTOLAUNCHAPP=True"))) + .chain(once(msi_args.as_os_str())) + .collect() + } + }; + + if let Some(on_before_exit) = self.on_before_exit.as_ref() { + on_before_exit(); + } + + let file = match &updater_type { + WindowsUpdaterType::Nsis { path, .. } => path.as_os_str().to_os_string(), + WindowsUpdaterType::Msi { .. } => std::env::var("SYSTEMROOT").as_ref().map_or_else( + |_| OsString::from("msiexec.exe"), + |p| OsString::from(format!("{p}\\System32\\msiexec.exe")), + ), + }; + let file = encode_wide(file); + + let parameters = installer_args.join(OsStr::new(" ")); + let parameters = encode_wide(parameters); + + unsafe { + ShellExecuteW( + std::ptr::null_mut(), + w!("open"), + file.as_ptr(), + parameters.as_ptr(), + std::ptr::null(), + SW_SHOW, + ) + }; + + std::process::exit(0); + } + + fn installer_args(&self) -> Vec<&OsStr> { + self.installer_args + .iter() + .map(OsStr::new) + .collect::>() + } + + fn current_exe_args(&self) -> Vec<&OsStr> { + self.current_exe_args + .iter() + .map(OsStr::new) + .collect::>() + } + + fn extract(&self, bytes: &[u8]) -> Result { + #[cfg(feature = "zip")] + if infer::archive::is_zip(bytes) { + return self.extract_zip(bytes); + } + + self.extract_exe(bytes) + } + + fn make_temp_dir(&self) -> Result { + Ok(tempfile::Builder::new() + .prefix(&format!("{}-{}-updater-", self.app_name, self.version)) + .tempdir()? + .into_path()) + } + + #[cfg(feature = "zip")] + fn extract_zip(&self, bytes: &[u8]) -> Result { + let temp_dir = self.make_temp_dir()?; + + let archive = Cursor::new(bytes); + let mut extractor = zip::ZipArchive::new(archive)?; + extractor.extract(&temp_dir)?; + + let paths = std::fs::read_dir(&temp_dir)?; + for path in paths { + let path = path?.path(); + let ext = path.extension(); + if ext == Some(OsStr::new("exe")) { + return Ok(WindowsUpdaterType::nsis(path, None)); + } else if ext == Some(OsStr::new("msi")) { + return Ok(WindowsUpdaterType::msi(path, None)); + } + } + + Err(crate::Error::BinaryNotFoundInArchive) + } + + fn extract_exe(&self, bytes: &[u8]) -> Result { + if infer::app::is_exe(bytes) { + let (path, temp) = self.write_to_temp(bytes, ".exe")?; + Ok(WindowsUpdaterType::nsis(path, temp)) + } else if infer::archive::is_msi(bytes) { + let (path, temp) = self.write_to_temp(bytes, ".msi")?; + Ok(WindowsUpdaterType::msi(path, temp)) + } else { + Err(crate::Error::InvalidUpdaterFormat) + } + } + + fn write_to_temp( + &self, + bytes: &[u8], + ext: &str, + ) -> Result<(PathBuf, Option)> { + use std::io::Write; + + let temp_dir = self.make_temp_dir()?; + let mut temp_file = tempfile::Builder::new() + .prefix(&format!("{}-{}-installer", self.app_name, self.version)) + .suffix(ext) + .rand_bytes(0) + .tempfile_in(temp_dir)?; + temp_file.write_all(bytes)?; + + let temp = temp_file.into_temp_path(); + Ok((temp.to_path_buf(), Some(temp))) + } +} + +/// Linux (AppImage and Deb) +#[cfg(any( + target_os = "linux", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "netbsd", + target_os = "openbsd" +))] +impl Update { + /// ### Expected structure: + /// ├── [AppName]_[version]_amd64.AppImage.tar.gz # GZ generated by tauri-bundler + /// │ └──[AppName]_[version]_amd64.AppImage # Application AppImage + /// ├── [AppName]_[version]_amd64.deb # Debian package + /// └── ... + /// + fn install_inner(&self, bytes: &[u8]) -> Result<()> { + match self.installer { + Some(Installer::Deb) => self.install_deb(bytes), + Some(Installer::Rpm) => self.install_rpm(bytes), + _ =>self.install_appimage(bytes) + } + } + + fn install_appimage(&self, bytes: &[u8]) -> Result<()> { + use std::os::unix::fs::{MetadataExt, PermissionsExt}; + let extract_path_metadata = self.extract_path.metadata()?; + + let tmp_dir_locations = vec![ + Box::new(|| Some(std::env::temp_dir())) as Box Option>, + Box::new(dirs::cache_dir), + Box::new(|| Some(self.extract_path.parent().unwrap().to_path_buf())), + ]; + + for tmp_dir_location in tmp_dir_locations { + if let Some(tmp_dir_location) = tmp_dir_location() { + let tmp_dir = tempfile::Builder::new() + .prefix("tauri_current_app") + .tempdir_in(tmp_dir_location)?; + let tmp_dir_metadata = tmp_dir.path().metadata()?; + + if extract_path_metadata.dev() == tmp_dir_metadata.dev() { + let mut perms = tmp_dir_metadata.permissions(); + perms.set_mode(0o700); + std::fs::set_permissions(tmp_dir.path(), perms)?; + + let tmp_app_image = &tmp_dir.path().join("current_app.AppImage"); + + let permissions = std::fs::metadata(&self.extract_path)?.permissions(); + + // create a backup of our current app image + std::fs::rename(&self.extract_path, tmp_app_image)?; + + #[cfg(feature = "zip")] + if infer::archive::is_gz(bytes) { + // extract the buffer to the tmp_dir + // we extract our signed archive into our final directory without any temp file + let archive = Cursor::new(bytes); + let decoder = flate2::read::GzDecoder::new(archive); + let mut archive = tar::Archive::new(decoder); + for mut entry in archive.entries()?.flatten() { + if let Ok(path) = entry.path() { + if path.extension() == Some(OsStr::new("AppImage")) { + // if something went wrong during the extraction, we should restore previous app + if let Err(err) = entry.unpack(&self.extract_path) { + std::fs::rename(tmp_app_image, &self.extract_path)?; + return Err(err.into()); + } + // early finish we have everything we need here + return Ok(()); + } + } + } + // if we have not returned early we should restore the backup + std::fs::rename(tmp_app_image, &self.extract_path)?; + return Err(Error::BinaryNotFoundInArchive); + } + + return match std::fs::write(&self.extract_path, bytes) + .and_then(|_| std::fs::set_permissions(&self.extract_path, permissions)) + { + Err(err) => { + // if something went wrong during the extraction, we should restore previous app + std::fs::rename(tmp_app_image, &self.extract_path)?; + Err(err.into()) + } + Ok(_) => Ok(()), + }; + } + } + } + + Err(Error::TempDirNotOnSameMountPoint) + } + + + fn install_deb(&self, bytes: &[u8]) -> Result<()> { + // First verify the bytes are actually a .deb package + if !infer::archive::is_deb(bytes) { + return Err(Error::InvalidUpdaterFormat); + } + + self.try_tmp_locations(bytes, "dpkg", "-i") + + } + + fn install_rpm(&self, bytes: &[u8]) -> Result<()> { + // First verify the bytes are actually a .rpm package + if !infer::archive::is_rpm(bytes) { + return Err(Error::InvalidUpdaterFormat); + } + self.try_tmp_locations(bytes, "rpm", "-U") + } + + fn try_tmp_locations(&self, bytes: &[u8], install_cmd: &str, install_arg: &str) -> Result<()> { + // Try different temp directories + let tmp_dir_locations = vec![ + Box::new(|| Some(std::env::temp_dir())) as Box Option>, + Box::new(dirs::cache_dir), + Box::new(|| Some(self.extract_path.parent().unwrap().to_path_buf())), + ]; + + // Try writing to multiple temp locations until one succeeds + for tmp_dir_location in tmp_dir_locations { + if let Some(path) = tmp_dir_location() { + if let Ok(tmp_dir) = tempfile::Builder::new() + .prefix("tauri_rpm_update") + .tempdir_in(path) + { + let pkg_path = tmp_dir.path().join("package.rpm"); + + // Try writing the .deb file + if std::fs::write(&pkg_path, bytes).is_ok() { + // If write succeeds, proceed with installation + return self.try_install_with_privileges(&pkg_path, install_cmd, install_arg); + } + // If write fails, continue to next temp location + } + } + } + + // If we get here, all temp locations failed + Err(Error::TempDirNotFound) + + } + + fn try_install_with_privileges(&self, pkg_path: &Path, install_cmd: &str, install_arg: &str) -> Result<()> { + // 1. First try using pkexec (graphical sudo prompt) + if let Ok(status) = std::process::Command::new("pkexec") + .arg(install_cmd) + .arg(install_arg) + .arg(pkg_path) + .status() + { + if status.success() { + return Ok(()); + } + } + + // 2. Try zenity or kdialog for a graphical sudo experience + if let Ok(password) = self.get_password_graphically() { + if self.install_with_sudo(pkg_path, &password, install_cmd, install_arg)? { + return Ok(()); + } + } + + // 3. Final fallback: terminal sudo + let status = std::process::Command::new("sudo") + .arg(install_cmd) + .arg(install_arg) + .arg(pkg_path) + .status()?; + + if status.success() { + Ok(()) + } else { + Err(Error::PackageInstallFailed) + } + } + + fn get_password_graphically(&self) -> Result { + // Try zenity first + let zenity_result = std::process::Command::new("zenity") + .args([ + "--password", + "--title=Authentication Required", + "--text=Enter your password to install the update:", + ]) + .output(); + + if let Ok(output) = zenity_result { + if output.status.success() { + return Ok(String::from_utf8_lossy(&output.stdout).trim().to_string()); + } + } + + // Fall back to kdialog if zenity fails or isn't available + let kdialog_result = std::process::Command::new("kdialog") + .args(["--password", "Enter your password to install the update:"]) + .output(); + + if let Ok(output) = kdialog_result { + if output.status.success() { + return Ok(String::from_utf8_lossy(&output.stdout).trim().to_string()); + } + } + + Err(Error::AuthenticationFailed) + } + + fn install_with_sudo(&self, pkg_path: &Path, password: &str, install_cmd: &str, install_arg: &str) -> Result { + use std::io::Write; + use std::process::{Command, Stdio}; + + let mut child = Command::new("sudo") + .arg("-S") // read password from stdin + .arg(install_cmd) + .arg(install_arg) + .arg(pkg_path) + .stdin(Stdio::piped()) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) + .spawn()?; + + if let Some(mut stdin) = child.stdin.take() { + // Write password to stdin + writeln!(stdin, "{}", password)?; + } + + let status = child.wait()?; + Ok(status.success()) + } +} + +/// MacOS +#[cfg(target_os = "macos")] +impl Update { + /// ### Expected structure: + /// ├── [AppName]_[version]_x64.app.tar.gz # GZ generated by tauri-bundler + /// │ └──[AppName].app # Main application + /// │ └── Contents # Application contents... + /// │ └── ... + /// └── ... + fn install_inner(&self, bytes: &[u8]) -> Result<()> { + use flate2::read::GzDecoder; + + let cursor = Cursor::new(bytes); + let mut extracted_files: Vec = Vec::new(); + + // Create temp directories for backup and extraction + let tmp_backup_dir = tempfile::Builder::new() + .prefix("tauri_current_app") + .tempdir()?; + + let tmp_extract_dir = tempfile::Builder::new() + .prefix("tauri_updated_app") + .tempdir()?; + + let decoder = GzDecoder::new(cursor); + let mut archive = tar::Archive::new(decoder); + + // Extract files to temporary directory + for entry in archive.entries()? { + let mut entry = entry?; + let collected_path: PathBuf = entry.path()?.iter().skip(1).collect(); + let extraction_path = tmp_extract_dir.path().join(&collected_path); + + // Ensure parent directories exist + if let Some(parent) = extraction_path.parent() { + std::fs::create_dir_all(parent)?; + } + + if let Err(err) = entry.unpack(&extraction_path) { + // Cleanup on error + std::fs::remove_dir_all(tmp_extract_dir.path()).ok(); + return Err(err.into()); + } + extracted_files.push(extraction_path); + } + + // Try to move the current app to backup + let move_result = std::fs::rename( + &self.extract_path, + tmp_backup_dir.path().join("current_app"), + ); + let need_authorization = if let Err(err) = move_result { + if err.kind() == std::io::ErrorKind::PermissionDenied { + true + } else { + std::fs::remove_dir_all(tmp_extract_dir.path()).ok(); + return Err(err.into()); + } + } else { + false + }; + + if need_authorization { + // Use AppleScript to perform moves with admin privileges + let apple_script = format!( + "do shell script \"rm -rf '{src}' && mv -f '{new}' '{src}'\" with administrator privileges", + src = self.extract_path.display(), + new = tmp_extract_dir.path().display() + ); + + let (tx, rx) = std::sync::mpsc::channel(); + let res = (self.run_on_main_thread)(Box::new(move || { + let mut script = + osakit::Script::new_from_source(osakit::Language::AppleScript, &apple_script); + script.compile().expect("invalid AppleScript"); + let r = script.execute(); + tx.send(r).unwrap(); + })); + let result = rx.recv().unwrap(); + + if res.is_err() || result.is_err() { + std::fs::remove_dir_all(tmp_extract_dir.path()).ok(); + return Err(Error::Io(std::io::Error::new( + std::io::ErrorKind::PermissionDenied, + "Failed to move the new app into place", + ))); + } + } else { + // Remove existing directory if it exists + if self.extract_path.exists() { + std::fs::remove_dir_all(&self.extract_path)?; + } + // Move the new app to the target path + std::fs::rename(tmp_extract_dir.path(), &self.extract_path)?; + } + + let _ = std::process::Command::new("touch") + .arg(&self.extract_path) + .status(); + + Ok(()) + } +} + +/// Gets the target string used on the updater. +pub fn target() -> Option { + if let (Some(target), Some(arch)) = (get_updater_target(), get_updater_arch()) { + Some(format!("{target}-{arch}")) + } else { + None + } +} + +pub(crate) fn get_updater_target() -> Option<&'static str> { + if cfg!(target_os = "linux") { + Some("linux") + } else if cfg!(target_os = "macos") { + // TODO shouldn't this be macos instead? + Some("darwin") + } else if cfg!(target_os = "windows") { + Some("windows") + } else { + None + } +} + + +pub(crate) fn get_updater_arch() -> Option<&'static str> { + if cfg!(target_arch = "x86") { + Some("i686") + } else if cfg!(target_arch = "x86_64") { + Some("x86_64") + } else if cfg!(target_arch = "arm") { + Some("armv7") + } else if cfg!(target_arch = "aarch64") { + Some("aarch64") + } else { + None + } +} + + + +pub fn extract_path_from_executable(executable_path: &Path) -> Result { + // Return the path of the current executable by default + // Example C:\Program Files\My App\ + let extract_path = executable_path + .parent() + .map(PathBuf::from) + .ok_or(Error::FailedToDetermineExtractPath)?; + + // MacOS example binary is in /Applications/TestApp.app/Contents/MacOS/myApp + // We need to get /Applications/.app + // TODO(lemarier): Need a better way here + // Maybe we could search for <*.app> to get the right path + #[cfg(target_os = "macos")] + if extract_path + .display() + .to_string() + .contains("Contents/MacOS") + { + return extract_path + .parent() + .map(PathBuf::from) + .ok_or(Error::FailedToDetermineExtractPath)? + .parent() + .map(PathBuf::from) + .ok_or(Error::FailedToDetermineExtractPath); + } + + Ok(extract_path) +} + +impl<'de> Deserialize<'de> for RemoteRelease { + fn deserialize(deserializer: D) -> std::result::Result + where + D: Deserializer<'de>, + { + #[derive(Deserialize)] + struct InnerRemoteRelease { + #[serde(alias = "name", deserialize_with = "parse_version")] + version: Version, + notes: Option, + pub_date: Option, + platforms: Option>, + // dynamic platform response + url: Option, + signature: Option, + } + + let release = InnerRemoteRelease::deserialize(deserializer)?; + + let pub_date = if let Some(date) = release.pub_date { + Some( + OffsetDateTime::parse(&date, &time::format_description::well_known::Rfc3339) + .map_err(|e| DeError::custom(format!("invalid value for `pub_date`: {e}")))?, + ) + } else { + None + }; + + Ok(RemoteRelease { + version: release.version, + notes: release.notes, + pub_date, + data: if let Some(platforms) = release.platforms { + RemoteReleaseInner::Static { platforms } + } else { + RemoteReleaseInner::Dynamic(ReleaseManifestPlatform { + url: release.url.ok_or_else(|| { + DeError::custom("the `url` field was not set on the updater response") + })?, + signature: release.signature.ok_or_else(|| { + DeError::custom("the `signature` field was not set on the updater response") + })?, + }) + }, + }) + } +} + +fn parse_version<'de, D>(deserializer: D) -> std::result::Result +where + D: serde::Deserializer<'de>, +{ + let str = String::deserialize(deserializer)?; + + Version::from_str(str.trim_start_matches('v')).map_err(serde::de::Error::custom) +} + +// Validate signature +fn verify_signature(data: &[u8], release_signature: &str, pub_key: &str) -> Result { + // we need to convert the pub key + let pub_key_decoded = base64_to_string(pub_key)?; + let public_key = PublicKey::decode(&pub_key_decoded)?; + let signature_base64_decoded = base64_to_string(release_signature)?; + let signature = Signature::decode(&signature_base64_decoded)?; + + // Validate signature or bail out + public_key.verify(data, &signature, true)?; + Ok(true) +} + +fn base64_to_string(base64_string: &str) -> Result { + let decoded_string = &base64::engine::general_purpose::STANDARD.decode(base64_string)?; + let result = std::str::from_utf8(decoded_string) + .map_err(|_| Error::SignatureUtf8(base64_string.into()))? + .to_string(); + Ok(result) +} + +#[cfg(windows)] +fn encode_wide(string: impl AsRef) -> Vec { + use std::os::windows::ffi::OsStrExt; + + string + .as_ref() + .encode_wide() + .chain(std::iter::once(0)) + .collect() +} + +#[cfg(windows)] +trait PathExt { + fn wrap_in_quotes(&self) -> Self; +} + +#[cfg(windows)] +impl PathExt for PathBuf { + fn wrap_in_quotes(&self) -> Self { + let mut msi_path = OsString::from("\""); + msi_path.push(self.as_os_str()); + msi_path.push("\""); + PathBuf::from(msi_path) + } +} + +#[cfg(windows)] +fn escape_msi_property_arg(arg: impl AsRef) -> String { + let mut arg = arg.as_ref().to_string_lossy().to_string(); + + // Otherwise this argument will get lost in ShellExecute + if arg.is_empty() { + return "\"\"\"\"".to_string(); + } else if !arg.contains(' ') && !arg.contains('"') { + return arg; + } + + if arg.contains('"') { + arg = arg.replace('"', r#""""""#) + } + + if arg.starts_with('-') { + if let Some((a1, a2)) = arg.split_once('=') { + format!("{a1}=\"\"{a2}\"\"") + } else { + format!("\"\"{arg}\"\"") + } + } else { + format!("\"\"{arg}\"\"") + } +} + +#[cfg(test)] +mod tests { + + #[test] + #[cfg(windows)] + fn it_wraps_correctly() { + use super::PathExt; + use std::path::PathBuf; + + assert_eq!( + PathBuf::from("C:\\Users\\Some User\\AppData\\tauri-example.exe").wrap_in_quotes(), + PathBuf::from("\"C:\\Users\\Some User\\AppData\\tauri-example.exe\"") + ) + } + + #[test] + #[cfg(windows)] + fn it_escapes_correctly() { + use crate::updater::escape_msi_property_arg; + + // Explanation for quotes: + // The output of escape_msi_property_args() will be used in `LAUNCHAPPARGS=\"{HERE}\"`. This is the first quote level. + // To escape a quotation mark we use a second quotation mark, so "" is interpreted as " later. + // This means that the escaped strings can't ever have a single quotation mark! + // Now there are 3 major things to look out for to not break the msiexec call: + // 1) Wrap spaces in quotation marks, otherwise it will be interpreted as the end of the msiexec argument. + // 2) Escape escaping quotation marks, otherwise they will either end the msiexec argument or be ignored. + // 3) Escape emtpy args in quotation marks, otherwise the argument will get lost. + let cases = [ + "something", + "--flag", + "--empty=", + "--arg=value", + "some space", // This simulates `./my-app "some string"`. + "--arg value", // -> This simulates `./my-app "--arg value"`. Same as above but it triggers the startsWith(`-`) logic. + "--arg=unwrapped space", // `./my-app --arg="unwrapped space"` + "--arg=\"wrapped\"", // `./my-app --args=""wrapped""` + "--arg=\"wrapped space\"", // `./my-app --args=""wrapped space""` + "--arg=midword\"wrapped space\"", // `./my-app --args=midword""wrapped""` + "", // `./my-app '""'` + ]; + let cases_escaped = [ + "something", + "--flag", + "--empty=", + "--arg=value", + "\"\"some space\"\"", + "\"\"--arg value\"\"", + "--arg=\"\"unwrapped space\"\"", + r#"--arg=""""""wrapped"""""""#, + r#"--arg=""""""wrapped space"""""""#, + r#"--arg=""midword""""wrapped space"""""""#, + "\"\"\"\"", + ]; + + // Just to be sure we didn't mess that up + assert_eq!(cases.len(), cases_escaped.len()); + + for (orig, escaped) in cases.iter().zip(cases_escaped) { + assert_eq!(escape_msi_property_arg(orig), escaped); + } + } +} diff --git a/plugins/updater/tests/app-updater/src/main.rs b/plugins/updater/tests/app-updater/src/main.rs index 5f5566f8..d3defc1e 100644 --- a/plugins/updater/tests/app-updater/src/main.rs +++ b/plugins/updater/tests/app-updater/src/main.rs @@ -1,56 +1,57 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] - -use tauri_plugin_updater::UpdaterExt; - -fn main() { - #[allow(unused_mut)] - let mut context = tauri::generate_context!(); - tauri::Builder::default() - .plugin(tauri_plugin_updater::Builder::new().build()) - .setup(|app| { - let handle = app.handle().clone(); - tauri::async_runtime::spawn(async move { - let mut builder = handle.updater_builder(); - if std::env::var("TARGET").unwrap_or_default() == "nsis" { - // /D sets the default installation directory ($INSTDIR), - // overriding InstallDir and InstallDirRegKey. - // It must be the last parameter used in the command line and must not contain any quotes, even if the path contains spaces. - // Only absolute paths are supported. - // NOTE: we only need this because this is an integration test and we don't want to install the app in the programs folder - builder = builder.installer_args(vec![format!( - "/D={}", - tauri::utils::platform::current_exe() - .unwrap() - .parent() - .unwrap() - .display() - )]); - } - let updater = builder.build().unwrap(); - - match updater.check().await { - Ok(Some(update)) => { - if let Err(e) = update.download_and_install(|_, _| {}, || {}).await { - println!("{e}"); - std::process::exit(1); - } - std::process::exit(0); - } - Ok(None) => { - std::process::exit(2); - } - Err(e) => { - println!("{e}"); - std::process::exit(1); - } - } - }); - Ok(()) - }) - .run(context) - .expect("error while running tauri application"); -} +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] + +use tauri_plugin_updater::UpdaterExt; + +fn main() { + #[allow(unused_mut)] + let mut context = tauri::generate_context!(); + println!("{}", tauri::__TAURI_BUNDLE_TYPE); + tauri::Builder::default() + .plugin(tauri_plugin_updater::Builder::new().build()) + .setup(|app| { + let handle = app.handle().clone(); + tauri::async_runtime::spawn(async move { + let mut builder = handle.updater_builder(); + if std::env::var("TARGET").unwrap_or_default() == "nsis" { + // /D sets the default installation directory ($INSTDIR), + // overriding InstallDir and InstallDirRegKey. + // It must be the last parameter used in the command line and must not contain any quotes, even if the path contains spaces. + // Only absolute paths are supported. + // NOTE: we only need this because this is an integration test and we don't want to install the app in the programs folder + builder = builder.installer_args(vec![format!( + "/D={}", + tauri::utils::platform::current_exe() + .unwrap() + .parent() + .unwrap() + .display() + )]); + } + let updater = builder.build().unwrap(); + + match updater.check().await { + Ok(Some(update)) => { + if let Err(e) = update.download_and_install(|_, _| {}, || {}).await { + println!("{e}"); + std::process::exit(1); + } + std::process::exit(0); + } + Ok(None) => { + std::process::exit(2); + } + Err(e) => { + println!("{e}"); + std::process::exit(1); + } + } + }); + Ok(()) + }) + .run(context) + .expect("error while running tauri application"); +} From b1a87811d887c1ef1e584b16628c37a204b4e771 Mon Sep 17 00:00:00 2001 From: Krzysztof Andrelczyk Date: Mon, 7 Apr 2025 22:22:02 +0200 Subject: [PATCH 12/25] format --- Cargo.lock | 726 ++++++++++++++++++++++----------- Cargo.toml | 2 +- plugins/updater/src/updater.rs | 86 ++-- 3 files changed, 529 insertions(+), 285 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0e1f2448..da9b2bcf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -212,7 +212,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.0.5", "tauri-plugin-barcode-scanner", "tauri-plugin-biometric", "tauri-plugin-cli", @@ -243,7 +243,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.0.5", "tauri-plugin-updater", "time", "tiny_http", @@ -256,7 +256,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.0.5", "tauri-plugin-updater", "tiny_http", ] @@ -268,7 +268,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.0.5", "tauri-plugin-store", ] @@ -291,9 +291,9 @@ dependencies = [ "core-graphics 0.23.2", "image", "log", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.5.2", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", "parking_lot", "windows-sys 0.48.0", "x11rb", @@ -701,7 +701,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e58aa60e59d8dbfcc36138f5f18be5f24394d33b38b24f7fd0b1caa33095f22f" dependencies = [ "block-sys", - "objc2", + "objc2 0.5.2", ] [[package]] @@ -710,7 +710,16 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" dependencies = [ - "objc2", + "objc2 0.5.2", +] + +[[package]] +name = "block2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d59b4c170e16f0405a2e95aff44432a0d41aa97675f3d52623effe95792a037" +dependencies = [ + "objc2 0.6.0", ] [[package]] @@ -903,6 +912,16 @@ dependencies = [ "toml 0.8.19", ] +[[package]] +name = "cargo_toml" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02260d489095346e5cafd04dea8e8cb54d1d74fcd759022a9b72986ebe9a1257" +dependencies = [ + "serde", + "toml 0.8.19", +] + [[package]] name = "cc" version = "1.2.2" @@ -1041,36 +1060,6 @@ dependencies = [ "error-code", ] -[[package]] -name = "cocoa" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f79398230a6e2c08f5c9760610eb6924b52aa9e7950a619602baba59dcbbdbb2" -dependencies = [ - "bitflags 2.7.0", - "block", - "cocoa-foundation", - "core-foundation 0.10.0", - "core-graphics 0.24.0", - "foreign-types 0.5.0", - "libc", - "objc", -] - -[[package]] -name = "cocoa-foundation" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14045fb83be07b5acf1c0884b2180461635b433455fa35d1cd6f17f1450679d" -dependencies = [ - "bitflags 2.7.0", - "block", - "core-foundation 0.10.0", - "core-graphics-types 0.2.0", - "libc", - "objc", -] - [[package]] name = "color-backtrace" version = "0.6.1" @@ -1492,7 +1481,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.0.5", "tauri-plugin-deep-link", "tauri-plugin-log", "tauri-plugin-single-instance", @@ -1833,6 +1822,20 @@ dependencies = [ "winreg 0.52.0", ] +[[package]] +name = "embed-resource" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fbc6e0d8e0c03a655b53ca813f0463d2c956bc4db8138dbc89f120b066551e3" +dependencies = [ + "cc", + "memchr", + "rustc_version", + "toml 0.8.19", + "vswhom", + "winreg 0.52.0", +] + [[package]] name = "embed_plist" version = "1.2.2" @@ -2509,8 +2512,8 @@ checksum = "b00d88f1be7bf4cd2e61623ce08e84be2dfa4eab458e5d632d3dab95f16c1f64" dependencies = [ "crossbeam-channel", "keyboard-types", - "objc2", - "objc2-app-kit", + "objc2 0.5.2", + "objc2-app-kit 0.2.2", "once_cell", "serde", "thiserror 1.0.69", @@ -2870,6 +2873,16 @@ dependencies = [ "png", ] +[[package]] +name = "ico" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc50b891e4acf8fe0e71ef88ec43ad82ee07b3810ad09de10f1d01f072ed4b98" +dependencies = [ + "byteorder", + "png", +] + [[package]] name = "icrate" version = "0.1.2" @@ -2877,7 +2890,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fb69199826926eb864697bddd27f73d9fddcffc004f5733131e15b465e30642" dependencies = [ "block2 0.4.0", - "objc2", + "objc2 0.5.2", ] [[package]] @@ -3069,6 +3082,15 @@ dependencies = [ "cfb", ] +[[package]] +name = "infer" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a588916bfdfd92e71cacef98a63d9b1f0d74d6599980d11894290e7ddefffcf7" +dependencies = [ + "cfb", +] + [[package]] name = "inotify" version = "0.11.0" @@ -3675,21 +3697,22 @@ dependencies = [ [[package]] name = "muda" -version = "0.15.3" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdae9c00e61cc0579bcac625e8ad22104c60548a025bfc972dc83868a28e1484" +checksum = "4de14a9b5d569ca68d7c891d613b390cf5ab4f851c77aaa2f9e435555d3d9492" dependencies = [ "crossbeam-channel", "dpi", "gtk", "keyboard-types", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.6.0", + "objc2-app-kit 0.3.0", + "objc2-core-foundation", + "objc2-foundation 0.3.0", "once_cell", "png", "serde", - "thiserror 1.0.69", + "thiserror 2.0.9", "windows-sys 0.59.0", ] @@ -3949,9 +3972,6 @@ name = "objc-sys" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" -dependencies = [ - "cc", -] [[package]] name = "objc2" @@ -3963,6 +3983,16 @@ dependencies = [ "objc2-encode", ] +[[package]] +name = "objc2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3531f65190d9cff863b77a99857e74c314dd16bf56c538c4b57c7cbc3f3a6e59" +dependencies = [ + "objc2-encode", + "objc2-exception-helper", +] + [[package]] name = "objc2-app-kit" version = "0.2.2" @@ -3972,35 +4002,41 @@ dependencies = [ "bitflags 2.7.0", "block2 0.5.1", "libc", - "objc2", - "objc2-core-data", - "objc2-core-image", - "objc2-foundation", - "objc2-quartz-core", + "objc2 0.5.2", + "objc2-core-data 0.2.2", + "objc2-core-image 0.2.2", + "objc2-foundation 0.2.2", + "objc2-quartz-core 0.2.2", ] [[package]] -name = "objc2-cloud-kit" -version = "0.2.2" +name = "objc2-app-kit" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" +checksum = "5906f93257178e2f7ae069efb89fbd6ee94f0592740b5f8a1512ca498814d0fb" dependencies = [ "bitflags 2.7.0", - "block2 0.5.1", - "objc2", - "objc2-core-location", - "objc2-foundation", + "block2 0.6.0", + "libc", + "objc2 0.6.0", + "objc2-cloud-kit", + "objc2-core-data 0.3.0", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-core-image 0.3.0", + "objc2-foundation 0.3.0", + "objc2-quartz-core 0.3.0", ] [[package]] -name = "objc2-contacts" -version = "0.2.2" +name = "objc2-cloud-kit" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" +checksum = "6c1948a9be5f469deadbd6bcb86ad7ff9e47b4f632380139722f7d9840c0d42c" dependencies = [ - "block2 0.5.1", - "objc2", - "objc2-foundation", + "bitflags 2.7.0", + "objc2 0.6.0", + "objc2-foundation 0.3.0", ] [[package]] @@ -4011,8 +4047,41 @@ checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" dependencies = [ "bitflags 2.7.0", "block2 0.5.1", - "objc2", - "objc2-foundation", + "objc2 0.5.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-core-data" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f860f8e841f6d32f754836f51e6bc7777cd7e7053cf18528233f6811d3eceb4" +dependencies = [ + "bitflags 2.7.0", + "objc2 0.6.0", + "objc2-foundation 0.3.0", +] + +[[package]] +name = "objc2-core-foundation" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daeaf60f25471d26948a1c2f840e3f7d86f4109e3af4e8e4b5cd70c39690d925" +dependencies = [ + "bitflags 2.7.0", + "objc2 0.6.0", +] + +[[package]] +name = "objc2-core-graphics" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dca602628b65356b6513290a21a6405b4d4027b8b250f0b98dddbb28b7de02" +dependencies = [ + "bitflags 2.7.0", + "objc2 0.6.0", + "objc2-core-foundation", + "objc2-io-surface", ] [[package]] @@ -4022,28 +4091,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" dependencies = [ "block2 0.5.1", - "objc2", - "objc2-foundation", + "objc2 0.5.2", + "objc2-foundation 0.2.2", "objc2-metal", ] [[package]] -name = "objc2-core-location" -version = "0.2.2" +name = "objc2-core-image" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" +checksum = "6ffa6bea72bf42c78b0b34e89c0bafac877d5f80bf91e159a5d96ea7f693ca56" dependencies = [ - "block2 0.5.1", - "objc2", - "objc2-contacts", - "objc2-foundation", + "objc2 0.6.0", + "objc2-foundation 0.3.0", ] [[package]] name = "objc2-encode" -version = "4.0.3" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7891e71393cd1f227313c9379a26a584ff3d7e6e7159e988851f0934c993f0f8" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + +[[package]] +name = "objc2-exception-helper" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7a1c5fbb72d7735b076bb47b578523aedc40f3c439bea6dfd595c089d79d98a" +dependencies = [ + "cc", +] [[package]] name = "objc2-foundation" @@ -4055,19 +4131,31 @@ dependencies = [ "block2 0.5.1", "dispatch", "libc", - "objc2", + "objc2 0.5.2", ] [[package]] -name = "objc2-link-presentation" -version = "0.2.2" +name = "objc2-foundation" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" +checksum = "3a21c6c9014b82c39515db5b396f91645182611c97d24637cf56ac01e5f8d998" dependencies = [ - "block2 0.5.1", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "bitflags 2.7.0", + "block2 0.6.0", + "libc", + "objc2 0.6.0", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-io-surface" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "161a8b87e32610086e1a7a9e9ec39f84459db7b3a0881c1f16ca5a2605581c19" +dependencies = [ + "bitflags 2.7.0", + "objc2 0.6.0", + "objc2-core-foundation", ] [[package]] @@ -4078,8 +4166,8 @@ checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ "bitflags 2.7.0", "block2 0.5.1", - "objc2", - "objc2-foundation", + "objc2 0.5.2", + "objc2-foundation 0.2.2", ] [[package]] @@ -4089,9 +4177,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6788b04a18ea31e3dc3ab256b8546639e5bbae07c1a0dc4ea8615252bc6aee9a" dependencies = [ "bitflags 2.7.0", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.5.2", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", ] [[package]] @@ -4102,77 +4190,46 @@ checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ "bitflags 2.7.0", "block2 0.5.1", - "objc2", - "objc2-foundation", + "objc2 0.5.2", + "objc2-foundation 0.2.2", "objc2-metal", ] [[package]] -name = "objc2-symbols" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" -dependencies = [ - "objc2", - "objc2-foundation", -] - -[[package]] -name = "objc2-ui-kit" -version = "0.2.2" +name = "objc2-quartz-core" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" +checksum = "6fb3794501bb1bee12f08dcad8c61f2a5875791ad1c6f47faa71a0f033f20071" dependencies = [ "bitflags 2.7.0", - "block2 0.5.1", - "objc2", - "objc2-cloud-kit", - "objc2-core-data", - "objc2-core-image", - "objc2-core-location", - "objc2-foundation", - "objc2-link-presentation", - "objc2-quartz-core", - "objc2-symbols", - "objc2-uniform-type-identifiers", - "objc2-user-notifications", + "objc2 0.6.0", + "objc2-foundation 0.3.0", ] [[package]] -name = "objc2-uniform-type-identifiers" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" -dependencies = [ - "block2 0.5.1", - "objc2", - "objc2-foundation", -] - -[[package]] -name = "objc2-user-notifications" -version = "0.2.2" +name = "objc2-ui-kit" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" +checksum = "777a571be14a42a3990d4ebedaeb8b54cd17377ec21b92e8200ac03797b3bee1" dependencies = [ "bitflags 2.7.0", - "block2 0.5.1", - "objc2", - "objc2-core-location", - "objc2-foundation", + "objc2 0.6.0", + "objc2-core-foundation", + "objc2-foundation 0.3.0", ] [[package]] name = "objc2-web-kit" -version = "0.2.2" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68bc69301064cebefc6c4c90ce9cba69225239e4b8ff99d445a2b5563797da65" +checksum = "b717127e4014b0f9f3e8bba3d3f2acec81f1bde01f656823036e823ed2c94dce" dependencies = [ "bitflags 2.7.0", - "block2 0.5.1", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "block2 0.6.0", + "objc2 0.6.0", + "objc2-app-kit 0.3.0", + "objc2-core-foundation", + "objc2-foundation 0.3.0", ] [[package]] @@ -4324,7 +4381,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35366a452fce3f8947eb2f33226a133aaf0cacedef2af67ade348d58be7f85d0" dependencies = [ "icrate", - "objc2-foundation", + "objc2-foundation 0.2.2", "objc2-osa-kit", "serde", "serde_json", @@ -5141,9 +5198,9 @@ dependencies = [ "gtk-sys", "js-sys", "log", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.5.2", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", "raw-window-handle", "wasm-bindgen", "wasm-bindgen-futures", @@ -5770,7 +5827,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.0.5", "tauri-plugin-cli", "tauri-plugin-single-instance", ] @@ -5821,9 +5878,9 @@ dependencies = [ "foreign-types 0.5.0", "js-sys", "log", - "objc2", - "objc2-foundation", - "objc2-quartz-core", + "objc2 0.5.2", + "objc2-foundation 0.2.2", + "objc2-quartz-core 0.2.2", "raw-window-handle", "redox_syscall", "wasm-bindgen", @@ -6327,12 +6384,11 @@ dependencies = [ [[package]] name = "tao" -version = "0.31.1" +version = "0.32.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3731d04d4ac210cd5f344087733943b9bfb1a32654387dad4d1c70de21aee2c9" +checksum = "63c8b1020610b9138dd7b1e06cf259ae91aa05c30f3bd0d6b42a03997b92dec1" dependencies = [ "bitflags 2.7.0", - "cocoa", "core-foundation 0.10.0", "core-graphics 0.24.0", "crossbeam-channel", @@ -6349,7 +6405,9 @@ dependencies = [ "ndk", "ndk-context", "ndk-sys", - "objc", + "objc2 0.6.0", + "objc2-app-kit 0.3.0", + "objc2-foundation 0.3.0", "once_cell", "parking_lot", "raw-window-handle", @@ -6357,8 +6415,8 @@ dependencies = [ "tao-macros", "unicode-segmentation", "url", - "windows 0.58.0", - "windows-core 0.58.0", + "windows 0.60.0", + "windows-core 0.60.1", "windows-version", "x11-dl", ] @@ -6399,13 +6457,11 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tauri" -version = "2.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2979ec5ec5a9310b15d1548db3b8de98d8f75abf2b5b00fec9cd5c0553ecc09c" +version = "2.3.1" dependencies = [ "anyhow", "bytes", - "dirs 5.0.1", + "dirs 6.0.0", "dunce", "embed_plist", "futures-util", @@ -6421,9 +6477,9 @@ dependencies = [ "log", "mime", "muda", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.6.0", + "objc2-app-kit 0.3.0", + "objc2-foundation 0.3.0", "percent-encoding", "plist", "raw-window-handle", @@ -6434,11 +6490,11 @@ dependencies = [ "serialize-to-javascript", "specta", "swift-rs", - "tauri-build", + "tauri-build 2.0.6", "tauri-macros", "tauri-runtime", "tauri-runtime-wry", - "tauri-utils", + "tauri-utils 2.2.0", "thiserror 2.0.9", "tokio", "tray-icon", @@ -6448,7 +6504,7 @@ dependencies = [ "webkit2gtk", "webview2-com", "window-vibrancy", - "windows 0.58.0", + "windows 0.60.0", ] [[package]] @@ -6458,7 +6514,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e950124f6779c6cf98e3260c7a6c8488a74aa6350dd54c6950fdaa349bca2df" dependencies = [ "anyhow", - "cargo_toml", + "cargo_toml 0.21.0", "dirs 5.0.1", "glob", "heck 0.5.0", @@ -6468,9 +6524,29 @@ dependencies = [ "semver", "serde", "serde_json", - "tauri-codegen", - "tauri-utils", - "tauri-winres", + "tauri-codegen 2.0.4", + "tauri-utils 2.1.1", + "tauri-winres 0.1.1", + "toml 0.8.19", + "walkdir", +] + +[[package]] +name = "tauri-build" +version = "2.0.6" +dependencies = [ + "anyhow", + "cargo_toml 0.22.1", + "dirs 6.0.0", + "glob", + "heck 0.5.0", + "json-patch", + "schemars", + "semver", + "serde", + "serde_json", + "tauri-utils 2.2.0", + "tauri-winres 0.3.0", "toml 0.8.19", "walkdir", ] @@ -6480,10 +6556,34 @@ name = "tauri-codegen" version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f77894f9ddb5cb6c04fcfe8c8869ebe0aded4dabf19917118d48be4a95599ab5" +dependencies = [ + "base64 0.22.1", + "ico 0.3.0", + "json-patch", + "plist", + "png", + "proc-macro2", + "quote", + "semver", + "serde", + "serde_json", + "sha2", + "syn 2.0.90", + "tauri-utils 2.1.1", + "thiserror 2.0.9", + "time", + "url", + "uuid", + "walkdir", +] + +[[package]] +name = "tauri-codegen" +version = "2.0.5" dependencies = [ "base64 0.22.1", "brotli", - "ico", + "ico 0.4.0", "json-patch", "plist", "png", @@ -6494,7 +6594,7 @@ dependencies = [ "serde_json", "sha2", "syn 2.0.90", - "tauri-utils", + "tauri-utils 2.2.0", "thiserror 2.0.9", "time", "url", @@ -6504,16 +6604,14 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3240a5caed760a532e8f687be6f05b2c7d11a1d791fb53ccc08cfeb3e5308736" +version = "2.0.5" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", "syn 2.0.90", - "tauri-codegen", - "tauri-utils", + "tauri-codegen 2.0.5", + "tauri-utils 2.2.0", ] [[package]] @@ -6528,7 +6626,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "tauri-utils", + "tauri-utils 2.1.1", "toml 0.8.19", "walkdir", ] @@ -6606,12 +6704,12 @@ dependencies = [ "serde_json", "tauri", "tauri-plugin", - "tauri-utils", + "tauri-utils 2.1.1", "thiserror 2.0.9", "tracing", "url", "windows-registry 0.4.0", - "windows-result 0.3.0", + "windows-result 0.3.2", ] [[package]] @@ -6646,7 +6744,7 @@ dependencies = [ "serde_repr", "tauri", "tauri-plugin", - "tauri-utils", + "tauri-utils 2.1.1", "thiserror 2.0.9", "toml 0.8.19", "url", @@ -6734,8 +6832,8 @@ dependencies = [ "byte-unit", "fern", "log", - "objc2", - "objc2-foundation", + "objc2 0.5.2", + "objc2-foundation 0.2.2", "serde", "serde_json", "serde_repr", @@ -6787,8 +6885,8 @@ version = "2.2.5" dependencies = [ "dunce", "glob", - "objc2-app-kit", - "objc2-foundation", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", "open", "schemars", "serde", @@ -6947,7 +7045,7 @@ dependencies = [ "flate2", "futures-util", "http", - "infer", + "infer 0.16.0", "minisign-verify", "osakit", "percent-encoding", @@ -7017,10 +7115,9 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2274ef891ccc0a8d318deffa9d70053f947664d12d58b9c0d1ae5e89237e01f7" +version = "2.4.0" dependencies = [ + "cookie", "dpi", "gtk", "http", @@ -7028,35 +7125,34 @@ dependencies = [ "raw-window-handle", "serde", "serde_json", - "tauri-utils", + "tauri-utils 2.2.0", "thiserror 2.0.9", "url", - "windows 0.58.0", + "windows 0.60.0", ] [[package]] name = "tauri-runtime-wry" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3707b40711d3b9f6519150869e358ffbde7c57567fb9b5a8b51150606939b2a0" +version = "2.4.1" dependencies = [ "gtk", "http", "jni", "log", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.6.0", + "objc2-app-kit 0.3.0", + "objc2-foundation 0.3.0", + "once_cell", "percent-encoding", "raw-window-handle", "softbuffer", "tao", "tauri-runtime", - "tauri-utils", + "tauri-utils 2.2.0", "url", "webkit2gtk", "webview2-com", - "windows 0.58.0", + "windows 0.60.0", "wry", ] @@ -7067,6 +7163,44 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96fb10e7cc97456b2d5b9c03e335b5de5da982039a303a20d10006885e4523a0" dependencies = [ "aes-gcm", + "cargo_metadata", + "ctor", + "dunce", + "getrandom 0.2.15", + "glob", + "html5ever", + "http", + "infer 0.16.0", + "json-patch", + "kuchikiki", + "log", + "memchr", + "phf 0.11.2", + "proc-macro2", + "quote", + "regex", + "schemars", + "semver", + "serde", + "serde-untagged", + "serde_json", + "serde_with", + "serialize-to-javascript", + "swift-rs", + "thiserror 2.0.9", + "toml 0.8.19", + "url", + "urlpattern", + "uuid", + "walkdir", +] + +[[package]] +name = "tauri-utils" +version = "2.2.0" +dependencies = [ + "aes-gcm", + "anyhow", "brotli", "cargo_metadata", "ctor", @@ -7075,7 +7209,7 @@ dependencies = [ "glob", "html5ever", "http", - "infer", + "infer 0.19.0", "json-patch", "kuchikiki", "log", @@ -7106,10 +7240,20 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5993dc129e544393574288923d1ec447c857f3f644187f4fbf7d9a875fbfc4fb" dependencies = [ - "embed-resource", + "embed-resource 2.5.1", "toml 0.7.8", ] +[[package]] +name = "tauri-winres" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56eaa45f707bedf34d19312c26d350bc0f3c59a47e58e8adbeecdc850d2c13a0" +dependencies = [ + "embed-resource 3.0.2", + "toml 0.8.19", +] + [[package]] name = "tauri-winrt-notification" version = "0.2.1" @@ -7506,22 +7650,23 @@ dependencies = [ [[package]] name = "tray-icon" -version = "0.19.2" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d48a05076dd272615d03033bf04f480199f7d1b66a8ac64d75c625fc4a70c06b" +checksum = "d433764348e7084bad2c5ea22c96c71b61b17afe3a11645710f533bd72b6a2b5" dependencies = [ - "core-graphics 0.24.0", "crossbeam-channel", - "dirs 5.0.1", + "dirs 6.0.0", "libappindicator", "muda", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.6.0", + "objc2-app-kit 0.3.0", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation 0.3.0", "once_cell", "png", "serde", - "thiserror 1.0.69", + "thiserror 2.0.9", "windows-sys 0.59.0", ] @@ -7690,7 +7835,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.0.5", "tauri-plugin-updater", "time", "tiny_http", @@ -8084,7 +8229,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.0.5", "tauri-plugin-websocket", "tokio", "tokio-tungstenite", @@ -8092,16 +8237,16 @@ dependencies = [ [[package]] name = "webview2-com" -version = "0.34.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "823e7ebcfaea51e78f72c87fc3b65a1e602c321f407a0b36dbb327d7bb7cd921" +checksum = "b0d606f600e5272b514dbb66539dd068211cc20155be8d3958201b4b5bd79ed3" dependencies = [ "webview2-com-macros", "webview2-com-sys", - "windows 0.58.0", - "windows-core 0.58.0", - "windows-implement 0.58.0", - "windows-interface 0.58.0", + "windows 0.60.0", + "windows-core 0.60.1", + "windows-implement 0.59.0", + "windows-interface 0.59.1", ] [[package]] @@ -8117,13 +8262,13 @@ dependencies = [ [[package]] name = "webview2-com-sys" -version = "0.34.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a82bce72db6e5ee83c68b5de1e2cd6ea195b9fbff91cb37df5884cbe3222df4" +checksum = "bfb27fccd3c27f68e9a6af1bcf48c2d82534b8675b83608a4d81446d095a17ac" dependencies = [ - "thiserror 1.0.69", - "windows 0.58.0", - "windows-core 0.58.0", + "thiserror 2.0.9", + "windows 0.60.0", + "windows-core 0.60.1", ] [[package]] @@ -8185,13 +8330,14 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "window-vibrancy" -version = "0.5.2" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ea403deff7b51fff19e261330f71608ff2cdef5721d72b64180bb95be7c4150" +checksum = "d9bec5a31f3f9362f2258fd0e9c9dd61a9ca432e7306cc78c444258f0dce9a9c" dependencies = [ - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.6.0", + "objc2-app-kit 0.3.0", + "objc2-core-foundation", + "objc2-foundation 0.3.0", "raw-window-handle", "windows-sys 0.59.0", "windows-version", @@ -8230,6 +8376,28 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows" +version = "0.60.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddf874e74c7a99773e62b1c671427abf01a425e77c3d3fb9fb1e4883ea934529" +dependencies = [ + "windows-collections", + "windows-core 0.60.1", + "windows-future", + "windows-link", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5467f79cc1ba3f52ebb2ed41dbb459b8e7db636cc3429458d9a852e15bc24dec" +dependencies = [ + "windows-core 0.60.1", +] + [[package]] name = "windows-core" version = "0.52.0" @@ -8264,6 +8432,29 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-core" +version = "0.60.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca21a92a9cae9bf4ccae5cf8368dce0837100ddf6e6d57936749e85f152f6247" +dependencies = [ + "windows-implement 0.59.0", + "windows-interface 0.59.1", + "windows-link", + "windows-result 0.3.2", + "windows-strings 0.3.1", +] + +[[package]] +name = "windows-future" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a787db4595e7eb80239b74ce8babfb1363d8e343ab072f2ffe901400c03349f0" +dependencies = [ + "windows-core 0.60.1", + "windows-link", +] + [[package]] name = "windows-implement" version = "0.56.0" @@ -8286,6 +8477,17 @@ dependencies = [ "syn 2.0.90", ] +[[package]] +name = "windows-implement" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83577b051e2f49a058c308f17f273b570a6a758386fc291b5f6a934dd84e48c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "windows-interface" version = "0.56.0" @@ -8308,6 +8510,33 @@ dependencies = [ "syn 2.0.90", ] +[[package]] +name = "windows-interface" +version = "0.59.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + +[[package]] +name = "windows-link" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" + +[[package]] +name = "windows-numerics" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "005dea54e2f6499f2cee279b8f703b3cf3b5734a2d8d21867c8f44003182eeed" +dependencies = [ + "windows-core 0.60.1", + "windows-link", +] + [[package]] name = "windows-registry" version = "0.2.0" @@ -8325,8 +8554,8 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3" dependencies = [ - "windows-result 0.3.0", - "windows-strings 0.3.0", + "windows-result 0.3.2", + "windows-strings 0.3.1", "windows-targets 0.53.0", ] @@ -8350,11 +8579,11 @@ dependencies = [ [[package]] name = "windows-result" -version = "0.3.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d08106ce80268c4067c0571ca55a9b4e9516518eaa1a1fe9b37ca403ae1d1a34" +checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" dependencies = [ - "windows-targets 0.53.0", + "windows-link", ] [[package]] @@ -8369,11 +8598,11 @@ dependencies = [ [[package]] name = "windows-strings" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b888f919960b42ea4e11c2f408fadb55f78a9f236d5eef084103c8ce52893491" +checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319" dependencies = [ - "windows-targets 0.53.0", + "windows-link", ] [[package]] @@ -8744,12 +8973,12 @@ checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" [[package]] name = "wry" -version = "0.48.0" +version = "0.50.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e644bf458e27b11b0ecafc9e5633d1304fdae82baca1d42185669752fe6ca4f" +checksum = "b19b78efae8b853c6c817e8752fc1dbf9cab8a8ffe9c30f399bd750ccf0f0730" dependencies = [ "base64 0.22.1", - "block2 0.5.1", + "block2 0.6.0", "cookie", "crossbeam-channel", "dpi", @@ -8763,9 +8992,10 @@ dependencies = [ "kuchikiki", "libc", "ndk", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc2 0.6.0", + "objc2-app-kit 0.3.0", + "objc2-core-foundation", + "objc2-foundation 0.3.0", "objc2-ui-kit", "objc2-web-kit", "once_cell", @@ -8779,8 +9009,8 @@ dependencies = [ "webkit2gtk", "webkit2gtk-sys", "webview2-com", - "windows 0.58.0", - "windows-core 0.58.0", + "windows 0.60.0", + "windows-core 0.60.1", "windows-version", "x11-dl", ] diff --git a/Cargo.toml b/Cargo.toml index d85be889..53f0c4ff 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ resolver = "2" serde = { version = "1", features = ["derive"] } tracing = "0.1" log = "0.4" -tauri = { version = "2", default-features = false } +tauri = { path = "../tauri/crates/tauri", default-features = false } tauri-build = "2" tauri-plugin = "2" tauri-utils = "2" diff --git a/plugins/updater/src/updater.rs b/plugins/updater/src/updater.rs index d7a2e547..d5febe1c 100644 --- a/plugins/updater/src/updater.rs +++ b/plugins/updater/src/updater.rs @@ -46,7 +46,7 @@ pub enum Installer { Nsis, } -impl Installer{ +impl Installer { fn suffix(self) -> &'static str { match self { Self::AppImage => "appimage", @@ -94,17 +94,19 @@ pub struct RemoteRelease { impl RemoteRelease { /// The release's download URL for the given target. pub fn download_url(&self, target: &str, installer: Option) -> Result<&Url> { - let fallback_target = installer.map(|installer| format!("{target}-{}", installer.suffix())); match self.data { RemoteReleaseInner::Dynamic(ref platform) => Ok(&platform.url), - RemoteReleaseInner::Static { ref platforms } => platforms - .get(target) - .map_or_else( - || match fallback_target { - Some(fallback) => platforms.get(&fallback).map_or(Err(Error::TargetsNotFound(target.to_string(), fallback)), |p| Ok(&p.url)), - None => Err(Error::TargetNotFound(target.to_string())) - }, |p| { Ok(&p.url) }) + RemoteReleaseInner::Static { ref platforms } => platforms.get(target).map_or_else( + || match fallback_target { + Some(fallback) => platforms.get(&fallback).map_or( + Err(Error::TargetsNotFound(target.to_string(), fallback)), + |p| Ok(&p.url), + ), + None => Err(Error::TargetNotFound(target.to_string())), + }, + |p| Ok(&p.url), + ), } } @@ -114,13 +116,16 @@ impl RemoteRelease { match self.data { RemoteReleaseInner::Dynamic(ref platform) => Ok(&platform.signature), - RemoteReleaseInner::Static { ref platforms } => platforms - .get(target) - .map_or_else( - || match fallback_target { - Some(fallback) => platforms.get(&fallback).map_or(Err(Error::TargetsNotFound(target.to_string(), fallback)), |p| Ok(&p.signature)), - None => Err(Error::TargetNotFound(target.to_string())) - }, |p| { Ok(&p.signature) }) + RemoteReleaseInner::Static { ref platforms } => platforms.get(target).map_or_else( + || match fallback_target { + Some(fallback) => platforms.get(&fallback).map_or( + Err(Error::TargetsNotFound(target.to_string(), fallback)), + |p| Ok(&p.signature), + ), + None => Err(Error::TargetNotFound(target.to_string())), + }, + |p| Ok(&p.signature), + ), } } } @@ -283,7 +288,7 @@ impl UpdaterBuilder { let arch = get_updater_arch().ok_or(Error::UnsupportedArch)?; let (target, json_target) = if let Some(target) = self.target { - (target.clone(), target ) + (target.clone(), target) } else { let target = get_updater_target().ok_or(Error::UnsupportedOs)?; let json_target = format!("{target}-{arch}"); @@ -356,11 +361,7 @@ pub struct Updater { current_exe_args: Vec, } - - - impl Updater { - fn get_updater_installer(&self) -> Result> { match tauri::__TAURI_BUNDLE_TYPE { "DEB_BUNDLE" => Ok(Some(Installer::Deb)), @@ -368,7 +369,7 @@ impl Updater { "APP_BUNDLE" => Ok(Some(Installer::AppImage)), "MSI_BUNDLE" => Ok(Some(Installer::Msi)), "NSS_BUNDLE" => Ok(Some(Installer::Nsis)), - _ => Err(Error::UnknownInstaller) + _ => Err(Error::UnknownInstaller), } } @@ -470,7 +471,7 @@ impl Updater { Some(comparator) => comparator(self.current_version.clone(), release.clone()), None => release.version > self.current_version, }; - + let installer = self.get_updater_installer()?; let update = if should_update { @@ -484,9 +485,13 @@ impl Updater { extract_path: self.extract_path.clone(), version: release.version.to_string(), date: release.pub_date, - download_url: release.download_url(&self.json_target, installer.clone())?.to_owned(), + download_url: release + .download_url(&self.json_target, installer.clone())? + .to_owned(), body: release.notes.clone(), - signature: release.signature(&self.json_target, installer.clone())?.to_owned(), + signature: release + .signature(&self.json_target, installer.clone())? + .to_owned(), installer, raw_json: raw_json.unwrap(), timeout: self.timeout, @@ -520,7 +525,7 @@ pub struct Update { pub date: Option, /// Target pub target: String, - /// Current installer + /// Current installer pub installer: Option, /// Download URL announced pub download_url: Url, @@ -852,7 +857,7 @@ impl Update { match self.installer { Some(Installer::Deb) => self.install_deb(bytes), Some(Installer::Rpm) => self.install_rpm(bytes), - _ =>self.install_appimage(bytes) + _ => self.install_appimage(bytes), } } @@ -927,7 +932,6 @@ impl Update { Err(Error::TempDirNotOnSameMountPoint) } - fn install_deb(&self, bytes: &[u8]) -> Result<()> { // First verify the bytes are actually a .deb package if !infer::archive::is_deb(bytes) { @@ -935,7 +939,6 @@ impl Update { } self.try_tmp_locations(bytes, "dpkg", "-i") - } fn install_rpm(&self, bytes: &[u8]) -> Result<()> { @@ -966,7 +969,11 @@ impl Update { // Try writing the .deb file if std::fs::write(&pkg_path, bytes).is_ok() { // If write succeeds, proceed with installation - return self.try_install_with_privileges(&pkg_path, install_cmd, install_arg); + return self.try_install_with_privileges( + &pkg_path, + install_cmd, + install_arg, + ); } // If write fails, continue to next temp location } @@ -975,10 +982,14 @@ impl Update { // If we get here, all temp locations failed Err(Error::TempDirNotFound) - } - fn try_install_with_privileges(&self, pkg_path: &Path, install_cmd: &str, install_arg: &str) -> Result<()> { + fn try_install_with_privileges( + &self, + pkg_path: &Path, + install_cmd: &str, + install_arg: &str, + ) -> Result<()> { // 1. First try using pkexec (graphical sudo prompt) if let Ok(status) = std::process::Command::new("pkexec") .arg(install_cmd) @@ -1042,7 +1053,13 @@ impl Update { Err(Error::AuthenticationFailed) } - fn install_with_sudo(&self, pkg_path: &Path, password: &str, install_cmd: &str, install_arg: &str) -> Result { + fn install_with_sudo( + &self, + pkg_path: &Path, + password: &str, + install_cmd: &str, + install_arg: &str, + ) -> Result { use std::io::Write; use std::process::{Command, Stdio}; @@ -1192,7 +1209,6 @@ pub(crate) fn get_updater_target() -> Option<&'static str> { } } - pub(crate) fn get_updater_arch() -> Option<&'static str> { if cfg!(target_arch = "x86") { Some("i686") @@ -1207,8 +1223,6 @@ pub(crate) fn get_updater_arch() -> Option<&'static str> { } } - - pub fn extract_path_from_executable(executable_path: &Path) -> Result { // Return the path of the current executable by default // Example C:\Program Files\My App\ From 3a433976f33962c31cdd15af02697696c900544e Mon Sep 17 00:00:00 2001 From: Krzysztof Andrelczyk Date: Thu, 10 Apr 2025 22:59:49 +0200 Subject: [PATCH 13/25] fix bundler --- Cargo.lock | 30 +++++++++---------- plugins/updater/src/lib.rs | 6 ++++ plugins/updater/src/updater.rs | 4 +-- plugins/updater/tests/app-updater/src/main.rs | 1 - .../updater/tests/app-updater/tauri.conf.json | 1 + .../updater/tests/app-updater/tests/update.rs | 19 +++++------- 6 files changed, 32 insertions(+), 29 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index da9b2bcf..eff0a2be 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6457,7 +6457,7 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tauri" -version = "2.3.1" +version = "2.4.1" dependencies = [ "anyhow", "bytes", @@ -6490,11 +6490,11 @@ dependencies = [ "serialize-to-javascript", "specta", "swift-rs", - "tauri-build 2.0.6", + "tauri-build 2.1.1", "tauri-macros", "tauri-runtime", "tauri-runtime-wry", - "tauri-utils 2.2.0", + "tauri-utils 2.3.1", "thiserror 2.0.9", "tokio", "tray-icon", @@ -6533,7 +6533,7 @@ dependencies = [ [[package]] name = "tauri-build" -version = "2.0.6" +version = "2.1.1" dependencies = [ "anyhow", "cargo_toml 0.22.1", @@ -6545,7 +6545,7 @@ dependencies = [ "semver", "serde", "serde_json", - "tauri-utils 2.2.0", + "tauri-utils 2.3.1", "tauri-winres 0.3.0", "toml 0.8.19", "walkdir", @@ -6579,7 +6579,7 @@ dependencies = [ [[package]] name = "tauri-codegen" -version = "2.0.5" +version = "2.1.1" dependencies = [ "base64 0.22.1", "brotli", @@ -6594,7 +6594,7 @@ dependencies = [ "serde_json", "sha2", "syn 2.0.90", - "tauri-utils 2.2.0", + "tauri-utils 2.3.1", "thiserror 2.0.9", "time", "url", @@ -6604,14 +6604,14 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "2.0.5" +version = "2.1.1" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", "syn 2.0.90", - "tauri-codegen 2.0.5", - "tauri-utils 2.2.0", + "tauri-codegen 2.1.1", + "tauri-utils 2.3.1", ] [[package]] @@ -7115,7 +7115,7 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "2.4.0" +version = "2.5.1" dependencies = [ "cookie", "dpi", @@ -7125,7 +7125,7 @@ dependencies = [ "raw-window-handle", "serde", "serde_json", - "tauri-utils 2.2.0", + "tauri-utils 2.3.1", "thiserror 2.0.9", "url", "windows 0.60.0", @@ -7133,7 +7133,7 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "2.4.1" +version = "2.5.1" dependencies = [ "gtk", "http", @@ -7148,7 +7148,7 @@ dependencies = [ "softbuffer", "tao", "tauri-runtime", - "tauri-utils 2.2.0", + "tauri-utils 2.3.1", "url", "webkit2gtk", "webview2-com", @@ -7197,7 +7197,7 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "2.2.0" +version = "2.3.1" dependencies = [ "aes-gcm", "anyhow", diff --git a/plugins/updater/src/lib.rs b/plugins/updater/src/lib.rs index 75b014bc..b83975ce 100644 --- a/plugins/updater/src/lib.rs +++ b/plugins/updater/src/lib.rs @@ -29,6 +29,12 @@ pub use config::Config; pub use error::{Error, Result}; pub use updater::*; +/// Variable holding the type of bundle the executable is stored in. This is modified by binary +/// patching during build +#[unsafe(no_mangle)] +#[link_section = ".data.ta"] +pub static __TAURI_BUNDLE_TYPE: &str = "UNK_BUNDLE"; + /// Extensions to [`tauri::App`], [`tauri::AppHandle`], [`tauri::WebviewWindow`], [`tauri::Webview`] and [`tauri::Window`] to access the updater APIs. pub trait UpdaterExt { /// Gets the updater builder to build and updater diff --git a/plugins/updater/src/updater.rs b/plugins/updater/src/updater.rs index d5febe1c..a5bed77b 100644 --- a/plugins/updater/src/updater.rs +++ b/plugins/updater/src/updater.rs @@ -29,7 +29,7 @@ use url::Url; use crate::{ error::{Error, Result}, - Config, + Config, __TAURI_BUNDLE_TYPE, }; const UPDATER_USER_AGENT: &str = concat!(env!("CARGO_PKG_NAME"), "/", env!("CARGO_PKG_VERSION"),); @@ -363,7 +363,7 @@ pub struct Updater { impl Updater { fn get_updater_installer(&self) -> Result> { - match tauri::__TAURI_BUNDLE_TYPE { + match __TAURI_BUNDLE_TYPE { "DEB_BUNDLE" => Ok(Some(Installer::Deb)), "RPM_BUNDLE" => Ok(Some(Installer::Rpm)), "APP_BUNDLE" => Ok(Some(Installer::AppImage)), diff --git a/plugins/updater/tests/app-updater/src/main.rs b/plugins/updater/tests/app-updater/src/main.rs index d3defc1e..c20bdcf3 100644 --- a/plugins/updater/tests/app-updater/src/main.rs +++ b/plugins/updater/tests/app-updater/src/main.rs @@ -9,7 +9,6 @@ use tauri_plugin_updater::UpdaterExt; fn main() { #[allow(unused_mut)] let mut context = tauri::generate_context!(); - println!("{}", tauri::__TAURI_BUNDLE_TYPE); tauri::Builder::default() .plugin(tauri_plugin_updater::Builder::new().build()) .setup(|app| { diff --git a/plugins/updater/tests/app-updater/tauri.conf.json b/plugins/updater/tests/app-updater/tauri.conf.json index f2c6df21..fc70993e 100644 --- a/plugins/updater/tests/app-updater/tauri.conf.json +++ b/plugins/updater/tests/app-updater/tauri.conf.json @@ -2,6 +2,7 @@ "identifier": "com.tauri.updater", "plugins": { "updater": { + "dangerousInsecureTransportProtocol": true, "endpoints": ["http://localhost:3007"], "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEUwNDRGMjkwRjg2MDhCRDAKUldUUWkyRDRrUEpFNEQ4SmdwcU5PaXl6R2ZRUUNvUnhIaVkwVUltV0NMaEx6VTkrWVhpT0ZqeEEK", "windows": { diff --git a/plugins/updater/tests/app-updater/tests/update.rs b/plugins/updater/tests/app-updater/tests/update.rs index a36ae90e..ac8f1b1f 100644 --- a/plugins/updater/tests/app-updater/tests/update.rs +++ b/plugins/updater/tests/app-updater/tests/update.rs @@ -78,7 +78,6 @@ fn build_app(cwd: &Path, config: &Config, bundle_updater: bool, target: BundleTa } } - #[derive(Copy, Clone)] enum BundleTarget { AppImage, @@ -119,7 +118,6 @@ fn target_to_platforms( update_platform: Option, signature: String, ) -> HashMap { - let mut platforms = HashMap::new(); if let Some(platform) = update_platform { println!("TARGET: {}", platform.clone()); @@ -207,7 +205,7 @@ fn bundle_path(root_dir: &Path, _version: &str, v1compatible: bool) -> PathBuf { fn test_cases( root_dir: &Path, version: &str, - target: String + target: String, ) -> Vec<(BundleTarget, PathBuf, Option, Vec)> { vec![ ( @@ -216,7 +214,7 @@ fn test_cases( "target/debug/bundle/nsis/app-updater_{version}_x64-setup.exe" )), Some(target.clone()), - vec![UPDATED_EXIT_CODE] + vec![UPDATED_EXIT_CODE], ), ( BundleTarget::Nsis, @@ -224,7 +222,7 @@ fn test_cases( "target/debug/bundle/nsis/app-updater_{version}_x64-setup.exe" )), Some(format!("{target}-{}", BundleTarget::Nsis.name())), - vec![UPDATED_EXIT_CODE] + vec![UPDATED_EXIT_CODE], ), ( BundleTarget::Nsis, @@ -232,7 +230,7 @@ fn test_cases( "target/debug/bundle/nsis/app-updater_{version}_x64-setup.exe" )), None, - vec![ERROR_EXIT_CODE] + vec![ERROR_EXIT_CODE], ), ( BundleTarget::Msi, @@ -240,7 +238,7 @@ fn test_cases( "target/debug/bundle/msi/app-updater_{version}_x64_en-US.msi" )), Some(target.clone()), - vec![UPDATED_EXIT_CODE] + vec![UPDATED_EXIT_CODE], ), ( BundleTarget::Msi, @@ -248,7 +246,7 @@ fn test_cases( "target/debug/bundle/msi/app-updater_{version}_x64_en-US.msi" )), Some(format!("{target}-{}", BundleTarget::Msi.name())), - vec![UPDATED_EXIT_CODE] + vec![UPDATED_EXIT_CODE], ), ( BundleTarget::Msi, @@ -256,8 +254,8 @@ fn test_cases( "target/debug/bundle/msi/app-updater_{version}_x64_en-US.msi" )), None, - vec![ERROR_EXIT_CODE] - ) + vec![ERROR_EXIT_CODE], + ), ] } @@ -287,7 +285,6 @@ fn update_app() { Updater::String(V1Compatible::V1Compatible) ); - let updater_zip_ext = if v1_compatible { if cfg!(windows) { Some("zip") From 24504e47df4c5f0cbadeaf7a381191adb03b3e11 Mon Sep 17 00:00:00 2001 From: Krzysztof Andrelczyk Date: Fri, 11 Apr 2025 22:59:07 +0200 Subject: [PATCH 14/25] remove local tauri dependency --- Cargo.lock | 134 ++++++++++++----------------------------------------- Cargo.toml | 2 +- 2 files changed, 31 insertions(+), 105 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6eba2524..7ea2f302 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -213,7 +213,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tauri-build", "tauri-plugin-barcode-scanner", "tauri-plugin-biometric", "tauri-plugin-cli", @@ -245,7 +245,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tauri-build", "tauri-plugin-updater", "time", "tiny_http", @@ -258,7 +258,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tauri-build", "tauri-plugin-updater", "tiny_http", ] @@ -270,7 +270,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tauri-build", "tauri-plugin-store", ] @@ -1437,7 +1437,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tauri-build", "tauri-plugin-deep-link", "tauri-plugin-log", "tauri-plugin-single-instance", @@ -5737,7 +5737,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tauri-build", "tauri-plugin-cli", "tauri-plugin-single-instance", ] @@ -6356,6 +6356,8 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tauri" version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d08db1ff9e011e04014e737ec022610d756c0eae0b3b3a9037bccaf3003173a" dependencies = [ "anyhow", "bytes", @@ -6388,11 +6390,11 @@ dependencies = [ "serialize-to-javascript", "specta", "swift-rs", - "tauri-build 2.1.1", + "tauri-build", "tauri-macros", "tauri-runtime", "tauri-runtime-wry", - "tauri-utils 2.3.1", + "tauri-utils", "thiserror 2.0.12", "tokio", "tray-icon", @@ -6405,26 +6407,6 @@ dependencies = [ "windows 0.60.0", ] -[[package]] -name = "tauri-build" -version = "2.1.1" -dependencies = [ - "anyhow", - "cargo_toml", - "dirs 6.0.0", - "glob", - "heck 0.5.0", - "json-patch", - "schemars", - "semver", - "serde", - "serde_json", - "tauri-utils 2.3.1", - "tauri-winres", - "toml", - "walkdir", -] - [[package]] name = "tauri-build" version = "2.1.1" @@ -6442,38 +6424,13 @@ dependencies = [ "semver", "serde", "serde_json", - "tauri-codegen 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tauri-utils 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tauri-codegen", + "tauri-utils", "tauri-winres", "toml", "walkdir", ] -[[package]] -name = "tauri-codegen" -version = "2.1.1" -dependencies = [ - "base64 0.22.1", - "brotli", - "ico", - "json-patch", - "plist", - "png", - "proc-macro2", - "quote", - "semver", - "serde", - "serde_json", - "sha2", - "syn 2.0.100", - "tauri-utils 2.3.1", - "thiserror 2.0.12", - "time", - "url", - "uuid", - "walkdir", -] - [[package]] name = "tauri-codegen" version = "2.1.1" @@ -6481,6 +6438,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "458258b19032450ccf975840116ecf013e539eadbb74420bd890e8c56ab2b1a4" dependencies = [ "base64 0.22.1", + "brotli", "ico", "json-patch", "plist", @@ -6492,7 +6450,7 @@ dependencies = [ "serde_json", "sha2", "syn 2.0.100", - "tauri-utils 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tauri-utils", "thiserror 2.0.12", "time", "url", @@ -6503,13 +6461,15 @@ dependencies = [ [[package]] name = "tauri-macros" version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d402813d3b9c773a0fa58697c457c771f10e735498fdcb7b343264d18e5a601f" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", "syn 2.0.100", - "tauri-codegen 2.1.1", - "tauri-utils 2.3.1", + "tauri-codegen", + "tauri-utils", ] [[package]] @@ -6524,7 +6484,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "tauri-utils 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tauri-utils", "toml", "walkdir", ] @@ -6602,7 +6562,7 @@ dependencies = [ "serde_json", "tauri", "tauri-plugin", - "tauri-utils 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tauri-utils", "thiserror 2.0.12", "tracing", "url", @@ -6642,7 +6602,7 @@ dependencies = [ "serde_repr", "tauri", "tauri-plugin", - "tauri-utils 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tauri-utils", "thiserror 2.0.12", "toml", "url", @@ -7018,6 +6978,8 @@ dependencies = [ [[package]] name = "tauri-runtime" version = "2.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00ada7ac2f9276f09b8c3afffd3215fd5d9bff23c22df8a7c70e7ef67cacd532" dependencies = [ "cookie", "dpi", @@ -7027,7 +6989,7 @@ dependencies = [ "raw-window-handle", "serde", "serde_json", - "tauri-utils 2.3.1", + "tauri-utils", "thiserror 2.0.12", "url", "windows 0.60.0", @@ -7036,6 +6998,8 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" version = "2.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf2e5842c57e154af43a20a49c7efee0ce2578c20b4c2bdf266852b422d2e421" dependencies = [ "gtk", "http", @@ -7050,7 +7014,7 @@ dependencies = [ "softbuffer", "tao", "tauri-runtime", - "tauri-utils 2.3.1", + "tauri-utils", "url", "webkit2gtk", "webview2-com", @@ -7058,45 +7022,6 @@ dependencies = [ "wry", ] -[[package]] -name = "tauri-utils" -version = "2.3.1" -dependencies = [ - "aes-gcm", - "anyhow", - "brotli", - "cargo_metadata", - "ctor", - "dunce", - "getrandom 0.2.15", - "glob", - "html5ever", - "http", - "infer", - "json-patch", - "kuchikiki", - "log", - "memchr", - "phf 0.11.3", - "proc-macro2", - "quote", - "regex", - "schemars", - "semver", - "serde", - "serde-untagged", - "serde_json", - "serde_with", - "serialize-to-javascript", - "swift-rs", - "thiserror 2.0.12", - "toml", - "url", - "urlpattern", - "uuid", - "walkdir", -] - [[package]] name = "tauri-utils" version = "2.3.1" @@ -7105,6 +7030,7 @@ checksum = "1f037e66c7638cc0a2213f61566932b9a06882b8346486579c90e4b019bac447" dependencies = [ "aes-gcm", "anyhow", + "brotli", "cargo_metadata", "ctor", "dunce", @@ -7741,7 +7667,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tauri-build", "tauri-plugin-updater", "time", "tiny_http", @@ -8157,7 +8083,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tauri-build", "tauri-plugin-websocket", "tokio", "tokio-tungstenite", diff --git a/Cargo.toml b/Cargo.toml index 53f0c4ff..d85be889 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ resolver = "2" serde = { version = "1", features = ["derive"] } tracing = "0.1" log = "0.4" -tauri = { path = "../tauri/crates/tauri", default-features = false } +tauri = { version = "2", default-features = false } tauri-build = "2" tauri-plugin = "2" tauri-utils = "2" From 5d12c97ea6bb0a40e8974b80f161e7a070bd5c37 Mon Sep 17 00:00:00 2001 From: Krzysztof Andrelczyk Date: Fri, 11 Apr 2025 23:06:26 +0200 Subject: [PATCH 15/25] remove print --- plugins/updater/tests/app-updater/tests/update.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/updater/tests/app-updater/tests/update.rs b/plugins/updater/tests/app-updater/tests/update.rs index ac8f1b1f..4c331b1e 100644 --- a/plugins/updater/tests/app-updater/tests/update.rs +++ b/plugins/updater/tests/app-updater/tests/update.rs @@ -120,8 +120,6 @@ fn target_to_platforms( ) -> HashMap { let mut platforms = HashMap::new(); if let Some(platform) = update_platform { - println!("TARGET: {}", platform.clone()); - platforms.insert( platform, PlatformUpdate { From 2137583004984ff92f9a4558f4e74a317008ae52 Mon Sep 17 00:00:00 2001 From: Krzysztof Andrelczyk Date: Sat, 12 Apr 2025 13:48:44 +0200 Subject: [PATCH 16/25] rever Cargo.lock --- Cargo.lock | 1984 ++++++++++++++++++++++++++-------------------------- 1 file changed, 980 insertions(+), 1004 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7ea2f302..b0f3cac1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -84,7 +84,7 @@ dependencies = [ "cfg-if", "once_cell", "version_check", - "zerocopy 0.7.35", + "zerocopy", ] [[package]] @@ -190,20 +190,19 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "3.0.7" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" dependencies = [ "anstyle", - "once_cell", "windows-sys 0.59.0", ] [[package]] name = "anyhow" -version = "1.0.97" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" +checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" [[package]] name = "api" @@ -285,21 +284,19 @@ dependencies = [ [[package]] name = "arboard" -version = "3.5.0" +version = "3.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1df21f715862ede32a0c525ce2ca4d52626bb0007f8c18b87a384503ac33e70" +checksum = "df099ccb16cd014ff054ac1bf392c67feeef57164b05c42f037cd40f5d4357f4" dependencies = [ "clipboard-win", + "core-graphics 0.23.2", "image", "log", - "objc2 0.6.0", - "objc2-app-kit", - "objc2-core-foundation", - "objc2-core-graphics", - "objc2-foundation 0.3.0", + "objc2 0.5.2", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", "parking_lot", - "percent-encoding", - "windows-sys 0.59.0", + "windows-sys 0.48.0", "wl-clipboard-rs", "x11rb", ] @@ -324,19 +321,22 @@ checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16" [[package]] name = "ashpd" -version = "0.11.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cbdf310d77fd3aaee6ea2093db7011dc2d35d2eb3481e5607f1f8d942ed99df" +checksum = "e9c39d707614dbcc6bed00015539f488d8e3fe3e66ed60961efc0c90f4b380b3" dependencies = [ "enumflags2", "futures-channel", "futures-util", - "rand 0.9.0", + "rand 0.8.5", "raw-window-handle", "serde", "serde_repr", "tokio", "url", + "wayland-backend", + "wayland-client", + "wayland-protocols 0.32.5", "zbus", ] @@ -352,9 +352,9 @@ dependencies = [ [[package]] name = "async-broadcast" -version = "0.7.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532" +checksum = "20cd0e2e25ea8e5f7e9df04578dc6cf5c83577fd09b1a46aaf5c85e1c33f2a7e" dependencies = [ "event-listener", "event-listener-strategy", @@ -376,9 +376,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.22" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59a194f9d963d8099596278594b3107448656ba73831c9d8c783e613ce86da64" +checksum = "df895a515f70646414f4b45c0b79082783b80552b373a68283012928df56f522" dependencies = [ "brotli", "flate2", @@ -427,7 +427,7 @@ dependencies = [ "futures-lite", "parking", "polling", - "rustix 0.38.44", + "rustix", "slab", "tracing", "windows-sys 0.59.0", @@ -459,7 +459,7 @@ dependencies = [ "cfg-if", "event-listener", "futures-lite", - "rustix 0.38.44", + "rustix", "tracing", ] @@ -471,7 +471,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] @@ -486,7 +486,7 @@ dependencies = [ "cfg-if", "futures-core", "futures-io", - "rustix 0.38.44", + "rustix", "signal-hook-registry", "slab", "windows-sys 0.59.0", @@ -500,20 +500,20 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.88" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] name = "atk" -version = "0.18.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "241b621213072e993be4f6f3a9e4b45f65b7e6faad43001be957184b7bb1824b" +checksum = "b4af014b17dd80e8af9fa689b2d4a211ddba6eb583c1622f35d0cb543f6b17e4" dependencies = [ "atk-sys", "glib", @@ -522,9 +522,9 @@ dependencies = [ [[package]] name = "atk-sys" -version = "0.18.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e48b684b0ca77d2bbadeef17424c2ea3c897d44d566a1617e7e8f30614d086" +checksum = "251e0b7d90e33e0ba930891a505a9a35ece37b2dd37a14f3ffc306c13b980009" dependencies = [ "glib-sys", "gobject-sys", @@ -605,9 +605,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "base64ct" -version = "1.7.3" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89e25b6adfb930f02d1981565a6e5d9c547ac15a96606256d3b59040e5cd4ca3" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "bincode" @@ -626,9 +626,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.9.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" +checksum = "1be3f42a67d6d345ecd59f675f3f012d6974981560836e938c22b424b85ce1be" dependencies = [ "serde", ] @@ -656,15 +656,21 @@ dependencies = [ [[package]] name = "blake2b_simd" -version = "1.0.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06e903a20b159e944f91ec8499fe1e55651480c541ea0a584f5d967c49ad9d99" +checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" dependencies = [ "arrayref", "arrayvec", "constant_time_eq 0.3.1", ] +[[package]] +name = "block" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" + [[package]] name = "block-buffer" version = "0.10.4" @@ -716,25 +722,25 @@ dependencies = [ [[package]] name = "borsh" -version = "1.5.7" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad8646f98db542e39fc66e68a20b2144f6a732636df7c2354e74645faaa433ce" +checksum = "2506947f73ad44e344215ccd6403ac2ae18cd8e046e581a441bf8d199f257f03" dependencies = [ "borsh-derive", - "cfg_aliases", + "cfg_aliases 0.2.1", ] [[package]] name = "borsh-derive" -version = "1.5.7" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdd1d3c0c2f5833f22386f252fe8ed005c7f59fdcddeef025c01b4c3b9fd9ac3" +checksum = "c2593a3b8b938bd68373196c9832f516be11fa487ef4ae745eb282e6a56a7244" dependencies = [ "once_cell", - "proc-macro-crate 3.3.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] @@ -750,9 +756,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "4.0.2" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74fa05ad7d803d413eb8380983b092cbbaf9a85f151b871360e7b00cd7060b37" +checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -760,9 +766,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.17.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "byte-unit" @@ -799,9 +805,9 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.22.0" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6b1fc10dbac614ebc03540c9dbd60e83887fda27794998c6528f1782047d540" +checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a" [[package]] name = "byteorder" @@ -817,9 +823,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "bytes" -version = "1.10.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" dependencies = [ "serde", ] @@ -830,7 +836,7 @@ version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "cairo-sys-rs", "glib", "libc", @@ -860,25 +866,25 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.9" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" dependencies = [ "serde", ] [[package]] name = "cargo_metadata" -version = "0.19.2" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba" +checksum = "afc309ed89476c8957c50fb818f56fe894db857866c3e163335faa91dc34eb85" dependencies = [ "camino", "cargo-platform", "semver", "serde", "serde_json", - "thiserror 2.0.12", + "thiserror 1.0.69", ] [[package]] @@ -893,9 +899,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.18" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525046617d8376e3db1deffb079e91cef90a89fc3ca5c185bbf8c9ecdd15cd5c" +checksum = "f34d93e62b03caf570cccc334cbc6c2fceca82f39211051345108adcba3eebdc" dependencies = [ "jobserver", "libc", @@ -935,6 +941,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + [[package]] name = "cfg_aliases" version = "0.2.1" @@ -967,15 +979,15 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.40" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", "num-traits", "serde", - "windows-link", + "windows-targets 0.52.6", ] [[package]] @@ -997,18 +1009,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.35" +version = "4.5.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8aa86934b44c19c50f87cc2790e19f54f7a67aedb64101c2e1a2e5ecfb73944" +checksum = "fb3b4b9e5a7c7514dfa52869339ee98b3156b0bfb4e8a77c4ff4babb64b1604f" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.35" +version = "4.5.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2414dbb2dd0695280da6ea9261e327479e9d37b0630f6b53ba2a11c60c679fd9" +checksum = "b17a95aa67cc7b5ebd32aa5370189aa0d79069ef1c64ce893bd30fb24bff20ec" dependencies = [ "anstream", "anstyle", @@ -1018,9 +1030,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.4" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" +checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7" [[package]] name = "clipboard-win" @@ -1049,21 +1061,12 @@ checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "colored" -version = "2.2.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" +checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" dependencies = [ "lazy_static", - "windows-sys 0.59.0", -] - -[[package]] -name = "colored" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fde0e0ec90c9dfb3b4b1a0891a7dcd0e2bffde2f7efed5fe7c9bb00e5bfb915e" -dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.48.0", ] [[package]] @@ -1184,26 +1187,50 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "core-graphics" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" +dependencies = [ + "bitflags 1.3.2", + "core-foundation 0.9.4", + "core-graphics-types 0.1.3", + "foreign-types 0.5.0", + "libc", +] + [[package]] name = "core-graphics" version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "core-foundation 0.10.0", - "core-graphics-types", + "core-graphics-types 0.2.0", "foreign-types 0.5.0", "libc", ] +[[package]] +name = "core-graphics-types" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" +dependencies = [ + "bitflags 1.3.2", + "core-foundation 0.9.4", + "libc", +] + [[package]] name = "core-graphics-types" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "core-foundation 0.10.0", "libc", ] @@ -1219,9 +1246,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.17" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" dependencies = [ "libc", ] @@ -1252,33 +1279,33 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.15" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-queue" -version = "0.3.12" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.21" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" -version = "0.2.3" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" @@ -1327,7 +1354,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] @@ -1337,7 +1364,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a2785755761f3ddc1492979ce1e48d2c00d09311c39e4466429188f3dd6501" dependencies = [ "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] @@ -1373,14 +1400,14 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] name = "darling" -version = "0.20.11" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ "darling_core", "darling_macro", @@ -1388,27 +1415,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.11" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] name = "darling_macro" -version = "0.20.11" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] @@ -1419,9 +1446,9 @@ checksum = "04d2cd9c18b9f454ed67da600630b021a8a80bf33f8c95896ab33aaf1c26b728" [[package]] name = "data-encoding" -version = "2.8.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "575f75dfd25738df5b91b8e43e14d44bda14637a58fae779fd2b064f8bf3e010" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" [[package]] name = "data-url" @@ -1456,14 +1483,25 @@ dependencies = [ [[package]] name = "deranged" -version = "0.4.0" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", "serde", ] +[[package]] +name = "derive-new" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d150dea618e920167e5973d70ae6ece4385b7164e0d799fe7c122dd0a5d912ad" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.90", +] + [[package]] name = "derive_arbitrary" version = "1.4.1" @@ -1472,20 +1510,20 @@ checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] name = "derive_more" -version = "0.99.19" +version = "0.99.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3da29a38df43d6f156149c9b43ded5e018ddff2a855cf2cfd62e8cd7d079c69f" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "convert_case", "proc-macro2", "quote", "rustc_version", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] @@ -1568,18 +1606,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" -[[package]] -name = "dispatch2" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a0d569e003ff27784e0e14e4a594048698e0c0f0b66cabcb51511be55a7caa0" -dependencies = [ - "bitflags 2.9.0", - "block2 0.6.0", - "libc", - "objc2 0.6.0", -] - [[package]] name = "displaydoc" version = "0.2.5" @@ -1588,7 +1614,16 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", +] + +[[package]] +name = "dlib" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" +dependencies = [ + "libloading 0.8.6", ] [[package]] @@ -1611,7 +1646,7 @@ checksum = "f2b99bf03862d7f545ebc28ddd33a665b50865f4dfd84031a393823879bd4c54" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] @@ -1625,9 +1660,9 @@ dependencies = [ [[package]] name = "document-features" -version = "0.2.11" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95249b50c6c185bee49034bcb378a49dc2b5dff0be90ff6616d31d64febab05d" +checksum = "cb6969eaabd2421f8a2775cfd2471a2b634372b4a25d41e3bd647b79912850a0" dependencies = [ "litrs", ] @@ -1655,9 +1690,9 @@ dependencies = [ [[package]] name = "dtoa" -version = "1.0.10" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6add3b8cff394282be81f3fc1a0605db594ed69890078ca6e2cab1c408bcf04" +checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" [[package]] name = "dtoa-short" @@ -1676,9 +1711,9 @@ checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "dyn-clone" -version = "1.0.19" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" [[package]] name = "ecdsa" @@ -1720,9 +1755,9 @@ dependencies = [ [[package]] name = "either" -version = "1.15.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" dependencies = [ "serde", ] @@ -1748,9 +1783,9 @@ dependencies = [ [[package]] name = "embed-resource" -version = "3.0.2" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fbc6e0d8e0c03a655b53ca813f0463d2c956bc4db8138dbc89f120b066551e3" +checksum = "4762ce03154ba57ebaeee60cc631901ceae4f18219cbb874e464347471594742" dependencies = [ "cc", "memchr", @@ -1783,9 +1818,9 @@ checksum = "a3d8a32ae18130a3c84dd492d4215c3d913c3b07c6b63c2eb3eb7ff1101ab7bf" [[package]] name = "enumflags2" -version = "0.7.11" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba2f4b465f5318854c6f8dd686ede6c0a9dc67d4b1ac241cf0eb51521a309147" +checksum = "d232db7f5956f3f14313dc2f87985c58bd2c695ce124c8cdd984e08e15ac133d" dependencies = [ "enumflags2_derive", "serde", @@ -1793,20 +1828,20 @@ dependencies = [ [[package]] name = "enumflags2_derive" -version = "0.7.11" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc4caf64a58d7a6d65ab00639b046ff54399a39f5f2554728895ace4b297cd79" +checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] name = "env_filter" -version = "0.1.3" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0" +checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" dependencies = [ "log", "regex", @@ -1814,15 +1849,15 @@ dependencies = [ [[package]] name = "equivalent" -version = "1.0.2" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "erased-serde" -version = "0.4.6" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e004d887f51fcb9fef17317a2f3525c887d8aa3f4f50fed920816a688284a5b7" +checksum = "24e2389d65ab4fab27dc2a5de7b191e1f6617d1f1c8855c0dc569c94a4cbb18d" dependencies = [ "serde", "typeid", @@ -1830,9 +1865,9 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.11" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", "windows-sys 0.59.0", @@ -1857,9 +1892,9 @@ dependencies = [ [[package]] name = "event-listener" -version = "5.4.0" +version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3492acde4c3fc54c845eaab3eed8bd00c7a7d881f78bfc801e43a93dec1331ae" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" dependencies = [ "concurrent-queue", "parking", @@ -1868,9 +1903,9 @@ dependencies = [ [[package]] name = "event-listener-strategy" -version = "0.5.4" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" +checksum = "3c3e4e0dd3673c1139bf041f3008816d9cf2946bbfac2945c09e523b8d7b05b2" dependencies = [ "event-listener", "pin-project-lite", @@ -1878,34 +1913,34 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.3.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" +checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" [[package]] name = "fdeflate" -version = "0.3.7" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" +checksum = "07c6f4c64c1d33a3111c4466f7365ebdcc37c5bd1ea0d62aae2e3d722aacbedb" dependencies = [ "simd-adler32", ] [[package]] name = "fern" -version = "0.7.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4316185f709b23713e41e3195f90edef7fb00c3ed4adc79769cf09cc762a3b29" +checksum = "69ff9c9d5fb3e6da8ac2f77ab76fe7e8087d512ce095200f8f29ac5b656cf6dc" dependencies = [ - "colored 2.2.0", + "colored", "log", ] [[package]] name = "ff" -version = "0.13.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ "rand_core 0.6.4", "subtle", @@ -1956,9 +1991,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.1.1" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ced92e76e966ca2fd84c8f7aa01a4aea65b0eb6648d72f7c8f3e2764a67fece" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", "miniz_oxide", @@ -1981,12 +2016,6 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "foldhash" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" - [[package]] name = "foreign-types" version = "0.3.2" @@ -2014,7 +2043,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] @@ -2124,9 +2153,9 @@ checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-lite" -version = "2.6.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5edaec856126859abb19ed65f39e90fea3a9574b9707f13539acf4abf7eb532" +checksum = "cef40d21ae2c515b51041df9ed313ed21e572df340ea58a922a0aefe7e8891a1" dependencies = [ "fastrand", "futures-core", @@ -2143,7 +2172,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] @@ -2187,9 +2216,9 @@ dependencies = [ [[package]] name = "gdk" -version = "0.18.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9f245958c627ac99d8e529166f9823fb3b838d1d41fd2b297af3075093c2691" +checksum = "f5ba081bdef3b75ebcdbfc953699ed2d7417d6bd853347a42a37d76406a33646" dependencies = [ "cairo-rs", "gdk-pixbuf", @@ -2228,9 +2257,9 @@ dependencies = [ [[package]] name = "gdk-sys" -version = "0.18.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c2d13f38594ac1e66619e188c6d5a1adb98d11b2fcf7894fc416ad76aa2f3f7" +checksum = "31ff856cb3386dae1703a920f803abafcc580e9b5f711ca62ed1620c25b51ff2" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", @@ -2245,9 +2274,9 @@ dependencies = [ [[package]] name = "gdkwayland-sys" -version = "0.18.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "140071d506d223f7572b9f09b5e155afbd77428cd5cc7af8f2694c41d98dfe69" +checksum = "a90fbf5c033c65d93792192a49a8efb5bb1e640c419682a58bb96f5ae77f3d4a" dependencies = [ "gdk-sys", "glib-sys", @@ -2259,9 +2288,9 @@ dependencies = [ [[package]] name = "gdkx11" -version = "0.18.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3caa00e14351bebbc8183b3c36690327eb77c49abc2268dd4bd36b856db3fbfe" +checksum = "db2ea8a4909d530f79921290389cbd7c34cb9d623bfe970eaae65ca5f9cd9cce" dependencies = [ "gdk", "gdkx11-sys", @@ -2273,9 +2302,9 @@ dependencies = [ [[package]] name = "gdkx11-sys" -version = "0.18.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e2e7445fe01ac26f11601db260dd8608fe172514eb63b3b5e261ea6b0f4428d" +checksum = "fee8f00f4ee46cad2939b8990f5c70c94ff882c3028f3cc5abf950fa4ab53043" dependencies = [ "gdk-sys", "glib-sys", @@ -2307,11 +2336,11 @@ dependencies = [ [[package]] name = "gethostname" -version = "1.0.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed7131e57abbde63513e0e6636f76668a1ca9798dcae2df4e283cae9ee83859e" +checksum = "4fd4b8790c0792e3b11895efdf5f289ebe8b59107a6624f1cce68f24ff8c7035" dependencies = [ - "rustix 1.0.5", + "rustix", "windows-targets 0.52.6", ] @@ -2339,20 +2368,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "getrandom" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "r-efi", - "wasi 0.14.2+wasi-0.2.4", - "wasm-bindgen", -] - [[package]] name = "ghash" version = "0.5.1" @@ -2407,7 +2422,7 @@ version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "futures-channel", "futures-core", "futures-executor", @@ -2435,7 +2450,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] @@ -2450,9 +2465,9 @@ dependencies = [ [[package]] name = "glob" -version = "0.3.2" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "global-hotkey" @@ -2463,10 +2478,10 @@ dependencies = [ "crossbeam-channel", "keyboard-types", "objc2 0.6.0", - "objc2-app-kit", + "objc2-app-kit 0.3.0", "once_cell", "serde", - "thiserror 2.0.12", + "thiserror 2.0.9", "windows-sys 0.59.0", "x11-dl", ] @@ -2495,9 +2510,9 @@ dependencies = [ [[package]] name = "gtk" -version = "0.18.2" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd56fb197bfc42bd5d2751f4f017d44ff59fbb58140c6b49f9b3b2bdab08506a" +checksum = "93c4f5e0e20b60e10631a5f06da7fe3dda744b05ad0ea71fee2f47adf865890c" dependencies = [ "atk", "cairo-rs", @@ -2516,9 +2531,9 @@ dependencies = [ [[package]] name = "gtk-sys" -version = "0.18.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f29a1c21c59553eb7dd40e918be54dccd60c52b049b75119d5d96ce6b624414" +checksum = "771437bf1de2c1c0b496c11505bdf748e26066bbe942dfc8f614c9460f6d7722" dependencies = [ "atk-sys", "cairo-sys-rs", @@ -2534,22 +2549,22 @@ dependencies = [ [[package]] name = "gtk3-macros" -version = "0.18.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ff3c5b21f14f0736fed6dcfc0bfb4225ebf5725f3c0209edeec181e4d73e9d" +checksum = "c6063efb63db582968fb7df72e1ae68aa6360dcfb0a75143f34fc7d616bad75e" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] name = "h2" -version = "0.4.8" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5017294ff4bb30944501348f6f8e42e6ad28f42c8bbef7a74029aff064a4e3c2" +checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" dependencies = [ "atomic-waker", "bytes", @@ -2557,7 +2572,7 @@ dependencies = [ "futures-core", "futures-sink", "http", - "indexmap 2.9.0", + "indexmap 2.7.0", "slab", "tokio", "tokio-util", @@ -2588,19 +2603,14 @@ name = "hashbrown" version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" -dependencies = [ - "allocator-api2", - "equivalent", - "foldhash", -] [[package]] name = "hashlink" -version = "0.10.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" +checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" dependencies = [ - "hashbrown 0.15.2", + "hashbrown 0.14.5", ] [[package]] @@ -2647,11 +2657,11 @@ dependencies = [ [[package]] name = "home" -version = "0.5.11" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -2670,13 +2680,13 @@ dependencies = [ [[package]] name = "http" -version = "1.3.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ "bytes", "fnv", - "itoa 1.0.15", + "itoa 1.0.14", ] [[package]] @@ -2691,12 +2701,12 @@ dependencies = [ [[package]] name = "http-body-util" -version = "0.1.3" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes", - "futures-core", + "futures-util", "http", "http-body", "pin-project-lite", @@ -2710,9 +2720,9 @@ checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573" [[package]] name = "httparse" -version = "1.10.1" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "httpdate" @@ -2722,9 +2732,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "1.6.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" +checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f" dependencies = [ "bytes", "futures-channel", @@ -2734,7 +2744,7 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 1.0.15", + "itoa 1.0.14", "pin-project-lite", "smallvec", "tokio", @@ -2743,9 +2753,9 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.5" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ "futures-util", "http", @@ -2778,9 +2788,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.11" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497bbc33a26fdd4af9ed9c70d63f61cf56a938375fbb32df34db9b1cd6d643f2" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", @@ -2788,7 +2798,6 @@ dependencies = [ "http", "http-body", "hyper", - "libc", "pin-project-lite", "socket2", "tokio", @@ -2798,17 +2807,16 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.63" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", - "log", "wasm-bindgen", - "windows-core 0.61.0", + "windows-core 0.52.0", ] [[package]] @@ -2871,9 +2879,9 @@ dependencies = [ [[package]] name = "icu_locid_transform_data" -version = "1.5.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7515e6d781098bf9f7205ab3fc7e9709d34554ae0b21ddbcb5febfa4bc7df11d" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" [[package]] name = "icu_normalizer" @@ -2895,9 +2903,9 @@ dependencies = [ [[package]] name = "icu_normalizer_data" -version = "1.5.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e8338228bdc8ab83303f16b797e177953730f601a96c25d10cb3ab0daa0cb7" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" [[package]] name = "icu_properties" @@ -2916,9 +2924,9 @@ dependencies = [ [[package]] name = "icu_properties_data" -version = "1.5.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85fb8799753b75aee8d2a21d7c14d9f38921b54b3dbda10f5a3c7a7b82dba5e2" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" [[package]] name = "icu_provider" @@ -2945,7 +2953,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] @@ -2977,9 +2985,9 @@ dependencies = [ [[package]] name = "image" -version = "0.25.6" +version = "0.25.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db35664ce6b9810857a38a906215e75a9c879f0696556a39f59c62829710251a" +checksum = "cd6f44aed642f18953a158afeb30206f4d50da59fbc66ecb53c66488de73563b" dependencies = [ "bytemuck", "byteorder-lite", @@ -3001,9 +3009,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.9.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ "equivalent", "hashbrown 0.15.2", @@ -3025,7 +3033,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f37dccff2791ab604f9babef0ba14fbe0be30bd368dc541e2b08d07c8aa908f3" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "inotify-sys", "libc", ] @@ -3041,9 +3049,9 @@ dependencies = [ [[package]] name = "inout" -version = "0.1.4" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ "block-padding", "generic-array", @@ -3103,9 +3111,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.11.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] name = "is-docker" @@ -3146,9 +3154,9 @@ checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "itoa" -version = "1.0.15" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "javascriptcore-rs" @@ -3197,11 +3205,10 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "jobserver" -version = "0.1.33" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ - "getrandom 0.3.2", "libc", ] @@ -3213,9 +3220,9 @@ checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" [[package]] name = "js-sys" -version = "0.3.77" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +checksum = "a865e038f7f6ed956f788f0d7d60c541fff74c7bd74272c5d4cf15c63743e705" dependencies = [ "once_cell", "wasm-bindgen", @@ -3262,7 +3269,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "serde", "unicode-segmentation", ] @@ -3329,7 +3336,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e9ec52138abedcc58dc17a7c6c0c00a2bdb4f3427c7f63fa97fd0d859155caf" dependencies = [ "gtk-sys", - "libloading", + "libloading 0.7.4", "once_cell", ] @@ -3373,6 +3380,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "libloading" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" +dependencies = [ + "cfg-if", + "windows-targets 0.48.5", +] + [[package]] name = "libm" version = "0.2.11" @@ -3385,16 +3402,16 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "libc", "redox_syscall", ] [[package]] name = "libsodium-sys-stable" -version = "1.22.3" +version = "1.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b023d38f2afdfe36f81e15a9d7232097701d7b107e3a93ba903083985e235239" +checksum = "798a1c6d8c3424c0686ca46f2929d81809b371ef61a68c5d1880570584d32b85" dependencies = [ "cc", "libc", @@ -3420,21 +3437,15 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" - -[[package]] -name = "linux-raw-sys" -version = "0.9.4" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "litemap" -version = "0.7.5" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" [[package]] name = "litrs" @@ -3460,9 +3471,9 @@ checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" [[package]] name = "log" -version = "0.4.27" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" dependencies = [ "value-bag", ] @@ -3475,16 +3486,26 @@ checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" [[package]] name = "mac-notification-sys" -version = "0.6.4" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b95dfb34071d1592b45622bf93e315e3a72d414b6782aca9a015c12bec367ef" +checksum = "dce8f34f3717aa37177e723df6c1fc5fb02b2a1087374ea3fe0ea42316dc8f91" dependencies = [ "cc", - "objc2 0.6.0", - "objc2-foundation 0.3.0", + "dirs-next", + "objc-foundation", + "objc_id", "time", ] +[[package]] +name = "malloc_buf" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" +dependencies = [ + "libc", +] + [[package]] name = "maplit" version = "1.0.2" @@ -3569,15 +3590,15 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "minisign-verify" -version = "0.2.3" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6367d84fb54d4242af283086402907277715b8fe46976963af5ebf173f8efba3" +checksum = "a05b5d0594e0cb1ad8cee3373018d2b84e25905dc75b2468114cc9a8e86cfc20" [[package]] name = "miniz_oxide" -version = "0.8.8" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ "adler2", "simd-adler32", @@ -3597,13 +3618,13 @@ dependencies = [ [[package]] name = "mockito" -version = "1.7.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7760e0e418d9b7e5777c0374009ca4c93861b9066f18cb334a20ce50ab63aa48" +checksum = "652cd6d169a36eaf9d1e6bce1a221130439a966d7f27858af66a33a66e9c4ee2" dependencies = [ "assert-json-diff", "bytes", - "colored 3.0.0", + "colored", "futures-util", "http", "http-body", @@ -3611,7 +3632,7 @@ dependencies = [ "hyper", "hyper-util", "log", - "rand 0.9.0", + "rand 0.8.5", "regex", "serde_json", "serde_urlencoded", @@ -3621,30 +3642,30 @@ dependencies = [ [[package]] name = "muda" -version = "0.16.1" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4de14a9b5d569ca68d7c891d613b390cf5ab4f851c77aaa2f9e435555d3d9492" +checksum = "89fed9ce3e5c01700e3a129d3d74619bbf468645b58274b420885107e496ecff" dependencies = [ "crossbeam-channel", "dpi", "gtk", "keyboard-types", "objc2 0.6.0", - "objc2-app-kit", + "objc2-app-kit 0.3.0", "objc2-core-foundation", "objc2-foundation 0.3.0", "once_cell", "png", "serde", - "thiserror 2.0.12", + "thiserror 2.0.9", "windows-sys 0.59.0", ] [[package]] name = "native-tls" -version = "0.2.14" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" dependencies = [ "libc", "log", @@ -3663,7 +3684,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "jni-sys", "log", "ndk-sys", @@ -3705,15 +3726,27 @@ dependencies = [ "memoffset 0.6.5", ] +[[package]] +name = "nix" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" +dependencies = [ + "bitflags 2.7.0", + "cfg-if", + "cfg_aliases 0.1.1", + "libc", +] + [[package]] name = "nix" version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "cfg-if", - "cfg_aliases", + "cfg_aliases 0.2.1", "libc", "memoffset 0.9.1", ] @@ -3740,7 +3773,7 @@ version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fee8403b3d66ac7b26aee6e40a897d85dc5ce26f44da36b8b73e987cc52e943" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "filetime", "fsevent-sys", "inotify", @@ -3768,11 +3801,10 @@ dependencies = [ [[package]] name = "notify-rust" -version = "4.11.7" +version = "4.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6442248665a5aa2514e794af3b39661a8e73033b1cc5e59899e1276117ee4400" +checksum = "96ae13fb6065b0865d2310dfa55ce319245052ed95fbbe2bc87c99962c58d73f" dependencies = [ - "futures-lite", "log", "mac-notification-sys", "serde", @@ -3857,10 +3889,10 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate 3.3.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] @@ -3872,6 +3904,26 @@ dependencies = [ "libc", ] +[[package]] +name = "objc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" +dependencies = [ + "malloc_buf", +] + +[[package]] +name = "objc-foundation" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" +dependencies = [ + "block", + "objc", + "objc_id", +] + [[package]] name = "objc-sys" version = "0.3.5" @@ -3900,19 +3952,35 @@ dependencies = [ [[package]] name = "objc2-app-kit" -version = "0.3.0" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" +dependencies = [ + "bitflags 2.7.0", + "block2 0.5.1", + "libc", + "objc2 0.5.2", + "objc2-core-data 0.2.2", + "objc2-core-image 0.2.2", + "objc2-foundation 0.2.2", + "objc2-quartz-core 0.2.2", +] + +[[package]] +name = "objc2-app-kit" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5906f93257178e2f7ae069efb89fbd6ee94f0592740b5f8a1512ca498814d0fb" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "block2 0.6.0", "libc", "objc2 0.6.0", "objc2-cloud-kit", - "objc2-core-data", + "objc2-core-data 0.3.0", "objc2-core-foundation", "objc2-core-graphics", - "objc2-core-image", + "objc2-core-image 0.3.0", "objc2-foundation 0.3.0", "objc2-quartz-core 0.3.0", ] @@ -3923,18 +3991,30 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c1948a9be5f469deadbd6bcb86ad7ff9e47b4f632380139722f7d9840c0d42c" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "objc2 0.6.0", "objc2-foundation 0.3.0", ] +[[package]] +name = "objc2-core-data" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" +dependencies = [ + "bitflags 2.7.0", + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", +] + [[package]] name = "objc2-core-data" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f860f8e841f6d32f754836f51e6bc7777cd7e7053cf18528233f6811d3eceb4" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "objc2 0.6.0", "objc2-foundation 0.3.0", ] @@ -3945,7 +4025,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daeaf60f25471d26948a1c2f840e3f7d86f4109e3af4e8e4b5cd70c39690d925" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "objc2 0.6.0", ] @@ -3955,12 +4035,24 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dca602628b65356b6513290a21a6405b4d4027b8b250f0b98dddbb28b7de02" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "objc2 0.6.0", "objc2-core-foundation", "objc2-io-surface", ] +[[package]] +name = "objc2-core-image" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.2", + "objc2-foundation 0.2.2", + "objc2-metal", +] + [[package]] name = "objc2-core-image" version = "0.3.0" @@ -3992,8 +4084,9 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "block2 0.5.1", + "dispatch", "libc", "objc2 0.5.2", ] @@ -4004,7 +4097,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a21c6c9014b82c39515db5b396f91645182611c97d24637cf56ac01e5f8d998" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "block2 0.6.0", "libc", "objc2 0.6.0", @@ -4017,7 +4110,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "161a8b87e32610086e1a7a9e9ec39f84459db7b3a0881c1f16ca5a2605581c19" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "objc2 0.6.0", "objc2-core-foundation", ] @@ -4028,7 +4121,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", @@ -4040,9 +4133,9 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1ac59da3ceebc4a82179b35dc550431ad9458f9cc326e053f49ba371ce76c5a" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "objc2 0.6.0", - "objc2-app-kit", + "objc2-app-kit 0.3.0", "objc2-foundation 0.3.0", ] @@ -4052,7 +4145,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", @@ -4065,7 +4158,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fb3794501bb1bee12f08dcad8c61f2a5875791ad1c6f47faa71a0f033f20071" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "objc2 0.6.0", "objc2-foundation 0.3.0", ] @@ -4076,7 +4169,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "777a571be14a42a3990d4ebedaeb8b54cd17377ec21b92e8200ac03797b3bee1" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "objc2 0.6.0", "objc2-core-foundation", "objc2-foundation 0.3.0", @@ -4088,28 +4181,37 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b717127e4014b0f9f3e8bba3d3f2acec81f1bde01f656823036e823ed2c94dce" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "block2 0.6.0", "objc2 0.6.0", - "objc2-app-kit", + "objc2-app-kit 0.3.0", "objc2-core-foundation", "objc2-foundation 0.3.0", ] +[[package]] +name = "objc_id" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" +dependencies = [ + "objc", +] + [[package]] name = "object" -version = "0.36.7" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.21.3" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "opaque-debug" @@ -4119,11 +4221,10 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "open" -version = "5.3.2" +version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2483562e62ea94312f3576a7aca397306df7990b8d89033e18766744377ef95" +checksum = "3ecd52f0b8d15c40ce4820aa251ed5de032e5d91fab27f7db2f40d42a8bdf69c" dependencies = [ - "dunce", "is-wsl", "libc", "pathdiff", @@ -4131,11 +4232,11 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.72" +version = "0.10.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fedfea7d58a1f73118430a55da6a286e7b044961736ce96a16a17068ea25e5da" +checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "cfg-if", "foreign-types 0.3.2", "libc", @@ -4152,29 +4253,29 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] name = "openssl-probe" -version = "0.1.6" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "300.5.0+3.5.0" +version = "300.4.1+3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8ce546f549326b0e6052b649198487d91320875da901e7bd11a06d1ee3f9c2f" +checksum = "faa4eac4138c62414b5622d1b31c5c304f34b406b013c079c2bbc652fdd6678c" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.107" +version = "0.9.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8288979acd84749c744a9014b4382d42b8f7b2592847b5afb2ed29e5d16ede07" +checksum = "8bb61ea9811cc39e3c2069f40b8b8e2e70d8569b361f879786cc7ed48b777cdd" dependencies = [ "cc", "libc", @@ -4211,9 +4312,9 @@ dependencies = [ [[package]] name = "os_info" -version = "3.10.0" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a604e53c24761286860eba4e2c8b23a0161526476b1de520139d69cdb85a6b5" +checksum = "e5ca711d8b83edbb00b44d504503cd247c9c0bd8b0fa2694f2a1a3d8165379ce" dependencies = [ "log", "serde", @@ -4241,7 +4342,7 @@ dependencies = [ "objc2-osa-kit", "serde", "serde_json", - "thiserror 2.0.12", + "thiserror 2.0.9", ] [[package]] @@ -4342,7 +4443,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.9.0", + "indexmap 2.7.0", ] [[package]] @@ -4367,12 +4468,12 @@ dependencies = [ [[package]] name = "phf" -version = "0.11.3" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" dependencies = [ - "phf_macros 0.11.3", - "phf_shared 0.11.3", + "phf_macros 0.11.2", + "phf_shared 0.11.2", ] [[package]] @@ -4417,11 +4518,11 @@ dependencies = [ [[package]] name = "phf_generator" -version = "0.11.3" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" dependencies = [ - "phf_shared 0.11.3", + "phf_shared 0.11.2", "rand 0.8.5", ] @@ -4441,15 +4542,15 @@ dependencies = [ [[package]] name = "phf_macros" -version = "0.11.3" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" +checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" dependencies = [ - "phf_generator 0.11.3", - "phf_shared 0.11.3", + "phf_generator 0.11.2", + "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] @@ -4458,7 +4559,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" dependencies = [ - "siphasher 0.3.11", + "siphasher", ] [[package]] @@ -4467,23 +4568,23 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" dependencies = [ - "siphasher 0.3.11", + "siphasher", ] [[package]] name = "phf_shared" -version = "0.11.3" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" dependencies = [ - "siphasher 1.0.1", + "siphasher", ] [[package]] name = "pin-project-lite" -version = "0.2.16" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -4525,18 +4626,18 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.32" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "plist" -version = "1.7.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac26e981c03a6e53e0aee43c113e3202f5581d5360dae7bd2c70e800dd0451d" +checksum = "42cf17e9a1800f5f396bc67d193dc9411b59012a5876445ef450d449881e1016" dependencies = [ "base64 0.22.1", - "indexmap 2.9.0", + "indexmap 2.7.0", "quick-xml 0.32.0", "serde", "time", @@ -4544,9 +4645,9 @@ dependencies = [ [[package]] name = "png" -version = "0.17.16" +version = "0.17.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" +checksum = "52f9d46a34a05a6a57566bc2bfae066ef07585a6e3fa30fbbdff5936380623f0" dependencies = [ "bitflags 1.3.2", "crc32fast", @@ -4565,7 +4666,7 @@ dependencies = [ "concurrent-queue", "hermit-abi", "pin-project-lite", - "rustix 0.38.44", + "rustix", "tracing", "windows-sys 0.59.0", ] @@ -4601,11 +4702,11 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.21" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" dependencies = [ - "zerocopy 0.8.24", + "zerocopy", ] [[package]] @@ -4635,11 +4736,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.3.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.22.24", + "toml_edit 0.22.22", ] [[package]] @@ -4674,9 +4775,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.94" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -4723,6 +4824,15 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +[[package]] +name = "quick-xml" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" +dependencies = [ + "memchr", +] + [[package]] name = "quick-xml" version = "0.32.0" @@ -4734,48 +4844,46 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.37.4" +version = "0.36.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4ce8c88de324ff838700f36fb6ab86c96df0e3c4ab6ef3a9b2044465cce1369" +checksum = "f7649a7b4df05aed9ea7ec6f628c67c9953a43869b8bc50929569b2999d443fe" dependencies = [ "memchr", ] [[package]] name = "quinn" -version = "0.11.7" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3bd15a6f2967aef83887dcb9fec0014580467e33720d073560cf015a5683012" +checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef" dependencies = [ "bytes", - "cfg_aliases", "pin-project-lite", "quinn-proto", "quinn-udp", "rustc-hash", "rustls", "socket2", - "thiserror 2.0.12", + "thiserror 2.0.9", "tokio", "tracing", - "web-time", ] [[package]] name = "quinn-proto" -version = "0.11.10" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b820744eb4dc9b57a3398183639c511b5a26d2ed702cedd3febaa1393caa22cc" +checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" dependencies = [ "bytes", - "getrandom 0.3.2", - "rand 0.9.0", + "getrandom 0.2.15", + "rand 0.8.5", "ring", "rustc-hash", "rustls", "rustls-pki-types", "slab", - "thiserror 2.0.12", + "thiserror 2.0.9", "tinyvec", "tracing", "web-time", @@ -4783,11 +4891,11 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.11" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "541d0f57c6ec747a90738a52741d3221f7960e8ac2f0ff4b1a63680e033b4ab5" +checksum = "7d5a626c6807713b15cac82a6acaccd6043c9a5408c24baae07611fec3f243da" dependencies = [ - "cfg_aliases", + "cfg_aliases 0.2.1", "libc", "once_cell", "socket2", @@ -4797,19 +4905,13 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.40" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] -[[package]] -name = "r-efi" -version = "5.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" - [[package]] name = "radium" version = "0.7.0" @@ -4841,17 +4943,6 @@ dependencies = [ "rand_core 0.6.4", ] -[[package]] -name = "rand" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" -dependencies = [ - "rand_chacha 0.9.0", - "rand_core 0.9.3", - "zerocopy 0.8.24", -] - [[package]] name = "rand_chacha" version = "0.2.2" @@ -4872,16 +4963,6 @@ dependencies = [ "rand_core 0.6.4", ] -[[package]] -name = "rand_chacha" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" -dependencies = [ - "ppv-lite86", - "rand_core 0.9.3", -] - [[package]] name = "rand_core" version = "0.5.1" @@ -4900,15 +4981,6 @@ dependencies = [ "getrandom 0.2.15", ] -[[package]] -name = "rand_core" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" -dependencies = [ - "getrandom 0.3.2", -] - [[package]] name = "rand_hc" version = "0.2.0" @@ -4946,11 +5018,11 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.11" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2f103c6d277498fbceb16e84d317e2a400f160f46904d5f5410848c829511a3" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", ] [[package]] @@ -4972,7 +5044,7 @@ checksum = "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b" dependencies = [ "getrandom 0.2.15", "libredox", - "thiserror 2.0.12", + "thiserror 2.0.9", ] [[package]] @@ -5015,9 +5087,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.15" +version = "0.12.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d19c46a6fdd48bc4dab94b6103fccc55d34c67cc0ad04653aad4ea2a07cd7bbb" +checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" dependencies = [ "async-compression", "base64 0.22.1", @@ -5060,7 +5132,6 @@ dependencies = [ "tokio-rustls", "tokio-socks", "tokio-util", - "tower", "tower-service", "url", "wasm-bindgen", @@ -5068,7 +5139,7 @@ dependencies = [ "wasm-streams", "web-sys", "webpki-roots", - "windows-registry 0.4.0", + "windows-registry 0.2.0", ] [[package]] @@ -5083,39 +5154,38 @@ dependencies = [ [[package]] name = "rfd" -version = "0.15.3" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80c844748fdc82aae252ee4594a89b6e7ebef1063de7951545564cbc4e57075d" +checksum = "46f6f80a9b882647d9014673ca9925d30ffc9750f2eed2b4490e189eaebd01e8" dependencies = [ "ashpd", - "block2 0.6.0", - "dispatch2", + "block2 0.5.1", "glib-sys", "gobject-sys", "gtk-sys", "js-sys", "log", - "objc2 0.6.0", - "objc2-app-kit", - "objc2-core-foundation", - "objc2-foundation 0.3.0", + "objc2 0.5.2", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", "raw-window-handle", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "windows-sys 0.59.0", + "windows-sys 0.48.0", ] [[package]] name = "ring" -version = "0.17.14" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", "getrandom 0.2.15", "libc", + "spin", "untrusted", "windows-sys 0.52.0", ] @@ -5157,9 +5227,9 @@ checksum = "3582f63211428f83597b51b2ddb88e2a91a9d52d12831f9d08f5e624e8977422" [[package]] name = "rsa" -version = "0.9.8" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78928ac1ed176a5ca1d17e578a1825f3d81ca54cf41053a592584b020cfd691b" +checksum = "47c75d7c5c6b673e58bf54d8544a9f432e3a925b0e80f7cd3602ab5c50c55519" dependencies = [ "const-oid", "digest", @@ -5211,9 +5281,9 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.37.1" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faa7de2ba56ac291bd90c6b9bece784a52ae1411f9506544b3eae36dd2356d50" +checksum = "b082d80e3e3cc52b2ed634388d436fe1f4de6af5786cc2de9ba9737527bdf555" dependencies = [ "arrayvec", "borsh", @@ -5233,9 +5303,9 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" -version = "2.1.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" +checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" [[package]] name = "rustc_version" @@ -5248,35 +5318,22 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" -dependencies = [ - "bitflags 2.9.0", - "errno", - "libc", - "linux-raw-sys 0.4.15", - "windows-sys 0.59.0", -] - -[[package]] -name = "rustix" -version = "1.0.5" +version = "0.38.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97817398dd4bb2e6da002002db259209759911da105da92bec29ccb12cf58bf" +checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "errno", "libc", - "linux-raw-sys 0.9.4", - "windows-sys 0.59.0", + "linux-raw-sys", + "windows-sys 0.52.0", ] [[package]] name = "rustls" -version = "0.23.26" +version = "0.23.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df51b5869f3a441595eac5e8ff14d486ff285f7b8c0df8770e49c3b56351f0f0" +checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1" dependencies = [ "once_cell", "ring", @@ -5295,7 +5352,7 @@ dependencies = [ "openssl-probe", "rustls-pki-types", "schannel", - "security-framework 3.2.0", + "security-framework 3.0.1", ] [[package]] @@ -5309,30 +5366,24 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.11.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" dependencies = [ "web-time", ] [[package]] name = "rustls-webpki" -version = "0.103.1" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fef8b8769aaccf73098557a87cd1816b4f9c7c16811c9c77142aa695c16f2c03" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ "ring", "rustls-pki-types", "untrusted", ] -[[package]] -name = "rustversion" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" - [[package]] name = "rusty-fork" version = "0.3.0" @@ -5347,9 +5398,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.20" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "salsa20" @@ -5380,9 +5431,9 @@ dependencies = [ [[package]] name = "schemars" -version = "0.8.22" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" +checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92" dependencies = [ "dyn-clone", "indexmap 1.9.3", @@ -5395,16 +5446,22 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.22" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" +checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.100", + "syn 2.0.90", ] +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + [[package]] name = "scopeguard" version = "1.2.0" @@ -5448,7 +5505,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "core-foundation 0.9.4", "core-foundation-sys", "libc", @@ -5457,11 +5514,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "3.2.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" +checksum = "e1415a607e92bec364ea2cf9264646dcce0f91e6d65281bd6f2819cca3bf39c8" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "core-foundation 0.10.0", "core-foundation-sys", "libc", @@ -5470,9 +5527,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.14.0" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" +checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" dependencies = [ "core-foundation-sys", "libc", @@ -5500,27 +5557,27 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.26" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.219" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" dependencies = [ "serde_derive", ] [[package]] name = "serde-untagged" -version = "0.1.7" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "299d9c19d7d466db4ab10addd5703e4c615dec2a5a16dbbafe191045e87ee66e" +checksum = "2676ba99bd82f75cae5cbd2c8eda6fa0b8760f18978ea840e980dd5567b5c5b6" dependencies = [ "erased-serde", "serde", @@ -5529,13 +5586,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.219" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] @@ -5546,16 +5603,16 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] name = "serde_json" -version = "1.0.140" +version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" dependencies = [ - "itoa 1.0.15", + "itoa 1.0.14", "memchr", "ryu", "serde", @@ -5563,13 +5620,13 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.20" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" +checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] @@ -5588,22 +5645,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.15", + "itoa 1.0.14", "ryu", "serde", ] [[package]] name = "serde_with" -version = "3.12.0" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6b6f7f2fcb69f747921f79f3926bd1e203fce4fef62c268dd3abfb6d86029aa" +checksum = "8e28bdad6db2b8340e449f7108f020b3b092e8583a9e3fb82713e1d4e71fe817" dependencies = [ "base64 0.22.1", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.9.0", + "indexmap 2.7.0", "serde", "serde_derive", "serde_json", @@ -5613,14 +5670,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.12.0" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d00caa5193a3c8362ac2b73be6b9e768aa5a4b2f721d8f4b339600c3cb51f8e" +checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] @@ -5726,9 +5783,9 @@ checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "similar" -version = "2.7.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbbb5d9659141646ae647b42fe094daf6c6192d1620870b449d9557f748b2daa" +checksum = "1de1d4f81173b03af4c0cbed3c898f6bff5b870e4a7f5d6f4057d62a7a4b686e" [[package]] name = "single-instance-example" @@ -5748,12 +5805,6 @@ version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" -[[package]] -name = "siphasher" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" - [[package]] name = "slab" version = "0.4.9" @@ -5765,18 +5816,18 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.15.0" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" dependencies = [ "serde", ] [[package]] name = "socket2" -version = "0.5.9" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f5fd57c80058a56cf5c777ab8a126398ece8e442983605d280a44ce79d0edef" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" dependencies = [ "libc", "windows-sys 0.52.0", @@ -5789,8 +5840,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "18051cdd562e792cad055119e0cdb2cfc137e44e3987532e0f9659a77931bb08" dependencies = [ "bytemuck", - "cfg_aliases", - "core-graphics", + "cfg_aliases 0.2.1", + "core-graphics 0.24.0", "foreign-types 0.5.0", "js-sys", "log", @@ -5832,9 +5883,9 @@ dependencies = [ [[package]] name = "specta" -version = "2.0.0-rc.22" +version = "2.0.0-rc.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab7f01e9310a820edd31c80fde3cae445295adde21a3f9416517d7d65015b971" +checksum = "4ccbb212565d2dc177bc15ecb7b039d66c4490da892436a4eee5b394d620c9bc" dependencies = [ "paste", "specta-macros", @@ -5843,14 +5894,14 @@ dependencies = [ [[package]] name = "specta-macros" -version = "2.0.0-rc.18" +version = "2.0.0-rc.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0074b9e30ed84c6924eb63ad8d2fe71cdc82628525d84b1fcb1f2fd40676517" +checksum = "68999d29816965eb9e5201f60aec02a76512139811661a7e8e653abc810b8f72" dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] @@ -5872,11 +5923,21 @@ dependencies = [ "der", ] +[[package]] +name = "sqlformat" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bba3a93db0cc4f7bdece8bb09e77e2e785c20bfebf79eb8340ed80708048790" +dependencies = [ + "nom", + "unicode_categories", +] + [[package]] name = "sqlx" -version = "0.8.3" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4410e73b3c0d8442c5f99b425d7a435b5ee0ae4167b3196771dd3f7a01be745f" +checksum = "93334716a037193fac19df402f8571269c84a00852f6a7066b5d2616dcd64d3e" dependencies = [ "sqlx-core", "sqlx-macros", @@ -5887,25 +5948,30 @@ dependencies = [ [[package]] name = "sqlx-core" -version = "0.8.3" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a007b6936676aa9ab40207cde35daab0a04b823be8ae004368c0793b96a61e0" +checksum = "d4d8060b456358185f7d50c55d9b5066ad956956fddec42ee2e8567134a8936e" dependencies = [ + "atoi", + "byteorder", "bytes", "crc", "crossbeam-queue", "either", "event-listener", + "futures-channel", "futures-core", "futures-intrusive", "futures-io", "futures-util", - "hashbrown 0.15.2", + "hashbrown 0.14.5", "hashlink", - "indexmap 2.9.0", + "hex", + "indexmap 2.7.0", "log", "memchr", "once_cell", + "paste", "percent-encoding", "rustls", "rustls-pemfile", @@ -5913,7 +5979,8 @@ dependencies = [ "serde_json", "sha2", "smallvec", - "thiserror 2.0.12", + "sqlformat", + "thiserror 1.0.69", "time", "tokio", "tokio-stream", @@ -5924,22 +5991,22 @@ dependencies = [ [[package]] name = "sqlx-macros" -version = "0.8.3" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3112e2ad78643fef903618d78cf0aec1cb3134b019730edb039b69eaf531f310" +checksum = "cac0692bcc9de3b073e8d747391827297e075c7710ff6276d9f7a1f3d58c6657" dependencies = [ "proc-macro2", "quote", "sqlx-core", "sqlx-macros-core", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] name = "sqlx-macros-core" -version = "0.8.3" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e9f90acc5ab146a99bf5061a7eb4976b573f560bc898ef3bf8435448dd5e7ad" +checksum = "1804e8a7c7865599c9c79be146dc8a9fd8cc86935fa641d3ea58e5f0688abaa5" dependencies = [ "dotenvy", "either", @@ -5955,7 +6022,7 @@ dependencies = [ "sqlx-mysql", "sqlx-postgres", "sqlx-sqlite", - "syn 2.0.100", + "syn 2.0.90", "tempfile", "tokio", "url", @@ -5963,13 +6030,13 @@ dependencies = [ [[package]] name = "sqlx-mysql" -version = "0.8.3" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4560278f0e00ce64938540546f59f590d60beee33fffbd3b9cd47851e5fff233" +checksum = "64bb4714269afa44aef2755150a0fc19d756fb580a67db8885608cf02f47d06a" dependencies = [ "atoi", "base64 0.22.1", - "bitflags 2.9.0", + "bitflags 2.7.0", "byteorder", "bytes", "crc", @@ -5984,7 +6051,7 @@ dependencies = [ "hex", "hkdf", "hmac", - "itoa 1.0.15", + "itoa 1.0.14", "log", "md-5", "memchr", @@ -5998,7 +6065,7 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror 2.0.12", + "thiserror 1.0.69", "time", "tracing", "whoami", @@ -6006,25 +6073,26 @@ dependencies = [ [[package]] name = "sqlx-postgres" -version = "0.8.3" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5b98a57f363ed6764d5b3a12bfedf62f07aa16e1856a7ddc2a0bb190a959613" +checksum = "6fa91a732d854c5d7726349bb4bb879bb9478993ceb764247660aee25f67c2f8" dependencies = [ "atoi", "base64 0.22.1", - "bitflags 2.9.0", + "bitflags 2.7.0", "byteorder", "crc", "dotenvy", "etcetera", "futures-channel", "futures-core", + "futures-io", "futures-util", "hex", "hkdf", "hmac", "home", - "itoa 1.0.15", + "itoa 1.0.14", "log", "md-5", "memchr", @@ -6036,7 +6104,7 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror 2.0.12", + "thiserror 1.0.69", "time", "tracing", "whoami", @@ -6044,9 +6112,9 @@ dependencies = [ [[package]] name = "sqlx-sqlite" -version = "0.8.3" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f85ca71d3a5b24e64e1d08dd8fe36c6c95c339a896cc33068148906784620540" +checksum = "d5b2cf34a45953bfd3daaf3db0f7a7878ab9b7a6b91b422d24a7a9e4c857b680" dependencies = [ "atoi", "flume", @@ -6080,25 +6148,26 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "string_cache" -version = "0.8.9" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf776ba3fa74f83bf4b63c3dcbbf82173db2632ed8452cb2d891d33f459de70f" +checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" dependencies = [ "new_debug_unreachable", + "once_cell", "parking_lot", - "phf_shared 0.11.3", + "phf_shared 0.10.0", "precomputed-hash", "serde", ] [[package]] name = "string_cache_codegen" -version = "0.5.4" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c711928715f1fe0fe509c53b43e993a9a557babc2d0a3567d0a3006f1ac931a0" +checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988" dependencies = [ - "phf_generator 0.11.3", - "phf_shared 0.11.3", + "phf_generator 0.10.0", + "phf_shared 0.10.0", "proc-macro2", "quote", ] @@ -6208,9 +6277,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.100" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", @@ -6234,7 +6303,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] @@ -6252,7 +6321,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "core-foundation 0.9.4", "system-configuration-sys", ] @@ -6286,9 +6355,9 @@ version = "0.32.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63c8b1020610b9138dd7b1e06cf259ae91aa05c30f3bd0d6b42a03997b92dec1" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "core-foundation 0.10.0", - "core-graphics", + "core-graphics 0.24.0", "crossbeam-channel", "dispatch", "dlopen2", @@ -6304,7 +6373,7 @@ dependencies = [ "ndk-context", "ndk-sys", "objc2 0.6.0", - "objc2-app-kit", + "objc2-app-kit 0.3.0", "objc2-foundation 0.3.0", "once_cell", "parking_lot", @@ -6327,7 +6396,7 @@ checksum = "f4e16beb8b2ac17db28eab8bca40e62dbfbb34c0fcdc6d9826b11b7b5d047dfd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] @@ -6338,9 +6407,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tar" -version = "0.4.44" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d863878d212c87a19c1a610eb53bb01fe12951c0501cf5a0d65f724914a667a" +checksum = "c65998313f8e17d0d553d28f91a0df93e4dbbbf770279c7bc21ca0f09ea1a1f6" dependencies = [ "filetime", "libc", @@ -6378,7 +6447,7 @@ dependencies = [ "mime", "muda", "objc2 0.6.0", - "objc2-app-kit", + "objc2-app-kit 0.3.0", "objc2-foundation 0.3.0", "percent-encoding", "plist", @@ -6395,7 +6464,7 @@ dependencies = [ "tauri-runtime", "tauri-runtime-wry", "tauri-utils", - "thiserror 2.0.12", + "thiserror 2.0.9", "tokio", "tray-icon", "url", @@ -6449,9 +6518,9 @@ dependencies = [ "serde", "serde_json", "sha2", - "syn 2.0.100", + "syn 2.0.90", "tauri-utils", - "thiserror 2.0.12", + "thiserror 2.0.9", "time", "url", "uuid", @@ -6467,7 +6536,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", "tauri-codegen", "tauri-utils", ] @@ -6498,7 +6567,7 @@ dependencies = [ "serde_json", "tauri", "tauri-plugin", - "thiserror 2.0.12", + "thiserror 2.0.9", ] [[package]] @@ -6510,7 +6579,7 @@ dependencies = [ "serde_json", "tauri", "tauri-plugin", - "thiserror 2.0.12", + "thiserror 2.0.9", ] [[package]] @@ -6523,7 +6592,7 @@ dependencies = [ "serde_repr", "tauri", "tauri-plugin", - "thiserror 2.0.12", + "thiserror 2.0.9", ] [[package]] @@ -6536,7 +6605,7 @@ dependencies = [ "serde_json", "tauri", "tauri-plugin", - "thiserror 2.0.12", + "thiserror 2.0.9", ] [[package]] @@ -6549,7 +6618,7 @@ dependencies = [ "serde_json", "tauri", "tauri-plugin", - "thiserror 2.0.12", + "thiserror 2.0.9", ] [[package]] @@ -6563,11 +6632,11 @@ dependencies = [ "tauri", "tauri-plugin", "tauri-utils", - "thiserror 2.0.12", + "thiserror 2.0.9", "tracing", "url", - "windows-registry 0.5.1", - "windows-result", + "windows-registry 0.5.0", + "windows-result 0.3.1", ] [[package]] @@ -6582,7 +6651,7 @@ dependencies = [ "tauri", "tauri-plugin", "tauri-plugin-fs", - "thiserror 2.0.12", + "thiserror 2.0.9", "url", ] @@ -6603,7 +6672,7 @@ dependencies = [ "tauri", "tauri-plugin", "tauri-utils", - "thiserror 2.0.12", + "thiserror 2.0.9", "toml", "url", "uuid", @@ -6619,7 +6688,7 @@ dependencies = [ "specta", "tauri", "tauri-plugin", - "thiserror 2.0.12", + "thiserror 2.0.9", ] [[package]] @@ -6632,7 +6701,7 @@ dependencies = [ "serde_json", "tauri", "tauri-plugin", - "thiserror 2.0.12", + "thiserror 2.0.9", ] [[package]] @@ -6645,7 +6714,7 @@ dependencies = [ "specta", "tauri", "tauri-plugin", - "thiserror 2.0.12", + "thiserror 2.0.9", ] [[package]] @@ -6664,7 +6733,7 @@ dependencies = [ "tauri", "tauri-plugin", "tauri-plugin-fs", - "thiserror 2.0.12", + "thiserror 2.0.9", "tokio", "tracing", "url", @@ -6680,7 +6749,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "thiserror 2.0.12", + "thiserror 2.0.9", "tiny_http", ] @@ -6700,7 +6769,7 @@ dependencies = [ "swift-rs", "tauri", "tauri-plugin", - "thiserror 2.0.12", + "thiserror 2.0.9", "time", "tracing", ] @@ -6715,7 +6784,7 @@ dependencies = [ "serde_repr", "tauri", "tauri-plugin", - "thiserror 2.0.12", + "thiserror 2.0.9", ] [[package]] @@ -6733,7 +6802,7 @@ dependencies = [ "serde_repr", "tauri", "tauri-plugin", - "thiserror 2.0.12", + "thiserror 2.0.9", "time", "url", "win7-notifications", @@ -6746,7 +6815,7 @@ version = "2.2.6" dependencies = [ "dunce", "glob", - "objc2-app-kit", + "objc2-app-kit 0.3.0", "objc2-foundation 0.3.0", "open", "schemars", @@ -6754,7 +6823,7 @@ dependencies = [ "serde_json", "tauri", "tauri-plugin", - "thiserror 2.0.12", + "thiserror 2.0.9", "url", "windows 0.60.0", "zbus", @@ -6764,7 +6833,7 @@ dependencies = [ name = "tauri-plugin-os" version = "2.2.1" dependencies = [ - "gethostname 1.0.1", + "gethostname 1.0.0", "log", "os_info", "serde", @@ -6773,7 +6842,7 @@ dependencies = [ "sys-locale", "tauri", "tauri-plugin", - "thiserror 2.0.12", + "thiserror 2.0.9", ] [[package]] @@ -6787,7 +6856,7 @@ dependencies = [ "serde_json", "tauri", "tauri-plugin-fs", - "thiserror 2.0.12", + "thiserror 2.0.9", ] [[package]] @@ -6800,7 +6869,7 @@ dependencies = [ "serde_repr", "tauri", "tauri-plugin", - "thiserror 2.0.12", + "thiserror 2.0.9", ] [[package]] @@ -6826,7 +6895,7 @@ dependencies = [ "shared_child", "tauri", "tauri-plugin", - "thiserror 2.0.12", + "thiserror 2.0.9", "tokio", ] @@ -6839,7 +6908,7 @@ dependencies = [ "serde_json", "tauri", "tauri-plugin-deep-link", - "thiserror 2.0.12", + "thiserror 2.0.9", "tracing", "windows-sys 0.59.0", "zbus", @@ -6850,14 +6919,14 @@ name = "tauri-plugin-sql" version = "2.2.0" dependencies = [ "futures-core", - "indexmap 2.9.0", + "indexmap 2.7.0", "log", "serde", "serde_json", "sqlx", "tauri", "tauri-plugin", - "thiserror 2.0.12", + "thiserror 2.0.9", "time", "tokio", ] @@ -6871,7 +6940,7 @@ dependencies = [ "serde_json", "tauri", "tauri-plugin", - "thiserror 2.0.12", + "thiserror 2.0.9", "tokio", "tracing", ] @@ -6893,7 +6962,7 @@ dependencies = [ "serde_json", "tauri", "tauri-plugin", - "thiserror 2.0.12", + "thiserror 2.0.9", "zeroize", ] @@ -6919,7 +6988,7 @@ dependencies = [ "tauri", "tauri-plugin", "tempfile", - "thiserror 2.0.12", + "thiserror 2.0.9", "time", "tokio", "url", @@ -6940,7 +7009,7 @@ dependencies = [ "serde_json", "tauri", "tauri-plugin", - "thiserror 2.0.12", + "thiserror 2.0.9", "tokio", "tokio-util", ] @@ -6957,7 +7026,7 @@ dependencies = [ "serde_json", "tauri", "tauri-plugin", - "thiserror 2.0.12", + "thiserror 2.0.9", "tokio", "tokio-tungstenite", ] @@ -6966,13 +7035,13 @@ dependencies = [ name = "tauri-plugin-window-state" version = "2.2.2" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "log", "serde", "serde_json", "tauri", "tauri-plugin", - "thiserror 2.0.12", + "thiserror 2.0.9", ] [[package]] @@ -6990,7 +7059,7 @@ dependencies = [ "serde", "serde_json", "tauri-utils", - "thiserror 2.0.12", + "thiserror 2.0.9", "url", "windows 0.60.0", ] @@ -7006,7 +7075,7 @@ dependencies = [ "jni", "log", "objc2 0.6.0", - "objc2-app-kit", + "objc2-app-kit 0.3.0", "objc2-foundation 0.3.0", "once_cell", "percent-encoding", @@ -7043,7 +7112,7 @@ dependencies = [ "kuchikiki", "log", "memchr", - "phf 0.11.3", + "phf 0.11.2", "proc-macro2", "quote", "regex", @@ -7055,7 +7124,7 @@ dependencies = [ "serde_with", "serialize-to-javascript", "swift-rs", - "thiserror 2.0.12", + "thiserror 2.0.9", "toml", "url", "urlpattern", @@ -7075,26 +7144,25 @@ dependencies = [ [[package]] name = "tauri-winrt-notification" -version = "0.7.2" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b1e66e07de489fe43a46678dd0b8df65e0c973909df1b60ba33874e297ba9b9" +checksum = "f89f5fb70d6f62381f5d9b2ba9008196150b40b75f3068eb24faeddf1c686871" dependencies = [ - "quick-xml 0.37.4", - "thiserror 2.0.12", - "windows 0.61.1", + "quick-xml 0.31.0", + "windows 0.56.0", "windows-version", ] [[package]] name = "tempfile" -version = "3.19.1" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" dependencies = [ + "cfg-if", "fastrand", - "getrandom 0.3.2", "once_cell", - "rustix 1.0.5", + "rustix", "windows-sys 0.59.0", ] @@ -7135,11 +7203,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.12" +version = "2.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +checksum = "f072643fd0190df67a8bab670c20ef5d8737177d6ac6b2e9a236cb096206b2cc" dependencies = [ - "thiserror-impl 2.0.12", + "thiserror-impl 2.0.9", ] [[package]] @@ -7150,18 +7218,18 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] name = "thiserror-impl" -version = "2.0.12" +version = "2.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +checksum = "7b50fa271071aae2e6ee85f842e2e28ba8cd2c5fb67f11fcb1fd70b276f9e7d4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] @@ -7177,12 +7245,12 @@ dependencies = [ [[package]] name = "time" -version = "0.3.41" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", - "itoa 1.0.15", + "itoa 1.0.14", "libc", "num-conv", "num_threads", @@ -7194,15 +7262,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.4" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.22" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ "num-conv", "time-core", @@ -7241,9 +7309,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.9.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -7256,9 +7324,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.44.2" +version = "1.43.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48" +checksum = "492a604e2fd7f814268a378409e6c92b5525d747d10db9a229723f55a417958c" dependencies = [ "backtrace", "bytes", @@ -7281,7 +7349,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] @@ -7296,11 +7364,12 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.26.2" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ "rustls", + "rustls-pki-types", "tokio", ] @@ -7318,9 +7387,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.17" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" +checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" dependencies = [ "futures-core", "pin-project-lite", @@ -7329,9 +7398,9 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.26.2" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a9daff607c6d2bf6c16fd681ccb7eecc83e4e2cdc1ca067ffaadfca5de7f084" +checksum = "be4bf6fecd69fcdede0ec680aaf474cdab988f9de6bc73d3758f0160e3b7025a" dependencies = [ "futures-util", "log", @@ -7348,9 +7417,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.14" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b9590b93e6fcc1739458317cccd391ad3955e2bde8913edf6f95f9e65a8f034" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", @@ -7361,14 +7430,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.20" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.24", + "toml_edit 0.22.22", ] [[package]] @@ -7386,7 +7455,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.9.0", + "indexmap 2.7.0", "toml_datetime", "winnow 0.5.40", ] @@ -7397,45 +7466,24 @@ version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" dependencies = [ - "indexmap 2.9.0", + "indexmap 2.7.0", "toml_datetime", "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.22.24" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ - "indexmap 2.9.0", + "indexmap 2.7.0", "serde", "serde_spanned", "toml_datetime", - "winnow 0.7.6", -] - -[[package]] -name = "tower" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" -dependencies = [ - "futures-core", - "futures-util", - "pin-project-lite", - "sync_wrapper", - "tokio", - "tower-layer", - "tower-service", + "winnow 0.6.20", ] -[[package]] -name = "tower-layer" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" - [[package]] name = "tower-service" version = "0.3.3" @@ -7462,7 +7510,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] @@ -7485,14 +7533,14 @@ dependencies = [ "libappindicator", "muda", "objc2 0.6.0", - "objc2-app-kit", + "objc2-app-kit 0.3.0", "objc2-core-foundation", "objc2-core-graphics", "objc2-foundation 0.3.0", "once_cell", "png", "serde", - "thiserror 2.0.12", + "thiserror 2.0.9", "windows-sys 0.59.0", ] @@ -7523,35 +7571,36 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tungstenite" -version = "0.26.2" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4793cb5e56680ecbb1d843515b23b6de9a75eb04b66643e256a396d43be33c13" +checksum = "413083a99c579593656008130e29255e54dcaae495be556cc26888f211648c24" dependencies = [ + "byteorder", "bytes", "data-encoding", "http", "httparse", "log", "native-tls", - "rand 0.9.0", + "rand 0.8.5", "rustls", "rustls-pki-types", "sha1", - "thiserror 2.0.12", + "thiserror 2.0.9", "utf-8", ] [[package]] name = "typeid" -version = "1.0.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" +checksum = "0e13db2e0ccd5e14a544e8a246ba2312cd25223f616442d7f2cb0e3db614236e" [[package]] name = "typenum" -version = "1.18.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "uds_windows" @@ -7607,21 +7656,21 @@ dependencies = [ [[package]] name = "unicase" -version = "2.8.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" +checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" [[package]] name = "unicode-bidi" -version = "0.3.18" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-ident" -version = "1.0.18" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-normalization" @@ -7644,6 +7693,12 @@ version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" +[[package]] +name = "unicode_categories" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" + [[package]] name = "universal-hash" version = "0.5.1" @@ -7675,9 +7730,9 @@ dependencies = [ [[package]] name = "ureq" -version = "2.12.1" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d1a66277ed75f640d608235660df48c8e3c19f3b4edb6a263315626cc3c01d" +checksum = "b74fc6b57825be3373f7054754755f03ac3a8f5d70015ccad699ba2029956f4a" dependencies = [ "base64 0.22.1", "log", @@ -7741,19 +7796,19 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.16.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458f7a779bf54acc9f347480ac654f68407d3aab21269a6e3c9f922acd9e2da9" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ - "getrandom 0.3.2", + "getrandom 0.2.15", "serde", ] [[package]] name = "value-bag" -version = "1.11.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "943ce29a8a743eb10d6082545d861b24f9d1b160b7d741e0f2cdf726bec909c5" +checksum = "3ef4c4aa54d5d05a279399bfa921ec387b7aba77caf7a682ae8d86785b8fdad2" [[package]] name = "vcpkg" @@ -7785,9 +7840,9 @@ dependencies = [ [[package]] name = "vswhom-sys" -version = "0.1.3" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb067e4cbd1ff067d1df46c9194b5de0e98efd2810bbc95c5d5e5f25a3231150" +checksum = "d3b17ae1f6c8a2b28506cd96d412eebf83b4a0ff2cbefeeb952f2f9dfa44ba18" dependencies = [ "cc", "libc", @@ -7795,9 +7850,9 @@ dependencies = [ [[package]] name = "wait-timeout" -version = "0.2.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ac3b126d3914f9849036f826e054cbabdc8519970b8998ddaf3b5bd3c65f11" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" dependencies = [ "libc", ] @@ -7833,15 +7888,6 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" -[[package]] -name = "wasi" -version = "0.14.2+wasi-0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" -dependencies = [ - "wit-bindgen-rt", -] - [[package]] name = "wasite" version = "0.1.0" @@ -7850,35 +7896,35 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" [[package]] name = "wasm-bindgen" -version = "0.2.100" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" +checksum = "d15e63b4482863c109d70a7b8706c1e364eb6ea449b201a76c5b89cedcec2d5c" dependencies = [ "cfg-if", "once_cell", - "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.100" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" +checksum = "8d36ef12e3aaca16ddd3f67922bc63e48e953f126de60bd33ccc0101ef9998cd" dependencies = [ "bumpalo", "log", + "once_cell", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.50" +version = "0.4.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" +checksum = "9dfaf8f50e5f293737ee323940c7d8b08a66a95a419223d9f41610ca08b0833d" dependencies = [ "cfg-if", "js-sys", @@ -7889,9 +7935,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.100" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" +checksum = "705440e08b42d3e4b36de7d66c944be628d579796b8090bfa3471478a2260051" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -7899,25 +7945,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.100" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" +checksum = "98c9ae5a76e46f4deecd0f0255cc223cfa18dc9b261213b8aa0c7b36f61b3f1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.100" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" -dependencies = [ - "unicode-ident", -] +checksum = "6ee99da9c5ba11bd675621338ef6fa52296b76b83305e9b6e5c77d4c286d6d49" [[package]] name = "wasm-streams" @@ -7934,36 +7977,49 @@ dependencies = [ [[package]] name = "wayland-backend" -version = "0.3.8" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7208998eaa3870dad37ec8836979581506e0c5c64c20c9e79e9d2a10d6f47bf" +checksum = "056535ced7a150d45159d3a8dc30f91a2e2d588ca0b23f70e56033622b8016f6" dependencies = [ "cc", "downcast-rs", - "rustix 0.38.44", + "rustix", + "scoped-tls", "smallvec", "wayland-sys", ] [[package]] name = "wayland-client" -version = "0.31.8" +version = "0.31.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b66249d3fc69f76fd74c82cc319300faa554e9d865dab1f7cd66cc20db10b280" +dependencies = [ + "bitflags 2.7.0", + "rustix", + "wayland-backend", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols" +version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2120de3d33638aaef5b9f4472bff75f07c56379cf76ea320bd3a3d65ecaf73f" +checksum = "8f81f365b8b4a97f422ac0e8737c438024b5951734506b0e1d775c73030561f4" dependencies = [ - "bitflags 2.9.0", - "rustix 0.38.44", + "bitflags 2.7.0", "wayland-backend", + "wayland-client", "wayland-scanner", ] [[package]] name = "wayland-protocols" -version = "0.32.6" +version = "0.32.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0781cf46869b37e36928f7b432273c0995aa8aed9552c556fb18754420541efc" +checksum = "7cd0ade57c4e6e9a8952741325c30bf82f4246885dca8bf561898b86d0c1f58e" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "wayland-backend", "wayland-client", "wayland-scanner", @@ -7971,42 +8027,44 @@ dependencies = [ [[package]] name = "wayland-protocols-wlr" -version = "0.3.6" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248a02e6f595aad796561fa82d25601bd2c8c3b145b1c7453fc8f94c1a58f8b2" +checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.7.0", "wayland-backend", "wayland-client", - "wayland-protocols", + "wayland-protocols 0.31.2", "wayland-scanner", ] [[package]] name = "wayland-scanner" -version = "0.31.6" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "896fdafd5d28145fce7958917d69f2fd44469b1d4e861cb5961bcbeebc6d1484" +checksum = "597f2001b2e5fc1121e3d5b9791d3e78f05ba6bfa4641053846248e3a13661c3" dependencies = [ "proc-macro2", - "quick-xml 0.37.4", + "quick-xml 0.36.2", "quote", ] [[package]] name = "wayland-sys" -version = "0.31.6" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbcebb399c77d5aa9fa5db874806ee7b4eba4e73650948e8f93963f128896615" +checksum = "efa8ac0d8e8ed3e3b5c9fc92c7881406a268e11555abe36493efabe649a29e09" dependencies = [ + "dlib", + "log", "pkg-config", ] [[package]] name = "web-sys" -version = "0.3.77" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" +checksum = "a98bc3c33f0fe7e59ad7cd041b89034fa82a7c2d4365ca538dda6cdaf513863c" dependencies = [ "js-sys", "wasm-bindgen", @@ -8068,9 +8126,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.26.8" +version = "0.26.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2210b291f7ea53617fbafcc4939f10914214ec15aace5ba62293a668f322c5c9" +checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e" dependencies = [ "rustls-pki-types", ] @@ -8100,7 +8158,7 @@ dependencies = [ "windows 0.60.0", "windows-core 0.60.1", "windows-implement 0.59.0", - "windows-interface", + "windows-interface 0.59.0", ] [[package]] @@ -8111,7 +8169,7 @@ checksum = "1d228f15bba3b9d56dde8bddbee66fa24545bd17b48d5128ccf4a8742b18e431" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] @@ -8120,7 +8178,7 @@ version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfb27fccd3c27f68e9a6af1bcf48c2d82534b8675b83608a4d81446d095a17ac" dependencies = [ - "thiserror 2.0.12", + "thiserror 2.0.9", "windows 0.60.0", "windows-core 0.60.1", ] @@ -8133,9 +8191,9 @@ checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" [[package]] name = "whoami" -version = "1.6.0" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6994d13118ab492c3c80c1f81928718159254c53c472bf9ce36f8dae4add02a7" +checksum = "372d5b87f58ec45c384ba03563b03544dc5fadc3983e434b286913f5b4a9bb6d" dependencies = [ "redox_syscall", "wasite", @@ -8189,7 +8247,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9bec5a31f3f9362f2258fd0e9c9dd61a9ca432e7306cc78c444258f0dce9a9c" dependencies = [ "objc2 0.6.0", - "objc2-app-kit", + "objc2-app-kit 0.3.0", "objc2-core-foundation", "objc2-foundation 0.3.0", "raw-window-handle", @@ -8212,28 +8270,25 @@ dependencies = [ [[package]] name = "windows" -version = "0.60.0" +version = "0.56.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddf874e74c7a99773e62b1c671427abf01a425e77c3d3fb9fb1e4883ea934529" +checksum = "1de69df01bdf1ead2f4ac895dc77c9351aefff65b2f3db429a343f9cbf05e132" dependencies = [ - "windows-collections 0.1.1", - "windows-core 0.60.1", - "windows-future 0.1.1", - "windows-link", - "windows-numerics 0.1.1", + "windows-core 0.56.0", + "windows-targets 0.52.6", ] [[package]] name = "windows" -version = "0.61.1" +version = "0.60.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5ee8f3d025738cb02bad7868bbb5f8a6327501e870bf51f1b455b0a2454a419" +checksum = "ddf874e74c7a99773e62b1c671427abf01a425e77c3d3fb9fb1e4883ea934529" dependencies = [ - "windows-collections 0.2.0", - "windows-core 0.61.0", - "windows-future 0.2.0", + "windows-collections", + "windows-core 0.60.1", + "windows-future", "windows-link", - "windows-numerics 0.2.0", + "windows-numerics", ] [[package]] @@ -8246,38 +8301,37 @@ dependencies = [ ] [[package]] -name = "windows-collections" -version = "0.2.0" +name = "windows-core" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-core 0.61.0", + "windows-targets 0.52.6", ] [[package]] name = "windows-core" -version = "0.60.1" +version = "0.56.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca21a92a9cae9bf4ccae5cf8368dce0837100ddf6e6d57936749e85f152f6247" +checksum = "4698e52ed2d08f8658ab0c39512a7c00ee5fe2688c65f8c0a4f06750d729f2a6" dependencies = [ - "windows-implement 0.59.0", - "windows-interface", - "windows-link", - "windows-result", - "windows-strings 0.3.1", + "windows-implement 0.56.0", + "windows-interface 0.56.0", + "windows-result 0.1.2", + "windows-targets 0.52.6", ] [[package]] name = "windows-core" -version = "0.61.0" +version = "0.60.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980" +checksum = "ca21a92a9cae9bf4ccae5cf8368dce0837100ddf6e6d57936749e85f152f6247" dependencies = [ - "windows-implement 0.60.0", - "windows-interface", + "windows-implement 0.59.0", + "windows-interface 0.59.0", "windows-link", - "windows-result", - "windows-strings 0.4.0", + "windows-result 0.3.1", + "windows-strings 0.3.1", ] [[package]] @@ -8291,13 +8345,14 @@ dependencies = [ ] [[package]] -name = "windows-future" -version = "0.2.0" +name = "windows-implement" +version = "0.56.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a1d6bbefcb7b60acd19828e1bc965da6fcf18a7e39490c5f8be71e54a19ba32" +checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" dependencies = [ - "windows-core 0.61.0", - "windows-link", + "proc-macro2", + "quote", + "syn 2.0.90", ] [[package]] @@ -8308,36 +8363,36 @@ checksum = "83577b051e2f49a058c308f17f273b570a6a758386fc291b5f6a934dd84e48c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] -name = "windows-implement" -version = "0.60.0" +name = "windows-interface" +version = "0.56.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" +checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] name = "windows-interface" -version = "0.59.1" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" +checksum = "cb26fd936d991781ea39e87c3a27285081e3c0da5ca0fcbc02d368cc6f52ff01" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] name = "windows-link" -version = "0.1.1" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" +checksum = "6dccfd733ce2b1753b03b6d3c65edf020262ea35e20ccdf3e288043e6dd620e3" [[package]] name = "windows-numerics" @@ -8350,60 +8405,69 @@ dependencies = [ ] [[package]] -name = "windows-numerics" +name = "windows-registry" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" dependencies = [ - "windows-core 0.61.0", - "windows-link", + "windows-result 0.2.0", + "windows-strings 0.1.0", + "windows-targets 0.52.6", ] [[package]] name = "windows-registry" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3" +checksum = "6c44a98275e31bfd112bb06ba96c8ab13c03383a3753fdddd715406a1824c7e0" dependencies = [ - "windows-result", + "windows-link", + "windows-result 0.3.1", "windows-strings 0.3.1", - "windows-targets 0.53.0", ] [[package]] -name = "windows-registry" -version = "0.5.1" +name = "windows-result" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1da3e436dc7653dfdf3da67332e22bff09bb0e28b0239e1624499c7830842e" +checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" dependencies = [ - "windows-link", - "windows-result", - "windows-strings 0.4.0", + "windows-targets 0.52.6", ] [[package]] name = "windows-result" -version = "0.3.2" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" dependencies = [ - "windows-link", + "windows-targets 0.52.6", ] [[package]] -name = "windows-strings" +name = "windows-result" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319" +checksum = "06374efe858fab7e4f881500e6e86ec8bc28f9462c47e5a9941a0142ad86b189" dependencies = [ "windows-link", ] [[package]] name = "windows-strings" -version = "0.4.0" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result 0.2.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97" +checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319" dependencies = [ "windows-link", ] @@ -8483,36 +8547,20 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm 0.52.6", + "windows_i686_gnullvm", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] -[[package]] -name = "windows-targets" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b" -dependencies = [ - "windows_aarch64_gnullvm 0.53.0", - "windows_aarch64_msvc 0.53.0", - "windows_i686_gnu 0.53.0", - "windows_i686_gnullvm 0.53.0", - "windows_i686_msvc 0.53.0", - "windows_x86_64_gnu 0.53.0", - "windows_x86_64_gnullvm 0.53.0", - "windows_x86_64_msvc 0.53.0", -] - [[package]] name = "windows-version" -version = "0.1.4" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e04a5c6627e310a23ad2358483286c7df260c964eb2d003d8efd6d0f4e79265c" +checksum = "6998aa457c9ba8ff2fb9f13e9d2a930dabcea28f1d0ab94d687d8b3654844515" dependencies = [ - "windows-link", + "windows-targets 0.52.6", ] [[package]] @@ -8533,12 +8581,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" - [[package]] name = "windows_aarch64_msvc" version = "0.36.1" @@ -8563,12 +8605,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" - [[package]] name = "windows_i686_gnu" version = "0.36.1" @@ -8593,24 +8629,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" -[[package]] -name = "windows_i686_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" - [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" - [[package]] name = "windows_i686_msvc" version = "0.36.1" @@ -8635,12 +8659,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_i686_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" - [[package]] name = "windows_x86_64_gnu" version = "0.36.1" @@ -8665,12 +8683,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" - [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -8689,12 +8701,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" - [[package]] name = "windows_x86_64_msvc" version = "0.36.1" @@ -8719,12 +8725,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "windows_x86_64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" - [[package]] name = "winnow" version = "0.5.40" @@ -8736,9 +8736,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.7.6" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63d3fcd9bba44b03821e7d699eeee959f3126dcc4aa8e4ae18ec617c2a5cea10" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] @@ -8762,31 +8762,23 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "wit-bindgen-rt" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" -dependencies = [ - "bitflags 2.9.0", -] - [[package]] name = "wl-clipboard-rs" -version = "0.9.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5ff8d0e60065f549fafd9d6cb626203ea64a798186c80d8e7df4f8af56baeb" +checksum = "12b41773911497b18ca8553c3daaf8ec9fe9819caf93d451d3055f69de028adb" dependencies = [ + "derive-new", "libc", "log", + "nix 0.28.0", "os_pipe", - "rustix 0.38.44", "tempfile", - "thiserror 2.0.12", + "thiserror 1.0.69", "tree_magic_mini", "wayland-backend", "wayland-client", - "wayland-protocols", + "wayland-protocols 0.31.2", "wayland-protocols-wlr", ] @@ -8824,7 +8816,7 @@ dependencies = [ "libc", "ndk", "objc2 0.6.0", - "objc2-app-kit", + "objc2-app-kit 0.3.0", "objc2-core-foundation", "objc2-foundation 0.3.0", "objc2-ui-kit", @@ -8835,7 +8827,7 @@ dependencies = [ "sha2", "soup3", "tao-macros", - "thiserror 2.0.12", + "thiserror 2.0.9", "url", "webkit2gtk", "webkit2gtk-sys", @@ -8883,7 +8875,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d91ffca73ee7f68ce055750bf9f6eca0780b8c85eff9bc046a3b0da41755e12" dependencies = [ "gethostname 0.4.3", - "rustix 0.38.44", + "rustix", "x11rb-protocol", ] @@ -8906,12 +8898,13 @@ dependencies = [ [[package]] name = "xattr" -version = "1.5.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d65cbf2f12c15564212d48f4e3dfb87923d25d611f2aed18f4cb23f0413d89e" +checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" dependencies = [ "libc", - "rustix 1.0.5", + "linux-raw-sys", + "rustix", ] [[package]] @@ -8944,15 +8937,15 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", "synstructure", ] [[package]] name = "zbus" -version = "5.5.0" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59c333f648ea1b647bc95dc1d34807c8e25ed7a6feff3394034dc4776054b236" +checksum = "192a0d989036cd60a1e91a54c9851fb9ad5bd96125d41803eed79d2e2ef74bd7" dependencies = [ "async-broadcast", "async-executor", @@ -8967,7 +8960,7 @@ dependencies = [ "enumflags2", "event-listener", "futures-core", - "futures-lite", + "futures-util", "hex", "nix 0.29.0", "ordered-stream", @@ -8978,7 +8971,7 @@ dependencies = [ "tracing", "uds_windows", "windows-sys 0.59.0", - "winnow 0.7.6", + "winnow 0.6.20", "xdg-home", "zbus_macros", "zbus_names", @@ -8987,14 +8980,14 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "5.5.0" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f325ad10eb0d0a3eb060203494c3b7ec3162a01a59db75d2deee100339709fc0" +checksum = "3685b5c81fce630efc3e143a4ded235b107f1b1cdf186c3f115529e5e5ae4265" dependencies = [ - "proc-macro-crate 3.3.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", "zbus_names", "zvariant", "zvariant_utils", @@ -9002,13 +8995,13 @@ dependencies = [ [[package]] name = "zbus_names" -version = "4.2.0" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7be68e64bf6ce8db94f63e72f0c7eb9a60d733f7e0499e628dfab0f84d6bcb97" +checksum = "519629a3f80976d89c575895b05677cbc45eaf9f70d62a364d819ba646409cc8" dependencies = [ "serde", "static_assertions", - "winnow 0.7.6", + "winnow 0.6.20", "zvariant", ] @@ -9018,16 +9011,8 @@ version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ - "zerocopy-derive 0.7.35", -] - -[[package]] -name = "zerocopy" -version = "0.8.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2586fea28e186957ef732a5f8b3be2da217d65c5969d4b1e17f973ebbe876879" -dependencies = [ - "zerocopy-derive 0.8.24", + "byteorder", + "zerocopy-derive", ] [[package]] @@ -9038,38 +9023,27 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", -] - -[[package]] -name = "zerocopy-derive" -version = "0.8.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a996a8f63c5c4448cd959ac1bab0aaa3306ccfd060472f85943ee0750f0169be" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] name = "zerofrom" -version = "0.1.6" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.6" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", "synstructure", ] @@ -9091,7 +9065,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] @@ -9113,21 +9087,23 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", ] [[package]] name = "zip" -version = "2.6.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dcb24d0152526ae49b9b96c1dcf71850ca1e0b882e4e28ed898a93c41334744" +checksum = "84e9a772a54b54236b9b744aaaf8d7be01b4d6e99725523cb82cb32d1c81b1d7" dependencies = [ "arbitrary", "crc32fast", "crossbeam-utils", + "displaydoc", "flate2", - "indexmap 2.9.0", + "indexmap 2.7.0", "memchr", + "thiserror 2.0.9", "zopfli", ] @@ -9175,43 +9151,43 @@ dependencies = [ [[package]] name = "zvariant" -version = "5.4.0" +version = "5.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2df9ee044893fcffbdc25de30546edef3e32341466811ca18421e3cd6c5a3ac" +checksum = "55e6b9b5f1361de2d5e7d9fd1ee5f6f7fcb6060618a1f82f3472f58f2b8d4be9" dependencies = [ "endi", "enumflags2", "serde", "static_assertions", "url", - "winnow 0.7.6", + "winnow 0.6.20", "zvariant_derive", "zvariant_utils", ] [[package]] name = "zvariant_derive" -version = "5.4.0" +version = "5.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74170caa85b8b84cc4935f2d56a57c7a15ea6185ccdd7eadb57e6edd90f94b2f" +checksum = "573a8dd76961957108b10f7a45bac6ab1ea3e9b7fe01aff88325dc57bb8f5c8b" dependencies = [ - "proc-macro-crate 3.3.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.90", "zvariant_utils", ] [[package]] name = "zvariant_utils" -version = "3.2.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16edfee43e5d7b553b77872d99bc36afdda75c223ca7ad5e3fbecd82ca5fc34" +checksum = "ddd46446ea2a1f353bfda53e35f17633afa79f4fe290a611c94645c69fe96a50" dependencies = [ "proc-macro2", "quote", "serde", "static_assertions", - "syn 2.0.100", - "winnow 0.7.6", + "syn 2.0.90", + "winnow 0.6.20", ] From b80a295e12ecfa5d7eeee359e74624028de821ae Mon Sep 17 00:00:00 2001 From: Krzysztof Andrelczyk Date: Sat, 12 Apr 2025 14:42:04 +0200 Subject: [PATCH 17/25] move __TAURI_BUNDLE_TYPE to tauri::utils --- plugins/updater/src/lib.rs | 6 ------ plugins/updater/src/updater.rs | 6 ++++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/plugins/updater/src/lib.rs b/plugins/updater/src/lib.rs index 7c4da675..fb059e43 100644 --- a/plugins/updater/src/lib.rs +++ b/plugins/updater/src/lib.rs @@ -29,12 +29,6 @@ pub use config::Config; pub use error::{Error, Result}; pub use updater::*; -/// Variable holding the type of bundle the executable is stored in. This is modified by binary -/// patching during build -#[unsafe(no_mangle)] -#[link_section = ".data.ta"] -pub static __TAURI_BUNDLE_TYPE: &str = "UNK_BUNDLE"; - /// Extensions to [`tauri::App`], [`tauri::AppHandle`], [`tauri::WebviewWindow`], [`tauri::Webview`] and [`tauri::Window`] to access the updater APIs. pub trait UpdaterExt { /// Gets the updater builder to build and updater diff --git a/plugins/updater/src/updater.rs b/plugins/updater/src/updater.rs index bfac9477..a4a0b8bf 100644 --- a/plugins/updater/src/updater.rs +++ b/plugins/updater/src/updater.rs @@ -26,13 +26,15 @@ use reqwest::{ }; use semver::Version; use serde::{de::Error as DeError, Deserialize, Deserializer, Serialize}; -use tauri::{utils::platform::current_exe, AppHandle, Resource, Runtime}; +use tauri::{ + utils::platform::current_exe, utils::__TAURI_BUNDLE_TYPE, AppHandle, Resource, Runtime, +}; use time::OffsetDateTime; use url::Url; use crate::{ error::{Error, Result}, - Config, __TAURI_BUNDLE_TYPE, + Config, }; const UPDATER_USER_AGENT: &str = concat!(env!("CARGO_PKG_NAME"), "/", env!("CARGO_PKG_VERSION"),); From f75d32be69fcd6ac87644c691d1b1f6cbc5bacb2 Mon Sep 17 00:00:00 2001 From: Krzysztof Andrelczyk Date: Tue, 15 Apr 2025 00:22:07 +0200 Subject: [PATCH 18/25] get_current_bundle_type --- plugins/updater/src/updater.rs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/plugins/updater/src/updater.rs b/plugins/updater/src/updater.rs index a4a0b8bf..2e871e00 100644 --- a/plugins/updater/src/updater.rs +++ b/plugins/updater/src/updater.rs @@ -27,7 +27,11 @@ use reqwest::{ use semver::Version; use serde::{de::Error as DeError, Deserialize, Deserializer, Serialize}; use tauri::{ - utils::platform::current_exe, utils::__TAURI_BUNDLE_TYPE, AppHandle, Resource, Runtime, + utils::{ + config::{get_current_bundle_type, PackageType}, + platform::current_exe, + }, + AppHandle, Resource, Runtime, }; use time::OffsetDateTime; use url::Url; @@ -384,12 +388,12 @@ pub struct Updater { impl Updater { fn get_updater_installer(&self) -> Result> { - match __TAURI_BUNDLE_TYPE { - "DEB_BUNDLE" => Ok(Some(Installer::Deb)), - "RPM_BUNDLE" => Ok(Some(Installer::Rpm)), - "APP_BUNDLE" => Ok(Some(Installer::AppImage)), - "MSI_BUNDLE" => Ok(Some(Installer::Msi)), - "NSS_BUNDLE" => Ok(Some(Installer::Nsis)), + match get_current_bundle_type() { + PackageType::Deb => Ok(Some(Installer::Deb)), + PackageType::Rpm => Ok(Some(Installer::Rpm)), + PackageType::AppImage => Ok(Some(Installer::AppImage)), + PackageType::Msi => Ok(Some(Installer::Msi)), + PackageType::Nsis => Ok(Some(Installer::Nsis)), _ => Err(Error::UnknownInstaller), } } From 940ed70420c471ab99085404b5c1173245789b25 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Mon, 7 Jul 2025 12:37:06 -0300 Subject: [PATCH 19/25] update tauri --- Cargo.lock | 153 +++++++++++++++++++++++++-------- Cargo.toml | 3 + plugins/updater/src/error.rs | 3 - plugins/updater/src/updater.rs | 33 ++++--- 4 files changed, 136 insertions(+), 56 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 299c3c4e..c76e8ff7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -213,7 +213,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "tauri-plugin-barcode-scanner", "tauri-plugin-biometric", "tauri-plugin-cli", @@ -245,7 +245,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "tauri-plugin-updater", "time", "tiny_http", @@ -258,7 +258,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "tauri-plugin-updater", "tiny_http", ] @@ -270,7 +270,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "tauri-plugin-store", ] @@ -1428,7 +1428,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "tauri-plugin-deep-link", "tauri-plugin-log", "tauri-plugin-single-instance", @@ -3615,9 +3615,9 @@ dependencies = [ [[package]] name = "muda" -version = "0.16.1" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4de14a9b5d569ca68d7c891d613b390cf5ab4f851c77aaa2f9e435555d3d9492" +checksum = "58b89bf91c19bf036347f1ab85a81c560f08c0667c8601bece664d860a600988" dependencies = [ "crossbeam-channel", "dpi", @@ -5729,7 +5729,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "tauri-plugin-cli", "tauri-plugin-single-instance", ] @@ -6348,16 +6348,15 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tauri" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f7a0f4019c80391d143ee26cd7cd1ed271ac241d3087d333f99f3269ba90812" +version = "2.6.2" +source = "git+https://github.com/tauri-apps/tauri?rev=232265c70e1c213bbb3f84b5541ddc07d330fce1#232265c70e1c213bbb3f84b5541ddc07d330fce1" dependencies = [ "anyhow", "bytes", "dirs 6.0.0", "dunce", "embed_plist", - "getrandom 0.2.15", + "getrandom 0.3.2", "glob", "gtk", "heck 0.5.0", @@ -6383,11 +6382,11 @@ dependencies = [ "serialize-to-javascript", "specta", "swift-rs", - "tauri-build", + "tauri-build 2.3.0 (git+https://github.com/tauri-apps/tauri?rev=232265c70e1c213bbb3f84b5541ddc07d330fce1)", "tauri-macros", "tauri-runtime", "tauri-runtime-wry", - "tauri-utils", + "tauri-utils 2.5.0 (git+https://github.com/tauri-apps/tauri?rev=232265c70e1c213bbb3f84b5541ddc07d330fce1)", "thiserror 2.0.12", "tokio", "tray-icon", @@ -6417,8 +6416,29 @@ dependencies = [ "semver", "serde", "serde_json", - "tauri-codegen", - "tauri-utils", + "tauri-codegen 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tauri-utils 2.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tauri-winres", + "toml", + "walkdir", +] + +[[package]] +name = "tauri-build" +version = "2.3.0" +source = "git+https://github.com/tauri-apps/tauri?rev=232265c70e1c213bbb3f84b5541ddc07d330fce1#232265c70e1c213bbb3f84b5541ddc07d330fce1" +dependencies = [ + "anyhow", + "cargo_toml", + "dirs 6.0.0", + "glob", + "heck 0.5.0", + "json-patch", + "schemars", + "semver", + "serde", + "serde_json", + "tauri-utils 2.5.0 (git+https://github.com/tauri-apps/tauri?rev=232265c70e1c213bbb3f84b5541ddc07d330fce1)", "tauri-winres", "toml", "walkdir", @@ -6442,7 +6462,7 @@ dependencies = [ "serde_json", "sha2", "syn 2.0.100", - "tauri-utils", + "tauri-utils 2.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "thiserror 2.0.12", "time", "url", @@ -6451,17 +6471,41 @@ dependencies = [ ] [[package]] -name = "tauri-macros" +name = "tauri-codegen" version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f59e1d1fa9651212dcb890a0c66226d819b716490b0cf43c078514da3591705" +source = "git+https://github.com/tauri-apps/tauri?rev=232265c70e1c213bbb3f84b5541ddc07d330fce1#232265c70e1c213bbb3f84b5541ddc07d330fce1" +dependencies = [ + "base64 0.22.1", + "ico", + "json-patch", + "plist", + "png", + "proc-macro2", + "quote", + "semver", + "serde", + "serde_json", + "sha2", + "syn 2.0.100", + "tauri-utils 2.5.0 (git+https://github.com/tauri-apps/tauri?rev=232265c70e1c213bbb3f84b5541ddc07d330fce1)", + "thiserror 2.0.12", + "time", + "url", + "uuid", + "walkdir", +] + +[[package]] +name = "tauri-macros" +version = "2.3.1" +source = "git+https://github.com/tauri-apps/tauri?rev=232265c70e1c213bbb3f84b5541ddc07d330fce1#232265c70e1c213bbb3f84b5541ddc07d330fce1" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", "syn 2.0.100", - "tauri-codegen", - "tauri-utils", + "tauri-codegen 2.3.0 (git+https://github.com/tauri-apps/tauri?rev=232265c70e1c213bbb3f84b5541ddc07d330fce1)", + "tauri-utils 2.5.0 (git+https://github.com/tauri-apps/tauri?rev=232265c70e1c213bbb3f84b5541ddc07d330fce1)", ] [[package]] @@ -6476,7 +6520,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "tauri-utils", + "tauri-utils 2.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "toml", "walkdir", ] @@ -6554,7 +6598,7 @@ dependencies = [ "serde_json", "tauri", "tauri-plugin", - "tauri-utils", + "tauri-utils 2.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "thiserror 2.0.12", "tracing", "url", @@ -6594,7 +6638,7 @@ dependencies = [ "serde_repr", "tauri", "tauri-plugin", - "tauri-utils", + "tauri-utils 2.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "thiserror 2.0.12", "toml", "url", @@ -6969,8 +7013,7 @@ dependencies = [ [[package]] name = "tauri-runtime" version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e7bb73d1bceac06c20b3f755b2c8a2cb13b20b50083084a8cf3700daf397ba4" +source = "git+https://github.com/tauri-apps/tauri?rev=232265c70e1c213bbb3f84b5541ddc07d330fce1#232265c70e1c213bbb3f84b5541ddc07d330fce1" dependencies = [ "cookie", "dpi", @@ -6982,7 +7025,7 @@ dependencies = [ "raw-window-handle", "serde", "serde_json", - "tauri-utils", + "tauri-utils 2.5.0 (git+https://github.com/tauri-apps/tauri?rev=232265c70e1c213bbb3f84b5541ddc07d330fce1)", "thiserror 2.0.12", "url", "windows 0.61.1", @@ -6990,9 +7033,8 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe52ed0ef40fd7ad51a620ecb3018e32eba3040bb95025216a962a37f6f050c5" +version = "2.7.1" +source = "git+https://github.com/tauri-apps/tauri?rev=232265c70e1c213bbb3f84b5541ddc07d330fce1#232265c70e1c213bbb3f84b5541ddc07d330fce1" dependencies = [ "gtk", "http", @@ -7007,7 +7049,7 @@ dependencies = [ "softbuffer", "tao", "tauri-runtime", - "tauri-utils", + "tauri-utils 2.5.0 (git+https://github.com/tauri-apps/tauri?rev=232265c70e1c213bbb3f84b5541ddc07d330fce1)", "url", "webkit2gtk", "webview2-com", @@ -7055,6 +7097,45 @@ dependencies = [ "walkdir", ] +[[package]] +name = "tauri-utils" +version = "2.5.0" +source = "git+https://github.com/tauri-apps/tauri?rev=232265c70e1c213bbb3f84b5541ddc07d330fce1#232265c70e1c213bbb3f84b5541ddc07d330fce1" +dependencies = [ + "aes-gcm", + "anyhow", + "cargo_metadata", + "ctor", + "dunce", + "getrandom 0.3.2", + "glob", + "html5ever", + "http", + "infer", + "json-patch", + "kuchikiki", + "log", + "memchr", + "phf 0.11.3", + "proc-macro2", + "quote", + "regex", + "schemars", + "semver", + "serde", + "serde-untagged", + "serde_json", + "serde_with", + "serialize-to-javascript", + "swift-rs", + "thiserror 2.0.12", + "toml", + "url", + "urlpattern", + "uuid", + "walkdir", +] + [[package]] name = "tauri-winres" version = "0.3.0" @@ -7462,9 +7543,9 @@ dependencies = [ [[package]] name = "tray-icon" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d433764348e7084bad2c5ea22c96c71b61b17afe3a11645710f533bd72b6a2b5" +checksum = "2da75ec677957aa21f6e0b361df0daab972f13a5bee3606de0638fd4ee1c666a" dependencies = [ "crossbeam-channel", "dirs 6.0.0", @@ -7653,7 +7734,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "tauri-plugin-updater", "time", "tiny_http", @@ -8069,7 +8150,7 @@ dependencies = [ "serde", "serde_json", "tauri", - "tauri-build", + "tauri-build 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "tauri-plugin-websocket", "tokio", "tokio-tungstenite", diff --git a/Cargo.toml b/Cargo.toml index cfa616ca..b92610bf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,3 +39,6 @@ codegen-units = 1 lto = true incremental = false opt-level = "s" + +[patch.crates-io] +tauri = { git = "https://github.com/tauri-apps/tauri", rev = "232265c70e1c213bbb3f84b5541ddc07d330fce1" } diff --git a/plugins/updater/src/error.rs b/plugins/updater/src/error.rs index aeaef63d..b3cacc95 100644 --- a/plugins/updater/src/error.rs +++ b/plugins/updater/src/error.rs @@ -30,9 +30,6 @@ pub enum Error { /// Operating system is not supported. #[error("Unsupported OS, expected one of `linux`, `darwin` or `windows`.")] UnsupportedOs, - /// Can't determine which type of installer was used for the app - #[error("Couldn't determinet installation method")] - UnknownInstaller, /// Failed to determine updater package extract path #[error("Failed to determine updater package extract path.")] FailedToDetermineExtractPath, diff --git a/plugins/updater/src/updater.rs b/plugins/updater/src/updater.rs index beb3867b..e715a23a 100644 --- a/plugins/updater/src/updater.rs +++ b/plugins/updater/src/updater.rs @@ -28,8 +28,8 @@ use semver::Version; use serde::{de::Error as DeError, Deserialize, Deserializer, Serialize}; use tauri::{ utils::{ - config::{get_current_bundle_type, PackageType}, - platform::current_exe, + config::BundleType, + platform::{bundle_type, current_exe}, }, AppHandle, Resource, Runtime, }; @@ -43,7 +43,7 @@ use crate::{ const UPDATER_USER_AGENT: &str = concat!(env!("CARGO_PKG_NAME"), "/", env!("CARGO_PKG_VERSION"),); -#[derive(Clone)] +#[derive(Copy, Clone)] pub enum Installer { AppImage, Deb, @@ -387,15 +387,16 @@ pub struct Updater { } impl Updater { - fn get_updater_installer(&self) -> Result> { - match get_current_bundle_type() { - PackageType::Deb => Ok(Some(Installer::Deb)), - PackageType::Rpm => Ok(Some(Installer::Rpm)), - PackageType::AppImage => Ok(Some(Installer::AppImage)), - PackageType::Msi => Ok(Some(Installer::Msi)), - PackageType::Nsis => Ok(Some(Installer::Nsis)), - _ => Err(Error::UnknownInstaller), - } + fn get_updater_installer(&self) -> Option { + bundle_type().and_then(|t| match t { + BundleType::Deb => Some(Installer::Deb), + BundleType::Rpm => Some(Installer::Rpm), + BundleType::AppImage => Some(Installer::AppImage), + BundleType::Msi => Some(Installer::Msi), + BundleType::Nsis => Some(Installer::Nsis), + BundleType::App => Some(Installer::App), + BundleType::Dmg => None, + }) } pub async fn check(&self) -> Result> { @@ -522,7 +523,7 @@ impl Updater { None => release.version > self.current_version, }; - let installer = self.get_updater_installer()?; + let installer = self.get_updater_installer(); let update = if should_update { Some(Update { @@ -536,12 +537,10 @@ impl Updater { version: release.version.to_string(), date: release.pub_date, download_url: release - .download_url(&self.json_target, installer.clone())? + .download_url(&self.json_target, installer)? .to_owned(), body: release.notes.clone(), - signature: release - .signature(&self.json_target, installer.clone())? - .to_owned(), + signature: release.signature(&self.json_target, installer)?.to_owned(), installer, raw_json: raw_json.unwrap(), timeout: None, From 201a001f0a8a56a44b7528b0a9e0cf4d50ebc3db Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Mon, 7 Jul 2025 13:24:25 -0300 Subject: [PATCH 20/25] fix macos integration test --- plugins/updater/src/updater.rs | 2 +- .../updater/tests/app-updater/tests/update.rs | 32 +++++++++++++++---- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/plugins/updater/src/updater.rs b/plugins/updater/src/updater.rs index e715a23a..12a305b2 100644 --- a/plugins/updater/src/updater.rs +++ b/plugins/updater/src/updater.rs @@ -1143,7 +1143,7 @@ impl Update { if let Some(mut stdin) = child.stdin.take() { // Write password to stdin - writeln!(stdin, "{}", password)?; + writeln!(stdin, "{password}")?; } let status = child.wait()?; diff --git a/plugins/updater/tests/app-updater/tests/update.rs b/plugins/updater/tests/app-updater/tests/update.rs index 4c331b1e..4ff4d416 100644 --- a/plugins/updater/tests/app-updater/tests/update.rs +++ b/plugins/updater/tests/app-updater/tests/update.rs @@ -171,15 +171,33 @@ fn test_cases( } #[cfg(target_os = "macos")] -fn bundle_paths( +fn test_cases( root_dir: &Path, _version: &str, - v1compatible: bool, -) -> Vec<(BundleTarget, PathBuf)> { - vec![( - BundleTarget::App, - root_dir.join("target/debug/bundle/macos/app-updater.app"), - )] + target: String, +) -> Vec<(BundleTarget, PathBuf, Option, Vec)> { + vec![ + ( + BundleTarget::App, + root_dir.join("target/debug/bundle/macos/app-updater.app"), + Some(target.clone()), + vec![UPDATED_EXIT_CODE, UP_TO_DATE_EXIT_CODE], + ), + // update with installer + ( + BundleTarget::App, + root_dir.join("target/debug/bundle/macos/app-updater.app"), + Some(format!("{target}-{}", BundleTarget::App.name())), + vec![UPDATED_EXIT_CODE, UP_TO_DATE_EXIT_CODE], + ), + // no update + ( + BundleTarget::App, + root_dir.join("target/debug/bundle/macos/app-updater.app"), + None, + vec![ERROR_EXIT_CODE], + ), + ] } #[cfg(target_os = "ios")] From 9e9d7bc15edd99759c8fcd2b2953afbcc861c8b1 Mon Sep 17 00:00:00 2001 From: Krzysztof Andrelczyk Date: Thu, 10 Jul 2025 00:46:50 +0200 Subject: [PATCH 21/25] fix fallback logic Signed-off-by: Krzysztof Andrelczyk --- plugins/updater/src/updater.rs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/plugins/updater/src/updater.rs b/plugins/updater/src/updater.rs index 12a305b2..8ffb5e28 100644 --- a/plugins/updater/src/updater.rs +++ b/plugins/updater/src/updater.rs @@ -102,18 +102,15 @@ pub struct RemoteRelease { impl RemoteRelease { /// The release's download URL for the given target. - pub fn download_url(&self, target: &str, installer: Option) -> Result<&Url> { - let fallback_target = installer.map(|installer| format!("{target}-{}", installer.suffix())); + pub fn download_url(&self, fallback_target: &str, installer: Option) -> Result<&Url> { + let target = installer.map(|installer| format!("{fallback_target}-{}", installer.suffix())).unwrap_or("".to_string()); match self.data { RemoteReleaseInner::Dynamic(ref platform) => Ok(&platform.url), - RemoteReleaseInner::Static { ref platforms } => platforms.get(target).map_or_else( - || match fallback_target { - Some(fallback) => platforms.get(&fallback).map_or( - Err(Error::TargetsNotFound(target.to_string(), fallback)), + RemoteReleaseInner::Static { ref platforms } => platforms.get(&target).map_or_else( + || platforms.get(fallback_target).map_or( + Err(Error::TargetsNotFound(target.to_string(), fallback_target.to_string())), |p| Ok(&p.url), ), - None => Err(Error::TargetNotFound(target.to_string())), - }, |p| Ok(&p.url), ), } From 2fdda080db721e7a1d828446b7e66dc97ab661d0 Mon Sep 17 00:00:00 2001 From: Krzysztof Andrelczyk Date: Mon, 14 Jul 2025 14:25:56 +0200 Subject: [PATCH 23/25] reformat --- plugins/updater/src/updater.rs | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/plugins/updater/src/updater.rs b/plugins/updater/src/updater.rs index 8ffb5e28..4f46a153 100644 --- a/plugins/updater/src/updater.rs +++ b/plugins/updater/src/updater.rs @@ -102,15 +102,26 @@ pub struct RemoteRelease { impl RemoteRelease { /// The release's download URL for the given target. - pub fn download_url(&self, fallback_target: &str, installer: Option) -> Result<&Url> { - let target = installer.map(|installer| format!("{fallback_target}-{}", installer.suffix())).unwrap_or("".to_string()); + pub fn download_url( + &self, + fallback_target: &str, + installer: Option, + ) -> Result<&Url> { + let target = installer + .map(|installer| format!("{fallback_target}-{}", installer.suffix())) + .unwrap_or("".to_string()); match self.data { RemoteReleaseInner::Dynamic(ref platform) => Ok(&platform.url), RemoteReleaseInner::Static { ref platforms } => platforms.get(&target).map_or_else( - || platforms.get(fallback_target).map_or( - Err(Error::TargetsNotFound(target.to_string(), fallback_target.to_string())), + || { + platforms.get(fallback_target).map_or( + Err(Error::TargetsNotFound( + target.to_string(), + fallback_target.to_string(), + )), |p| Ok(&p.url), - ), + ) + }, |p| Ok(&p.url), ), } From 4913dbe0a594b90091ab4ef743e523c08739c107 Mon Sep 17 00:00:00 2001 From: Krzysztof Andrelczyk Date: Wed, 16 Jul 2025 19:18:00 +0200 Subject: [PATCH 24/25] fix tests --- plugins/updater/src/updater.rs | 64 ++++++++----------- .../updater/tests/app-updater/tests/update.rs | 34 +++++----- 2 files changed, 44 insertions(+), 54 deletions(-) diff --git a/plugins/updater/src/updater.rs b/plugins/updater/src/updater.rs index 4f46a153..b5a6a6ca 100644 --- a/plugins/updater/src/updater.rs +++ b/plugins/updater/src/updater.rs @@ -102,47 +102,26 @@ pub struct RemoteRelease { impl RemoteRelease { /// The release's download URL for the given target. - pub fn download_url( - &self, - fallback_target: &str, - installer: Option, - ) -> Result<&Url> { - let target = installer - .map(|installer| format!("{fallback_target}-{}", installer.suffix())) - .unwrap_or("".to_string()); + pub fn download_url(&self, target: &str) -> Result<&Url> { match self.data { RemoteReleaseInner::Dynamic(ref platform) => Ok(&platform.url), - RemoteReleaseInner::Static { ref platforms } => platforms.get(&target).map_or_else( - || { - platforms.get(fallback_target).map_or( - Err(Error::TargetsNotFound( - target.to_string(), - fallback_target.to_string(), - )), - |p| Ok(&p.url), - ) - }, - |p| Ok(&p.url), - ), + RemoteReleaseInner::Static { ref platforms } => platforms + .get(target) + .map_or(Err(Error::TargetNotFound(target.to_string())), |p| { + Ok(&p.url) + }), } } /// The release's signature for the given target. - pub fn signature(&self, target: &str, installer: Option) -> Result<&String> { - let fallback_target = installer.map(|installer| format!("{target}-{}", installer.suffix())); - + pub fn signature(&self, target: &str) -> Result<&String> { match self.data { RemoteReleaseInner::Dynamic(ref platform) => Ok(&platform.signature), - RemoteReleaseInner::Static { ref platforms } => platforms.get(target).map_or_else( - || match fallback_target { - Some(fallback) => platforms.get(&fallback).map_or( - Err(Error::TargetsNotFound(target.to_string(), fallback)), - |p| Ok(&p.signature), - ), - None => Err(Error::TargetNotFound(target.to_string())), - }, - |p| Ok(&p.signature), - ), + RemoteReleaseInner::Static { ref platforms } => platforms + .get(target) + .map_or(Err(Error::TargetNotFound(target.to_string())), |platform| { + Ok(&platform.signature) + }), } } } @@ -531,7 +510,20 @@ impl Updater { None => release.version > self.current_version, }; + let mut download_url = release.download_url(&self.json_target); + let mut signature = release.signature(&self.json_target); + let installer = self.get_updater_installer(); + if installer.is_none() && (download_url.is_err() || signature.is_err()) { + return Err(Error::TargetNotFound(self.json_target.clone())); + } + + if let Some(installer) = installer { + let target = &format!("{}-{}", &self.json_target, installer.suffix()); + download_url = release.download_url(target).or(download_url.or(Err(Error::TargetsNotFound(self.json_target.clone(), target.clone())))); + signature = release.signature(target).or(signature.or(Err(Error::TargetsNotFound(self.json_target.clone(), target.clone())))); + } + let update = if should_update { Some(Update { @@ -544,11 +536,9 @@ impl Updater { extract_path: self.extract_path.clone(), version: release.version.to_string(), date: release.pub_date, - download_url: release - .download_url(&self.json_target, installer)? - .to_owned(), + download_url: download_url?.to_owned(), body: release.notes.clone(), - signature: release.signature(&self.json_target, installer)?.to_owned(), + signature: signature?.to_owned(), installer, raw_json: raw_json.unwrap(), timeout: None, diff --git a/plugins/updater/tests/app-updater/tests/update.rs b/plugins/updater/tests/app-updater/tests/update.rs index 4ff4d416..8087c1e9 100644 --- a/plugins/updater/tests/app-updater/tests/update.rs +++ b/plugins/updater/tests/app-updater/tests/update.rs @@ -49,7 +49,7 @@ struct Update { fn build_app(cwd: &Path, config: &Config, bundle_updater: bool, target: BundleTarget) { let mut command = Command::new("cargo"); command - .args(["tauri", "build", "--debug", "--verbose"]) + .args(["tauri", "build", "--verbose"]) .arg("--config") .arg(serde_json::to_string(config).unwrap()) .env("TAURI_SIGNING_PRIVATE_KEY", UPDATER_PRIVATE_KEY) @@ -144,7 +144,7 @@ fn test_cases( ( BundleTarget::AppImage, root_dir.join(format!( - "target/debug/bundle/appimage/app-updater_{version}_amd64.AppImage" + "target/release/bundle/appimage/app-updater_{version}_amd64.AppImage" )), Some(target.clone()), vec![UPDATED_EXIT_CODE, UP_TO_DATE_EXIT_CODE], @@ -153,7 +153,7 @@ fn test_cases( ( BundleTarget::AppImage, root_dir.join(format!( - "target/debug/bundle/appimage/app-updater_{version}_amd64.AppImage" + "target/release/bundle/appimage/app-updater_{version}_amd64.AppImage" )), Some(format!("{target}-{}", BundleTarget::AppImage.name())), vec![UPDATED_EXIT_CODE, UP_TO_DATE_EXIT_CODE], @@ -162,7 +162,7 @@ fn test_cases( ( BundleTarget::AppImage, root_dir.join(format!( - "target/debug/bundle/appimage/app-updater_{version}_amd64.AppImage" + "target/release/bundle/appimage/app-updater_{version}_amd64.AppImage" )), None, vec![ERROR_EXIT_CODE], @@ -179,21 +179,21 @@ fn test_cases( vec![ ( BundleTarget::App, - root_dir.join("target/debug/bundle/macos/app-updater.app"), + root_dir.join("target/release/bundle/macos/app-updater.app"), Some(target.clone()), vec![UPDATED_EXIT_CODE, UP_TO_DATE_EXIT_CODE], ), // update with installer ( BundleTarget::App, - root_dir.join("target/debug/bundle/macos/app-updater.app"), + root_dir.join("target/release/bundle/macos/app-updater.app"), Some(format!("{target}-{}", BundleTarget::App.name())), vec![UPDATED_EXIT_CODE, UP_TO_DATE_EXIT_CODE], ), // no update ( BundleTarget::App, - root_dir.join("target/debug/bundle/macos/app-updater.app"), + root_dir.join("target/release/bundle/macos/app-updater.app"), None, vec![ERROR_EXIT_CODE], ), @@ -208,13 +208,13 @@ fn bundle_paths( ) -> Vec<(BundleTarget, PathBuf)> { vec![( BundleTarget::App, - root_dir.join("target/debug/bundle/ios/app-updater.ipa"), + root_dir.join("target/release/bundle/ios/app-updater.ipa"), )] } #[cfg(target_os = "android")] fn bundle_path(root_dir: &Path, _version: &str, v1compatible: bool) -> PathBuf { - root_dir.join("target/debug/bundle/android/app-updater.apk") + root_dir.join("target/release/bundle/android/app-updater.apk") } #[cfg(windows)] @@ -227,7 +227,7 @@ fn test_cases( ( BundleTarget::Nsis, root_dir.join(format!( - "target/debug/bundle/nsis/app-updater_{version}_x64-setup.exe" + "target/release/bundle/nsis/app-updater_{version}_x64-setup.exe" )), Some(target.clone()), vec![UPDATED_EXIT_CODE], @@ -235,7 +235,7 @@ fn test_cases( ( BundleTarget::Nsis, root_dir.join(format!( - "target/debug/bundle/nsis/app-updater_{version}_x64-setup.exe" + "target/release/bundle/nsis/app-updater_{version}_x64-setup.exe" )), Some(format!("{target}-{}", BundleTarget::Nsis.name())), vec![UPDATED_EXIT_CODE], @@ -243,7 +243,7 @@ fn test_cases( ( BundleTarget::Nsis, root_dir.join(format!( - "target/debug/bundle/nsis/app-updater_{version}_x64-setup.exe" + "target/release/bundle/nsis/app-updater_{version}_x64-setup.exe" )), None, vec![ERROR_EXIT_CODE], @@ -251,7 +251,7 @@ fn test_cases( ( BundleTarget::Msi, root_dir.join(format!( - "target/debug/bundle/msi/app-updater_{version}_x64_en-US.msi" + "target/release/bundle/msi/app-updater_{version}_x64_en-US.msi" )), Some(target.clone()), vec![UPDATED_EXIT_CODE], @@ -259,7 +259,7 @@ fn test_cases( ( BundleTarget::Msi, root_dir.join(format!( - "target/debug/bundle/msi/app-updater_{version}_x64_en-US.msi" + "target/release/bundle/msi/app-updater_{version}_x64_en-US.msi" )), Some(format!("{target}-{}", BundleTarget::Msi.name())), vec![UPDATED_EXIT_CODE], @@ -267,7 +267,7 @@ fn test_cases( ( BundleTarget::Msi, root_dir.join(format!( - "target/debug/bundle/msi/app-updater_{version}_x64_en-US.msi" + "target/release/bundle/msi/app-updater_{version}_x64_en-US.msi" )), None, vec![ERROR_EXIT_CODE], @@ -347,7 +347,7 @@ fn update_app() { }); let out_updater_path = out_bundle_path.with_extension(updater_extension); let updater_path = root_dir.join(format!( - "target/debug/{}", + "target/release/{}", out_updater_path.file_name().unwrap().to_str().unwrap() )); std::fs::rename(&out_updater_path, &updater_path).expect("failed to rename bundle"); @@ -405,7 +405,7 @@ fn update_app() { for expected_exit_code in status_checks { let mut binary_cmd = if cfg!(windows) { - Command::new(root_dir.join("target/debug/app-updater.exe")) + Command::new(root_dir.join("target/release/app-updater.exe")) } else if cfg!(target_os = "macos") { Command::new( test_cases(&root_dir, "0.1.0", target.clone()) From 5eae160c6d25ed78a939915c3f90216b70573834 Mon Sep 17 00:00:00 2001 From: Krzysztof Andrelczyk Date: Wed, 16 Jul 2025 23:25:08 +0200 Subject: [PATCH 25/25] reformat --- plugins/updater/src/updater.rs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/plugins/updater/src/updater.rs b/plugins/updater/src/updater.rs index b5a6a6ca..68412fbd 100644 --- a/plugins/updater/src/updater.rs +++ b/plugins/updater/src/updater.rs @@ -102,7 +102,7 @@ pub struct RemoteRelease { impl RemoteRelease { /// The release's download URL for the given target. - pub fn download_url(&self, target: &str) -> Result<&Url> { + pub fn download_url(&self, target: &str) -> Result<&Url> { match self.data { RemoteReleaseInner::Dynamic(ref platform) => Ok(&platform.url), RemoteReleaseInner::Static { ref platforms } => platforms @@ -520,11 +520,21 @@ impl Updater { if let Some(installer) = installer { let target = &format!("{}-{}", &self.json_target, installer.suffix()); - download_url = release.download_url(target).or(download_url.or(Err(Error::TargetsNotFound(self.json_target.clone(), target.clone())))); - signature = release.signature(target).or(signature.or(Err(Error::TargetsNotFound(self.json_target.clone(), target.clone())))); + download_url = + release + .download_url(target) + .or(download_url.or(Err(Error::TargetsNotFound( + self.json_target.clone(), + target.clone(), + )))); + signature = release + .signature(target) + .or(signature.or(Err(Error::TargetsNotFound( + self.json_target.clone(), + target.clone(), + )))); } - let update = if should_update { Some(Update { run_on_main_thread: self.run_on_main_thread.clone(),