Files
iptvnator/apps/electron-backend/native/binding.gyp
T
4gray 8fdac824fd feat(packaging): ship Linux embedded MPV frame-copy runtime (#1200)
* docs: design Linux frame-copy packaging

* docs: plan Linux frame-copy packaging

* feat(packaging): define Linux frame-copy profiles

* fix(packaging): reject inherited profile names

* feat(embedded-mpv): validate staged Linux runtime

* fix(embedded-mpv): require Linux source packages

* fix(embedded-mpv): harden Linux runtime staging

* feat(embedded-mpv): build LGPL Linux runtime

* fix(embedded-mpv): pin Linux runtime inputs

* feat(embedded-mpv): build relocatable Linux helper

* fix(embedded-mpv): require bundled Linux runtime

* fix(embedded-mpv): make Linux runtime portable

* feat(packaging): ship Linux frame-copy artifacts

* fix(embedded-mpv): verify Linux helper linkage

* fix(packaging): enforce Linux frame-copy isolation

* fix(embedded-mpv): pin Linux display data

* docs(embedded-mpv): document Linux frame-copy packaging

* feat(embedded-mpv): probe Linux frame-copy runtime

* test(embedded-mpv): smoke packaged Linux frame-copy

* docs(embedded-mpv): clarify Linux system runtime baseline

* fix(embedded-mpv): harden Linux runtime capability gate

* ci: verify Linux frame-copy packages

* test(embedded-mpv): harden packaged Linux smoke

* test(embedded-mpv): preserve packaged GL mode

* test(packaging): harden Linux package probes

* fix(embedded-mpv): enable private Snap shared memory

* fix(embedded-mpv): sanitize Linux helper environment

* fix(packaging): enforce private Snap memory semantics

* fix(packaging): reject ambiguous Snap memory metadata

* fix(embedded-mpv): prioritize trusted Snap GL

* fix(packaging): reject advanced Snap YAML semantics

* fix(packaging): reject arbitrary Snap YAML aliases

* feat(packaging): ship Linux runtime license notices

* docs(embedded-mpv): document Linux runtime distribution

* fix(packaging): parse Snap trailing comments safely

* fix(release): gate Snap publish on public source release

* fix(packaging): strip VCS metadata from source bundle

* docs(packaging): clarify Linux source release gate

* test(embedded-mpv): smoke missing bundled libmpv

* style(embedded-mpv): format final validation inputs

* fix(e2e): satisfy fixture index signature typing

* fix(ci): declare fontconfig gperf generator

* fix(embedded-mpv): hash runtime cache identities

* fix(packaging): harden Linux frame-copy delivery

* fix(packaging): tighten runtime delivery gates

* fix(ci): decouple Linux runtime matrix

* fix(packaging): harden Linux frame-copy delivery

* fix(packaging): validate Linux frame-copy runtimes

* fix(packaging): scope Snap Electron library checks

* feat(packaging): ship Linux frame-copy runtimes

* fix(packaging): improve Linux runtime smoke diagnostics

* fix(packaging): expose bounded helper probe details

* test(packaging): trace Snap EGL probe failures

* fix(packaging): prefer core22 ABI in Snap helper

* fix(packaging): bound helper probe capture

* fix(packaging): harden Linux frame-copy releases

* fix(packaging): canonicalize libplacebo submodule identity

* fix(packaging): make source archive inspection portable

* fix(packaging): harden Snap release verification
2026-07-18 17:28:22 +02:00

206 lines
6.2 KiB
Python

{
"targets": [
{
"target_name": "embedded_mpv",
"sources": [],
"include_dirs": [
"<(module_root_dir)/../../../node_modules/.pnpm/node_modules/node-addon-api",
"<!(node -p \"process.env.LIBMPV_INCLUDE_DIR || '/opt/homebrew/include'\")",
"src"
],
"defines": [
"NAPI_CPP_EXCEPTIONS"
],
"cflags_cc": [
"-fexceptions",
"-std=c++20"
],
"conditions": [
[
"OS==\"mac\"",
{
"sources": [
"src/embedded_mpv.mm"
],
"xcode_settings": {
"CLANG_CXX_LANGUAGE_STANDARD": "c++20",
"CLANG_ENABLE_OBJC_ARC": "YES",
"GCC_ENABLE_CPP_EXCEPTIONS": "YES",
"MACOSX_DEPLOYMENT_TARGET": "10.15",
"OTHER_LDFLAGS": [
"-Wl,-rpath,@loader_path/lib"
]
},
"libraries": [
"-framework AppKit",
"-framework CoreVideo",
"-framework Foundation",
"-framework OpenGL",
"<!(node -e \"const path = require('path'); const dir = process.env.LIBMPV_LIBRARY_DIR || '/opt/homebrew/lib'; process.stdout.write(path.join(dir, 'libmpv.2.dylib'))\")"
]
}
],
[
"OS==\"win\"",
{
"sources": [
"src/embedded_mpv_win32.cc"
],
"defines": [
"WIN32_LEAN_AND_MEAN",
"NOMINMAX"
],
"libraries": [
"<!(node -e \"const path = require('path'); const dir = process.env.LIBMPV_LIBRARY_DIR || process.cwd(); const lib = process.env.LIBMPV_IMPORT_LIB || path.join(dir, 'mpv.lib'); process.stdout.write(lib.replace(/\\\\\\\\/g, '/'))\")",
"user32.lib",
"gdi32.lib"
]
}
],
[
"OS==\"linux\"",
{
"sources": [
"src/embedded_mpv_linux.cc"
],
"defines": [
"IPTVNATOR_DYNAMIC_LIBMPV"
],
"libraries": [
"-L<!(node -p \"process.env.LINUX_NATIVE_LIBRARY_DIR || '/usr/lib'\")",
"-lX11",
"-lXext",
"-ldl"
]
}
]
]
},
{
"target_name": "embedded_mpv_frame_reader",
"sources": [
"src/embedded_mpv_frame_reader.c"
],
"include_dirs": [
"helper"
],
"conditions": [
[
"OS==\"win\"",
{
"defines": [
"WIN32_LEAN_AND_MEAN",
"NOMINMAX"
],
"msvs_settings": {
"VCCLCompilerTool": {
"CompileAs": 2,
"ExceptionHandling": 1
}
}
}
]
]
},
{
"target_name": "iptvnator_mpv_helper",
"type": "none",
"conditions": [
[
"OS==\"mac\"",
{
"type": "executable",
"sources": [
"helper/mpv_frame_helper.cpp"
],
"include_dirs": [
"<!(node -p \"process.env.LIBMPV_INCLUDE_DIR || '/opt/homebrew/include'\")",
"helper"
],
"cflags_cc": [
"-std=c++17"
],
"xcode_settings": {
"CLANG_CXX_LANGUAGE_STANDARD": "c++17",
"GCC_ENABLE_CPP_EXCEPTIONS": "YES",
"MACOSX_DEPLOYMENT_TARGET": "11.0",
"OTHER_LDFLAGS": [
"-Wl,-rpath,@executable_path/lib",
"-Wl,-rpath,@loader_path/lib"
]
},
"libraries": [
"-framework OpenGL",
"<!(node -e \"const path = require('path'); const dir = process.env.LIBMPV_LIBRARY_DIR || '/opt/homebrew/lib'; process.stdout.write(path.join(dir, 'libmpv.2.dylib'))\")"
]
}
],
[
"OS==\"linux\"",
{
"type": "executable",
"sources": [
"helper/mpv_frame_helper.cpp"
],
"include_dirs": [
"<!(node -p \"process.env.LIBMPV_INCLUDE_DIR || '/usr/include'\")",
"helper"
],
"cflags_cc!": [
"-fno-exceptions"
],
"cflags_cc": [
"-std=c++17",
"-fexceptions"
],
"cflags": [
"-pthread"
],
"ldflags": [
"-pthread",
"-Wl,--enable-new-dtags",
"-Wl,-rpath,'$$ORIGIN/lib'"
],
"libraries": [
"-L<!(node -e \"const dir = process.env.LINUX_VERIFIED_RUNTIME_LIBRARY_DIR; if (!dir) { throw new Error('Missing LINUX_VERIFIED_RUNTIME_LIBRARY_DIR'); } process.stdout.write(dir)\")",
"<!(node -e \"const path = require('path'); const dir = process.env.LINUX_VERIFIED_RUNTIME_LIBRARY_DIR; if (!dir) { throw new Error('Missing LINUX_VERIFIED_RUNTIME_LIBRARY_DIR'); } process.stdout.write(path.join(dir, 'libmpv.so'))\")",
"-lEGL",
"-lGL",
"-lgbm",
"-ldl"
]
}
],
[
"OS==\"win\"",
{
"type": "executable",
"sources": [
"helper/mpv_frame_helper.cpp"
],
"include_dirs": [
"<!(node -p \"(process.env.LIBMPV_INCLUDE_DIR || process.cwd()).replace(/\\\\\\\\/g, '/')\")",
"helper"
],
"defines": [
"WIN32_LEAN_AND_MEAN",
"NOMINMAX"
],
"msvs_settings": {
"VCCLCompilerTool": {
"ExceptionHandling": 1
}
},
"libraries": [
"<!(node -e \"const path = require('path'); const dir = process.env.LIBMPV_LIBRARY_DIR || process.cwd(); const lib = process.env.LIBMPV_IMPORT_LIB || path.join(dir, 'mpv.lib'); process.stdout.write(lib.replace(/\\\\\\\\/g, '/'))\")",
"opengl32.lib",
"gdi32.lib",
"user32.lib"
]
}
]
]
}
]
}