mirror of
https://github.com/lucannez64/darling-lol.git
synced 2026-10-26 19:47:42 +00:00
Fix X11 presentation handoff after resizing, preserve NSView size callbacks, and correct content and backing-layer geometry. Add CoreText font enumeration for the language dropdown and rebuild/install the matching runtime overlays. Correct CarbonCore Gestalt version queries and roll back proc_listpids for Vanguard testing. Document that VAN -101 can still recur. Include accumulated CoreAudio stream and AudioUnit corrections. Add standalone font, version, resize and publisher-handoff regressions. Record manual confirmation of the language dropdown and window resizing; all 29 pinned patches and the source/script audit validate.
35 lines
2.0 KiB
Python
35 lines
2.0 KiB
Python
#!/usr/bin/env python3
|
|
"""Build CoreText's font-list compatibility override and standalone regression."""
|
|
from pathlib import Path
|
|
import shlex
|
|
import subprocess
|
|
|
|
root = Path(__file__).resolve().parent.parent
|
|
folder = root / 'build/darling-src/build/src/external/cocotron/CoreText'
|
|
flags = {}
|
|
for line in (folder / 'CMakeFiles/CoreText.dir/flags.make').read_text().splitlines():
|
|
if line.startswith('C_') and ' = ' in line:
|
|
key, value = line.split(' = ', 1)
|
|
flags[key] = shlex.split(value)
|
|
link = shlex.split((folder / 'CMakeFiles/CoreText.dir/link.txt').read_text())
|
|
for name in ['CTFontDescriptor', 'CTFontManager']:
|
|
obj = root / f'build/riot-{name}.o'
|
|
subprocess.run(['clang', *flags['C_DEFINES'], *flags['C_INCLUDES'], *flags['C_FLAGS'],
|
|
'-O2', '-Wno-macro-redefined', '-c',
|
|
str(root / f'build/darling-src/src/external/cocotron/CoreText/{name}.m'),
|
|
'-o', str(obj)], check=True)
|
|
link[link.index(f'CMakeFiles/CoreText.dir/{name}.m.o')] = str(obj)
|
|
link[link.index('-o') + 1] = str(root / 'build/riot-CoreText')
|
|
fontconfig = str(root / 'build/darling-src/build/src/native/libfontconfig.dylib')
|
|
if not any(value.endswith('/libfontconfig.dylib') and not value.startswith('-') for value in link):
|
|
link.append(fontconfig)
|
|
subprocess.run(link, cwd=folder, check=True)
|
|
obj = root / 'build/riot-coretext-font-list-check.o'
|
|
subprocess.run(['clang', *flags['C_DEFINES'], *flags['C_INCLUDES'], *flags['C_FLAGS'],
|
|
'-O2', '-Wno-macro-redefined', '-c', str(root / 'tools/riot-coretext-font-list-check.m'),
|
|
'-o', str(obj)], check=True)
|
|
subprocess.run(['clang', '-target', 'x86_64-apple-macosx11.0', '-fuse-ld=lld', '-nostdlib',
|
|
'-isysroot', '@DARLING_SDK@', str(obj), str(root / 'build/riot-CoreText'),
|
|
'-lSystem', '-lobjc', '-framework', 'Foundation', '-framework', 'CoreFoundation',
|
|
'-o', str(root / 'build/riot-coretext-font-list-check')], check=True)
|