Files
app/app
T
denis0001-dev 2ce888a70d Give the .deb the tray dependency, and log whether the tray exists
AWT's Linux tray is not built into the JDK: it dlopens libappindicator, and
without it SystemTray.isSupported() is false. The app gates the whole tray on
that call (Main.kt:409) and silently renders nothing when it is false — which
is why the tray on KDE Plasma 6 had no working clicks and no explanation in the
log.

jpackage cannot be told about dependencies through Compose's `linux { }` DSL,
so the generated .deb shipped a control file with no Depends at all and pulled
nothing in. packageReleaseLinux now injects
`libayatana-appindicator3-1 | libappindicator3-1, libdbus-1-3` into that
control file (Ayatana is the maintained package; the legacy name stays as an
alternative for older distros).

The `ar` container is rewritten in Kotlin rather than shelled out to, because
BSD ar (macOS) injects a `__.SYMDEF SORTED` member while GNU ar (Linux, where
this runs) does not, and rebuilding a package with the wrong dialect corrupts
it. Member order is preserved and headers are reused verbatim, with only the
size field refreshed for the replaced control member. Everything is wrapped so
a failure logs a warning and leaves the deb exactly as jpackage built it,
rather than failing the release.

Verified against a synthetic GNU-style .deb: members read back in order
(debian-binary, control.tar.gz, data.tar.gz), the control file gains the
Depends line and keeps Package/Architecture, and the data payload round-trips
intact. BSD `ar t` also reads the result.

Main.kt now logs SystemTray.isSupported() once per run, so the next report
says outright whether the tray was available instead of us inferring it.

Still not covered: the .rpm gets no dependency injection (no jpackage option
and no easy rpm rewrite), and the AppImage still relies on the host having
libappindicator.
2ce888a70d · 2026-10-17 01:47:46 +03:00
History
..
…