Skip to content

fix(gui): set linux.executableName so electron-builder 26 can build the AppImage - #182

Merged
PAMulligan merged 1 commit into
mainfrom
fix/gui-linux-executable-name-168
Nov 3, 2026
Merged

PAMulligan merged 1 commit into
mainfrom
fix/gui-linux-executable-name-168

Conversation

@PAMulligan

Copy link
Copy Markdown
Collaborator

Description

On Linux, electron-builder 26.8+ names the GUI binary after the package name, sanitized and lowercased, so @flavian/gui becomes @flaviangui. Its AppImage step then refuses the @ (validateCriticalPathString in appImageUtil.ts), so every Linux package build since v2.0.0 (electron-builder moved from 25.1.8 to 26.15.3 in #163) fails at "Package installer". macOS and Windows are unaffected: they fall back to productName.

This sets linux.executableName: flavian in packages/gui/electron-builder.yml, under linux: only, so Flavian.app and Flavian.exe keep their names (a top-level key would rename them too, which is what the Aurelius fix did).

A new packaging test, packages/gui/tests/packaging/electron-builder-config.test.mts, derives the Linux executable name the way electron-builder's LinuxPackager does and checks it against the AppImage name whitelist, and pins productName with no top-level executableName. It fails on main with "@flaviangui" and passes with the fix. js-yaml joins the GUI dev dependencies to read the config.

Related Issue

Closes #168

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Chore
  • Breaking change

Verification

Linux: a node:22-bookworm linux/amd64 container on a clean copy of main, running the gui-release.yml commands (electron-builder 26.15.3, Electron 42.11.16).

Step Before After
pnpm --filter @flavian/gui exec electron-builder --publish never exit 1: executableName contains characters that cannot be safely used in file paths: @flaviangui exit 0
packages/gui/dist/ linux-unpacked/@flaviangui, no AppImage Flavian-2.1.0.AppImage, linux-unpacked/flavian
Launch under Xvfb not reached linux-unpacked/flavian boots and renders the setup view (Playwright, the same assertions as tests/smoke/smoke.mjs); the AppImage starts with --appimage-extract-and-run and stays up, with only D-Bus warnings from the bus-less container

macOS (this host, x64): electron-builder --dir --mac with the patched config still produces dist/mac/Flavian.app. Windows follows the same rule (productFilename falls back to productName when no top-level executableName is set) and is pinned by the test.

Checklist

  • pnpm --filter @flavian/gui lint, typecheck and test (55 tests, 2 new)
  • pnpm test:pipeline (133), pnpm test:claude (88), node scripts/claude-code-conformance.js (0 errors), bash scripts/check-doc-counts.sh
  • pnpm lint:commits
  • PHPCS and security scan: not applicable, no PHP changed
  • Documentation: not needed, the comment in electron-builder.yml explains the setting
  • gui-release.yml has still never run (release-please publishes with GITHUB_TOKEN, which starts no workflows). Fixing that trigger is out of scope here, as the issue says.

Local macOS runs of pnpm test:init (two Canva export tests) and the bats suites (eight convert-html-to-blocks tests) fail in scripts/canva-fse, which this diff does not touch; the same suites are green in CI on main.

🤖 Generated with Claude Code

…he AppImage

electron-builder 26.8+ derives the Linux binary name from the package name
("@flavian/gui" becomes "@flaviangui") and its AppImage step then refuses the
"@", so every Linux package build since v2.0.0 fails at "Package installer".
Name the binary "flavian" under linux: only, so macOS and Windows keep
productName (Flavian.app, Flavian.exe).

A packaging test derives the Linux executable name the way electron-builder
does and checks it against the AppImage name whitelist, and pins productName
with no top-level executableName. js-yaml joins the GUI dev dependencies to
read electron-builder.yml.

Verified in a linux/amd64 Debian container on Node 22 with electron-builder
26.15.3 and Electron 42.11.16: the unpatched config fails exactly as reported;
with the patch, electron-builder exits 0 and writes dist/Flavian-2.1.0.AppImage
and dist/linux-unpacked/flavian, and the packaged binary launches under Xvfb
and renders the setup view.

Closes #168

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@PAMulligan
PAMulligan merged commit 933b514 into main Nov 3, 2026
22 checks passed
@PAMulligan
PAMulligan deleted the fix/gui-linux-executable-name-168 branch November 3, 2026 01:55
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.

Linux AppImage build fails: electron-builder names the GUI binary "@flaviangui", then rejects it

1 participant