feat(packaging): add deb and rpm desktop targets - #5139
Conversation
Install a t3 launcher in DEB and RPM artifacts that runs the bundled server through Electron's Node mode, while preserving t3code as the desktop command. Cover both package mappings and production/nightly install paths with tests.
Pin electron-builder's standard RPM requirements and add alsa-lib, libsecret, and mesa-libgbm so desktop and headless commands work on minimal installations without relying on weak dependencies.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
# Conflicts: # scripts/build-desktop-artifact.test.ts # scripts/build-desktop-artifact.ts
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1b6acb1. Configure here.
| `exec ${quotePosixShellArgument(desktopExecutable)} ${quotePosixShellArgument(serverEntry)} "$@"`, | ||
| "", | ||
| ].join("\n"); | ||
| } |
There was a problem hiding this comment.
Wrong headless launcher entry path
High Severity
The renderLinuxHeadlessLauncher function generates a path for the server entry (resources/app.asar.unpacked/...) that incorrectly assumes the server bundle is unpacked. Linux builds (deb/rpm) do not unpack this bundle, causing the /usr/bin/t3 CLI launcher to fail with an ENOENT error.
Reviewed by Cursor Bugbot for commit 1b6acb1. Configure here.


What Changed
Added additional outputs to packaging script.
Why
Allows output of 2 linux packaging systems Deb and RPM
issue #4030
Checklist
This PR is small and focused
I explained what changed and why
I included before/after screenshots for any UI changes
I included a video for animation/interaction changes
Note
Low Risk
Changes are confined to the desktop artifact build script, tests, and npm/gitignore entries; no production app runtime or auth logic is modified.
Overview
Adds DEB and RPM Linux desktop packaging alongside the existing AppImage flow, with npm scripts
dist:desktop:debanddist:desktop:rpmwriting artifacts topackaging-output/(also gitignored).For deb and rpm targets, the build stages a POSIX shell launcher installed as
/usr/bin/t3. It setsELECTRON_RUN_AS_NODE=1and execs the packagedt3codebinary against the unpacked server entryapps/server/dist/bin.mjs, with install paths derived from the product name (Alpha vs Nightly).Linux package metadata is expanded: maintainer, vendor, synopsis,
syncDesktopName, plus staged package fields (homepage, license,desktopName). deb and rpm each get explicit runtime depends lists and fpm mappings for the launcher.Reviewed by Cursor Bugbot for commit 1b6acb1. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add DEB and RPM desktop build targets with a
/usr/bin/t3headless launcherdist:desktop:debanddist:desktop:rpmnpm scripts in package.json that invoke scripts/build-desktop-artifact.ts for Linux x64 builds, outputting topackaging-output/.t3(mapped to/usr/bin/t3) that runs the server in headless mode via the packaged Electron binary withELECTRON_RUN_AS_NODE=1.packaging-output/is added to.gitignore.Macroscope summarized 1b6acb1.