Optimize builds

This commit is contained in:
Lncvrt committed 2026-03-27 12:27:05 -07:00
1 parent 387bd54ce2
commit e2d98307c0
2 files changed
+14 -3

No files matched your search

+10 -2
View File
@@ -25,8 +25,7 @@ tauri-plugin-fs = "2.4.5"
zip = "8.4.0" zip = "8.4.0"
tauri-plugin-dialog = "2.6.0" tauri-plugin-dialog = "2.6.0"
tauri-plugin-notification = "2.3.3" tauri-plugin-notification = "2.3.3"
sysinfo = "0.38.4" sha2 = "0.11.0"
sha2 = "0.10.9"
tauri-plugin-clipboard-manager = "2.3.2" tauri-plugin-clipboard-manager = "2.3.2"
tauri-plugin-prevent-default = "4.0.4" tauri-plugin-prevent-default = "4.0.4"
openssl = { version = "0.10.76", features = ["v110", "vendored"] } openssl = { version = "0.10.76", features = ["v110", "vendored"] }
@@ -35,9 +34,18 @@ tauri-plugin-http = "2.5.7"
dashmap = "6.1.0" dashmap = "6.1.0"
tauri-plugin-store = "2.4.2" tauri-plugin-store = "2.4.2"
[target.'cfg(any(target_os = "windows", target_os = "linux"))'.dependencies]
sysinfo = "0.38.4"
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies] [target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
tauri-plugin-single-instance = "2.4.0" tauri-plugin-single-instance = "2.4.0"
tauri-plugin-window-state = "2.4.1" tauri-plugin-window-state = "2.4.1"
[target.'cfg(target_os = "windows")'.dependencies] [target.'cfg(target_os = "windows")'.dependencies]
tauri-plugin-decorum = "1.1.1" tauri-plugin-decorum = "1.1.1"
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
strip = true
+4 -1
View File
@@ -15,7 +15,6 @@ use std::{
process::Command, process::Command,
time::Duration, time::Duration,
}; };
use sysinfo::System;
use tauri::window::{ProgressBarState, ProgressBarStatus}; use tauri::window::{ProgressBarState, ProgressBarStatus};
use tauri::{AppHandle, Emitter, Manager}; use tauri::{AppHandle, Emitter, Manager};
use tauri_plugin_os::platform; use tauri_plugin_os::platform;
@@ -25,6 +24,9 @@ use tokio::{io::AsyncWriteExt, time::timeout};
use zip::ZipArchive; use zip::ZipArchive;
use zip::result::ZipError; use zip::result::ZipError;
#[cfg(any(target_os = "windows", target_os = "linux"))]
use sysinfo::System;
#[cfg(unix)] #[cfg(unix)]
use std::os::unix::fs::PermissionsExt; use std::os::unix::fs::PermissionsExt;
@@ -38,6 +40,7 @@ fn is_cancelled(name: &str) -> bool {
cancel_map().get(name).map(|v| *v).unwrap_or(false) cancel_map().get(name).map(|v| *v).unwrap_or(false)
} }
#[cfg(any(target_os = "windows", target_os = "linux"))]
fn is_running_by_path(path: &Path) -> bool { fn is_running_by_path(path: &Path) -> bool {
let sys = System::new_all(); let sys = System::new_all();
let target = match path.canonicalize() { let target = match path.canonicalize() {