diff --git a/public/img/properties.png b/public/img/properties.png new file mode 100644 index 0000000..86cb811 Binary files /dev/null and b/public/img/properties.png differ diff --git a/src-tauri/src/commands/install/install_mod.rs b/src-tauri/src/commands/install/install_mod.rs index beef74f..cf4c6ef 100644 --- a/src-tauri/src/commands/install/install_mod.rs +++ b/src-tauri/src/commands/install/install_mod.rs @@ -28,15 +28,6 @@ pub async fn install_wbm_mod(game_path: &str) -> Result<(), InstallErr> { Ok(zip_path) => { let wbm_path = std::path::Path::new(game_path).join("BepInEx/plugins/WBM"); - println!("Removing existing files"); - match std::fs::remove_dir_all(wbm_path.clone()) { - Ok(_) => {} - Err(_) => { - println!("Failed to remove existing WBM mod files"); - return Err(InstallErr::WBMRemoveFailed); - } - }; - println!("Creating WBM directory"); match std::fs::create_dir_all(wbm_path.clone()) { Ok(_) => {} diff --git a/src-tauri/src/commands/install/launch_options.rs b/src-tauri/src/commands/install/launch_options.rs index c30e320..ce9530e 100644 --- a/src-tauri/src/commands/install/launch_options.rs +++ b/src-tauri/src/commands/install/launch_options.rs @@ -19,6 +19,10 @@ pub async fn unix_launch_option_setup() -> Result<(), InstallErr> { } }; + // todo: make run_bepinex.sh executable + + // todo: send launch option string to frontend + if is_already_set() { println!("Steam launch option is already set. Skipping."); return Ok(()); @@ -52,7 +56,7 @@ fn is_already_set() -> bool { // todo: improve logic // 1. find line only containing "750470" // 2. find next closest line only containing "}" - // 3. check if section contains "./run_bepinex.sh %command%" + // 3. check if section contains "run_bepinex.sh" // run_bepinex.sh // %command% diff --git a/src-tauri/src/commands/install/mod.rs b/src-tauri/src/commands/install/mod.rs index ab109d3..9df04e3 100644 --- a/src-tauri/src/commands/install/mod.rs +++ b/src-tauri/src/commands/install/mod.rs @@ -53,10 +53,6 @@ pub async fn install(game_path: String) -> Result<(), InstallErr> { default_game_path } else { - if !util::is_game_path_valid(&game_path) { - return Err(InstallErr::GamePathNotValid); - } - game_path }; let game_path = game_path.as_str(); diff --git a/src-tauri/src/commands/install/types.rs b/src-tauri/src/commands/install/types.rs index 3b3a035..c44f853 100644 --- a/src-tauri/src/commands/install/types.rs +++ b/src-tauri/src/commands/install/types.rs @@ -4,12 +4,10 @@ pub enum InstallErr { UnsupportedOS, FailedToGetGamePath, - GamePathNotValid, RemoveOldFilesFailed, BepInExDownloadFailed, BepInExUnzipFailed, WBMDownloadFailed, - WBMRemoveFailed, WBMDirectoryCreationFailed, WBMUnzipFailed, LaunchOptionNotSet, diff --git a/src/pages/Home/ActionButtons.svelte b/src/pages/Home/ActionButtons.svelte index 2289818..fca0028 100644 --- a/src/pages/Home/ActionButtons.svelte +++ b/src/pages/Home/ActionButtons.svelte @@ -10,7 +10,7 @@