Commit Graph
10 Commits
Author SHA1 Message Date
david 248a9a0ecf build: add Linux libmpv.so build and drop the stray headers
Add a native x86_64 Linux build (ci/build-libmpv-linux.sh,
build-linux.yml). Every dependency is static and linked into a single
libmpv.so; only glibc/pthread/dl/m and the system zlib remain external.
The Linux-only additions are the font stack (fontconfig -> expat, where
macOS/Windows use CoreText/DirectWrite) and alsa audio output; gl is the
plain render-API support (no X11/Wayland context, since jlibmpv supplies
the GL context via JOGL).

For consistency, ship a single native per platform and no public headers
(jlibmpv loads the library via JNA and never compiles against it). Remove
the accidental header/import-library copies from the Windows build and the
phantom header copy from the macOS build.
2026-10-01 18:10:21 +02:00
david c92a9ef033 build: look for libmpv.2.dylib (dot) in the macOS build
meson names the shared library libmpv.2.dylib on macOS, not
libmpv-2.dylib as on Windows. Fix the collect step in the build script
and the lipo inputs in the workflow.
2026-10-01 06:23:37 +02:00
david 58ed2725fa build: rebuild macOS CI as single arm64 runner with x86_64 cross-compile
GitHub's macOS runners are all arm64 now, so the two parallel per-arch
jobs are obsolete: one macos-15 runner builds the arm64 slice natively
and the x86_64 slice via clang --target=x86_64-apple-darwin, then lipo
merges both into the universal libmpv.dylib. The build script is now
parameterized by ARCH, installs every meson dependency into its own
macos_prefix-<arch> (meson's macOS default prefix is /opt/homebrew),
uses release buildtype for the static deps, and disables harfbuzz icu
(the brew icu4c on the runner is arm64-only and must not leak into the
x86_64 slice).
2026-10-01 01:54:20 +02:00
david 4845b5e44f build: fix macOS CI (brew meson, cocoa/gl-cocoa, system zlib)
pip installs are blocked by PEP 668 on the macOS runners, so install meson
via brew. Enable cocoa and gl-cocoa: on macOS the OpenGL render API
backend of libmpv requires them (system frameworks only). Build no zlib
ourselves - macOS ships it in the system like iconv. Use PKG_CONFIG_PATH
additively instead of overriding PKG_CONFIG_LIBDIR so system pkg-config
files (icu-uc, ...) stay visible.
2026-10-01 01:01:22 +02:00
david 4b385cd92f build: add macOS universal libmpv.dylib CI build
Vendor ci/build-libmpv-macos.sh, which builds every dependency statically
for the native runner architecture and links them into a single
self-contained libmpv dylib (coreaudio output, videotoolbox hardware
decode, OpenGL render API; no vulkan/cocoa player). build-macos.yml runs
it on macos-14 (x86_64) and macos-15 (arm64) in parallel and a merge job
combines the two dylibs into one universal libmpv.dylib with lipo, matching
the file name jlibmpv expects on macOS.
2026-10-01 00:36:24 +02:00
david ca0a5de2a9 build: strip debug sections and remove double-zip from Windows artifact
The release build type emits DWARF .debug_* sections even for the MinGW
cross build, inflating libmpv-2.dll to ~169 MB. Strip them with
TARGET-strip --strip-all so only code/data remain. Also hand upload-artifact
the folder directly instead of a pre-zipped file, so the artifact is a
single-level archive rather than a zip containing a zip.
2026-09-30 17:40:12 +02:00
david 60663d7f4c build: build self-contained static libmpv for Windows
Vendored ci/build-libmpv-mingw64.sh builds every dependency statically and
links the single libmpv-2.dll against those archives with a static CRT, so
the artifact depends only on Windows system DLLs. Dependency versions are
pinned to the latest stable tag on the mpv v0.41.0 release date. Vulkan,
shaderc and SPIRV-Cross are dropped (jlibmpv renders through an external
OpenGL context). The workflow no longer needs a Rust toolchain.
2026-09-30 15:03:24 +02:00
david 008c829c21 build: downgrade deprecated-Vulkan-API warnings in pinned v0.41.0 build 2026-09-30 09:13:40 +02:00
david 287db8ebee build: strip removed --enable-libshaderc flag for current FFmpeg master 2026-09-30 08:25:32 +02:00
david 7f865ec579 chore: initial mpv-natives repo with Windows libmpv build workflow 2026-09-30 07:34:55 +02:00