Files
darling-lol/tools/build-riot-carboncore-runtime.py
T
lucannez64 e94c3ce40f Fix League client resizing and runtime compatibility
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.
2026-10-15 18:44:43 +02:00

30 lines
1.7 KiB
Python

#!/usr/bin/env python3
"""Rebuild CarbonCore's legacy Gestalt version query and its standalone probe."""
from pathlib import Path
import shlex
import subprocess
root = Path(__file__).resolve().parent.parent
folder = root / 'build/darling-src/build/src/frameworks/CoreServices/src/CarbonCore'
flags = {}
for line in (folder / 'CMakeFiles/CarbonCore.dir/flags.make').read_text().splitlines():
if line.startswith(('C_', 'CXX_')) and ' = ' in line:
key, value = line.split(' = ', 1)
flags[key] = shlex.split(value)
obj = root / 'build/riot-Gestalt.o'
subprocess.run(['clang++', *flags['CXX_DEFINES'], *flags['CXX_INCLUDES'], *flags['CXX_FLAGS'],
'-O2', '-Wno-macro-redefined', '-c',
str(root / 'build/darling-src/src/frameworks/CoreServices/src/CarbonCore/Gestalt.cpp'),
'-o', str(obj)], check=True)
link = shlex.split((folder / 'CMakeFiles/CarbonCore.dir/link.txt').read_text())
link[link.index('CMakeFiles/CarbonCore.dir/Gestalt.cpp.o')] = str(obj)
link[link.index('-o') + 1] = str(root / 'build/riot-CarbonCore')
subprocess.run(link, cwd=folder, check=True)
probe = root / 'build/riot-gestalt-version-check.o'
subprocess.run(['clang++', *flags['CXX_DEFINES'], *flags['CXX_INCLUDES'], *flags['CXX_FLAGS'],
'-O2', '-Wno-macro-redefined', '-c', str(root / 'tools/riot-gestalt-version-check.cpp'),
'-o', str(probe)], check=True)
subprocess.run(['clang++', '-target', 'x86_64-apple-macosx11.0', '-fuse-ld=lld', '-nostdlib',
'-isysroot', '@DARLING_SDK@', str(probe), str(root / 'build/riot-CarbonCore'),
'-lSystem', '-lc++', '-o', str(root / 'build/riot-gestalt-version-check')], check=True)