mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-06-06 13:53:54 +02:00
update tauri to cef/wry feature flag removal
This commit is contained in:
@@ -39,13 +39,14 @@ tauri-plugin-opener = { path = "../../../plugins/opener", version = "2.5.3" }
|
||||
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.3.5" }
|
||||
tauri-plugin-store = { path = "../../../plugins/store", version = "2.4.2" }
|
||||
tauri-plugin-upload = { path = "../../../plugins/upload", version = "2.3.0" }
|
||||
tauri-runtime-wry = { workspace = true, optional = true, features = [
|
||||
"macos-private-api",
|
||||
] }
|
||||
tauri-runtime-cef = { workspace = true, optional = true }
|
||||
|
||||
[dependencies.tauri]
|
||||
workspace = true
|
||||
features = [
|
||||
"wry",
|
||||
"common-controls-v6",
|
||||
"x11",
|
||||
"image-ico",
|
||||
"image-png",
|
||||
"isolation",
|
||||
@@ -68,4 +69,7 @@ tauri-plugin-geolocation = { path = "../../../plugins/geolocation/", version = "
|
||||
tauri-plugin-haptics = { path = "../../../plugins/haptics/", version = "2.3.2" }
|
||||
|
||||
[features]
|
||||
default = ["wry"]
|
||||
wry = ["dep:tauri-runtime-wry"]
|
||||
cef = ["dep:tauri-runtime-cef"]
|
||||
prod = ["tauri/custom-protocol"]
|
||||
|
||||
@@ -6,6 +6,11 @@ mod cmd;
|
||||
#[cfg(desktop)]
|
||||
mod tray;
|
||||
|
||||
#[cfg(feature = "cef")]
|
||||
type TauriRuntime = tauri_runtime_cef::CefRuntime<tauri::EventLoopMessage>;
|
||||
#[cfg(feature = "wry")]
|
||||
type TauriRuntime = tauri_runtime_wry::Wry<tauri::EventLoopMessage>;
|
||||
|
||||
use serde::Serialize;
|
||||
use tauri::{
|
||||
webview::{PageLoadEvent, WebviewWindowBuilder},
|
||||
@@ -17,13 +22,13 @@ struct Reply {
|
||||
data: String,
|
||||
}
|
||||
|
||||
pub type SetupHook = Box<dyn FnOnce(&mut App) -> Result<(), Box<dyn std::error::Error>> + Send>;
|
||||
pub type OnEvent = Box<dyn FnMut(&AppHandle, RunEvent)>;
|
||||
pub type SetupHook<R> = Box<dyn FnOnce(&mut App<R>) -> Result<(), Box<dyn std::error::Error>> + Send>;
|
||||
pub type OnEvent<R> = Box<dyn FnMut(&AppHandle<R>, RunEvent)>;
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
#[allow(unused_mut)]
|
||||
let mut builder = tauri::Builder::default()
|
||||
let mut builder = tauri::Builder::<TauriRuntime>::new()
|
||||
.plugin(
|
||||
tauri_plugin_log::Builder::default()
|
||||
.level(log::LevelFilter::Info)
|
||||
|
||||
Reference in New Issue
Block a user