fix(app): Windows stop check, size-based download progress, APPDATA in the data folder

Found running the app's admin commands on the game PC (Windows, RTX 5070
Ti): the full install, Strata started by the app downloading the 22.9 GB
model, the worker and Discord up, five spoken questions all answered.

- Windows refuses a connection to a closed local port only after about
  2 s, so the 2 s request timeout made every stop "not confirmed". The
  check now waits up to 10 s to connect and still counts only a refusal
  (not a timeout) as stopped.
- Strata 0.1.59 reports the model download as "X of Y GB"; percent()
  reads that, and the dashboard shows the current line's progress only
  (it had stayed on the engine download's 80 %).
- Strata and the NVIDIA shader cache write under %APPDATA% whatever
  STRATA_* says: the layout sets APPDATA inside the data folder on
  Windows, next to LOCALAPPDATA.

Roadmap: M5 step 5 done.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-11-12 18:51:12 +09:00
parent ac8c30022d
commit 76144fb19b
4 changed files with 55 additions and 17 deletions

View File

@@ -91,7 +91,10 @@ impl Layout {
("STRATA_COMPONENTS_DIR".into(), s(self.strata_home().join("components"))),
];
if cfg!(windows) {
// Strata keeps state under %APPDATA%\Strata and the NVIDIA driver its shader cache under
// %APPDATA% too, whatever STRATA_* says (game PC, 2026-11-12): both go in the data folder.
env.push(("LOCALAPPDATA".into(), s(self.strata_home().join("localappdata"))));
env.push(("APPDATA".into(), s(self.strata_home().join("appdata"))));
} else {
// On Windows the worker adds the pip CUDA wheels' DLL folders itself; on Linux the loader
// needs them in LD_LIBRARY_PATH before the process starts.
@@ -194,6 +197,10 @@ impl Ctx {
#[cfg(unix)]
cmd.process_group(0);
let _ = std::fs::create_dir_all(self.layout.data.join("cache").join("tmp"));
#[cfg(windows)]
for d in ["appdata", "localappdata"] {
let _ = std::fs::create_dir_all(self.layout.strata_home().join(d));
}
let name = program.file_name().map(|n| n.to_string_lossy().into_owned()).unwrap_or_default();
crate::info_log!(self.tab, "run {name} {}", args.first().copied().unwrap_or(""));
let mut child = cmd.spawn().map_err(|e| format!("{name}을(를) 실행하지 못했습니다: {e}"))?;