Files
ansible/group_vars/mediapis.yml
Martin Bauer 2fb290b146 Build and install the native front-end on musicdolphin
slint-frontend/ in the app repo is a native front-end for the same backend, written
because the React UI is sluggish on this device. This installs it beside the web UI,
never instead of it: the systemd unit is installed but not enabled, so the device still
boots into the kiosk browser and the two can be compared on the same screen.

  systemctl start musikdelfin     # takes over the display
  systemctl stop  musikdelfin     # back to the browser underneath

Unlike pi_musicmouse, which builds the web front-end on the control machine and rsyncs
dist/, this builds on the device. A Rust binary is not portable, and the reason it has
to be built here rather than cross-compiled is worth writing down: these Pis run 32-bit
armhf Raspbian on a 64-bit kernel. `uname -m` says aarch64 and it is misleading;
`dpkg --print-architecture` says armhf and that is the one that matters. Cross-compiling
to armv7-unknown-linux-gnueabihf needs a sysroot, the devices carry no -dev packages to
build one from, and reconstructing one from the Debian archive means owning a glibc skew
risk indefinitely. Spending the device's own CPU once is the smaller liability. The
build is stamped with the commit it came from, so it only runs again when that changes.

The same fact rules out the Skia renderer that the app's own kiosk profile prefers:
rust-skia publishes no prebuilt binaries for armhf. This builds --features desktop -
winit, FemtoVG and the software renderer - and runs as an X client in the existing
session. Worth noting after the fact: the FemtoVG bug that makes Skia the upstream
recommendation (slint-ui/slint#11785, album covers drawn as solid black) was reported on
a Pi 5 with a 64-bit userland and does not reproduce here - covers render correctly.

Three things had to be found by running it rather than reading anything:

The X session belongs to `kiosk`, not root, so the launcher needs that user's cookie and
the unit runs as them. Without it winit fails with "could not initialize backend", which
says nothing about authorization.

winit and glutin dlopen every windowing and GL library they use, so none of them appear
in `ldd` and the binary links happily without them - then aborts on first run with
"Library libxkbcommon-x11.so could not be loaded". The runtime packages are listed
explicitly for that reason.

Raspbian ships no font containing the emoji the design uses as iconography, so the shelf
badges rendered as empty boxes until fonts-noto-color-emoji went in.

First build took 63 minutes: 570 crates, two jobs, nice'd, which bounds peak memory on
musicdolphin's 1.8 GB.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 00:44:54 +02:00

21 lines
950 B
YAML

---
mediapi_has_hifiberry_amp: false
mediapi_ir_control: lirc
mediapi_has_dhtsensor: false
mediapi_disable_onboard_bluetooth: false
mediapi_install_bluetooth_monitor: false
mediapi_install_kidsmusic: false
# The native Slint front-end, built on the device and installed beside the web UI.
# Needs mediapi_install_kidsmusic, which owns the checkout it builds from. Off by
# default: the build is ~40 minutes of the device's own CPU the first time.
mediapi_install_slint_frontend: false
mediapi_has_monitor: false
# No media pi runs its own Logitech Media Server. Every squeezelite in the fleet is
# pointed at pi_squeezelite_squeezeserver (the server, 192.168.178.80) by inventory.yml,
# so a server on a pi would have no clients. false here does not mean "skip the role" -
# it means "actively remove it", which is how the stray one on musicdolphin goes away
# and stays away. See roles/pi_squeezeserver/README.md.
mediapi_has_squeezeserver: false