Overview
Currently, the Linux build only produces an AppImage artifact (configured in electron-builder-config.js). To improve discoverability and ease of installation for Linux users, we should add Snap and/or Flatpak as additional distribution targets.
Current State
electron-builder-config.js sets linux.target: "AppImage" only
- CI pipelines (
build-matrix.yml, stable-matrix.yml, nightly-matrix.yml) build on ubuntu-22.04 but only publish the AppImage artifact
- No Snap Store or Flathub publishing step exists in any workflow
- The current AppImage is x64 only — the
linux config has no arch field, so electron-builder defaults to the host (x64). ARM Linux users (Raspberry Pi, ARM Chromebooks, etc.) cannot run it. Compare: macOS already sets arch: ["arm64", "x64"] explicitly; Linux does not.
Goals
Implementation Notes
ARM64 AppImage
- Add
arch: ["x64", "arm64"] to the linux block in electron-builder-config.js (mirrors the macOS approach)
- CI would need either a GitHub ARM runner (
ubuntu-22.04-arm) or cross-compilation from x64
electron-builder supports cross-compiling to arm64 on Linux, but native modules (USB/serial) may need additional handling
- Update the
artifactName to include ${arch} so x64 and arm64 artifacts are distinguishable
Snap
electron-builder has built-in Snap support — add "snap" to linux.target in electron-builder-config.js
- Requires
snapcraft installed on the build runner (sudo snap install snapcraft --classic)
- Publishing needs a
SNAPCRAFT_STORE_CREDENTIALS secret added to GitHub Actions
- Consider
confinement: classic for USB/HID device access (Grid hardware uses serial/USB)
- Snap supports multi-arch publishing, so ARM64 can be covered here too
Flatpak
electron-builder does not have native Flatpak support — requires a separate Flatpak manifest (com.intechstudio.GridEditor.yml)
- Use
flatpak-builder in CI or the electron-packager + flatpak-builder approach
- Flathub submission requires a PR to the flathub/flathub repo
- USB/HID device access requires
--device=all or appropriate portal permissions in the sandbox
- Flathub supports multi-arch (x86_64 + aarch64) if build infrastructure is set up
Hardware Access Concern
Grid Editor communicates with hardware over USB/serial. Both Snap (classic confinement or raw-usb interface) and Flatpak (device portal or --device=all) need explicit permission grants — this needs validation before shipping.
Questions to Resolve
- Snap, Flatpak, or both?
- Should nightly builds publish to Snap
edge / a beta Flatpak repo?
- Do we need to create Snap Store / Flathub accounts and register the app name?
- Has USB device access been validated inside a Snap/Flatpak sandbox?
- Should we add an ARM64 AppImage alongside Snap/Flatpak, or rely on those formats for ARM coverage?
References
Overview
Currently, the Linux build only produces an AppImage artifact (configured in
electron-builder-config.js). To improve discoverability and ease of installation for Linux users, we should add Snap and/or Flatpak as additional distribution targets.Current State
electron-builder-config.jssetslinux.target: "AppImage"onlybuild-matrix.yml,stable-matrix.yml,nightly-matrix.yml) build onubuntu-22.04but only publish the AppImage artifactlinuxconfig has noarchfield, soelectron-builderdefaults to the host (x64). ARM Linux users (Raspberry Pi, ARM Chromebooks, etc.) cannot run it. Compare: macOS already setsarch: ["arm64", "x64"]explicitly; Linux does not.Goals
electron-builder(snaptarget) and publish to the Snap Storestable-matrix.ymlrelease workflow (triggered on tag)nightly-matrix.ymlfor pre-release channels (Snapedge, Flatpak beta repo)arch: ["x64", "arm64"]to thelinuxsection to produce ARM64 AppImage artifactsImplementation Notes
ARM64 AppImage
arch: ["x64", "arm64"]to thelinuxblock inelectron-builder-config.js(mirrors the macOS approach)ubuntu-22.04-arm) or cross-compilation from x64electron-buildersupports cross-compiling toarm64on Linux, but native modules (USB/serial) may need additional handlingartifactNameto include${arch}so x64 and arm64 artifacts are distinguishableSnap
electron-builderhas built-in Snap support — add"snap"tolinux.targetinelectron-builder-config.jssnapcraftinstalled on the build runner (sudo snap install snapcraft --classic)SNAPCRAFT_STORE_CREDENTIALSsecret added to GitHub Actionsconfinement: classicfor USB/HID device access (Grid hardware uses serial/USB)Flatpak
electron-builderdoes not have native Flatpak support — requires a separate Flatpak manifest (com.intechstudio.GridEditor.yml)flatpak-builderin CI or theelectron-packager+flatpak-builderapproach--device=allor appropriate portal permissions in the sandboxHardware Access Concern
Grid Editor communicates with hardware over USB/serial. Both Snap (classic confinement or
raw-usbinterface) and Flatpak (device portal or--device=all) need explicit permission grants — this needs validation before shipping.Questions to Resolve
edge/ a beta Flatpak repo?References