move __TAURI_BUNDLE_TYPE to tauri::utils

pull/2624/head
Krzysztof Andrelczyk 3 months ago
parent 2137583004
commit b80a295e12
No known key found for this signature in database
GPG Key ID: 1381C9E2A2973DBF

@ -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<R: Runtime> {
/// Gets the updater builder to build and updater

@ -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"),);

Loading…
Cancel
Save