Skip to content

feat(setup): Botloft's own install window (I1) - #46

Merged
httpsphl merged 2 commits into
mainfrom
feat/setup-window
Sep 30, 2026
Merged

httpsphl merged 2 commits into
mainfrom
feat/setup-window

Conversation

@httpsphl

Copy link
Copy Markdown
Owner

What

The first milestone of the setup window (spec 15.7, I1). The file people download opens a window of Botloft's own: the mascot, the name and one button, in the app's look, three languages and the Windows theme (light or dark). Behind it, the NSIS installer it carries runs quietly (/S). Shortcuts, the Installed apps entry, the uninstaller, WebView2 and the service hook stay as they were, and so do updates, which keep using the NSIS installer directly.

Pages

  • Ready to install: Install, with "Installs just for you, without asking for an administrator."
  • Already installed: Update for an older version; Open Botloft and Install again for the same one; only Open Botloft for a newer one.
  • The app is open: a line says it closes to install and the bots keep working.
  • Installing: the mascot working and a bar with no percentage. The close button hides until it ends.
  • Done: "All set.", then the installed app opens and the setup closes.
  • Failed: Try again or Use the classic installer, with the exit code under Details.

How

  • botloft-setup (app/src-setup), a small Tauri app:
    • It reads Installed apps, closes the Botloft.exe running from the install folder and writes the installer to a folder of its own under %TEMP%.
    • It runs the installer with /S, deletes the folder and opens the installed app.
    • Its manifest asks for asInvoker, since Windows takes a program with "setup" in its name for an installer.
    • Without WebView2 it hands over to the classic installer.
    • WebView2 keeps its files in %TEMP%\Botloft-setup-webview.
    • A build without the installer inside only rehearses: the pages pretend and nothing is installed.
  • The page (app/src/setup, entry setup.html) depends on SetupHost only. FakeSetupHost drives the tests and the dev preview at /setup.html (?relation=older&installed=0.5.0&running&fail).
  • pnpm bundle:setup (scripts/setup.mjs) builds the page with vite build --mode setup into dist-setup, then the crate with --features tauri/custom-protocol and the installer from pnpm bundle inside. The output is target\release\bundle\setup\Botloft_<version>_x64-setup.exe, 15.4 MB for 0.5.0.
  • scripts/workspace.mjs now holds the workspace version for both the release and the setup scripts.
  • Spec 15.7 describes it and records the tests. CLAUDE.md lists the new command.

Tests

  • cargo fmt, cargo clippy --workspace --all-targets -D warnings, cargo test --workspace and pnpm check (190 tests) pass. pnpm build still builds only the app.
  • Rust: version comparison (by number, tags ignored, unreadable counts as older), the installer's folder order, quoted registry values, the unique temp folder that goes away, and matching the app's folder as Windows does.
  • App: every page, installing then opening, update, install again, newer only opens, the open-app line, failure with retry and the classic installer, opening that fails, and closing from the title strip.

Real test (Windows 11 25H2, 0.5.0)

  • The setup opened with no administrator prompt.
  • A fresh install took about 3 s. It created the Installed apps entry (publisher "Botloft", folder %LOCALAPPDATA%\Botloft), opened the app from that folder and deleted the temp folder.
  • Install again with the app open closed it, installed and opened it again. No uninstaller process showed up: NSIS /S over the same version only overwrites.
  • The daemon kept running throughout.

Still open (I2 and I3 in spec 15.7)

  • I2: the release publishes the setup as Botloft_<version>_x64-setup.exe and NSIS as -update.exe for latest.json; README.
  • I3: installing over an older version, a newer version installed, NSIS /S with the app open when the setup does not close it, and no WebView2.

…uietly

The file people download opens a window of Botloft's own (spec 15.7): the
mascot, the name and one button, in the app's look, three languages and
the Windows theme. Behind it, the NSIS installer it carries runs with /S,
so shortcuts, Installed apps, the uninstaller, WebView2 and the service
hook stay as they were, and so do updates.

- botloft-setup (app/src-setup): reads what Installed apps says, closes
  the open app, runs the installer from a folder of its own under %TEMP%,
  deletes it and opens the installed app. Its manifest asks for asInvoker,
  since Windows takes a "setup" program for an installer. Without WebView2
  it hands over to the classic installer. A build without the installer
  inside only rehearses.
- The page (app/src/setup, setup.html) depends on SetupHost only; the
  fake drives the tests and the dev preview at /setup.html.
- pnpm bundle:setup builds the page with `vite build --mode setup` and the
  crate with the installer from `pnpm bundle` inside.

Tested for real on Windows 11: a fresh install took about 3 s, created
the Installed apps entry and opened the app; "Install again" with the app
open closed it, installed and opened it again, and the daemon kept
running throughout. Spec 15.7 records the results.
@httpsphl
httpsphl enabled auto-merge September 30, 2026 02:20
@httpsphl
httpsphl merged commit e5d144f into main Sep 30, 2026
3 checks passed
@httpsphl httpsphl mentioned this pull request Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant