mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-12-05 22:36:23 +01:00
Remove the CEF build and upgrade Tauri
The experimental Linux CEF build is gone: its release jobs, tarball step, cache and artifact pattern, the `cef` feature and its cfg branches. With it goes the patch pinning tauri and tauri-build to Tauri's feat/cef branch, and the 3.0 alpha cef CLI that every platform's release was bundled by. Tauri moves to 2.12.7 (tauri-build 2.7.6, tauri-plugin 2.7.4), the updater to 2.14.1 and every other plugin to its current 2.x release; the JS API to 2.12.5 and the CLI to 2.12.6. The old updater's zip 4.6.1 leaves the lockfile. Two behavior changes in the new versions are handled. Tauri now drops a window's listeners as it closes, so the update prompt's reply listener moves to the app, keeping a closed window from turning a pending prompt into the native dialog. Single-instance now releases its lock after the exit handler, so the client releases it before relaunching after an update. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6196bf2a21
commit
1e8ecfd1a2
16 files changed
+489
-1279
No files matched your search
@@ -13,13 +13,12 @@ crate-type = ["staticlib", "cdylib", "lib"]
|
||||
[features]
|
||||
cargo-clippy = []
|
||||
default = []
|
||||
cef = ["tauri/cef", "tauri-plugin-dialog/xdg-portal"]
|
||||
wry = ["tauri/wry", "tauri/x11", "tauri/dbus", "tauri-plugin-dialog/gtk3"]
|
||||
updater = []
|
||||
license = ["yaak-license"]
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "2.6.1", features = [] }
|
||||
tauri-build = { version = "2.7.6", features = [] }
|
||||
|
||||
[target.'cfg(target_os = "linux")'.dependencies]
|
||||
openssl-sys = { version = "0.9.105", features = ["vendored"] } # For Ubuntu installation to work
|
||||
@@ -56,16 +55,16 @@ reqwest = { workspace = true, features = [
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
serde_json = { workspace = true, features = ["raw_value"] }
|
||||
tauri = { workspace = true, features = ["devtools", "protocol-asset"] }
|
||||
tauri-plugin-clipboard-manager = "2.3.2"
|
||||
tauri-plugin-deep-link = "2.4.9"
|
||||
tauri-plugin-clipboard-manager = "2.5.0"
|
||||
tauri-plugin-deep-link = "2.6.3"
|
||||
tauri-plugin-dialog = { workspace = true }
|
||||
tauri-plugin-fs = "2.5.1"
|
||||
tauri-plugin-log = { version = "2.8.0", features = ["colored"] }
|
||||
tauri-plugin-opener = "2.5.4"
|
||||
tauri-plugin-os = "2.3.2"
|
||||
tauri-plugin-fs = "2.7.1"
|
||||
tauri-plugin-log = { version = "2.10.2", features = ["colored"] }
|
||||
tauri-plugin-opener = "2.7.3"
|
||||
tauri-plugin-os = "2.4.0"
|
||||
tauri-plugin-shell = { workspace = true }
|
||||
tauri-plugin-single-instance = { version = "2.4.2", features = ["deep-link"] }
|
||||
tauri-plugin-updater = "2.10.1"
|
||||
tauri-plugin-single-instance = { version = "2.5.5", features = ["deep-link"] }
|
||||
tauri-plugin-updater = "2.14.1"
|
||||
thiserror = { workspace = true }
|
||||
tokio = { workspace = true, features = ["sync"] }
|
||||
tokio-stream = "0.1.17"
|
||||
|
||||
@@ -75,12 +75,10 @@ mod uri_scheme;
|
||||
mod window_menu;
|
||||
mod ws_ext;
|
||||
|
||||
#[cfg(not(any(feature = "cef", feature = "wry")))]
|
||||
compile_error!("Enable one Tauri runtime feature: `cef` or `wry`.");
|
||||
#[cfg(not(feature = "wry"))]
|
||||
compile_error!("Enable the Tauri runtime feature: `wry`.");
|
||||
|
||||
#[cfg(feature = "cef")]
|
||||
type TauriRuntime = tauri::Cef;
|
||||
#[cfg(all(not(feature = "cef"), feature = "wry"))]
|
||||
#[cfg(feature = "wry")]
|
||||
type TauriRuntime = tauri::Wry;
|
||||
|
||||
fn setup_window_menu<R: Runtime>(win: &WebviewWindow<R>) -> Result<()> {
|
||||
@@ -1202,7 +1200,6 @@ 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() {
|
||||
// GUI apps launched via Finder/launchd inherit a 256 open-file soft limit on macOS
|
||||
// (1024 on most Linux desktops). SQLite WAL connections hold ~3 fds each, so raise
|
||||
@@ -1440,7 +1437,13 @@ pub fn run() {
|
||||
}
|
||||
});
|
||||
}
|
||||
RunEvent::Exit => restart::relaunch_if_requested(),
|
||||
RunEvent::Exit => {
|
||||
// The single-instance lock is otherwise released only after this handler
|
||||
// returns, so the relaunched app could find it, hand its launch to this
|
||||
// dying instance and quit. A no-op where the plugin isn't registered.
|
||||
tauri_plugin_single_instance::destroy(app_handle);
|
||||
restart::relaunch_if_requested();
|
||||
}
|
||||
_ => {}
|
||||
};
|
||||
});
|
||||
|
||||
@@ -371,8 +371,8 @@ async fn cmd_sync_watch<R: Runtime>(
|
||||
}
|
||||
|
||||
/// Build the router with every command in the schema registered to its
|
||||
/// adapter here. Generic over the runtime so the same registry serves Wry and
|
||||
/// CEF builds. Adding a command means adding it to the schema *and* writing an
|
||||
/// adapter here. Generic over the runtime, as the commands it registers are.
|
||||
/// Adding a command means adding it to the schema *and* writing an
|
||||
/// adapter below; a missing adapter fails to compile rather than 404 at runtime.
|
||||
macro_rules! register_commands {
|
||||
( $( $name:ident ( $req:ty ) -> $res:ty ),* $(,)? ) => {
|
||||
|
||||
Reference in new issue
Block a user