chore(packaging): CI + package guards for the Linux frame-copy helper

- build-and-make.yaml: install libegl-dev/libgl-dev/libgbm-dev on the
  Linux runner (the helper's EGL backend needs them now that the helper
  target builds on Linux), and verify the built helper exists and DOES
  link libmpv - the inverse of the addon's no-libmpv rule, which still
  holds and stays validated.
- electron-after-pack.cjs: strip iptvnator_mpv_helper from packaged Linux
  apps. It links the build host's system libmpv, which end-user systems
  cannot be assumed to have; the support probe treats the missing helper
  as frame-copy-unavailable (dev-build-only engine until the
  bundled-runtime staging milestone).
- frame_helper_gl.h: log the chosen EGL display tier to stderr (the
  adapter mirrors helper stderr), so bring-up problems on exotic setups
  are diagnosable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
4grayandClaude Fable 5 authored and 4gray committed 2026-07-15 19:51:39 +02:00
1 parent cf7a1524c4
commit 4316f4d95d
2 files changed
+24 -4

No files matched your search

+10 -1
View File
@@ -68,7 +68,7 @@ jobs:
if: matrix.os == 'linux'
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y rpm libarchive-tools flatpak flatpak-builder appstream libx11-dev libxext-dev libmpv-dev mpv pkg-config
sudo apt-get install --no-install-recommends -y rpm libarchive-tools flatpak flatpak-builder appstream libx11-dev libxext-dev libmpv-dev mpv pkg-config libegl-dev libgl-dev libgbm-dev
# Configure Flatpak
# 1. Add the Flathub repository (source of runtimes)
@@ -336,6 +336,15 @@ jobs:
ldd dist/apps/electron-backend/native/embedded_mpv.node
exit 1
fi
# The frame-copy helper is the inverse: a separate process
# that MUST link libmpv (dev-mode engine; stripped from
# packages until the bundled-runtime staging lands).
test -x dist/apps/electron-backend/native/iptvnator_mpv_helper
if ! ldd dist/apps/electron-backend/native/iptvnator_mpv_helper | grep -q 'libmpv'; then
echo "::error::Linux frame-copy helper must link libmpv"
ldd dist/apps/electron-backend/native/iptvnator_mpv_helper
exit 1
fi
;;
esac
@@ -212,18 +212,29 @@ public:
private:
bool acquireDisplay() {
/* Tier log goes to stderr (the adapter mirrors it) — stdout is
* reserved for the JSON event protocol. */
display_ = eglGetPlatformDisplay(EGL_PLATFORM_SURFACELESS_MESA,
nullptr, nullptr);
if (initDisplay(display_)) return true;
if (initDisplay(display_)) {
std::fprintf(stderr, "egl display: surfaceless-mesa\n");
return true;
}
display_ = eglGetDisplay(EGL_DEFAULT_DISPLAY);
if (initDisplay(display_)) return true;
if (initDisplay(display_)) {
std::fprintf(stderr, "egl display: default\n");
return true;
}
display_ = EGL_NO_DISPLAY;
if (openGbmDevice()) {
display_ = eglGetPlatformDisplay(EGL_PLATFORM_GBM_KHR, gbmDevice_,
nullptr);
if (initDisplay(display_)) return true;
if (initDisplay(display_)) {
std::fprintf(stderr, "egl display: gbm render node\n");
return true;
}
}
display_ = EGL_NO_DISPLAY;
return false;