From a44676070c07618444b69b16cc0d246715a8ca7e Mon Sep 17 00:00:00 2001 From: Christopher Serr Date: Mon, 22 Jul 2024 17:47:37 +0200 Subject: [PATCH] Fix Desktop Build on Linux (#954) WebAssembly needs a specific mime type to be allowed to be loaded. Tauri by default apparently can't send headers on Linux, unless you activate a specific feature, so the WebAssembly failed to load. Additionally, without the dialog feature, it also wasn't able to show the error message. --- src-tauri/Cargo.toml | 6 +++++- src-tauri/tauri.conf.json | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index f2a2f678..f667212b 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -11,7 +11,11 @@ edition = "2021" tauri-build = { version = "1", features = [] } [dependencies] -tauri = { version = "1", features = [ "http-all"] } +tauri = { version = "1", features = [ + "dialog-all", + "http-all", + "linux-protocol-headers", +] } serde = { version = "1" } serde_derive = { version = "1" } serde_json = "1" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 0660038b..b71d79f1 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -11,10 +11,15 @@ "tauri": { "allowlist": { "all": false, + "dialog": { + "all": true + }, "http": { "all": true, "request": true, - "scope": ["https://www.speedrun.com/static/*"] + "scope": [ + "https://www.speedrun.com/static/*" + ] } }, "windows": [