voelin-media builds dav1d (AV1 decoding) by default, like every other codec backend: Linux images already had libdav1d-dev; Windows CI takes it from vcpkg next to libvpx and the MinGW image builds it static (dav1d 1.5.4, pinned commit; checked to cross-compile). Windows packages ship FFmpeg's LGPL DLLs (BtbN's 8.1 shared build, checked against the release's checksums by scripts/fetch-ffmpeg-windows.sh) next to voelin.exe, where the app looks first, with their license and a note on the build and its source; the installer installs and removes them. The Linux .tar.gz carries libvpx and libdav1d in lib/ (RUNPATH $ORIGIN/../lib, set with patchelf), whose sonames differ between distributions, and bin/voelin-install-deps, which installs FFmpeg, VA-API drivers, PipeWire, the desktop portal and a keyring with apt, dnf, pacman or zypper. The .deb recommends those packages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VZBWxxMsxUzp4PSTKVzbZN
105 lines
4.6 KiB
YAML
105 lines
4.6 KiB
YAML
name: System dependencies
|
|
description: >
|
|
Native libraries and tools the workspace builds against: apt packages on
|
|
Linux; NASM, libvpx and dav1d (vcpkg, cached) on Windows, exporting
|
|
VPX_LIB_DIR, VPX_INCLUDE_DIR, VPX_VERSION and VPX_STATIC for
|
|
libvpx-native-sys and SYSTEM_DEPS_DAV1D_* for dav1d-sys.
|
|
|
|
inputs:
|
|
vpx-triplet:
|
|
description: vcpkg triplet for libvpx and dav1d on Windows (static libraries, dynamic CRT like Rust's default)
|
|
default: x64-windows-static-md
|
|
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: apt packages
|
|
if: runner.os == 'Linux'
|
|
shell: bash
|
|
# ALSA (audio devices), fontconfig + xkbcommon (UI), libvpx + dav1d
|
|
# (video codecs), PipeWire + SPA (screen and audio capture), libclang
|
|
# (bindgen), Xvfb (X11 tests).
|
|
run: |
|
|
# Gitea container runners may run as root and need the base build
|
|
# tools that GitHub's hosted images already provide.
|
|
sudo=()
|
|
if [ "$(id -u)" -ne 0 ]; then sudo=(sudo); fi
|
|
"${sudo[@]}" apt-get update
|
|
"${sudo[@]}" apt-get install -y --no-install-recommends \
|
|
build-essential ca-certificates cmake curl git jq pkg-config python3 \
|
|
libasound2-dev libfontconfig1-dev libxkbcommon-dev \
|
|
libvpx-dev libdav1d-dev libpipewire-0.3-dev libspa-0.2-dev libclang-dev \
|
|
xvfb xauth
|
|
|
|
# aws-lc-sys (WebRTC DTLS through str0m) assembles with NASM on Windows.
|
|
- name: NASM
|
|
if: runner.os == 'Windows'
|
|
uses: ilammy/setup-nasm@v1
|
|
|
|
- name: vcpkg revision
|
|
if: runner.os == 'Windows'
|
|
id: vcpkg
|
|
shell: pwsh
|
|
run: |
|
|
"commit=$(git -C "$env:VCPKG_INSTALLATION_ROOT" rev-parse HEAD)" >> $env:GITHUB_OUTPUT
|
|
|
|
- name: Cache vcpkg packages
|
|
if: runner.os == 'Windows'
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ${{ runner.temp }}\vcpkg-archives
|
|
key: vcpkg-libvpx-dav1d-${{ inputs.vpx-triplet }}-${{ steps.vcpkg.outputs.commit }}
|
|
restore-keys: vcpkg-libvpx-dav1d-${{ inputs.vpx-triplet }}-
|
|
|
|
- name: libvpx
|
|
if: runner.os == 'Windows'
|
|
shell: pwsh
|
|
env:
|
|
TRIPLET: ${{ inputs.vpx-triplet }}
|
|
VCPKG_BINARY_SOURCES: clear;files,${{ runner.temp }}\vcpkg-archives,readwrite
|
|
run: |
|
|
$ErrorActionPreference = 'Stop'
|
|
$vcpkg = Join-Path $env:VCPKG_INSTALLATION_ROOT 'vcpkg.exe'
|
|
New-Item -ItemType Directory -Force (Join-Path $env:RUNNER_TEMP 'vcpkg-archives') | Out-Null
|
|
& $vcpkg install "libvpx:$env:TRIPLET" "dav1d:$env:TRIPLET"
|
|
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
|
|
# "libvpx:x64-windows-static-md 1.15.2#1 The reference ..."
|
|
$line = (& $vcpkg list libvpx | Select-String -Pattern "^libvpx:$env:TRIPLET\s").Line
|
|
if (-not $line) { throw "vcpkg list does not show libvpx:$env:TRIPLET" }
|
|
$version = (($line -split '\s+')[1] -split '#')[0]
|
|
|
|
$root = Join-Path $env:VCPKG_INSTALLATION_ROOT "installed\$env:TRIPLET"
|
|
$libdir = Join-Path $root 'lib'
|
|
# libvpx-native-sys links "vpx"; libvpx's own MSVC build names the
|
|
# library vpxmd.lib / vpxmt.lib, so provide vpx.lib if needed.
|
|
if (-not (Test-Path (Join-Path $libdir 'vpx.lib'))) {
|
|
$lib = Get-ChildItem $libdir -Filter 'vpx*.lib' | Select-Object -First 1
|
|
if (-not $lib) { Get-ChildItem $libdir; throw "no vpx library in $libdir" }
|
|
$libdir = Join-Path $env:RUNNER_TEMP 'vpx-lib'
|
|
New-Item -ItemType Directory -Force $libdir | Out-Null
|
|
Copy-Item $lib.FullName (Join-Path $libdir 'vpx.lib')
|
|
}
|
|
|
|
"VPX_LIB_DIR=$libdir" >> $env:GITHUB_ENV
|
|
"VPX_INCLUDE_DIR=$(Join-Path $root 'include')" >> $env:GITHUB_ENV
|
|
"VPX_VERSION=$version" >> $env:GITHUB_ENV
|
|
"VPX_STATIC=1" >> $env:GITHUB_ENV
|
|
Write-Host "libvpx $version from $libdir"
|
|
|
|
# dav1d-sys (AV1 decoding) through system-deps, without pkg-config:
|
|
# the static library, linked as dav1d.lib.
|
|
$davdir = Join-Path $root 'lib'
|
|
if (-not (Test-Path (Join-Path $davdir 'dav1d.lib'))) {
|
|
$lib = Get-ChildItem $davdir -Filter '*dav1d*.lib' | Select-Object -First 1
|
|
if (-not $lib) { Get-ChildItem $davdir; throw "no dav1d library in $davdir" }
|
|
$davdir = Join-Path $env:RUNNER_TEMP 'dav1d-lib'
|
|
New-Item -ItemType Directory -Force $davdir | Out-Null
|
|
Copy-Item $lib.FullName (Join-Path $davdir 'dav1d.lib')
|
|
}
|
|
"SYSTEM_DEPS_DAV1D_NO_PKG_CONFIG=1" >> $env:GITHUB_ENV
|
|
"SYSTEM_DEPS_DAV1D_SEARCH_NATIVE=$davdir" >> $env:GITHUB_ENV
|
|
"SYSTEM_DEPS_DAV1D_LIB=dav1d" >> $env:GITHUB_ENV
|
|
"SYSTEM_DEPS_DAV1D_LINK=static" >> $env:GITHUB_ENV
|
|
Write-Host "dav1d from $davdir"
|