feat(app): update the app from the project's Gitea releases
- update.rs finds the newest app-v<version> release above the running version (v1 tags, drafts, prereleases, incomplete releases and files on another server are skipped), downloads Jarvis-Setup-<version>.exe into cache/updates checked against its .sha256, and hands it over. - update_install hashes the file again, stops what runs, starts the installer with /S /RUN as administrator and the window quits; a declined administrator prompt keeps the app with the services stopped. - New 업데이트 screen; the app checks once when the main screens open. - tauri.conf.json no longer sets its own version, so the program file carries the Cargo.toml version the update compares. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -501,6 +501,7 @@ back as Korean messages for the screen. The Tauri shell passes the screens' `inv
|
||||
| `display_driver_status` / `display_driver_install` / `display_driver_uninstall` | the virtual monitor's driver: `{supported, installed, leftover, other, action}` (Windows only, above) / install or remove it elevated (above), then its status; refused unless the services are stopped or failed, and `service_start` / `service_restart` are refused meanwhile |
|
||||
| `install_status` / `install_start` / `install_cancel` | the install steps and their state, bytes and last line / run what is not done in the background / stop it |
|
||||
| `logs_query` `{tab, level, find, after, limit}` / `logs_error_report` / `logs_export` `{from, to}` | the log hub; the zip goes to `logs/` and its path comes back |
|
||||
| `update_status` / `update_check` / `update_download` / `update_install` | updates (below): `{current, phase, latest, error, done, total}` / look for a newer release / download it in the background / stop what runs, start the installer and answer `{exit: true}`, on which the window quits without asking |
|
||||
|
||||
The invite link asks for: view channels, send messages, read history, add reactions, manage
|
||||
messages, manage channels, connect, speak, voice activity, and the slash command scope; never
|
||||
@@ -534,6 +535,9 @@ Plain HTML, CSS and an ES module, no build step, dark theme after `DESIGN.md`. A
|
||||
address or words, interval in minutes, on/off, delete), the keep days, and the results (the
|
||||
newest 100, filtered by any target that has results, each with its time, title, link and the start of its text shown
|
||||
as plain text).
|
||||
- **업데이트**: the version here, the state, "다시 확인", "받기" (with its percentage) and "설치하고
|
||||
다시 시작", and the release's notes as plain text. The app checks once when the main screens open;
|
||||
a newer release renames the button "업데이트 (새 버전)" and says so once.
|
||||
- **Logs**: tab, level and text filters, pause, live follow (lines after the last seen), "최근 오류
|
||||
복사" (to the clipboard; over 2,000 characters it suggests the zip), and the zip export by days.
|
||||
|
||||
@@ -541,6 +545,30 @@ Plain HTML, CSS and an ES module, no build step, dark theme after `DESIGN.md`. A
|
||||
the commands on 127.0.0.1; every command needs the random token it prints (`#token=` in the page
|
||||
URL), so other local programs cannot drive it.
|
||||
|
||||
## Updates (`app/src/update.rs`)
|
||||
|
||||
The app updates itself from the project's Gitea releases
|
||||
(`https://git.tkrmagid.kr/api/v1/repos/tkrmagid/javis_bot/releases`; `JARVIS_UPDATE_SOURCE` points a
|
||||
test at another server). A release of this app is tagged `app-v<version>` and carries the two files
|
||||
`installer.sh` writes, `Jarvis-Setup-<version>.exe` and its `.sha256`; publishing one is uploading
|
||||
both to a release with that tag. The repository's other releases (v1's `v1.x`) are skipped.
|
||||
|
||||
- **Check**: the release list (50 newest); drafts, prereleases, other tags, releases without both
|
||||
files, and files on another server than the list are skipped; the newest version above the
|
||||
app's own (dotted numbers, "0.2" equals "0.2.0") is offered. HTTPS only (plain HTTP only to
|
||||
127.0.0.1 or localhost). A failure keeps its reason for the screen and the `app` log tab.
|
||||
- **Download**: the `.sha256` first (64 hex digits, for that file name), then the installer into the
|
||||
data folder's `cache/updates` through the install's resumable, checked download; a mismatch
|
||||
deletes it and fails. Once it is there, earlier installers in that folder are removed. Checking
|
||||
again keeps a downloaded release ready.
|
||||
- **Install**: the file is hashed again, then what runs is stopped as when the window closes (a
|
||||
failure stops here), then the installer starts with `/S /RUN` as administrator (Windows asks)
|
||||
without waiting, and the app quits. The installer waits for it to close, replaces it and starts
|
||||
it again (above, "Installer"). Declining the administrator question keeps the app open with the
|
||||
services stopped and says so.
|
||||
- The app's version is the one in `app/Cargo.toml` and `app/shell/Cargo.toml` (kept equal; the
|
||||
program file's version comes from the latter, `tauri.conf.json` sets none).
|
||||
|
||||
## Window and Windows build (`app/shell/`)
|
||||
|
||||
- `jarvis.exe` (crate `jarvis-shell`, Tauri 2 on the WebView2 Windows already has) opens one window
|
||||
@@ -618,6 +646,13 @@ a stop right after a background start running no launch at all, and the next sta
|
||||
closing the app (the controller's shutdown after a failed stop: clean-up failing keeps it failed,
|
||||
succeeding stops it; an install in progress cancelled and waited for); command output that is not
|
||||
UTF-8 read on to the end; the window data folder (data folder, or a scratch folder removed later);
|
||||
updates (the newest release of this app picked past v1's, prerelease, incomplete and other-server
|
||||
releases; the checksum file read for its own file only; a fake Gitea on 127.0.0.1 found, downloaded,
|
||||
checked and handed over with earlier installers removed, a ready download kept by a new check, a
|
||||
file changed after the download refused, a wrong checksum never offered, an unreachable or plain
|
||||
HTTP server failing with a reason; the install command refused before a download, keeping the app
|
||||
when the administrator question is declined, and starting the installer after stopping what runs;
|
||||
one version in both Cargo.toml files and none in tauri.conf.json);
|
||||
the TTS speed reaching the worker's arguments; features and MCP servers (read and refused with
|
||||
the key, the feature tools named as the brain names them, only enabled servers in the brain's
|
||||
settings without values, stored values passed for enabled servers only, values of removed servers
|
||||
@@ -674,7 +709,9 @@ second task) refused while one runs, also after it failed; removing a driver tha
|
||||
there is nothing to remove. The installer (by hand on a Windows VM): installing into a folder that
|
||||
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
|
||||
failing nothing is installed or started; an update end to end (0.1.0 installed, a release server
|
||||
on 127.0.0.1 offering `app-v0.2.0`: the screen finds it at the start, downloads it, and "설치하고
|
||||
다시 시작" leaves 0.2.0 installed and running); with the lock held the app shows its message and exits
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user