Skip to content

feat: add Linux packaging support (AppImage + deb) - #51

Open
lin-1259 wants to merge 1 commit into
dataelement:mainfrom
lin-1259:feat/linux-support
Open

feat: add Linux packaging support (AppImage + deb)#51
lin-1259 wants to merge 1 commit into
dataelement:mainfrom
lin-1259:feat/linux-support

Conversation

@lin-1259

Copy link
Copy Markdown

Summary

Adds Linux packaging support so DSH Desktop can be built and distributed for Linux, mirroring the existing macOS/Windows package scripts.

Changes (all in package.json):

  • linux builder target: AppImage + deb for x64, Development category, syncDesktopName: true for correct WM_CLASS/desktop-entry window association
  • package:linux script: verify-target.mjs linux x64 && electron-builder --linux --publish never — same pattern as package:mac* / package:win
  • top-level desktopName for desktop-environment window association (resolves the electron-builder warning about missing desktopName)

Why

The app already supports Linux at runtime — the main process code has generic branches for PATH/node executable/window frame, and all native deps (node-pty, koffi, sharp) ship Linux prebuilds or compile on Linux — only the packaging targets were missing. No runtime code changes were needed.

Verified

  • Built on Arch Linux x64: npm installnpm run package:linux succeeds (AppImage + deb)
  • Packaged app launches: window appears, bundled Harness server starts on a random loopback port and serves the UI
  • dsh-desktop.patch.yml (native directory picker) works as-is on Linux

Known limitations

  • Auto-update remains macOS/Windows only by design (update-policy.ts supportsAutoUpdates); Linux builds report updater status unsupported — fine for first-party packaging, worth revisiting later (AppImageUpdate)
  • AppImage on Wayland + Vulkan (Electron 43) can hit a GPU-process failure (GPU process isn't usable) in some environments; --ozone-platform=x11 or --disable-gpu works around it. Unpacked builds are unaffected. This appears to be an Electron/Wayland issue rather than something this change introduces
  • No CI job added yet for Linux — local package:linux only, to keep the change minimal

Test plan

  • npm run package:linux produces dist/dsh-desktop-linux-x86_64.AppImage and dist/dsh-desktop-linux-amd64.deb
  • macOS/Windows packaging scripts still work (no changes to their config)

Add electron-builder linux targets so DSH Desktop can be built and
packaged on Linux:

- linux target config: AppImage + deb for x64, Development category,
  syncDesktopName for proper WM_CLASS window association
- package:linux script mirroring the mac/win package scripts, with the
  same verify-target platform guard
- top-level desktopName for window/desktop-entry association on Linux

Verified on Arch Linux x64: electron-vite build + electron-builder
--linux succeed, the packaged app launches with its bundled Harness
server on a random loopback port. Auto-update remains mac/win only by
design (update-policy.ts).
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.

1 participant