Skip to content

Commit 4d60dd6

Browse files
authored
Merge branch 'master' into feat/new-subtitle-option
2 parents b7c555a + bbafb74 commit 4d60dd6

File tree

19 files changed

+95
-61
lines changed

19 files changed

+95
-61
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -228,16 +228,15 @@ jobs:
228228
strategy:
229229
matrix:
230230
include:
231-
- os: "macos-13"
232-
arch: "intel"
233-
xcode: "Xcode_14.1"
234-
homebrew: "2e821e2d8ae38540311cd6ec60f6e1b23d61d167"
235231
- os: "macos-14"
236232
arch: "arm"
237-
xcode: "Xcode_15.2"
233+
xcode: "Xcode_15.0"
238234
- os: "macos-15"
239235
arch: "arm"
240-
- os: "macos-15"
236+
- os: "macos-15-intel"
237+
- os: "macos-26"
238+
arch: "arm"
239+
- os: "macos-26"
241240
arch: "test"
242241
swift: "-target arm64-apple-macosx10.15"
243242
target: "10.15"
@@ -303,7 +302,7 @@ jobs:
303302
- uses: actions/upload-artifact@v4
304303
if: ${{ matrix.arch != 'test' }}
305304
with:
306-
name: mpv-${{ matrix.os }}-${{ matrix.arch }}
305+
name: mpv-${{ matrix.os }}${{ matrix.arch != '' && format('-{0}', matrix.arch) || '' }}
307306
path: mpv.tar.gz
308307

309308
linux:
@@ -341,7 +340,6 @@ jobs:
341340
- name: Run meson tests
342341
id: tests
343342
run: |
344-
export LSAN_OPTIONS="suppressions=${GITHUB_WORKSPACE}/.lsan_suppressions"
345343
meson test -C build
346344
347345
- name: Print meson test log
@@ -364,7 +362,6 @@ jobs:
364362
run: |
365363
meson setup build \
366364
--werror \
367-
-Dc_args="-Wno-error=deprecated -Wno-error=deprecated-declarations" \
368365
-Dfuzzers=true -Dlibmpv=true -Dcplayer=false
369366
meson compile -C build fuzzers
370367

.lsan_suppressions

Lines changed: 0 additions & 1 deletion
This file was deleted.

DOCS/man/options.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7395,7 +7395,7 @@ them.
73957395
to ensure a consistent appearance. Depending on the platform, the sRGB EOTF
73967396
used by the system compositor may differ.
73977397

7398-
The default is ``input``. (Only for ``--vo=gpu-next``)
7398+
The default is ``auto``. (Only for ``--vo=gpu-next``)
73997399

74007400
``--tone-mapping=<value>``
74017401
Specifies the algorithm used for tone-mapping images onto the target

TOOLS/lua/autoload.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,9 @@ local function find_and_add_entries()
372372
added_entries[entry.filename] = true
373373
end
374374

375+
-- stop initial file from being added twice
376+
added_entries[path] = true
377+
375378
local append = {[-1] = {}, [1] = {}}
376379
for direction = -1, 1, 2 do -- 2 iterations, with direction = -1 and +1
377380
for i = 1, MAX_ENTRIES do

TOOLS/osxbundle.py

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env python3
22
import fileinput
33
import os
4+
import re
45
import shutil
56
import subprocess
67
from optparse import OptionParser
@@ -34,9 +35,10 @@ def copy_bundle(binary_name, src_path):
3435
def copy_binary(binary_name):
3536
shutil.copy(binary_name, target_binary(binary_name))
3637

37-
def apply_plist_template(plist_file, version):
38+
def apply_plist_template(plist_file, version, category):
39+
print(">> setting bundle category to " + category)
3840
for line in fileinput.input(plist_file, inplace=True):
39-
print(line.rstrip().replace("${VERSION}", version))
41+
print(line.rstrip().replace("${VERSION}", version).replace("${CATEGORY}", category))
4042

4143
def sign_bundle(binary_name):
4244
sign_directories = ["Contents/Frameworks", "Contents/MacOS"]
@@ -48,12 +50,12 @@ def sign_bundle(binary_name):
4850
subprocess.run(["codesign", "--force", "-s", "-", path])
4951
subprocess.run(["codesign", "--force", "-s", "-", bundle_path(binary_name)])
5052

51-
def bundle_version(src_path):
53+
def bundle_version(build_path):
5254
version = "UNKNOWN"
53-
version_path = os.path.join(src_path, "MPV_VERSION")
54-
if os.path.exists(version_path):
55-
x = open(version_path)
56-
version = x.read()
55+
version_h_path = os.path.join(build_path, "common", "version.h")
56+
if os.path.exists(version_h_path):
57+
x = open(version_h_path)
58+
version = re.findall(r"#define\s+VERSION\s+\"v(.+)\"", x.read())[0]
5759
x.close()
5860
return version
5961

@@ -63,24 +65,28 @@ def main():
6365
parser.add_option("-s", "--skip-deps", action="store_false", dest="deps",
6466
default=True,
6567
help="don't bundle the dependencies")
68+
parser.add_option("-c", "--category", action="store", dest="category",
69+
type="choice", choices=["video", "games"], default="video",
70+
help="sets bundle category")
6671

6772
(options, args) = parser.parse_args()
6873

