Просмотр исходного кода

PR #382 follow-up: x11 comment in the Flatpak manifest; build steps and the host-os plugin override in docs/LINUX.md

- Manifest: a comment on --socket=x11 (LYNX draws through X11 and runs under XWayland on Wayland).
- docs/LINUX.md › Flatpak: how to build and install it from a release tarball (the manifest's input contract as
  commands), and that it is updated by building it again.
- Plugins under the host's /usr: Flatpak reserves /usr (and /usr/local), so a --filesystem=/usr/lib/...:ro grant has
  no effect (docs.flatpak.org); documented the read-only host-os override (/run/host/usr/...) and that distribution
  plugins may miss libraries in the runtime.

MIDI (--socket=pulseaudio), JACK (/dev/shm, PipeWire's JACK) and the rest of the Flatpak section are TheAifam5's own
commit. No CI or release workflow change.

(cherry picked from commit aa20c99d402014b1e2ee39ae3752af4a72ce5a8f)
Ka1-S 2 дней назад
Родитель
Сommit
ffb5255fe7
2 измененных файлов с 24 добавлено и 0 удалено
  1. 22 0
      docs/LINUX.md
  2. 2 0
      resources/linux/com.lynx_share.LYNX.flatpak.yml

+ 22 - 0
docs/LINUX.md

@@ -96,6 +96,23 @@ on or off later, and LYNX SHARE updates the entry when the AppImage file moves.
 
 ## Flatpak
 
+`resources/linux/com.lynx_share.LYNX.flatpak.yml` (by TheAifam5, PR #382) packs a released
+`LYNX-<version>-linux-x86_64.tar.gz` into a Flatpak; nothing is compiled. It is not on Flathub, and the release
+workflow does not build it. To build and install it for your user:
+
+```
+mkdir lynx-flatpak && cd lynx-flatpak
+cp /path/to/LYNX-SHARE/resources/linux/com.lynx_share.LYNX.flatpak.yml .
+mkdir stage && tar -xzf LYNX-<version>-linux-x86_64.tar.gz -C stage --strip-components=1
+sed -e "s/@VERSION@/<version>/" -e "s/@DATE@/$(date +%F)/" \
+  /path/to/LYNX-SHARE/resources/linux/com.lynx_share.LYNX.appdata.xml > com.lynx_share.LYNX.appdata.xml
+flatpak install --user flathub org.freedesktop.Platform//26.08 org.freedesktop.Sdk//26.08
+flatpak-builder --user --install --force-clean build com.lynx_share.LYNX.flatpak.yml
+flatpak run com.lynx_share.LYNX
+```
+
+To update, build it again from the new release's tarball.
+
 The Flatpak uses X11, including XWayland on Wayland desktops. In *Options › Audio settings*, use the native PipeWire
 driver or the JACK driver through PipeWire's JACK compatibility layer. The Flatpak runtime supplies PipeWire's JACK
 client, not a standalone JACK client. To connect to `jackd`, use the AppImage or tarball build with your host's
@@ -110,6 +127,11 @@ to audio playback and recording.
 Use the plugin directories in your home folder, such as `~/.vst3`, `~/.clap` and `~/.lv2`, for plugins compatible
 with the Flatpak runtime. The sandbox's `/usr` belongs to the runtime, so plugins installed by your distribution
 in the host's `/usr/lib` are not picked up from those paths.
+Flatpak reserves `/usr` (with `/usr/local`), so a `--filesystem=/usr/lib/vst3:ro` grant has no effect. To try them
+anyway, give the app read-only access to the host system with
+`flatpak override --user --filesystem=host-os:ro com.lynx_share.LYNX`, then add `/run/host/usr/lib/vst3` (or
+`.../clap`, `.../lv2`, `/run/host/usr/local/lib/...`) in *Options › Plugins*. Plugins built by a distribution use its
+libraries, and the runtime may lack some of them, so not every one of those plugins loads.
 
 ## Building from source
 

+ 2 - 0
resources/linux/com.lynx_share.LYNX.flatpak.yml

@@ -9,6 +9,8 @@ runtime-version: '26.08'
 sdk: org.freedesktop.Sdk
 command: LYNX
 finish-args:
+  # LYNX draws through X11 (JUCE's Linux windows) and runs under XWayland on a Wayland session, so it needs x11, not
+  # wayland / fallback-x11
   - --socket=x11
   - --share=ipc
   # Standalone JACK2 uses the host's /dev/shm for both its socket and audio buffers.