Windows only thing
This commit is contained in:
4 files changed
+18
-7
No files matched your search
@@ -23,7 +23,6 @@ reqwest = { version = "0.13.2", default-features = false, features = [
|
||||
] }
|
||||
tokio = "1.52.1"
|
||||
futures-util = { version = "0.3.32", features = ["io"] }
|
||||
tauri-plugin-decorum = "1.1.1"
|
||||
tauri-plugin-fs = "2.5.0"
|
||||
zip = "8.5.1"
|
||||
tauri-plugin-dialog = "2.7.0"
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
"core:window:allow-start-dragging",
|
||||
"core:window:allow-toggle-maximize",
|
||||
"core:window:allow-request-user-attention",
|
||||
"decorum:allow-show-snap-overlay",
|
||||
"fs:default",
|
||||
"dialog:default",
|
||||
"dialog:allow-open",
|
||||
@@ -32,7 +31,10 @@
|
||||
"fs:allow-applocaldata-write",
|
||||
{
|
||||
"identifier": "fs:scope",
|
||||
"allow": [{ "path": "$APPLOCALDATA/game/**" }, { "path": "$APPCONFIG/versions.json" }]
|
||||
"allow": [
|
||||
{ "path": "$APPLOCALDATA/game/**" },
|
||||
{ "path": "$APPCONFIG/versions.json" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"identifier": "opener:allow-open-path",
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"identifier": "windows-capability",
|
||||
"platforms": ["windows"],
|
||||
"windows": ["main"],
|
||||
"permissions": ["decorum:allow-show-snap-overlay"]
|
||||
}
|
||||
@@ -688,8 +688,8 @@ fn open_new_window(
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
#[allow(unused_variables)]
|
||||
tauri::Builder::default()
|
||||
#[allow(unused)]
|
||||
let mut builder = tauri::Builder::default()
|
||||
.plugin(tauri_plugin_updater::Builder::new().build())
|
||||
.plugin(tauri_plugin_store::Builder::new().build())
|
||||
.plugin(tauri_plugin_http::init())
|
||||
@@ -704,7 +704,6 @@ pub fn run() {
|
||||
}))
|
||||
.plugin(tauri_plugin_dialog::init())
|
||||
.plugin(tauri_plugin_fs::init())
|
||||
.plugin(tauri_plugin_decorum::init())
|
||||
.plugin(tauri_plugin_os::init())
|
||||
.plugin(tauri_plugin_opener::init())
|
||||
.invoke_handler(tauri::generate_handler![
|
||||
@@ -763,7 +762,12 @@ pub fn run() {
|
||||
}
|
||||
|
||||
Ok(())
|
||||
})
|
||||
});
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
builder.plugin(tauri_plugin_decorum::init());
|
||||
|
||||
builder
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user