modified: README.md
modified: src/config.rs modified: src/diagnose.rs modified: src/launcher.rs modified: src/main.rs new file: src/setup.rs modified: src/tray.rs
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
use crate::config::{Config, Launcher};
|
||||
use anyhow::Result;
|
||||
|
||||
/// Print manual setup steps for a launcher.
|
||||
///
|
||||
/// This is a stub until the iced-based setup wizard lands. It walks the
|
||||
/// user through creating the prefix directory, obtaining the installer,
|
||||
/// and running it through umu.
|
||||
pub fn run(config: &Config, launcher: &Launcher) -> Result<()> {
|
||||
let version = launcher
|
||||
.proton_version
|
||||
.as_deref()
|
||||
.unwrap_or(&config.proton_version);
|
||||
let proton_path: String = if version == "GE-Proton" {
|
||||
version.to_string()
|
||||
} else {
|
||||
config
|
||||
.proton_compat_dir
|
||||
.join(version)
|
||||
.display()
|
||||
.to_string()
|
||||
};
|
||||
|
||||
println!("Setup steps for \x1b[1m{}\x1b[0m ({})", launcher.display, launcher.name);
|
||||
println!();
|
||||
println!("1. Create the prefix directory:");
|
||||
println!(" mkdir -p {}", launcher.prefix_dir.display());
|
||||
println!();
|
||||
println!("2. Obtain the Windows installer for {}.", launcher.display);
|
||||
if let Some(url) = &launcher.installer_url {
|
||||
println!(" (configured source: {url})");
|
||||
} else {
|
||||
println!(
|
||||
" No installer URL is configured for '{}'.",
|
||||
launcher.name
|
||||
);
|
||||
println!(" Download the installer from the vendor and save it locally.");
|
||||
}
|
||||
println!();
|
||||
println!("3. Run the installer under umu (replace INSTALLER.EXE with the path):");
|
||||
println!(
|
||||
" WINEPREFIX={} \\",
|
||||
launcher.prefix_dir.display()
|
||||
);
|
||||
println!(" GAMEID={} \\", launcher.gameid);
|
||||
println!(" PROTONPATH={proton_path} \\");
|
||||
println!(" umu-run INSTALLER.EXE");
|
||||
println!();
|
||||
println!("4. After the installer finishes, verify it placed:");
|
||||
println!(" {}", launcher.full_exe_path().display());
|
||||
println!();
|
||||
println!("5. Then: umutray launch {}", launcher.name);
|
||||
println!();
|
||||
println!(
|
||||
"(A graphical setup wizard via iced is planned — this stub prints the manual\n \
|
||||
steps in the meantime.)"
|
||||
);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user