built wails project
This commit is contained in:
35
FCLauncher.old/src-tauri/src/system_dirs.rs
Normal file
35
FCLauncher.old/src-tauri/src/system_dirs.rs
Normal file
@ -0,0 +1,35 @@
|
||||
use dirs::home_dir;
|
||||
use std::{
|
||||
env,
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
pub fn get_local_data_directory() -> PathBuf {
|
||||
dirs::data_local_dir().unwrap().join("FCLauncher")
|
||||
}
|
||||
|
||||
pub fn get_data_directory() -> PathBuf {
|
||||
dirs::data_dir().unwrap().join("FCLauncher")
|
||||
}
|
||||
|
||||
pub fn get_java_executable() -> String {
|
||||
return format!(
|
||||
"java{}",
|
||||
if env::consts::OS == "windows" {
|
||||
".exe"
|
||||
} else {
|
||||
""
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
pub fn get_prism_executable() -> String {
|
||||
return format!(
|
||||
"{}",
|
||||
if env::consts::OS == "windows" {
|
||||
"prismlauncher.exe"
|
||||
} else {
|
||||
"PrismLauncher"
|
||||
}
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user