Add ScummVM support and generalize manifest zip lookup
Add scummvm to the Dockerfile. Its binary lives at /usr/games/scummvm (Debian's convention for game packages), not reliably on $PATH under a non-login shell, so manifests reference it by absolute path. Generalize the manifest schema from a bare "zip" filename (implicitly under Games\dosbox\ on the SMB share) to "zip_path" (a full path relative to the share root), since the SCUMM games' zips live in their own folders (Games\Monkey Island\, Games\Indiana Jones\, etc.) rather than being colocated with their manifest like stuntcar/t7g were. Manifests themselves still all live in the Games\dosbox\ catalog directory regardless of where the actual zip sits. Added and verified (install/start/stop/uninstall via monkey2) manifests for: monkey, monkey2, atlantis, indy3, tentacle. Skipped the German CD release of Day of the Tentacle (loose files at the zip root, no single top-level folder - incompatible with the current extraction convention) and Curse of Monkey Island (untested, much larger). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NiNnj78HGx1KWyCCo39HSz
This commit is contained in:
@@ -11,11 +11,15 @@ Manifest schema (all fields required):
|
||||
{
|
||||
"name": "stuntcar", # must match the manifest's own filename
|
||||
"title": "Stuntcar Racer",
|
||||
"zip": "stuntcar.zip", # filename under SMB_DIR to fetch on install
|
||||
"zip_path": "Games/dosbox/stuntcar.zip", # path to the zip, relative to the share root -
|
||||
# games can live anywhere on the share, not just
|
||||
# next to their manifest
|
||||
"start_cmd": ["dosbox", "run.bat", "-conf", "dosbox-0.74-3.conf"]
|
||||
}
|
||||
Uninstall is implicit (remove GAMES_HOME/<name>); stop is implicit (terminate
|
||||
the process tracked from the last start_cmd).
|
||||
the process tracked from the last start_cmd). Manifests themselves always live
|
||||
in SMB_DIR (the catalog directory), even though the zip_path they point at may
|
||||
not.
|
||||
"""
|
||||
|
||||
import html
|
||||
@@ -95,12 +99,12 @@ def install_game(name, manifest):
|
||||
tmpdir = f"/tmp/setup-{name}"
|
||||
try:
|
||||
os.makedirs(tmpdir, exist_ok=True)
|
||||
zip_name = manifest["zip"]
|
||||
zip_name = manifest["zip_path"].rsplit("/", 1)[-1]
|
||||
zip_path = os.path.join(tmpdir, zip_name)
|
||||
# smbget's -a (guest) can't be combined with -o (output file), so let it save
|
||||
# under its default name in tmpdir instead.
|
||||
subprocess.run(
|
||||
["smbget", "-au", f"smb://{SMB_SERVER}/{SMB_SHARE}/Games/dosbox/{zip_name}"],
|
||||
["smbget", "-au", f"smb://{SMB_SERVER}/{SMB_SHARE}/{manifest['zip_path']}"],
|
||||
check=True, timeout=1800, cwd=tmpdir,
|
||||
)
|
||||
with state_lock:
|
||||
|
||||
Reference in New Issue
Block a user