Skip to content

build(linux): stage desktop-entry assets into the portable tarball - #363

Merged
thcp merged 1 commit into
mainfrom
feat/linux-desktop-entry-assets
Aug 12, 2026
Merged

build(linux): stage desktop-entry assets into the portable tarball#363
thcp merged 1 commit into
mainfrom
feat/linux-desktop-entry-assets

Conversation

@thcp

@thcp thcp commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Closes #360. Prep for #342.

Adds two data files to the Linux tarball and nothing else. No runtime behaviour changes, and the package still runs in place when extracted.

StemDeck-Linux-x64/
  packaging/
    stemdeck.png            # desktop/src-tauri/icons/icon.png, already square
    stemdeck.desktop.in     # Exec= and Icon= substituted at install time

Why in the tarball

It is what lets the installer be self-contained: no second download, no checksum step, and no raw asset URL pointing at a branch that can drift from the release being installed. The version and variant it needs are already in the package too, in backend/static/version.json and the cpu-only marker.

The one substantive detail

Exec= is quoted. The freedesktop spec splits Exec on whitespace, so the unquoted form used by the reference installer in #342 generates an entry that tries to run /home/u/My when installed to ~/My Apps:

parsed into: ['/home/u/My', 'Apps/StemDeck-Linux-x64/StemDeck']

That is invisible until someone picks a custom directory, so tests/test_packaging_linux.py pins it. Removing the quotes fails that test, verified.

Verification

  • Replayed the staging block against a temp stage: both files land at the right paths, icon is 1024x1024 RGBA.
  • Substituted a path containing a space and confirmed shlex.split yields a single argument.
  • bash -n scripts/linux/make-portable.sh clean.
  • 10 new tests; full suite 536 passed.
  • tests/test_stems_api.py::test_all_stems_zip_ogg fails identically on clean main (local ffmpeg has no libvorbis, and the test's skip guard only checks that ffmpeg exists). Unrelated, not fixed here.

Not included

install.sh and the README-LINUX.txt section documenting it, both of which land with #361 along with the line that stages the script. Splitting it this way means this ships without referencing a file that does not exist yet, and gives whoever writes the installer the ground to stand on. #361 is offered to @MetalMan1245, whose fork prompted all of this.

Prep for the optional Linux installer (#342). Carrying the icon and a
.desktop template inside the package is what lets the installer be
self-contained: no second download, and no asset URL that can drift from
the release being installed.

The Tauri icon is already square at 1024x1024, so it doubles as the
desktop icon with no separate artwork to keep in sync.

Exec= is quoted in the template. The freedesktop spec splits Exec on
whitespace, so the unquoted form used by the reference installer in #342
produces an entry that tries to run ".../My" when the user installs to
a path like ~/My Apps. It is invisible until someone picks a custom
directory, which is why it is pinned by a test.

Both variants pick this up: the CPU and NVIDIA packages run the same
script with CPU_ONLY toggled.

install.sh itself, and the README-LINUX.txt change documenting it, land
with #361 -- this commit deliberately ships nothing that references a
file which does not exist yet.

Closes #360
@thcp
thcp marked this pull request as ready for review August 12, 2026 17:54
@thcp
thcp merged commit f9d7182 into main Aug 12, 2026
8 checks passed
@thcp
thcp deleted the feat/linux-desktop-entry-assets branch August 12, 2026 17:54
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.

Stage the Linux desktop-entry assets inside the portable tarball

1 participant