Add detect command to find installed launchers on disk
Scans common Wine prefix locations (~/Games, ~/.wine, Lutris, Bottles, Heroic) plus any user-supplied --dir paths for each configured launcher's exe. Reports matches with four markers: ✓ already configured at that prefix → detected at a different prefix (--apply to update) ⚠ multiple prefixes match (ambiguous) · not found --apply writes the new prefix_dir back to config.toml for unambiguous cases; ambiguous ones are skipped with a note to resolve via `config edit`. The Setup doc comment is also refreshed since the iced wizard landed in an earlier commit. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+17
-1
@@ -1,4 +1,5 @@
|
||||
mod config;
|
||||
mod detect;
|
||||
mod diagnose;
|
||||
mod launcher;
|
||||
mod proton;
|
||||
@@ -61,12 +62,23 @@ enum Commands {
|
||||
launcher: Option<String>,
|
||||
},
|
||||
|
||||
/// Print setup instructions for a launcher (automated wizard coming soon)
|
||||
/// Open the graphical setup wizard for a launcher
|
||||
Setup {
|
||||
/// Launcher name
|
||||
name: String,
|
||||
},
|
||||
|
||||
/// Scan common Wine prefix locations for installed launchers
|
||||
Detect {
|
||||
/// Additional directory to scan (repeatable)
|
||||
#[arg(long, value_name = "PATH")]
|
||||
dir: Vec<PathBuf>,
|
||||
|
||||
/// Write detected prefix_dirs to config
|
||||
#[arg(long)]
|
||||
apply: bool,
|
||||
},
|
||||
|
||||
/// Download and switch GE-Proton versions
|
||||
UpdateProton {
|
||||
/// Install the latest release automatically
|
||||
@@ -296,6 +308,10 @@ fn main() -> Result<()> {
|
||||
setup::run(&config, l)?;
|
||||
}
|
||||
|
||||
Commands::Detect { dir, apply } => {
|
||||
detect::run(&config, &dir, apply)?;
|
||||
}
|
||||
|
||||
Commands::UpdateProton { latest, version, list } => {
|
||||
proton::run(&config, latest, version, list)?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user