Add Linux packaging (deb, rpm, AppImage, Arch) and CI - #42
Open
Tsurgcom wants to merge 2 commits into
Open
Conversation
Builds and ships the desktop app for Linux across five targets: - deb (Debian/Ubuntu) and zip via Electron Forge makers - rpm (Fedora) via a custom spec + rpmbuild script, since electron-installer-redhat is incompatible with RPM 6's build layout - AppImage via appimagetool - Arch Linux (.pkg.tar.zst) via makepkg + a PKGBUILD Also makes the staged `dapi` CLI wrapper platform-aware so it resolves the app binary on Linux (it previously hardcoded the macOS Contents/MacOS path), and adds `publish-linux` / `publish-arch` jobs to the release workflow.
Add a Download badge and an Install section covering the deb, rpm, Arch, and AppImage artifacts, plus build instructions for contributors.
|
@Tsurgcom is attempting to deploy a commit to the Diffusion Studio Team on Vercel. A member of the Team first needs to authorize it. |
Open
Author
|
We got all of the infinity stones (distros) 🚀 |
Tsurgcom
commented
Aug 31, 2026
Tsurgcom
left a comment
Author
There was a problem hiding this comment.
Yes, I looked through the code.
zbcoding
added a commit
to zbcoding/editor
that referenced
this pull request
Sep 4, 2026
Dry-running the deb and rpm makers against the packaged tree, rather than trusting their config, turned up two builds that could never have succeeded, and comparing notes with diffusionstudio#42 turned up a third: - The deb had no `Maintainer`, one of the five fields dpkg-deb requires. It defaults to `package.json`'s `author`, which this workspace does not set, and the control template silently omits the field when it is undefined - so the release job would have failed on its first run. - `@electron-forge/maker-rpm` (electron-installer-redhat 3.4.0) writes a spec whose `%install` runs `cp -r usr/*` relative to the build directory. rpm 4.20 moved that directory, so the copy fails on Fedora 41+ and on recent Debian and Ubuntu (electron-userland/electron-installer-redhat#343, electron/forge#3701). Diagnosed in diffusionstudio#42, which worked around it with a hand-written spec; this patches the template through the patch-package setup the repo already runs, so the maker keeps generating dependencies and metadata. - MakerZIP shells out to `zip`, which is not installed everywhere. Named in the README with the other per-maker tools, and installed in CI. Arch Linux support comes from diffusionstudio#42: it has no Electron Forge maker, so a script stages the forge output and runs makepkg. The PKGBUILD drops the launcher shim that PR needed, because the Linux executable is renamed to `diffusion-studio` and /usr/bin can link straight to it, and it puts `dapi` on PATH directly, which a package can do and the AppImage cannot. All four formats now install one desktop entry, kept in packaging/linux so the makers and the PKGBUILD cannot drift: two of the three formats in diffusionstudio#42 registered `x-scheme-handler/diffusion` and the deb did not, which is the difference between the auth and checkout deep links working and silently doing nothing. The CLI install dialog now only claims `dapi` is ready to run when the link target is on the session PATH, and otherwise says which directory to add - Debian and Fedora put ~/.local/bin there, Arch does not. Co-authored-by: Tsurg <info@tsurg.com>
|
Added export fixes and more. I opened #58 for Linux support before spotting this PR. It covers packaging too, plus the mp4 export failure (Chromium has no AAC encoder on Linux, so every template's I folded your work into #58 with a Two things I did differently
|
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 for the desktop app so it can ship alongside the macOS build: deb, rpm, zip, AppImage, and Arch Linux (
.pkg.tar.zst), plus CI jobs to publish them on release.What changed
apps/desktop/forge.config.ts): addedMakerDeb(Debian/Ubuntu) and enabledMakerZIPfor Linux.apps/desktop/scripts/make-rpm.mjs): a self-generated.spec+rpmbuildscript instead of@electron-forge/maker-rpm.electron-installer-redhat@3.4.0stages toBUILD/usrbut runscp -r usr/*from the build subdir, which breaks on RPM 6's build-directory layout; the custom spec works on RPM 4 and 6.apps/desktop/scripts/make-appimage.mjs): builds viaappimagetool(auto-downloaded, run FUSE-less so it works in CI).apps/desktop/scripts/make-arch.mjs+packaging/arch/{PKGBUILD,launcher,diffusion-studio.desktop}): stages the packaged app and runsmakepkg.apps/desktop/scripts/stage-cli.mjs): the shippeddapiwrapper hardcoded the macOSContents/MacOS/…path; it now resolves the binary/app-root per platform sodapiworks from a Linux install..github/workflows/release.yml): newpublish-linux(ubuntu: deb + rpm + zip + AppImage) andpublish-arch(archlinux container) jobs that upload to the release.New npm scripts
Testing
Built and inspected all five artifacts on an Arch host (Node 20):
diffusion-studio_0.201.0_amd64.debdiffusion-studio-0.201.0-1.x86_64.rpmDiffusion Studio-linux-x64-0.201.0.zipDiffusion-Studio-0.201.0-x86_64.AppImagediffusion-studio-0.201.0-1-x86_64.pkg.tar.zstEach package installs to
/usr/lib/diffusion-studio/with adiffusion-studiolauncher, thedapiCLI, a.desktopentry, and an icon;chrome-sandboxis setuid 4755. The AppImage extracts cleanly with a correctAppRun/.desktop/icon, and the packageddapiruns via the app's Electron binary (dapi --version→0.201.0).Notes
dpkg+fakeroot(deb),rpmbuild(rpm),makepkg(Arch); AppImage fetchesappimagetoolitself.linux-only.