Make Linux a supported platform: HTML context menus + runtime deps + release target
`bun run start` died on Linux with ERR_DLOPEN_FAILED (missing libayatana-appindicator3.so.1). Fixing the environment exposed the real gap: electrobun's ContextMenu.showContextMenu is a documented no-op on Linux, and since the UI suppresses the webview's own right-click menu, EVERY panel context menu was silently dead there — Send to Other Panel, Open, Rename, Permissions, Delete, Copy Path, Reveal and the column picker all unreachable. Electrobun itself logs "Application menus are not supported on Linux. Implement menu UI in your webview HTML instead." at boot. - Context menus are now HTML on EVERY platform (ui/src/app/context-menu.ts + context-menu.service.ts), not just as a Linux fallback: one implementation cannot drift from a second one. The item builders are ported verbatim from the old bun menu, so ordering, per-platform labels and the Windows-local chmod hide are unchanged, and picks are emitted as the same `ctx-*` / `col:*` strings through RpcService.emitMenuAction — App.handleMenuAction is untouched and still the single dispatcher for both the macOS menubar and right-clicks. Adds what the native menu gave for free: arrow/Enter/Escape keys, viewport edge-flip, close on blur/resize/scroll. The Edit item now shows the real F4 hint instead of the native menu's "e" mnemonic. - New shellItemAction RPC replaces showRowMenu/showColumnsMenu — the only part the webview can't do itself (reveal, open-with-default, copy path). Deletes src/bun/context-menu.ts entirely. - release.ts gains a linux-x64 target. Electrobun emits only the .tar.zst updater blob on Linux, so the artifact is a .tar.gz of the assembled app folder, mirroring the Windows portable zip. - Docs: platform-notes gets a Linux runtime-dependency table (AppIndicator is linked HARD — a missing lib is a boot failure, not a degraded tray), the ldd diagnostic, GNOME tray caveat, known issues and a first-boot smoke test; gotchas gets the ERR_DLOPEN_FAILED trail and the benign GLX/GBM startup noise; architecture/build-and-release/README updated accordingly. Verified: backend `tsc --noEmit` clean, `bun run build:ui` clean (399 kB initial), app boots on Linux with no errors beyond the documented benign warnings. NOT verified on macOS/Windows — the native menu is retired on those platforms too, so the menus need eyeballing on a Mac before the next release. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -15,7 +15,8 @@ remote server over SSH/SFTP, so you can move files **local↔remote**,
|
||||
Dense reference material lives in [docs/](docs/): [architecture](docs/architecture.md)
|
||||
(processes, windows, RPC, every module/service), [build & release](docs/build-and-release.md)
|
||||
(Build-n versioning, per-target release pipeline, CI), [platform notes](docs/platform-notes.md)
|
||||
(macOS/Windows matrix + smoke tests), and [gotchas](docs/gotchas.md) (known landmines).
|
||||
(macOS/Windows/Linux matrix, runtime deps + smoke tests), and
|
||||
[gotchas](docs/gotchas.md) (known landmines).
|
||||
|
||||
## Features
|
||||
|
||||
@@ -75,6 +76,11 @@ ui/src/app/ Angular components + signal services
|
||||
|
||||
- [Bun](https://bun.sh) ≥ 1.3 (`bun --version`).
|
||||
- macOS: **Xcode Command Line Tools** (for the app build).
|
||||
- Linux: **AppIndicator** — the app links it for the tray and will not start
|
||||
without it (`ERR_DLOPEN_FAILED`). `libayatana-appindicator` (Arch),
|
||||
`libayatana-appindicator3-1` (Debian/Ubuntu),
|
||||
`libayatana-appindicator-gtk3` (Fedora), plus system `webkit2gtk`.
|
||||
Details and diagnostics in [platform notes](docs/platform-notes.md).
|
||||
- No Node install required — a preload shim (`scripts/node-version-shim.ts`)
|
||||
satisfies the Angular CLI's Node version check while running under Bun.
|
||||
|
||||
@@ -107,11 +113,13 @@ cross-compile between OSes:
|
||||
bun run release -- --target mac-arm64 # on the Mac (native)
|
||||
bun run release -- --target mac-x64 # on the same arm64 Mac, via Rosetta 2
|
||||
bun run release -- --target win-x64 # on a Windows 11 x64 machine
|
||||
bun run release -- --target linux-x64 # on a Linux x64 machine
|
||||
```
|
||||
|
||||
Artifacts land in `release/<target>/miniSCP-Build<n>-<target>.*` — a `.dmg`
|
||||
per mac arch; on Windows a `-Setup.zip` installer **and** a `-portable.zip`
|
||||
(unzip anywhere and run). The mac-x64 build fetches electrobun's x64 CLI once
|
||||
(unzip anywhere and run); on Linux a portable `.tar.gz` (unpack and run
|
||||
`bin/launcher`). The mac-x64 build fetches electrobun's x64 CLI once
|
||||
into `~/.cache/miniscp/` and runs it under Rosetta so the whole pipeline
|
||||
believes it is on an Intel Mac. CI: `.gitea/workflows/release.yml` runs the
|
||||
same script on a macos + windows runner matrix once act_runners are
|
||||
@@ -210,6 +218,12 @@ shell-integration wording, drive listing, and the connections-file ACL. The
|
||||
application menu ([src/bun/menu.ts](src/bun/menu.ts)) is macOS-only for now;
|
||||
the in-app UI covers every menu action.
|
||||
|
||||
Right-click menus are **HTML, on every platform**
|
||||
([ui/src/app/context-menu.ts](ui/src/app/context-menu.ts)) rather than native —
|
||||
electrobun's native context menu is a documented no-op on Linux, and one menu
|
||||
implementation beats two that drift. Only reveal / open-with-default / copy-path
|
||||
cross to the backend, through the `shellItemAction` RPC.
|
||||
|
||||
## Windows (beta)
|
||||
|
||||
Windows 11+ x64 is supported as a **beta** target (win-arm64 deferred). All
|
||||
@@ -231,6 +245,28 @@ drive root ('..' disappears); local↔remote transfers; external editor launch
|
||||
renders colored; Permissions absent on local panels; Ctrl+labels in tooltips;
|
||||
portable zip runs from any folder.
|
||||
|
||||
## Linux (beta)
|
||||
|
||||
Linux x64 is supported as a **beta** target and builds a portable tarball.
|
||||
One hard requirement: the AppIndicator library listed under
|
||||
[Prerequisites](#prerequisites) — electrobun links it for the tray, so without
|
||||
it the app aborts at startup with `ERR_DLOPEN_FAILED` rather than merely losing
|
||||
its tray icon.
|
||||
|
||||
- **No native menus at all** upstream (both the app menubar and context menus
|
||||
are no-ops). The menubar was already macOS-only and the context menus are now
|
||||
HTML, so nothing is missing in practice.
|
||||
- **Tray visibility** depends on the desktop: KDE, XFCE, MATE and Cinnamon show
|
||||
it; GNOME 3.26+ needs the AppIndicator extension. The app works either way.
|
||||
- **Unsigned and unpackaged**: no AppImage, `.deb`, desktop entry or icon
|
||||
installation — unpack the tarball and run `bin/launcher`.
|
||||
- Harmless startup warnings (`GLXBadWindow`, `Failed to create GBM buffer`, an
|
||||
appindicator deprecation notice) are documented in
|
||||
[gotchas](docs/gotchas.md#linux).
|
||||
|
||||
Full dependency table, diagnostics and the first-boot smoke test:
|
||||
[platform notes](docs/platform-notes.md).
|
||||
|
||||
## Known issues
|
||||
|
||||
- **Rare native crash under load.** A long-running session (multiple remote
|
||||
@@ -246,5 +282,5 @@ portable zip runs from any folder.
|
||||
|
||||
Drag-and-drop, file preview/edit, transfer resume, symlink following
|
||||
(symlinks are listed but skipped by transfers), OS keychain, tab persistence
|
||||
across restarts, Windows/Linux packaging (the code is portable; only macOS
|
||||
packaging is wired up).
|
||||
across restarts, Linux desktop integration (AppImage/.deb/.desktop entry —
|
||||
the release is a portable tarball).
|
||||
|
||||
Reference in New Issue
Block a user