feat: SETUP.EXE detection + separate setup .jsdos bundle
Build & Deploy / build-and-deploy (push) Successful in 1m1s

When a game archive contains SETUP.EXE, INSTALL.EXE, CONFIG.EXE or
CUSTOM.EXE (or .com/.bat variants), the upload now:

- Detects and stores the path in game metadata (setup_exe / has_setup)
- Generates a second .jsdos bundle with SETUP.EXE as autoexec:
  - Standard mode: {gameId}.setup.jsdos (full game + setup autoexec)
  - Sockdrive mode: .jsdos-setup/ directory alongside .jsdos/
- Both bundles share the same game files; only the autoexec differs

Frontend changes:
- Router strips query params from hash so ?setup=1 doesn't leak into id
- GameDetail shows a "Setup" button between Play and Edit (only when
  game.has_setup is true), navigating to /play/{id}?setup=1
- Play.svelte detects ?setup=1, loads setupBundleUrl() instead, and
  shows setup-specific overlay text

Persistence is handled automatically by js-dos v8 via the built-in
auto-save mechanism (ci.persist() → browser OPFS), so any config
changes made via SETUP.EXE survive across sessions.
This commit is contained in:
David Alvarez
2026-05-27 16:49:15 +02:00
parent 00267da3dd
commit 5f5cb8411f
7 changed files with 185 additions and 8 deletions
+10 -1
View File
@@ -102,7 +102,7 @@ export function artworkUrl(path) {
return `/artwork/${path}`;
}
/** Get game bundle URL */
/** Get game bundle URL for normal play */
export function bundleUrl(game) {
if (!game) return null;
if (game.bundle_type === "sockdrive") {
@@ -110,3 +110,12 @@ export function bundleUrl(game) {
}
return `/games/${game.id}.jsdos`;
}
/** Get game bundle URL for setup mode (runs SETUP.EXE instead) */
export function setupBundleUrl(game) {
if (!game) return null;
if (game.bundle_type === "sockdrive") {
return `/api/sockdrive/${game.id}/file?path=.jsdos-setup/dosbox.conf`;
}
return `/games/${game.id}.setup.jsdos`;
}