mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-07-03 19:41:48 +02:00
Add CEF runtime to Linux builds
This commit is contained in:
@@ -12,7 +12,13 @@ crate-type = ["staticlib", "cdylib", "lib"]
|
||||
|
||||
[features]
|
||||
cargo-clippy = []
|
||||
default = []
|
||||
default = ["wry"]
|
||||
cef = ["tauri/cef"]
|
||||
#
|
||||
# Keep the system webview runtime as the default for local development and
|
||||
# non-Linux release jobs. Linux release builds opt into `cef` with
|
||||
# `--no-default-features`.
|
||||
wry = ["tauri/wry", "tauri/x11", "tauri/dbus"]
|
||||
updater = []
|
||||
license = ["yaak-license"]
|
||||
|
||||
|
||||
@@ -83,6 +83,11 @@ mod uri_scheme;
|
||||
mod window_menu;
|
||||
mod ws_ext;
|
||||
|
||||
#[cfg(feature = "cef")]
|
||||
type TauriRuntime = tauri::Cef;
|
||||
#[cfg(not(feature = "cef"))]
|
||||
type TauriRuntime = tauri::Wry;
|
||||
|
||||
fn setup_window_menu<R: Runtime>(win: &WebviewWindow<R>) -> Result<()> {
|
||||
#[allow(unused_variables)]
|
||||
let menu = window_menu::app_menu(win.app_handle())?;
|
||||
@@ -1632,8 +1637,9 @@ async fn cmd_check_for_updates<R: Runtime>(
|
||||
}
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
#[cfg_attr(feature = "cef", tauri::cef_entry_point)]
|
||||
pub fn run() {
|
||||
let mut builder = tauri::Builder::default().plugin(
|
||||
let mut builder = tauri::Builder::<TauriRuntime>::default().plugin(
|
||||
Builder::default()
|
||||
.targets([
|
||||
Target::new(TargetKind::Stdout),
|
||||
|
||||
@@ -12,6 +12,10 @@ crate-type = ["staticlib", "cdylib", "lib"]
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "2.6.1", features = [] }
|
||||
|
||||
[features]
|
||||
default = ["wry"]
|
||||
wry = ["tauri/wry", "tauri/x11", "tauri/dbus"]
|
||||
|
||||
[dependencies]
|
||||
log = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
|
||||
Reference in New Issue
Block a user