From c90057572a3f2bd8f2c89c557df77adc42e998ac Mon Sep 17 00:00:00 2001 From: rueger-events-bot <287312438+rueger-events-bot@users.noreply.github.com> Date: Sat, 23 May 2026 23:00:22 +0000 Subject: [PATCH 1/7] feat: add Linux build and release support --- .github/scripts/install-ndi-linux.sh | 82 ++++++++++++++++++++++++++++ .github/workflows/build.yml | 73 ++++++++++++++++++++++++- CMakeLists.txt | 50 ++++++++++++++++- src/DnsSdBridge_win.cpp | 10 +++- src/ui/StreamSourcePanel.cpp | 1 - 5 files changed, 208 insertions(+), 8 deletions(-) create mode 100755 .github/scripts/install-ndi-linux.sh diff --git a/.github/scripts/install-ndi-linux.sh b/.github/scripts/install-ndi-linux.sh new file mode 100755 index 0000000..a99b015 --- /dev/null +++ b/.github/scripts/install-ndi-linux.sh @@ -0,0 +1,82 @@ +#!/usr/bin/env bash +set -euo pipefail + +if [[ -z "${NDI_SDK_URL_LINUX:-}" ]]; then + echo "NDI_SDK_URL_LINUX is not set" >&2 + exit 1 +fi + +archive="$RUNNER_TEMP/ndi-sdk-linux" +extract_dir="$RUNNER_TEMP/ndi-sdk-linux-extract" +mkdir -p "$extract_dir" + +curl -L --retry 3 --retry-delay 5 "$NDI_SDK_URL_LINUX" -o "$archive" + +if file "$archive" | grep -qi 'gzip compressed'; then + tar -xzf "$archive" -C "$extract_dir" +elif file "$archive" | grep -qi 'bzip2 compressed'; then + tar -xjf "$archive" -C "$extract_dir" +elif file "$archive" | grep -qi 'Zip archive'; then + unzip -q "$archive" -d "$extract_dir" +else + chmod +x "$archive" + (cd "$extract_dir" && printf 'y\ny\n' | "$archive") +fi + +# NDI's Linux download is a .tar.gz containing a self-extracting shell installer. +# Run it non-interactively after unpacking the outer archive. +installer="$(find "$extract_dir" -maxdepth 2 -type f -name 'Install_NDI_SDK*_Linux*.sh' -print -quit || true)" +existing_header="$(find "$extract_dir" -type f -path '*/include/Processing.NDI.Lib.h' -print -quit || true)" +if [[ -n "$installer" && -z "$existing_header" ]]; then + chmod +x "$installer" + (cd "$(dirname "$installer")" && printf 'y\ny\n' | PAGER=cat ./"$(basename "$installer")") +fi + +sdk_root="" +while IFS= read -r header; do + candidate="$(dirname "$(dirname "$header")")" + first_lib="$(find "$candidate" -type f -name 'libndi.so*' -print -quit || true)" + if [[ -n "$first_lib" ]]; then + sdk_root="$candidate" + break + fi +done < <(find "$extract_dir" /usr/local /opt -type f -path '*/include/Processing.NDI.Lib.h' 2>/dev/null || true) + +if [[ -z "$sdk_root" ]]; then + echo "Could not locate Processing.NDI.Lib.h and libndi.so after extracting Linux NDI SDK" >&2 + find "$extract_dir" -maxdepth 4 -type f | sort >&2 || true + exit 1 +fi + +# Normalize into the project-local layout CMake searches first. Preserve symlinks +# so versioned libndi.so chains remain intact. +case "$(uname -m)" in + x86_64|amd64) ndi_arch_dir="x86_64-linux-gnu" ;; + aarch64|arm64) ndi_arch_dir="aarch64-rpi4-linux-gnueabi" ;; + armv7l) ndi_arch_dir="arm-rpi4-linux-gnueabihf" ;; + *) ndi_arch_dir="" ;; +esac + +lib_source_dir="" +if [[ -n "$ndi_arch_dir" && -d "$sdk_root/lib/$ndi_arch_dir" ]]; then + lib_source_dir="$sdk_root/lib/$ndi_arch_dir" +elif [[ -d "$sdk_root/lib" ]]; then + lib_source_dir="$sdk_root/lib" +fi + +rm -rf ndi +mkdir -p ndi/include ndi/lib +cp -a "$sdk_root/include"/. ndi/include/ +if [[ -z "$lib_source_dir" ]]; then + echo "Could not locate an NDI library directory for $(uname -m) under $sdk_root/lib" >&2 + exit 1 +fi +cp -a "$lib_source_dir"/libndi.so* ndi/lib/ + +if [[ ! -e ndi/lib/libndi.so ]]; then + first_lib="$(find ndi/lib -type f -name 'libndi.so*' | sort | head -n1)" + [[ -n "$first_lib" ]] || { echo "No libndi.so found in normalized SDK" >&2; exit 1; } + ln -s "$(basename "$first_lib")" ndi/lib/libndi.so +fi + +echo "NDI SDK normalized to $PWD/ndi" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1468b2e..7709d08 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,6 +4,8 @@ on: push: branches: ["**"] tags: ["v*"] + pull_request: + branches: ["**"] workflow_dispatch: inputs: tag: @@ -265,11 +267,79 @@ jobs: path: OnPoint-*-Setup.exe if-no-files-found: error + # ───────────────────────────────────────────────────────────────────────────── + build-linux: + name: Linux x64 + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref }} + + - name: Install system dependencies + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends \ + build-essential \ + cmake \ + ninja-build \ + curl \ + file \ + unzip \ + libgl1-mesa-dev \ + libxkbcommon-dev \ + libxcb-cursor0 \ + libxcb-cursor-dev \ + libopencv-dev \ + qt6-base-dev \ + qt6-base-dev-tools \ + qt6-multimedia-dev \ + libqt6svg6-dev \ + libavahi-compat-libdnssd-dev + + - name: Install NDI SDK + env: + NDI_SDK_URL_LINUX: ${{ secrets.NDI_SDK_URL_LINUX }} + run: bash .github/scripts/install-ndi-linux.sh + + - name: Configure + run: | + cmake -S . -B build -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX="$PWD/package/OnPoint-Linux-x86_64" + + - name: Build + run: cmake --build build --parallel $(nproc) + + - name: Package + run: | + mkdir -p package/OnPoint-Linux-x86_64/bin package/OnPoint-Linux-x86_64/lib package/OnPoint-Linux-x86_64/share/doc/onpoint + cp build/onpoint package/OnPoint-Linux-x86_64/bin/ + cp -a ndi/lib/libndi.so* package/OnPoint-Linux-x86_64/lib/ + cp README.md package/OnPoint-Linux-x86_64/share/doc/onpoint/ 2>/dev/null || true + { + echo '#!/usr/bin/env bash' + echo 'set -euo pipefail' + echo 'APPDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"' + echo 'export LD_LIBRARY_PATH="$APPDIR/lib:${LD_LIBRARY_PATH:-}"' + echo 'exec "$APPDIR/bin/onpoint" "$@"' + } > package/OnPoint-Linux-x86_64/run-onpoint.sh + chmod +x package/OnPoint-Linux-x86_64/run-onpoint.sh + tar -C package -czf OnPoint-Linux-x86_64.tar.gz OnPoint-Linux-x86_64 + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: OnPoint-Linux-x86_64 + path: OnPoint-Linux-x86_64.tar.gz + if-no-files-found: error + # ───────────────────────────────────────────────────────────────────────────── release: name: GitHub Release if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch' - needs: [build-macos, build-windows] + needs: [build-macos, build-windows, build-linux] runs-on: ubuntu-latest env: TAG_NAME: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref_name }} @@ -287,3 +357,4 @@ jobs: files: | OnPoint.dmg OnPoint-*-Setup.exe + OnPoint-Linux-x86_64.tar.gz diff --git a/CMakeLists.txt b/CMakeLists.txt index e55e5b7..36ed545 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -109,11 +109,20 @@ if(WIN32) "C:/Program Files (x86)/NDI/NDI Advanced SDK 6" "$ENV{NDI_SDK_DIR}" ) -else() +elseif(APPLE) set(NDI_SEARCH_PATHS "${CMAKE_SOURCE_DIR}/ndi" "/Library/NDI SDK for Apple" "/usr/local" + "$ENV{NDI_SDK_DIR}" + ) +else() + set(NDI_SEARCH_PATHS + "${CMAKE_SOURCE_DIR}/ndi" + "/opt/ndi" + "/usr/local" + "/usr" + "$ENV{NDI_SDK_DIR}" ) endif() @@ -131,12 +140,23 @@ foreach(NDI_BASE ${NDI_SEARCH_PATHS}) break() endif() endforeach() - else() + elseif(APPLE) if(EXISTS "${NDI_BASE}/lib/macOS/libndi.dylib") set(NDI_LIB "${NDI_BASE}/lib/macOS/libndi.dylib") elseif(EXISTS "${NDI_BASE}/lib/libndi.dylib") set(NDI_LIB "${NDI_BASE}/lib/libndi.dylib") endif() + else() + foreach(_lib_path + "${NDI_BASE}/lib/x86_64-linux-gnu/libndi.so" + "${NDI_BASE}/lib/x64/libndi.so" + "${NDI_BASE}/lib/libndi.so" + "${NDI_BASE}/lib64/libndi.so") + if(EXISTS "${_lib_path}") + set(NDI_LIB "${_lib_path}") + break() + endif() + endforeach() endif() if(NDI_LIB) set(NDI_FOUND TRUE) @@ -198,11 +218,16 @@ else() "Install the NDI 6 SDK for Windows from https://ndi.video/download-ndi-sdk/ " "or place the SDK directory under ${CMAKE_SOURCE_DIR}/ndi/.\n" "You can also set the NDI_SDK_DIR environment variable to the SDK root.") - else() + elseif(APPLE) message(FATAL_ERROR "NDI SDK not found. " "Install 'NDI SDK for Apple' (6.x) so CMake can find " "Processing.NDI.Lib.h and libndi.dylib.") + else() + message(FATAL_ERROR + "NDI SDK not found. Install the NDI SDK for Linux so CMake can find " + "Processing.NDI.Lib.h and libndi.so, place it under ${CMAKE_SOURCE_DIR}/ndi/, " + "or set NDI_SDK_DIR to the SDK root.") endif() endif() @@ -268,6 +293,25 @@ if(APPLE) endif() +# ── Linux-specific ──────────────────────────────────────────────────────────── +if(UNIX AND NOT APPLE) + find_path(DNSSD_INCLUDE_DIR dns_sd.h) + find_library(DNSSD_LIB dns_sd) + if(NOT DNSSD_INCLUDE_DIR OR NOT DNSSD_LIB) + message(FATAL_ERROR + "DNS-SD compatibility library not found. Install libavahi-compat-libdnssd-dev " + "(Debian/Ubuntu) or the equivalent package for your distribution.") + endif() + + target_sources(onpoint PRIVATE src/DnsSdBridge_win.cpp) + target_include_directories(onpoint PRIVATE "${DNSSD_INCLUDE_DIR}") + target_link_libraries(onpoint PRIVATE "${DNSSD_LIB}") + target_compile_definitions(onpoint PRIVATE DNSSD_AVAILABLE=1) + message(STATUS "Found DNS-SD compatibility library — session discovery enabled") + + install(TARGETS onpoint RUNTIME DESTINATION bin) +endif() + # ── Windows-specific ────────────────────────────────────────────────────────── if(WIN32) # Use the Windows GUI subsystem (no console window) diff --git a/src/DnsSdBridge_win.cpp b/src/DnsSdBridge_win.cpp index 53ececb..a9e418e 100644 --- a/src/DnsSdBridge_win.cpp +++ b/src/DnsSdBridge_win.cpp @@ -3,7 +3,11 @@ #if defined(DNSSD_AVAILABLE) && DNSSD_AVAILABLE -#include +#ifdef _WIN32 +# include +#else +# include +#endif #include #include #include @@ -201,8 +205,8 @@ DnsSdBridge::~DnsSdBridge() {} void DnsSdBridge::advertise(const QString&, quint16) { QTimer::singleShot(0, this, [this]() { emit advertiseError( - QStringLiteral("Session discovery unavailable: " - "install Apple Bonjour for Windows")); + QStringLiteral("Session discovery unavailable: install a DNS-SD compatibility library " + "(Bonjour on Windows or Avahi libdns_sd on Linux)")); }); } void DnsSdBridge::stopAdvertising() {} diff --git a/src/ui/StreamSourcePanel.cpp b/src/ui/StreamSourcePanel.cpp index 288127d..0bf14ea 100644 --- a/src/ui/StreamSourcePanel.cpp +++ b/src/ui/StreamSourcePanel.cpp @@ -511,7 +511,6 @@ class DecklinkSourceTab : public VideoSourceTab { bool settingSource_ = false; #else void refreshSources() override {} - QString selectedSource() const override { return {}; } void setCurrentSource(const QString&) override {} #endif }; From 04747c0e4c14591b4ae9725c7ee4501e987e49f4 Mon Sep 17 00:00:00 2001 From: rueger-events-bot Date: Wed, 27 May 2026 10:40:29 +0000 Subject: [PATCH 2/7] ci: use newer Qt for Linux builds --- .github/workflows/build.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7709d08..3e74702 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -282,7 +282,6 @@ jobs: sudo apt-get update sudo apt-get install -y --no-install-recommends \ build-essential \ - cmake \ ninja-build \ curl \ file \ @@ -292,12 +291,18 @@ jobs: libxcb-cursor0 \ libxcb-cursor-dev \ libopencv-dev \ - qt6-base-dev \ - qt6-base-dev-tools \ - qt6-multimedia-dev \ - libqt6svg6-dev \ libavahi-compat-libdnssd-dev + - name: Install Qt + uses: jurplel/install-qt-action@v4 + with: + version: "6.8.3" + host: linux + target: desktop + arch: linux_gcc_64 + modules: "qtmultimedia qtsvg" + cache: true + - name: Install NDI SDK env: NDI_SDK_URL_LINUX: ${{ secrets.NDI_SDK_URL_LINUX }} @@ -307,6 +312,7 @@ jobs: run: | cmake -S . -B build -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_PREFIX_PATH="$QT_ROOT_DIR" \ -DCMAKE_INSTALL_PREFIX="$PWD/package/OnPoint-Linux-x86_64" - name: Build From 661d84a0e323ed6639f24d492a7cf3697a63da46 Mon Sep 17 00:00:00 2001 From: rueger-events-bot Date: Wed, 27 May 2026 10:52:45 +0000 Subject: [PATCH 3/7] ci: only install extra Qt multimedia module on Linux --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3e74702..c650106 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -300,7 +300,7 @@ jobs: host: linux target: desktop arch: linux_gcc_64 - modules: "qtmultimedia qtsvg" + modules: "qtmultimedia" cache: true - name: Install NDI SDK From fd9a43fc7a503f9b85033277c8e86fae44b96e56 Mon Sep 17 00:00:00 2001 From: rueger-events-bot Date: Wed, 27 May 2026 12:20:13 +0000 Subject: [PATCH 4/7] ci: bundle Qt libraries in Linux artifact --- .github/workflows/build.yml | 75 ++++++++++++++++++++++++++++++++++--- 1 file changed, 69 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c650106..fae0107 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -320,18 +320,81 @@ jobs: - name: Package run: | - mkdir -p package/OnPoint-Linux-x86_64/bin package/OnPoint-Linux-x86_64/lib package/OnPoint-Linux-x86_64/share/doc/onpoint - cp build/onpoint package/OnPoint-Linux-x86_64/bin/ - cp -a ndi/lib/libndi.so* package/OnPoint-Linux-x86_64/lib/ - cp README.md package/OnPoint-Linux-x86_64/share/doc/onpoint/ 2>/dev/null || true + set -euo pipefail + + appdir="$PWD/package/OnPoint-Linux-x86_64" + mkdir -p "$appdir/bin" "$appdir/lib" "$appdir/plugins" "$appdir/share/doc/onpoint" + + cp build/onpoint "$appdir/bin/" + cp -a ndi/lib/libndi.so* "$appdir/lib/" + cp README.md "$appdir/share/doc/onpoint/" 2>/dev/null || true + + # Bundle Qt from the aqt installation. The Linux artifact is built + # against Qt 6.8 from QT_ROOT_DIR, which is not available on a clean + # Ubuntu install, so the launcher must not depend on system Qt. + cp -aL "$QT_ROOT_DIR/lib"/libQt6*.so* "$appdir/lib/" + + for plugin_dir in \ + platforms \ + platformthemes \ + imageformats \ + iconengines \ + tls \ + xcbglintegrations \ + multimedia; do + if [ -d "$QT_ROOT_DIR/plugins/$plugin_dir" ]; then + cp -a "$QT_ROOT_DIR/plugins/$plugin_dir" "$appdir/plugins/" + fi + done + + cat > "$appdir/bin/qt.conf" <<'EOF' + [Paths] + Prefix = .. + Plugins = plugins + EOF + + copy_deps() { + local target="$1" + ldd "$target" \ + | awk '/=> \/.*\.so/ {print $3} /^\s*\/.*\.so/ {print $1}' \ + | while IFS= read -r lib; do + [ -f "$lib" ] || continue + case "$lib" in + "$QT_ROOT_DIR"/*|"$PWD"/ndi/*|/usr/lib/*/libopencv*|/usr/lib/*/libdns_sd*|/usr/lib/*/libavahi*) + cp -aL "$lib" "$appdir/lib/" + ;; + esac + done + } + + copy_deps build/onpoint + find "$appdir/plugins" -type f -name '*.so' -print0 | while IFS= read -r -d '' plugin; do + copy_deps "$plugin" + done + + # Resolve transitive dependencies from the libraries we just copied. + for _ in 1 2 3; do + find "$appdir/lib" -type f -name '*.so*' -print0 | while IFS= read -r -d '' lib; do + copy_deps "$lib" || true + done + done + { echo '#!/usr/bin/env bash' echo 'set -euo pipefail' echo 'APPDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"' echo 'export LD_LIBRARY_PATH="$APPDIR/lib:${LD_LIBRARY_PATH:-}"' + echo 'export QT_PLUGIN_PATH="$APPDIR/plugins:${QT_PLUGIN_PATH:-}"' echo 'exec "$APPDIR/bin/onpoint" "$@"' - } > package/OnPoint-Linux-x86_64/run-onpoint.sh - chmod +x package/OnPoint-Linux-x86_64/run-onpoint.sh + } > "$appdir/run-onpoint.sh" + chmod +x "$appdir/run-onpoint.sh" + + echo "Checking packaged binary dependencies" + LD_LIBRARY_PATH="$appdir/lib" ldd "$appdir/bin/onpoint" | tee /tmp/onpoint-ldd.txt + if grep -q 'not found' /tmp/onpoint-ldd.txt; then + exit 1 + fi + tar -C package -czf OnPoint-Linux-x86_64.tar.gz OnPoint-Linux-x86_64 - name: Upload artifact From bcdd4493889112faf8937aa485b8d7b69657c892 Mon Sep 17 00:00:00 2001 From: rueger-events-bot Date: Wed, 27 May 2026 14:19:29 +0000 Subject: [PATCH 5/7] ci: bundle OpenCV libraries in Linux artifact --- .github/workflows/build.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fae0107..d92b621 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -360,7 +360,7 @@ jobs: | while IFS= read -r lib; do [ -f "$lib" ] || continue case "$lib" in - "$QT_ROOT_DIR"/*|"$PWD"/ndi/*|/usr/lib/*/libopencv*|/usr/lib/*/libdns_sd*|/usr/lib/*/libavahi*) + "$QT_ROOT_DIR"/*|"$PWD"/ndi/*|/usr/lib/*/libopencv*|/lib/*/libopencv*|/usr/lib/*/libdns_sd*|/lib/*/libdns_sd*|/usr/lib/*/libavahi*|/lib/*/libavahi*) cp -aL "$lib" "$appdir/lib/" ;; esac @@ -395,6 +395,20 @@ jobs: exit 1 fi + echo "Checking bundled non-system runtime libraries" + ldd build/onpoint \ + | awk '/=> \/.*\.so/ {print $1 " " $3}' \ + | while read -r soname lib; do + case "$lib" in + "$QT_ROOT_DIR"/*|"$PWD"/ndi/*|/usr/lib/*/libopencv*|/lib/*/libopencv*|/usr/lib/*/libdns_sd*|/lib/*/libdns_sd*|/usr/lib/*/libavahi*|/lib/*/libavahi*) + test -e "$appdir/lib/$soname" || { + echo "Missing bundled runtime library: $soname from $lib" + exit 1 + } + ;; + esac + done + tar -C package -czf OnPoint-Linux-x86_64.tar.gz OnPoint-Linux-x86_64 - name: Upload artifact From ed4e1e3d0291602c53c3a7864ab191ae3479e3e7 Mon Sep 17 00:00:00 2001 From: rueger-events-bot Date: Wed, 27 May 2026 14:33:27 +0000 Subject: [PATCH 6/7] ci: bundle Linux runtime dependency closure --- .github/workflows/build.yml | 67 +++++++++++++++++++++++++++---------- 1 file changed, 49 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d92b621..6e9757f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -353,17 +353,40 @@ jobs: Plugins = plugins EOF + should_bundle() { + local lib="$1" + local soname + soname="$(basename "$lib")" + + # Do not bundle glibc/loader primitives; they must come from the + # target system. Bundle the rest of the runtime closure so the + # archive works on minimal Ubuntu installs that may not have GLX, + # OpenCV, TBB, PulseAudio, or Qt plugin dependencies preinstalled. + case "$soname" in + libc.so.*|ld-linux-x86-64.so.*|libpthread.so.*|libdl.so.*|librt.so.*|libm.so.*|libresolv.so.*) + return 1 + ;; + esac + + case "$lib" in + "$appdir"/*|"$QT_ROOT_DIR"/*|"$PWD"/ndi/*|/usr/lib/*|/lib/*) + return 0 + ;; + *) + return 1 + ;; + esac + } + copy_deps() { local target="$1" ldd "$target" \ | awk '/=> \/.*\.so/ {print $3} /^\s*\/.*\.so/ {print $1}' \ | while IFS= read -r lib; do [ -f "$lib" ] || continue - case "$lib" in - "$QT_ROOT_DIR"/*|"$PWD"/ndi/*|/usr/lib/*/libopencv*|/lib/*/libopencv*|/usr/lib/*/libdns_sd*|/lib/*/libdns_sd*|/usr/lib/*/libavahi*|/lib/*/libavahi*) - cp -aL "$lib" "$appdir/lib/" - ;; - esac + if should_bundle "$lib"; then + cp -aL "$lib" "$appdir/lib/" + fi done } @@ -395,19 +418,27 @@ jobs: exit 1 fi - echo "Checking bundled non-system runtime libraries" - ldd build/onpoint \ - | awk '/=> \/.*\.so/ {print $1 " " $3}' \ - | while read -r soname lib; do - case "$lib" in - "$QT_ROOT_DIR"/*|"$PWD"/ndi/*|/usr/lib/*/libopencv*|/lib/*/libopencv*|/usr/lib/*/libdns_sd*|/lib/*/libdns_sd*|/usr/lib/*/libavahi*|/lib/*/libavahi*) - test -e "$appdir/lib/$soname" || { - echo "Missing bundled runtime library: $soname from $lib" - exit 1 - } - ;; - esac - done + echo "Checking bundled runtime closure" + check_unbundled() { + local target="$1" + LD_LIBRARY_PATH="$appdir/lib" ldd "$target" \ + | awk '/=> \/.*\.so/ {print $1 " " $3} /^\s*\/.*\.so/ {print $1 " " $1}' \ + | while read -r soname lib; do + [ -f "$lib" ] || continue + if should_bundle "$lib" && [ "$lib" != "$appdir/lib/$soname" ]; then + echo "Missing bundled runtime library: $soname from $lib" + exit 1 + fi + done + } + + check_unbundled "$appdir/bin/onpoint" + find "$appdir/plugins" -type f -name '*.so' -print0 | while IFS= read -r -d '' plugin; do + check_unbundled "$plugin" + done + find "$appdir/lib" -type f -name '*.so*' -print0 | while IFS= read -r -d '' lib; do + check_unbundled "$lib" || true + done tar -C package -czf OnPoint-Linux-x86_64.tar.gz OnPoint-Linux-x86_64 From c364b5c56be470f3ecc11ccb3252706380a98b0d Mon Sep 17 00:00:00 2001 From: rueger-events-bot Date: Wed, 27 May 2026 14:38:37 +0000 Subject: [PATCH 7/7] ci: avoid recopying bundled Linux libraries --- .github/workflows/build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6e9757f..88c6982 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -384,6 +384,11 @@ jobs: | awk '/=> \/.*\.so/ {print $3} /^\s*\/.*\.so/ {print $1}' \ | while IFS= read -r lib; do [ -f "$lib" ] || continue + case "$lib" in + "$appdir"/*) + continue + ;; + esac if should_bundle "$lib"; then cp -aL "$lib" "$appdir/lib/" fi