feat: add Linux packaging support (AppImage + deb) - #51
Open
lin-1259 wants to merge 1 commit into
Open
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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):linuxbuilder target: AppImage + deb for x64,Developmentcategory,syncDesktopName: truefor correct WM_CLASS/desktop-entry window associationpackage:linuxscript:verify-target.mjs linux x64 && electron-builder --linux --publish never— same pattern aspackage:mac*/package:windesktopNamefor 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
npm install→npm run package:linuxsucceeds (AppImage + deb)dsh-desktop.patch.yml(native directory picker) works as-is on LinuxKnown limitations
update-policy.tssupportsAutoUpdates); Linux builds reportupdater status unsupported— fine for first-party packaging, worth revisiting later (AppImageUpdate)GPU process isn't usable) in some environments;--ozone-platform=x11or--disable-gpuworks around it. Unpacked builds are unaffected. This appears to be an Electron/Wayland issue rather than something this change introducespackage:linuxonly, to keep the change minimalTest plan
npm run package:linuxproducesdist/dsh-desktop-linux-x86_64.AppImageanddist/dsh-desktop-linux-amd64.deb