mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-04-23 11:36:13 +02:00
move __TAURI_BUNDLE_TYPE to tauri::utils
This commit is contained in:
@@ -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"),);
|
||||
|
||||
Reference in New Issue
Block a user