Skip to content

Add Linux packaging (deb, rpm, AppImage, Arch) and CI - #42

Open
Tsurgcom wants to merge 2 commits into
diffusionstudio:mainfrom
Tsurgcom:linux-packaging
Open

Add Linux packaging (deb, rpm, AppImage, Arch) and CI#42
Tsurgcom wants to merge 2 commits into
diffusionstudio:mainfrom
Tsurgcom:linux-packaging

Conversation

@Tsurgcom

Copy link
Copy Markdown

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

  • Electron Forge makers (apps/desktop/forge.config.ts): added MakerDeb (Debian/Ubuntu) and enabled MakerZIP for Linux.
  • RPM (apps/desktop/scripts/make-rpm.mjs): a self-generated .spec + rpmbuild script instead of @electron-forge/maker-rpm. electron-installer-redhat@3.4.0 stages to BUILD/usr but runs cp -r usr/* from the build subdir, which breaks on RPM 6's build-directory layout; the custom spec works on RPM 4 and 6.
  • AppImage (apps/desktop/scripts/make-appimage.mjs): builds via appimagetool (auto-downloaded, run FUSE-less so it works in CI).
  • Arch (apps/desktop/scripts/make-arch.mjs + packaging/arch/{PKGBUILD,launcher,diffusion-studio.desktop}): stages the packaged app and runs makepkg.
  • CLI wrapper fix (apps/desktop/scripts/stage-cli.mjs): the shipped dapi wrapper hardcoded the macOS Contents/MacOS/… path; it now resolves the binary/app-root per platform so dapi works from a Linux install.
  • CI (.github/workflows/release.yml): new publish-linux (ubuntu: deb + rpm + zip + AppImage) and publish-arch (archlinux container) jobs that upload to the release.
  • Docs: Linux download badge, an Install section, and contributor build instructions.

New npm scripts

npm run make:linux --workspace=@diffusionstudio/desktop   # deb, rpm, zip, AppImage
npm run make:arch --workspace=@diffusionstudio/desktop    # Arch (.pkg.tar.zst)

Testing

Built and inspected all five artifacts on an Arch host (Node 20):

Target Artifact
deb diffusion-studio_0.201.0_amd64.deb
rpm diffusion-studio-0.201.0-1.x86_64.rpm
zip Diffusion Studio-linux-x64-0.201.0.zip
AppImage Diffusion-Studio-0.201.0-x86_64.AppImage
Arch diffusion-studio-0.201.0-1-x86_64.pkg.tar.zst

Each package installs to /usr/lib/diffusion-studio/ with a diffusion-studio launcher, the dapi CLI, a .desktop entry, and an icon; chrome-sandbox is setuid 4755. The AppImage extracts cleanly with a correct AppRun/.desktop/icon, and the packaged dapi runs via the app's Electron binary (dapi --version0.201.0).

Notes

  • Builds require Node 20 (newer Node versions can break Electron Packager's zip extraction).
  • System tools per format: dpkg + fakeroot (deb), rpmbuild (rpm), makepkg (Arch); AppImage fetches appimagetool itself.
  • macOS is unchanged — the new makers are linux-only.

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.
@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

@Tsurgcom is attempting to deploy a commit to the Diffusion Studio Team on Vercel.

A member of the Team first needs to authorize it.

@Tsurgcom Tsurgcom mentioned this pull request Aug 31, 2026
@Tsurgcom

Copy link
Copy Markdown
Author

We got all of the infinity stones (distros) 🚀

@Tsurgcom Tsurgcom left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I looked through the code.

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