Skip to content

chore(app): pnpm local puts this checkout over the installed Botloft - #84

Merged
httpsphl merged 1 commit into
mainfrom
chore/local-install
Oct 1, 2026
Merged

httpsphl merged 1 commit into
mainfrom
chore/local-install

Conversation

@httpsphl

@httpsphl httpsphl commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Why

Trying what is on main in the Botloft I actually use meant building the NSIS installer, getting it onto the machine and running it. pnpm local does it in one step and needs no installer or release.

What app/scripts/local.mjs does

  1. Builds botloftd (cargo build --release -p botloftd) and the app (pnpm tauri build --no-bundle), which embeds the UI.
  2. Finds the install folder from HKCU\Software\Botloft\Botloft (written by hooks.nsh), falling back to %LOCALAPPDATA%\Botloft.
  3. Closes the installed Botloft.exe. Its exe is locked while it runs; the daemon keeps the bots going meanwhile.
  4. Copies the two exes it replaces into local-backup\, then copies the new ones in.
  5. Runs botloftd.exe --home %LOCALAPPDATA%\Botloft service install, with BOTLOFT_HOME removed so a dev shell cannot point it at the dev home. This copies the daemon to bin\, restarts the Botloft task and waits for /health to report the new version (spec 14).
  6. Reopens the app through start, so it holds no handles of the terminal.

Options:

  • pnpm local --no-build installs what the last build left in target/release.
  • pnpm local --restore puts back the previous exes.

CLAUDE.md documents the command and its caveat: it uses the real data. New migrations run on the real database, and an older daemon then refuses to open it (StoreError::TooNew). The updater still offers any higher release version.

Checked

I ran it on my install, going from 0.6.0 to main (0.7.0):

  • the new exes are in place and the old ones are in local-backup\;
  • the task restarted the daemon from bin\;
  • /health reports 0.7.0, and the log shows a clean start with the migrations applied;
  • the app reopened.

Trying main on the real install meant building the installer, publishing
or copying it, and running it. `pnpm local` builds botloftd and the app
for release (tauri build --no-bundle, so the UI is embedded), closes the
installed app, keeps the two exes it replaces in local-backup, copies the
new ones in, runs `service install` against the real home (the task then
runs the new daemon) and reopens the app. `--no-build` installs the last
build; `--restore` puts back the previous one.
@httpsphl
httpsphl enabled auto-merge October 1, 2026 02:00
@httpsphl
httpsphl merged commit d749144 into main Oct 1, 2026
3 checks passed
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