feat: SETUP.EXE detection + separate setup .jsdos bundle
Build & Deploy / build-and-deploy (push) Successful in 1m1s
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:
+10
-1
@@ -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`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user