Ship install.sh with the Linux tarball - #68
Merged
Merged
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
approved these changes
Sep 15, 2026
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.
The
.tar.gzalready carried a.desktopfile and an icon, and neither worked where it was unpacked:Exec=is a bare command name andIcon=a theme lookup. Unpacking and running./pappuswas fine; putting the app in the menu meant knowing where those two belong.What changes
linux/packaging/install.shcopies the folder to~/.local/opt/<app id>, writes the desktop entry into~/.local/share/applicationswith an absoluteExec=, puts the icon into the hicolor theme, and links~/.local/bin/pappus.uninstall.shremoves exactly those, and its symlink only while it still points into its own install.Exec=because~/.local/binis 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 wherepath_providerkeeps that build's preferences.<app id>.desktop.in, not as a.desktopfile. 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".pappus-ci.sh, no root, nothing outside$HOME.tool/package_linux.shputs 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 withstringsinstead of taken on trust from the environment. SettingPAPPUS_SIDE_BY_SIDEfor 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.Verified, in a throwaway
HOME./install.shcreated all four paths and rewroteExec=to the absolute path.Exec=worked from an unrelated working directory../uninstall.shleft nothing behind but the app's own data directory, which it must not touch.Verified on a real desktop
uninstall.shremoves the program, the command, the menu entry and the icon, and keeps the settings and the database.🤖 Generated with Claude Code