Skip to content

Ship install.sh with the Linux tarball - #68

Merged
aquasolterra merged 4 commits into
mainfrom
linux-installer
Sep 15, 2026
Merged

aquasolterra merged 4 commits into
mainfrom
linux-installer

Conversation

@JoshuaLampert

@JoshuaLampert JoshuaLampert commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

The .tar.gz already carried a .desktop file and an icon, and neither worked where it was unpacked: Exec= is a bare command name and Icon= a theme lookup. Unpacking and running ./pappus was fine; putting the app in the menu meant knowing where those two belong.

What changes

  • linux/packaging/install.sh copies the folder to ~/.local/opt/<app id>, writes the desktop entry into ~/.local/share/applications with an absolute Exec=, puts the icon into the hicolor theme, and links ~/.local/bin/pappus. uninstall.sh removes exactly those, and its symlink only while it still points into its own install.
    • The absolute Exec= because ~/.local/bin is not on every distribution's PATH, and never on the session's PATH when that directory is created after login.
    • ~/.local/opt/<app id> and not ~/.local/share/<app id>, which is where path_provider keeps that build's preferences.
    • The entry is packed as a template, <app id>.desktop.in, not as a .desktop file. Shipped ready-made, it was the file a file manager offers as a launcher, and dragged onto a desktop it failed with "pappus: command not found".
    • Everything is derived from that template, so the CI build installs beside the released app, under the command name pappus-ci.
    • POSIX sh, no root, nothing outside $HOME.
  • tool/package_linux.sh puts both scripts in the tarball, and now refuses to package a bundle built as the other build: the application id is compiled into the executable, so it is read back with strings instead of taken on trust from the environment. Setting PAPPUS_SIDE_BY_SIDE for the build and forgetting it for the packaging is otherwise silent and produces a CI build wearing the released app's name, entry and icon. That is how this was found.
  • Docs: README, CHANGELOG, AGENTS.md.

Verified, in a throwaway HOME

  • ./install.sh created all four paths and rewrote Exec= to the absolute path.
  • Starting the app through the installed entry's Exec= worked from an unrelated working directory.
  • ./uninstall.sh left nothing behind but the app's own data directory, which it must not touch.
  • The new guard fails with the mismatched bundle and passes with a matching one, in both directions.

Verified on a real desktop

  • "Pappus CI" appears in the application menu and starts from there. The icon shows after logging in again.
  • The installed entry copied onto the desktop starts the app.
  • uninstall.sh removes the program, the command, the menu entry and the icon, and keeps the settings and the database.

🤖 Generated with Claude Code

Unpacking and running ./pappus always worked; the desktop entry beside it did
not, since Exec= is a bare command name and Icon= a theme lookup. install.sh
copies the folder to ~/.local/opt/<app id>, writes the entry with an absolute
Exec= into ~/.local/share/applications, puts the icon in the hicolor theme and
links ~/.local/bin. uninstall.sh undoes exactly that.

Both derive everything from the .desktop file beside them, so the CI build
installs beside the released app under its own command name.

Found while testing it: packaging can name a bundle after the wrong build when
PAPPUS_SIDE_BY_SIDE is set for one of the build and the packaging but not the
other. The script now reads the id back out of the executable and refuses.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

aquasolterra and others added 3 commits September 15, 2026 21:50
The tarball is the only package carrying install.sh, so uploading the AppImage
alone left the installer untestable from a pull request.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The tarball's own .desktop file could not work where it was unpacked: its
Exec= named `pappus`, a bare command that is on nobody's PATH, and for the CI
build not even the command install.sh links. Dragged onto a desktop it failed
with "pappus: command not found".

It is now <app id>.desktop.in, which no file manager offers as a launcher, and
install.sh fills in the absolute path. The script also touches the icon theme
directory so GTK desktops can pick the icon up without a new login.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@aquasolterra
aquasolterra merged commit 329e88f into main Sep 15, 2026
5 checks passed
@aquasolterra
aquasolterra deleted the linux-installer branch September 15, 2026 20:21
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.

2 participants