add warning + default config

This commit is contained in:
Julian 2023-01-31 16:48:38 -05:00
parent fc79312ded
commit 3a81828237
Signed by: NotNite
GPG key ID: BD91A5402CCEB08A

View file

@ -104,9 +104,29 @@ fn main() -> anyhow::Result<()> {
let game_exe = PathBuf::from(game_exe); let game_exe = PathBuf::from(game_exe);
let xiv_install = game_exe.parent().unwrap(); let xiv_install = game_exe.parent().unwrap();
println!("just a warning this is gonna wipe your config most likely so Be Careful\nyou have five seconds to cancel");
std::thread::sleep(std::time::Duration::from_secs(5));
get_reshade(xiv_install.to_path_buf())?; get_reshade(xiv_install.to_path_buf())?;
get_gshade_presets(xiv_install.to_path_buf())?; get_gshade_presets(xiv_install.to_path_buf())?;
println!("making screenshot folders");
std::fs::create_dir_all(xiv_install.join("reshade-screenshots"))?;
// write config file
let config = r#"
[GENERAL]
EffectSearchPaths=.\reshade-shaders\Shaders\**,.\reshade-shaders\FFXIV\**
TextureSearchPaths=.\reshade-shaders\Textures\**
[SCREENSHOT]
SavePath=.\reshade-screenshots
"#
.trim();
println!("writing config");
std::fs::write(xiv_install.join("ReShade.ini"), config)?;
println!("done lol"); println!("done lol");
Ok(()) Ok(())