From b80a295e12ecfa5d7eeee359e74624028de821ae Mon Sep 17 00:00:00 2001 From: Krzysztof Andrelczyk Date: Sat, 12 Apr 2025 14:42:04 +0200 Subject: [PATCH] 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"),);