fix(app): installer drops its lock before starting the app and refuses a second setup

- The lock is closed in a last hidden section once every change is done,
  so /S /RUN and the finish page's "Jarvis 실행" start the app instead of
  its "installing" message.
- An installer or uninstaller that finds the lock taken (or cannot make
  it) stops at once, silently with exit code 5, so two never run together.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-11-14 11:34:02 +09:00
parent 1ae2521d58
commit b4ea9a6af4
2 changed files with 47 additions and 12 deletions

View File

@@ -582,8 +582,11 @@ come with the first-run wizard into the data folder, which the installer never t
asks to retry or cancel; silently it stops with exit code 3, nothing installed and nothing
started.
- While it installs, updates or removes, the installer holds the named mutex
`Global\JarvisBotSetup` (`setup_lock.rs`); `jarvis.exe` started meanwhile says so in a message
box and exits (code 3) before any window or service. Before copying or removing, the installer
`Global\JarvisBotSetup` (`setup_lock.rs`) from its start until every change is done (a last
hidden section closes it, before `/RUN` and the finish page start the app); `jarvis.exe` started
meanwhile says so in a message box and exits (code 3) before any window or service. Another
installer or uninstaller finding the lock taken (or unable to make it) stops at once with a
message, silently with exit code 5, so two never run together. Before copying or removing, the installer
also waits for `jarvis.exe` to close: it asks with a retry, or silently waits up to 60 s (an
update closes the app itself), then gives up.
- `/S` installs silently with the default components; `/S /RUN` starts the app again afterwards
@@ -672,5 +675,8 @@ there is nothing to remove. The installer (by hand on a Windows VM): installing
holds other files and uninstalling keeps them; a driver removal that fails stops the uninstall with
the files and entry kept, and nothing to remove lets it finish; with no WebView2 and its installer
failing nothing is installed or started; with the lock held the app shows its message and exits
after OK, and starts normally once released. On Linux the same window test runs on an X display (one window at the given place and
after OK, and starts normally once released; `/S /RUN` (fresh, and over a running app that closes)
and the finish page's "Jarvis 실행" start the app's window; a silent install while the uninstaller's
window is open, and a silent uninstall while the installer's is, stop with code 5 and change
nothing. On Linux the same window test runs on an X display (one window at the given place and
size, the bot's tab in it).