packages: every codec backend, and the libraries the app needs
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
This commit is contained in:
13 files changed
+280
-42
No files matched your search
Executable
+42
@@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
# Install what Voelin loads at run time from the system, for the .tar.gz
|
||||
# (the .deb and the Flatpak get them on their own): FFmpeg (hardware and
|
||||
# extra encoders and decoders), VA-API drivers, PipeWire and the desktop
|
||||
# portal (screen sharing, push-to-talk on Wayland), the Secret Service
|
||||
# (saved passwords). libvpx and libdav1d come with the archive (lib/).
|
||||
#
|
||||
# voelin-install-deps [--dry-run]
|
||||
#
|
||||
# Uses apt, dnf, pacman or zypper through sudo (unless run as root).
|
||||
set -eu
|
||||
|
||||
dry=
|
||||
[ "${1:-}" = "--dry-run" ] && dry=echo
|
||||
sudo=
|
||||
[ "$(id -u)" -eq 0 ] || sudo=sudo
|
||||
|
||||
run() {
|
||||
echo "+ $*"
|
||||
[ -n "$dry" ] || $sudo "$@"
|
||||
}
|
||||
|
||||
if command -v apt-get >/dev/null 2>&1; then
|
||||
# ffmpeg pulls in the libav* libraries of the release.
|
||||
run apt-get update
|
||||
run apt-get install -y ffmpeg libva2 libva-drm2 mesa-va-drivers pipewire xdg-desktop-portal \
|
||||
gnome-keyring libegl1 libxkbcommon-x11-0
|
||||
elif command -v dnf >/dev/null 2>&1; then
|
||||
# Fedora's ffmpeg-free; RPM Fusion's ffmpeg adds H.264/HEVC encoders.
|
||||
run dnf install -y ffmpeg-free libva mesa-va-drivers pipewire xdg-desktop-portal gnome-keyring \
|
||||
libxkbcommon-x11
|
||||
elif command -v pacman >/dev/null 2>&1; then
|
||||
run pacman -S --needed --noconfirm ffmpeg libva mesa pipewire xdg-desktop-portal gnome-keyring \
|
||||
libxkbcommon-x11
|
||||
elif command -v zypper >/dev/null 2>&1; then
|
||||
run zypper --non-interactive install ffmpeg libva2 Mesa-dri pipewire xdg-desktop-portal \
|
||||
gnome-keyring libxkbcommon-x11-0
|
||||
else
|
||||
echo "No apt, dnf, pacman or zypper: install FFmpeg (libavcodec), VA-API drivers," >&2
|
||||
echo "PipeWire, xdg-desktop-portal and a Secret Service keyring with your package manager." >&2
|
||||
exit 1
|
||||
fi
|
||||
@@ -11,22 +11,36 @@ is for servers and packaged for Linux only.
|
||||
## Build
|
||||
|
||||
Needs the MSVC build tools, CMake (bundled libopus), NASM (assembly of
|
||||
`aws-lc-sys`, used by the WebRTC stack) and libvpx (video, `voelin-media`):
|
||||
`aws-lc-sys`, used by the WebRTC stack), libvpx (VP8/VP9) and dav1d (AV1
|
||||
decoding), both for `voelin-media`:
|
||||
|
||||
```powershell
|
||||
winget install NASM.NASM Kitware.CMake NSIS.NSIS
|
||||
vcpkg install libvpx:x64-windows-static-md
|
||||
vcpkg install libvpx:x64-windows-static-md dav1d:x64-windows-static-md
|
||||
|
||||
$vpx = "$env:VCPKG_ROOT\installed\x64-windows-static-md"
|
||||
$env:VPX_LIB_DIR = "$vpx\lib"
|
||||
$env:VPX_INCLUDE_DIR = "$vpx\include"
|
||||
$env:VPX_VERSION = "1.15.2" # what `vcpkg list libvpx` shows
|
||||
$env:VPX_STATIC = "1"
|
||||
# dav1d-sys through system-deps, without pkg-config.
|
||||
$env:SYSTEM_DEPS_DAV1D_NO_PKG_CONFIG = "1"
|
||||
$env:SYSTEM_DEPS_DAV1D_SEARCH_NATIVE = "$vpx\lib"
|
||||
$env:SYSTEM_DEPS_DAV1D_LIB = "dav1d"
|
||||
$env:SYSTEM_DEPS_DAV1D_LINK = "static"
|
||||
|
||||
cargo build --release --locked -p voelin-ui
|
||||
makensis /DVERSION=0.1.0 packaging\windows\installer.nsi
|
||||
bash scripts/fetch-ffmpeg-windows.sh ffmpeg
|
||||
makensis /DVERSION=0.1.0 /DFFMPEG=..\..\ffmpeg packaging\windows\installer.nsi
|
||||
```
|
||||
|
||||
FFmpeg (hardware encoders and decoders, H.265, more AV1 decoders) is not
|
||||
linked: the app loads `avcodec-*.dll` and `avutil-*.dll` from its own
|
||||
directory, then `PATH`. The packages carry BtbN's LGPL build of FFmpeg 8.1
|
||||
(`scripts/fetch-ffmpeg-windows.sh`, with `FFMPEG-LICENSE.txt` and
|
||||
`FFMPEG-README.txt` naming the build and its source); replacing the DLLs
|
||||
with another build of the same major versions works.
|
||||
|
||||
This gives `target\release\voelin.exe` and
|
||||
`packaging\windows\voelin-0.1.0-setup.exe`. The installer puts the app in
|
||||
`Program Files\Voelin`, adds a Start menu shortcut and an uninstaller; user
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
; for the numeric file version (default: VERSION)
|
||||
; BINARY the executable (default ..\..\target\release\voelin.exe)
|
||||
; OUTDIR where the installer goes (default: next to this file)
|
||||
; FFMPEG a directory with FFmpeg's DLLs and FFMPEG-*.txt
|
||||
; (scripts/fetch-ffmpeg-windows.sh), installed next to the app
|
||||
; SIGN a signing command; "%1" is replaced by the file to sign, e.g.
|
||||
; /DSIGN="signtool sign /fd SHA256 /tr http://timestamp.digicert.com /td SHA256 /a %1"
|
||||
;
|
||||
@@ -67,6 +69,11 @@ Section "Install"
|
||||
File "/oname=${EXE}" "${BINARY}"
|
||||
; Also shown in the app's About page.
|
||||
File "/oname=THIRD_PARTY_NOTICES.md" "..\..\THIRD_PARTY_NOTICES.md"
|
||||
!ifdef FFMPEG
|
||||
; FFmpeg's DLLs, loaded from the app's directory, and their license.
|
||||
File "${FFMPEG}\*.dll"
|
||||
File "${FFMPEG}\FFMPEG-*.txt"
|
||||
!endif
|
||||
WriteUninstaller "$INSTDIR\uninstall.exe"
|
||||
|
||||
CreateShortcut "$SMPROGRAMS\${APP_NAME}.lnk" "$INSTDIR\${EXE}"
|
||||
@@ -86,6 +93,9 @@ Section "Uninstall"
|
||||
; User data in %APPDATA%\voelin (identities, bookmarks, history) is kept.
|
||||
Delete "$INSTDIR\${EXE}"
|
||||
Delete "$INSTDIR\THIRD_PARTY_NOTICES.md"
|
||||
Delete "$INSTDIR\av*.dll"
|
||||
Delete "$INSTDIR\sw*.dll"
|
||||
Delete "$INSTDIR\FFMPEG-*.txt"
|
||||
Delete "$INSTDIR\uninstall.exe"
|
||||
RMDir "$INSTDIR"
|
||||
Delete "$SMPROGRAMS\${APP_NAME}.lnk"
|
||||
|
||||
Reference in new issue
Block a user