Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ tauri-plugin-notifications = { git = "https://github.com/SableClient/tauri-plugi
tauri-plugin-notifications = { git = "https://github.com/SableClient/tauri-plugin-notifications.git", rev = "df09f08e64b840e4d51cde2720030836eed40f4c", default-features = false }

[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
tauri-plugin-updater = "2"
tauri-plugin-updater = { version = "2", optional = true }
tauri-plugin-process = "2"
tauri-plugin-dialog = "2"
tauri-plugin-window-state = "2.4.1"
Expand Down Expand Up @@ -101,9 +101,11 @@ tauri-plugin-android-fs = { version = "=28.4.0", features = ["legacy-storage-per
jni = "0.21"

[features]
default = ["wry"]
default = ["wry", "updater"]
custom-protocol = ["tauri/custom-protocol"]
wry = ["tauri/wry"]
# Tauri auto-updater. Disable with --no-default-features --features wry,cef.
updater = ["dep:tauri-plugin-updater"]
# CEF (Chromium) runtime. Build with --no-default-features --features cef.
cef = ["dep:tauri-runtime-cef", "dep:cef"]
[patch.crates-io]
Expand Down
11 changes: 10 additions & 1 deletion src-tauri/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,14 @@ fn main() {
tauri_typegen::BuildSystem::generate_at_build_time()
.expect("Failed to generate TypeScript bindings");

tauri_build::build()
// tauri-build fails on permissions from missing plugins, so only glob the
// updater capability file when the `updater` feature is on.
#[cfg(feature = "updater")]
let tauri_attrs =
tauri_build::Attributes::new().capabilities_path_pattern("./capabilities/**/*.json");
#[cfg(not(feature = "updater"))]
let tauri_attrs =
tauri_build::Attributes::new().capabilities_path_pattern("./capabilities/*.json");

tauri_build::try_build(tauri_attrs).expect("tauri-build failed");
}
1 change: 0 additions & 1 deletion src-tauri/capabilities/desktop.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"window-state:default",
"store:default",
"notifications:default",
"updater:default",
"process:default",
"dialog:default"
]
Expand Down
7 changes: 7 additions & 0 deletions src-tauri/capabilities/updater/updater.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "../../gen/schemas/desktop-schema.json",
"identifier": "updater-capability",
"platforms": ["macOS", "windows", "linux"],
"windows": ["main"],
"permissions": ["updater:default"]
}
4 changes: 3 additions & 1 deletion src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,11 @@ pub fn run() {
#[cfg(any(mobile, desktop))]
let builder = builder.plugin(tauri_plugin_notifications::init());

#[cfg(all(desktop, feature = "updater"))]
let builder = builder.plugin(tauri_plugin_updater::Builder::new().build());

#[cfg(desktop)]
let builder = builder
.plugin(tauri_plugin_updater::Builder::new().build())
.plugin(tauri_plugin_process::init())
.plugin(tauri_plugin_dialog::init());

Expand Down
2 changes: 1 addition & 1 deletion src/app/generated/tauri/commands.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Auto-generated TypeScript bindings for Tauri commands
* Generated by tauri-typegen v0.5.0
* Generated at: 2026-07-20T05:55:07.154868857+00:00
* Generated at: 2026-07-20T16:38:06.342501881+00:00
* Generator: none
*
* Do not edit manually - regenerate using: cargo tauri-typegen generate
Expand Down
2 changes: 1 addition & 1 deletion src/app/generated/tauri/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Auto-generated TypeScript bindings for Tauri commands
* Generated by tauri-typegen v0.5.0
* Generated at: 2026-07-20T05:55:07.155133577+00:00
* Generated at: 2026-07-20T16:38:06.342846421+00:00
* Generator: none
*
* Do not edit manually - regenerate using: cargo tauri-typegen generate
Expand Down
2 changes: 1 addition & 1 deletion src/app/generated/tauri/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Auto-generated TypeScript bindings for Tauri commands
* Generated by tauri-typegen v0.5.0
* Generated at: 2026-07-20T05:55:07.154428637+00:00
* Generated at: 2026-07-20T16:38:06.341992373+00:00
* Generator: none
*
* Do not edit manually - regenerate using: cargo tauri-typegen generate
Expand Down
Loading