Add setup tray entry, wizard progress/log, config add/remove, stale-wine check
- tray: uninstalled launchers now show a "Setup…" entry that spawns the setup wizard as a child process. - setup.rs: download shows a progress bar (bytes / total), and umu-run stdout+stderr stream into a scrollable log pane. A 250 ms tick subscription pulls updates from the shared state. - config add-launcher / remove-launcher CLI, with sensible defaults for prefix_dir, gameid, and process_pattern derived from name/exe. - diagnose: flag stale wineserver processes when no launcher is running, suggesting `umutray kill`. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+58
@@ -98,6 +98,40 @@ enum ConfigAction {
|
||||
#[arg(long, value_name = "PATH")]
|
||||
compat_dir: Option<PathBuf>,
|
||||
},
|
||||
/// Add a new launcher to the config
|
||||
AddLauncher {
|
||||
/// Short CLI name (e.g. "heroic")
|
||||
name: String,
|
||||
|
||||
/// Windows exe path relative to drive_c/ (e.g. "Program Files/Foo/foo.exe")
|
||||
#[arg(long, value_name = "PATH")]
|
||||
exe_path: PathBuf,
|
||||
|
||||
/// Display name for menus (defaults to NAME)
|
||||
#[arg(long)]
|
||||
display: Option<String>,
|
||||
|
||||
/// Wine prefix dir (defaults to ~/Games/NAME)
|
||||
#[arg(long, value_name = "PATH")]
|
||||
prefix_dir: Option<PathBuf>,
|
||||
|
||||
/// umu GAMEID (defaults to "umu-NAME")
|
||||
#[arg(long)]
|
||||
gameid: Option<String>,
|
||||
|
||||
/// pgrep -f regex (defaults to escaped exe basename)
|
||||
#[arg(long)]
|
||||
process_pattern: Option<String>,
|
||||
|
||||
/// Optional installer URL
|
||||
#[arg(long)]
|
||||
installer_url: Option<String>,
|
||||
},
|
||||
/// Remove a launcher from the config (leaves its prefix on disk)
|
||||
RemoveLauncher {
|
||||
/// Short CLI name
|
||||
name: String,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Subcommand)]
|
||||
@@ -173,6 +207,30 @@ fn main() -> Result<()> {
|
||||
let mut c = config;
|
||||
c.set_globals(proton_version, compat_dir)?;
|
||||
}
|
||||
ConfigAction::AddLauncher {
|
||||
name,
|
||||
exe_path,
|
||||
display,
|
||||
prefix_dir,
|
||||
gameid,
|
||||
process_pattern,
|
||||
installer_url,
|
||||
} => {
|
||||
let mut c = config;
|
||||
c.add_launcher(
|
||||
name,
|
||||
display,
|
||||
exe_path,
|
||||
prefix_dir,
|
||||
gameid,
|
||||
process_pattern,
|
||||
installer_url,
|
||||
)?;
|
||||
}
|
||||
ConfigAction::RemoveLauncher { name } => {
|
||||
let mut c = config;
|
||||
c.remove_launcher(&name)?;
|
||||
}
|
||||
},
|
||||
|
||||
Commands::Service { action } => match action {
|
||||
|
||||
Reference in New Issue
Block a user