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:
funman300
2026-04-17 12:46:47 -07:00
parent 14eccf4ef0
commit 22fa1efabf
8 changed files with 339 additions and 20 deletions
+35
View File
@@ -25,6 +25,7 @@ pub fn run(config: &Config, name: Option<&str>) -> Result<()> {
global_vulkan_check(),
global_display_check(),
compat_dir_check(config),
wineserver_check(config),
];
let launchers: Vec<&Launcher> = if let Some(n) = name {
@@ -124,6 +125,40 @@ fn compat_dir_check(config: &Config) -> Check {
}
}
fn wineserver_check(config: &Config) -> Check {
let count = wineserver_count();
if count == 0 {
return Check::pass("wine procs", "no wineserver running");
}
let any_running = config
.launchers
.iter()
.any(crate::launcher::is_running);
if any_running {
Check::pass(
"wine procs",
format!("{count} wineserver process(es); launcher active"),
)
} else {
Check::fail(
"wine procs",
format!(
"{count} stale wineserver process(es) — try: umutray kill"
),
)
}
}
fn wineserver_count() -> usize {
Command::new("pgrep")
.args(["-c", "-f", "wineserver"])
.output()
.ok()
.and_then(|o| String::from_utf8(o.stdout).ok())
.and_then(|s| s.trim().parse::<usize>().ok())
.unwrap_or(0)
}
fn launcher_checks(l: &Launcher) -> Vec<Check> {
let mut out = Vec::new();
let tag = format!("[{}]", l.name);