horizon-prepare sounds: the sound copy in Rust, run by the launcher

tools/fetch_sounds.py (and the lab.py functions it used) becomes
`horizon-prepare sounds` (horizon_prepare::sounds): the pinned asset index,
sounds.json and every .ogg from the player's own launcher install, each SHA-1
checked, into .local/horizon-client/<version>. The launcher runs it as part of
Prepare (in-process, the version's own binary when its sources differ and it
knows the subcommand, in-process for older versions), and a launcher install
without the assets only logs that the game will be silent. Player docs no
longer mention Python for sound.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-14 18:10:13 +02:00
parent b2462d54c4
commit 8355a6ff14
15 changed files with 408 additions and 65 deletions
+1 -1
View File
@@ -87,7 +87,7 @@ def main():
if not (args.resources / 'horizon-resources.json').is_file():
raise SystemExit(f'missing prepared resources in {args.resources}: run horizon-prepare --prepare (cargo run --release -p horizon-prepare -- --prepare)')
if not (args.resources / 'assets/minecraft/sounds.json').is_file():
print('warning: no sound assets; run tools/fetch_sounds.py for audio')
print('warning: no sound assets; run cargo run -p horizon-prepare -- sounds for audio')
system = {'Linux': 'linux', 'Darwin': 'macos'}.get(platform.system())
if system is None: