new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Tauri · all subjects

updater system

11 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Updater module removed in Tauri 2

In Tauri 2, tauri::updater module was removed. Use tauri-plugin-updater instead.

Updater plugin initialization example

To use the updater plugin in Tauri 2, initialize with tauri::Builder::default().plugin(tauri_plugin_updater::Builder::new().build()) and add @tauri-apps/plugin-updater@^2.0.0 to package.json. Use check() to check for updates and downloadAndInstall() to apply them.

Updater custom target example

In Tauri 2, to set a custom updater target, use tauri_plugin_updater::Builder::new().target("darwin-universal") on macOS before calling build().

Updater plugin migration in Tauri v2

The Rust `tauri::updater` and JavaScript `@tauri-apps/api-updater` APIs are removed. Use `@tauri-apps/plugin-updater` instead. For Rust: add `tauri-plugin-updater = "2"` to Cargo.toml. Initialize with `tauri::Builder::default().plugin(tauri_plugin_updater::Builder::new().build())`. Check for updates with `handle.updater().check().await;` Set custom target with `tauri_plugin_updater::Builder::new().target("darwin-universal").build();` For JavaScript: add `@tauri-apps/plugin-updater: ^2.0.0` to package.json. Import `{ check } from '@tauri-apps/plugin-updater'` and `{ relaunch } from '@tauri-apps/plugin-process'`. Call `const update = await check();` Check `update.response.available`, `update.response.latestVersion`, `update.response.date`, `update.response.body`. Call `await update.downloadAndInstall();` then `await relaunch();`

Updater plugin migration: overview

Built-in automatic update check dialog removed. Use Rust and JavaScript APIs to manually check and install updates. Add 'tauri-plugin-updater = "2"' to Cargo.

Updater plugin migration: Rust check

Check for updates in Rust: Initialize plugin: tauri::Builder::default().plugin(tauri_plugin_updater::Builder::new().build()). In setup: let handle = app.handle(); tauri::async_runtime::spawn(async move { let response = handle.updater().check().await; });

Updater plugin migration: Rust custom target

Set custom update target in Rust: let mut updater = tauri_plugin_updater::Builder::new(); #[cfg(target_os = "macos")] { updater = updater.target("darwin-universal"); } tauri::Builder::default().plugin(updater.build())

Updater plugin migration: JavaScript

Check and install updates in JavaScript: import { check } from '@tauri-apps/plugin-updater'; import { relaunch } from '@tauri-apps/plugin-process'; const update = await check(); if (update?.available) { console.log(`Update to ${update.version} available!`); await update.downloadAndInstall(); await relaunch(); }

Updater signature validation

Tauri 1.1.0 improves the updater to validate signatures against the configured public key.

Updater preserves command line arguments on Windows

The auto updater in Tauri 1.6.0 now keeps command line arguments on Windows when updating the application.

Removed UpdaterEvent in Tauri 2.0

Tauri 2.0 removed `UpdaterEvent`. The updater functionality has been moved to the updater plugin.

Give your agent this brain