fix(app): installer removes only its own files and stops on failed steps

- installer.sh lists every packaged file for the uninstaller, and folders
  are removed only when empty, so a chosen folder keeps other files.
- A virtual monitor driver removal that fails stops the uninstall with
  everything kept (silent exit code 4); the elevated half exits 2 when
  there is no driver of ours to remove, which the uninstaller accepts.
- WebView2 is installed before any file is copied; when it is still
  missing the installer asks to retry, or silently stops with code 3
  without installing or starting anything.
- The installer holds Global\JarvisBotSetup while it runs; jarvis.exe
  started meanwhile shows a message and exits before any window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-11-14 11:26:28 +09:00
parent 5ce832f51a
commit 1ae2521d58
7 changed files with 192 additions and 33 deletions

View File

@@ -41,6 +41,11 @@ fn main() {
if let Some(code) = jarvis_app::vdisplay::elevated_main(&std::env::args().collect::<Vec<_>>()) {
std::process::exit(code);
}
// Not while an installer installs, updates or removes Jarvis (admin.spec.md, "Installer").
if jarvis_app::setup_lock::held() {
jarvis_app::setup_lock::tell();
std::process::exit(3);
}
let location = arg("--location").map(PathBuf::from).or_else(jarvis_app::datadir::default_location_file)
.expect("no location file path: pass --location");
// Log files go to the data folder once there is one; until then memory only.