0
Fork 0
mirror of https://github.com/zeronsh/comet.git synced 2026-11-16 18:57:19 +00:00
Commit graph

1 commit

Author SHA1 Message Date
Daniel Katulevskiy
11c9108940
Linux: install a launcher entry and icon with both installers (#627)
* Linux installers: add a launcher entry and icon

The curl installer extracted the release tarball but never ran the
tarball's install.sh, so no .desktop entry or icon was ever written and
Zeron did not show up in application launchers.

The tarball's own install.sh did write an entry, but copied the shipped
one verbatim: `Exec=zeron` and `TryExec=zeron` need ~/.local/bin on the
desktop session's PATH, which is often missing (bare Wayland/fuzzel/rofi
setups), and TryExec then hides the entry entirely. Both installers now
render the entry with absolute paths through ~/.zeron/app/current (stable
across in-app updates), reference the icon by path because the only
artwork is 1024x1024 (not a size the hicolor theme indexes), honor
XDG_DATA_HOME, quote Exec per the Desktop Entry spec, write atomically,
and refresh the desktop/icon caches only when those tools exist.
StartupNotify is added to the template; StartupWMClass=zeron already
matches the app_id the UI sets.

scripts/test-linux-desktop-entry.sh runs both installers offline against
a fake release under a throwaway HOME.

* Linux installers: keep the download cleanup, don't create an icon cache

install_desktop_entry reused `tmp` for its staging file. The curl
installer runs under sh, which has no `local`, so this overwrote the
download dir its EXIT trap removes and left every downloaded tarball
behind in $TMPDIR. Use `entry_tmp` in both copies.

gtk-update-icon-cache -f created ~/.local/share/icons/hicolor/
icon-theme.cache when none existed. Nothing else maintains a user-level
cache, and a stale one hides icons other apps later install there; the
entry references the icon by path anyway. Only refresh an existing one.

The test now gives each run its own TMPDIR and requires it empty, fails
if an icon cache appears, and checks the two copies of the function are
identical. A small workflow runs it on changes to the installers.

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

---------

Co-authored-by: Wing <contact@winglee.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 11:12:04 -07:00