From 3edb0357b7841f1cd9314fd1917bb866a0cba11b Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Fri, 4 Sep 2026 10:47:21 +0200 Subject: feat(packaging): put the bundled meshbay-node on the per-user PATH MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The installer had no console entry point, so running the CLI meant cd-ing into resources\node-runtime\ every time. installer.nsh now adds that dir to HKCU\Environment\Path on install and removes it on uninstall, via stock WordFunc.nsh (electron-builder's NSIS bundle has no EnVar plugin). It points at the real meshbay-node.exe dir — not a shim — so `where meshbay-node`, findNodeBinary and the W3 autostart launcher all resolve to the same binary. A WM_SETTINGCHANGE broadcast nudges open shells; new ones just work. Rebuilt: electron-builder --win nsis compiles the WordFunc includes fine, MeshBay-Setup-0.1.0.exe (155 MB). test_packaging_win.py covers the add/remove symmetry. Co-Authored-By: Claude Sonnet 5 --- packaging/win/README.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'packaging') diff --git a/packaging/win/README.md b/packaging/win/README.md index d02adca..0ba18ca 100644 --- a/packaging/win/README.md +++ b/packaging/win/README.md @@ -22,6 +22,12 @@ Runtime data stays where the node already puts it: `%LOCALAPPDATA%\meshbay\` (`node.toml`, `keystore.enc`, `unlock.key`, `data\`). The installer never writes there and the uninstaller never deletes it — installers place files, not secrets. +`build/installer.nsh` also adds `…\resources\node-runtime` to the **per-user** +`Path` (`HKCU\Environment`) so `meshbay-node` works in a terminal, and takes it +back out on uninstall. New shells only — a `WM_SETTINGCHANGE` broadcast nudges +open ones. It uses stock `WordFunc.nsh` (the `EnVar` plugin is not in +electron-builder's NSIS bundle). + ## Build On a Windows machine with **Node ≥ 22**, **Python ≥ 3.12** (`py -3.12`) and -- cgit v1.2.3