refactor: upgrade tauri 2.0

This commit is contained in:
Kevin Yue
2024-11-30 21:29:42 +08:00
parent 3316fdf722
commit f474ab36c0
30 changed files with 5888 additions and 1961 deletions

View File

@@ -1,7 +1,7 @@
use crate::GP_CLIENT_LOCK_FILE;
use log::{info, warn};
use std::fs;
use sysinfo::{Pid, ProcessExt, Signal, System, SystemExt};
use sysinfo::{Pid, Signal, System};
pub(crate) struct DisconnectHandler;

View File

@@ -4,7 +4,7 @@ use clap::Args;
use directories::ProjectDirs;
use gpapi::{
process::service_launcher::ServiceLauncher,
utils::{endpoint::http_endpoint, env_file, shutdown_signal},
utils::{endpoint::http_endpoint, env_utils, shutdown_signal},
};
use log::info;
use tokio::io::AsyncWriteExt;
@@ -62,7 +62,7 @@ impl<'a> LaunchGuiHandler<'a> {
extra_envs.insert("GP_LOG_FILE".into(), log_file_path.clone());
// Persist the environment variables to a file
let env_file = env_file::persist_env_vars(Some(extra_envs))?;
let env_file = env_utils::persist_env_vars(Some(extra_envs))?;
let env_file = env_file.into_temp_path();
let env_file_path = env_file.to_string_lossy().to_string();