Migrate to Electrobun 2.0.2 (Hutch)
Electrobun 2.x replaces the vendored CLI with Hutch: the npm package is now a
bootstrap whose exports are a throwing stub, and the SDK is projected into
.hutch/devkit. The app stays on the Bun main process — `mainProcess: "bun"` is
load-bearing, since the 2.x default (Cottontail) ignores build.bun and with it
the ssh2 externals — and the bundle now ships the pinned Bun 1.4.0.
- electrobun 2.0.2 as an exact devDependency. `electrobun prepare` takes the
old CLI re-sign step's slot in postinstall and every dev/build/start/release
script: tsc (root tsconfig extends the devkit's) and the Angular build
(electrobun/view mapped into the devkit) resolve the SDK there.
- Imports move to electrobun/main. The CLI re-sign script and the v1 "three"
type shim are gone (Hutch's binaries are validly signed).
- UI: Electroview's bunSocket is hostSocket; noImplicitReturns is off because
the devkit's raw-TS browser SDK compiles inside the UI program.
- Updater.applyUpdate() now consults before-quit, so the transfers/unsaved
guard's "Quit Anyway" re-runs the apply instead of quitting without it.
- 2.x applies trafficLightOffset from macOS's default button position (1.18.1
clamped it inside the titlebar); {12, 4} centres the lights in the header.
- Releases: mac-x64 dropped (2.x publishes no macOS x64 core, so no Rosetta
path). artifacts/ is emptied before each build and published verbatim.
Installers lost the stable- prefix (the update feed kept it), so release.ts,
deploy.sh and the site links follow. Linux ships Electrobun's Setup
installer instead of the portable tarball and its miniSCP.sh wrapper.
- Docs cover all of the above, plus re-checks against 2.0.2: still no native
modal windows; window close is now cancellable through will-close.
Verified: tsc, build:ui, a stable mac-arm64 release (dmg + the v1-compatible
stable-macos-arm64 feed) and dev launches (RPC, Settings window, traffic
lights). Windows/Linux builds and the v1 -> 2.x Windows update bridge still
need their first run on native machines.
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
+36
-27
@@ -1,8 +1,9 @@
|
||||
# Platform notes — macOS / Windows / Linux behavior matrix
|
||||
|
||||
macOS is the primary target; Windows 11+ x64 and Linux x64 are **beta** targets
|
||||
(win-arm64 and linux-arm64 deferred). Every platform seam carries a
|
||||
`PORTABILITY:` comment at the branch site.
|
||||
macOS (Apple Silicon) is the primary target; Windows 11+ x64 and Linux x64 are
|
||||
**beta** targets (win-arm64 and linux-arm64 deferred). **Intel Macs were
|
||||
dropped** with the move to Electrobun 2.x, which publishes no macOS x64 core.
|
||||
Every platform seam carries a `PORTABILITY:` comment at the branch site.
|
||||
|
||||
## Seam inventory (where platform branches live)
|
||||
|
||||
@@ -81,7 +82,8 @@ ldd build/dev-linux-x64/*/bin/libNativeWrapper.so | grep 'not found'
|
||||
|
||||
`libasar.so => not found` in that output is **expected and harmless** — it ships
|
||||
in the same `bin/` folder and resolves at load time; only an unresolved
|
||||
`libayatana-appindicator3.so.1` is fatal.
|
||||
`libayatana-appindicator3.so.1` is fatal. (Hard link and path verified on
|
||||
1.18.1 — re-check both on the first 2.x Linux build.)
|
||||
|
||||
**Tray visibility** is a separate matter from linking: GNOME 3.26+ hides the
|
||||
legacy tray, so the icon needs the
|
||||
@@ -92,23 +94,26 @@ either way — the tray is a convenience, and every action it offers exists in-a
|
||||
## Linux known issues (upstream electrobun)
|
||||
|
||||
- **No native menus of any kind.** Application menus and `showContextMenu` are
|
||||
both no-ops (electrobun's `dist/api/bun/proc/linux.md`; the app logs
|
||||
both no-ops (electrobun's `.hutch/devkit/api/sdks/main/proc/linux.md`, still in
|
||||
2.0.2; the app logs
|
||||
"Application menus are not supported on Linux" at boot). The app menubar was
|
||||
already macOS-only, and the panel context menus are now HTML on every platform,
|
||||
so nothing is missing at the UI level — but do not add a feature that depends
|
||||
on a native menu.
|
||||
- **NVIDIA renders black without the DMABUF workaround.** WebKitGTK can't
|
||||
allocate GBM buffers on the proprietary driver, so the window paints nothing
|
||||
while the log looks perfectly healthy. Every launch path sets
|
||||
`WEBKIT_DISABLE_DMABUF_RENDERER=1` when `/proc/driver/nvidia` exists —
|
||||
`scripts/linux-gpu.ts` for dev, the `miniSCP.sh` wrapper in the tarball for
|
||||
releases. The app can't do it itself (Bun's `process.env` writes don't reach
|
||||
child processes); see [gotchas.md](gotchas.md#linux).
|
||||
while the log looks perfectly healthy. The dev launches
|
||||
(`scripts/linux-gpu.ts`) set `WEBKIT_DISABLE_DMABUF_RENDERER=1` when
|
||||
`/proc/driver/nvidia` exists; an installed build (the official Setup
|
||||
installer) does not — launch it with that variable set (e.g. in the desktop
|
||||
entry's `Exec`). The app can't do it itself (Bun's `process.env` writes don't
|
||||
reach child processes); see [gotchas.md](gotchas.md#linux).
|
||||
- **Benign startup noise**: a deprecation warning pointing at
|
||||
`libayatana-appindicator-glib`. Not fatal.
|
||||
- **Unsigned, unpackaged**: the release artifact is a portable tarball — no
|
||||
AppImage, `.deb`, `.desktop` entry or icon installation. Unpack and run
|
||||
`miniSCP.sh` (which execs `bin/launcher`).
|
||||
- **Unsigned; Electrobun's own installer**: the release artifact is
|
||||
`linux-x64-miniSCP-Setup.tar.gz` — a self-extracting `installer` + README
|
||||
(2.x does the desktop-entry packaging and ships an uninstaller); no AppImage
|
||||
or `.deb`. Layout unverified until the first 2.x Linux build.
|
||||
|
||||
## First-Linux-boot smoke test
|
||||
|
||||
@@ -130,21 +135,24 @@ either way — the tray is a convenience, and every action it offers exists in-a
|
||||
(temp download → save → auto-upload) with the inotify watcher.
|
||||
6. Move to Trash lands the item in the desktop's trash; connections.json is 0600.
|
||||
7. `bun scripts/release.ts --target linux-x64` produces
|
||||
`release/linux-x64/miniSCP-Build<N>-linux-x64.tar.gz`; unpack it elsewhere and
|
||||
run `miniSCP.sh`.
|
||||
`release/linux-x64/miniSCP-Build<N>-linux-x64-Setup.tar.gz`; unpack it
|
||||
elsewhere, run its `installer`, then launch the installed app (on NVIDIA with
|
||||
`WEBKIT_DISABLE_DMABUF_RENDERER=1`).
|
||||
|
||||
## Windows known issues (upstream electrobun, documented not fixed)
|
||||
|
||||
- **HiDPI blur** — WebView2 renders at 1x on scaled displays
|
||||
(blackboardsh/electrobun#324, open). Most user-visible defect; wait for
|
||||
upstream DPI awareness.
|
||||
(blackboardsh/electrobun#324, seen on 1.18.1). Most user-visible defect; 2.x
|
||||
lists per-monitor DPI setup among its Windows fixes — re-check on the first
|
||||
2.x Windows build.
|
||||
- **Notifications** are legacy balloon style (`Shell_NotifyIcon`), not
|
||||
Windows toasts.
|
||||
- **Unsigned binaries** — Setup.exe and the portable exe both trigger
|
||||
SmartScreen / Mark-of-the-Web on first run. No Authenticode support in
|
||||
electrobun 1.18.1 (signtool post-hook or electrobun-builder are options
|
||||
later). Installer unpacks to `%LOCALAPPDATA%`, desktop shortcut only — no
|
||||
Start Menu entry or uninstaller.
|
||||
SmartScreen / Mark-of-the-Web on first run. No Authenticode support (2.x:
|
||||
"Windows release signing is not currently part of Hutch's packaging
|
||||
pipeline"; a signtool post-hook is an option later). Installer unpacks to
|
||||
`%LOCALAPPDATA%`, desktop shortcut only; 2.x installer builds add an
|
||||
uninstaller (`%LOCALAPPDATA%\<identifier>\<install-root>\uninstall.exe`).
|
||||
- `hiddenInset` degrades to `hidden` on Windows — irrelevant here because
|
||||
non-mac windows use the native titlebar.
|
||||
- `findInPage` is a `window.find()` shim on WebView2 — irrelevant here, the
|
||||
@@ -155,10 +163,11 @@ either way — the tray is a convenience, and every action it offers exists in-a
|
||||
Code paths written blind (no Windows box was available); verify in order:
|
||||
|
||||
1. Build: `bun scripts/release.ts --target win-x64` on the Windows machine —
|
||||
core binaries download from GitHub releases on first run; Setup.zip AND
|
||||
the portable zip appear under `release/win-x64/` (the portable step warns
|
||||
instead of failing if the assembled-app folder layout differs — fix the
|
||||
`appDir` path in release.ts if so).
|
||||
Hutch, the core and the pinned Bun download into `~/.hutch` on first run;
|
||||
Setup.zip AND the portable zip appear under `release/win-x64/` (the portable
|
||||
step warns instead of failing if the assembled-app folder layout differs —
|
||||
fix the `appDir` path in release.ts if so). A v1 0.1.78 install must pick up
|
||||
the published 2.x build through its updater (the bridge release).
|
||||
2. App boots, tray icon renders colored, window has a native titlebar.
|
||||
3. Drives dropdown in each panel lists `C:\` (+ others); navigating to a
|
||||
drive root hides the `'..'` row; the path bar shows consistent `\` paths.
|
||||
@@ -175,5 +184,5 @@ Code paths written blind (no Windows box was available); verify in order:
|
||||
user after saving a connection.
|
||||
9. Editor/manager/Settings windows open, modal bounce works, Ctrl+, opens
|
||||
Settings and About shows from its About section.
|
||||
10. Known-issue confirmation: HiDPI blur on a scaled display (expected until
|
||||
upstream fixes it).
|
||||
10. Known-issue check: HiDPI blur on a scaled display (seen on 1.18.1 — 2.x's
|
||||
per-monitor DPI setup may have fixed it).
|
||||
|
||||
Reference in New Issue
Block a user