Files
darling-lol/tools/install-riot-metal-pair.sh
T
lucannez64andClaude Opus 5.5 4027cb9aa7 Make the Indium hand-off changes opt-in and record the Hyprland findings
Two matches with the Indium hand-off round (narrow present wait, deferred
blits, worker-side command-buffer lease, skipping CPU Vulkan devices) ran
slower than before, with more main-thread futex waiting. Each change is now
behind a guest flag file and off by default, so the default libindium matches
the round-3 build (vertex-descriptor dirty masks, cheaper resource setters).

The wait counters stay opt-in, write a "waits enabled" line when they are on
and keep their state per image. The docs explain that flag files created from
the host while Darling runs may stay invisible through the overlay mount.

Also adds a passive cursor watcher. The stuck in-game cursor is Hyprland's
direct scanout, not Darling. The first match with direct scanout off averaged
135 FPS. STATUS, TROUBLESHOOTING and README are updated with the new matches.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 00:29:19 +02:00

29 lines
1.5 KiB
Bash
Executable File

#!/bin/sh
# Install the Metal wrapper and Indium overlays built by build-riot-metal-runtime.py / build-riot-indium-runtime.py
# as a pair (the Indium blit interface they share changed), with a backup of the files they replace.
# RIOT_METAL_ARTIFACT / RIOT_INDIUM_ARTIFACT select other builds. --rollback puts the backed-up pair back. Neither stops a process: exit the game and both clients, then
# `darling shutdown` and `sh scripts/run.sh` to activate.
set -eu
project_dir=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
guest_home=${RIOT_GUEST_HOME:-$HOME/.darling@GUEST_HOME@}
metal="$guest_home/RuntimeFrameworks/Metal.framework/Versions/A/Metal"
indium="$guest_home/RuntimeLibraries/libindium.dylib"
backups="$project_dir/build/metal-pair-backups"
if [ "${1:-}" = "--rollback" ]; then
source_metal="$backups/Metal"
source_indium="$backups/libindium.dylib"
else
source_metal=${RIOT_METAL_ARTIFACT:-$project_dir/build/riot-Metal}
source_indium=${RIOT_INDIUM_ARTIFACT:-$project_dir/build/riot-libindium.dylib}
mkdir -p "$backups"
# a repeated install must not replace the backup with the pair it installed last time
cmp -s "$metal" "$source_metal" || cp -p "$metal" "$backups/Metal"
cmp -s "$indium" "$source_indium" || cp -p "$indium" "$backups/libindium.dylib"
fi
for file in "$source_metal" "$source_indium"; do
[ -f "$file" ] || { echo "missing $file" >&2; exit 1; }
done
install -m755 "$source_indium" "$indium.next" && mv "$indium.next" "$indium"
install -m755 "$source_metal" "$metal.next" && mv "$metal.next" "$metal"
sha256sum "$indium" "$metal"