6974
if len(args) < 1 or len(args) > 2:
7075
parser.error("incorrect number of arguments")
7176
else:
7277
binary_name = args[0]
78+
build_path = os.path.dirname(binary_name)
7379
src_path = args[1] if len(args) > 1 else "."
7480

75-
version = bundle_version(src_path).rstrip()
81+
version = bundle_version(build_path).rstrip()
7682

7783
print(f"Creating macOS application bundle (version: {version})...")
7884
print("> copying bundle skeleton")
7985
copy_bundle(binary_name, src_path)
8086
print("> copying binary")
8187
copy_binary(binary_name)
8288
print("> generating Info.plist")
83-
apply_plist_template(target_plist(binary_name), version)
89+
apply_plist_template(target_plist(binary_name), version, options.category)
8490

8591
if options.deps:
8692
print("> bundling dependencies")

TOOLS/osxbundle/mpv.app/Contents/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
<key>NSHighResolutionCapable</key>
134134
<true/>
135135
<key>LSApplicationCategoryType</key>
136-
<string>public.app-category.games</string>
136+
<string>public.app-category.${CATEGORY}</string>
137137
<key>LSEnvironment</key>
138138
<dict>
139139
<key>MallocNanoZone</key>

ci/build-common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ common_args="--werror \
33
-Dtests=true \
44
"
55

6-
export CFLAGS="$CFLAGS -Wno-error=deprecated -Wno-error=deprecated-declarations -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3"
6+
export CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3"

ci/build-msys2.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ args=(
1212
-Db_sanitize=address,undefined
1313
)
1414

15+
[[ "$SYS" == "clangarm64" ]] && args+=(
16+
-Dpdf-build=disabled
17+
)
18+
1519
meson setup build $common_args "${args[@]}"
1620
meson compile -C build
1721
./build/mpv.com -v --no-config

ci/build-tumbleweed.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44
. ./ci/build-common.sh
55

66
meson setup build $common_args $@ \
7-
-Db_sanitize=address,undefined \
7+
-Db_sanitize=$([ "$CC" = "gcc" ] && echo none || echo address,undefined) \
88
-Dcdda=enabled \
99
-Ddvbin=enabled \
1010
-Ddvdnav=enabled \

meson.build

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -740,19 +740,16 @@ if features['rubberband']
740740
sources += files('audio/filter/af_rubberband.c')
741741
endif
742742

743-
sdl2 = dependency('sdl2', required: get_option('sdl2'))
744-
features += {'sdl2': sdl2.found()}
745-
if features['sdl2']
746-
dependencies += sdl2
747-
endif
743+
sdl2 = dependency('sdl2', required: false)
748744

749745
sdl2_gamepad = get_option('sdl2-gamepad').require(
750-
features['sdl2'],
746+
sdl2.found(),
751747
error_message: 'sdl2 was not found!',
752748
)
753749
features += {'sdl2-gamepad': sdl2_gamepad.allowed()}
754750
if features['sdl2-gamepad']
755751
sources += files('input/sdl_gamepad.c')
752+
dependencies += sdl2
756753
endif
757754

758755
uchardet_opt = get_option('uchardet').require(
@@ -896,12 +893,13 @@ if features['pulse']
896893
endif
897894

898895
sdl2_audio = get_option('sdl2-audio').require(
899-
features['sdl2'],
896+
sdl2.found(),
900897
error_message: 'sdl2 was not found!',
901898
)
902899
features += {'sdl2-audio': sdl2_audio.allowed()}
903900
if features['sdl2-audio']
904901
sources += files('audio/out/ao_sdl.c')
902+
dependencies += sdl2
905903
endif
906904

907905
sndio = dependency('sndio', required: get_option('sndio'))
@@ -976,12 +974,13 @@ if features['jpeg']
976974
endif
977975

978976
sdl2_video = get_option('sdl2-video').require(
979-
features['sdl2'],
977+
sdl2.found(),
980978
error_message: 'sdl2 was not found!',
981979
)
982980
features += {'sdl2-video': sdl2_video.allowed()}
983981
if features['sdl2-video']
984982
sources += files('video/out/vo_sdl.c')
983+
dependencies += sdl2
985984
endif
986985

987986
shaderc = dependency('shaderc', required:
@@ -1845,7 +1844,8 @@ if get_option('cplayer')
18451844
osxbundle = find_program(join_paths(tools_directory, 'osxbundle.py'), required: true)
18461845
custom_target('macos-bundle',
18471846
output: 'mpv.app',
1848-
command: [osxbundle, mpv.full_path(), '@SOURCE_ROOT@'],
1847+
depends: version_h,
1848+
command: [osxbundle, mpv, '@SOURCE_ROOT@', '-c', get_option('macos-bundle-category')],
18491849
)
18501850
endif
18511851

@@ -1878,6 +1878,10 @@ if get_option('fuzzers')
18781878
subdir('fuzzers')
18791879
endif
18801880

1881+
if features['sdl2-audio'] or features['sdl2-gamepad'] or features['sdl2-video']
1882+
warning('You are building with optional SDL2 support. If you encounter build issues, try disabling it.')
1883+
endif
1884+
18811885
summary({'d3d11': features['d3d11'],
18821886
'javascript': features['javascript'],
18831887
'libmpv': get_option('libmpv'),

0 commit comments

Comments
 (0)