Have the launcher put Steam's library file beside the game, so no player fetches it for co-op.

Co-op loads steam_api64.dll from beside ocarina.exe, and the repository may not hold that file. Before Play and before a start from the Steam shortcut, when the file is not there, launcher/steamlib.py now copies one: one a release ships in its bin folder if it has one, else the newest one in the games of the player's own Steam libraries that Valve signed (WinVerifyTrust and the signer's name) and that has every call runtime/steam.c uses. Nothing is downloaded, the search takes a second or two once, and with no Steam or no suitable file the game starts as before and the Co-op tab says what is missing. The tab's two texts about the file say so in the four languages.

Checked: four new tests on made-up library folders (too old, unsigned, too deep, a second library, a shipped file first, none said once) and the launcher's 190 tests pass; on this PC the search found 40 files in 1.2 s, 25 suitable, and copied a Valve-signed one; that file's library version, an older one than the game was run with, signs in as app 480 and makes a lobby in a program without the game. Not run: Play in the launcher itself with this change.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
epicmeme546
2026-11-13 04:24:56 -05:00
parent cd2f9f12be
commit e60677ed87
9 changed files with 361 additions and 23 deletions

View File

@@ -640,7 +640,8 @@
[coop]
# Co-op, experimental: play with friends over Steam, each in their own game and save (docs/coop.md). The game signs in
# to Steam as its test app, so Steam shows you as playing Spacewar; it needs Steam running and Steam's library file
# steam_api64.dll beside ocarina.exe. Rooms are made and joined in the menu's Co-op tab, never from this file.
# steam_api64.dll beside ocarina.exe, which the launcher copies there from a Steam game you have installed. Rooms are
# made and joined in the menu's Co-op tab, never from this file.
# 0 = off, the game uses no network. Takes effect at once.
# coop = 0
# In a room, share progress, items and songs with the other players; your save is copied to coop-backup in the profile