fix: remove sockdrive mode, always create .jsdos ZIP bundles
Build & Deploy / build-and-deploy (push) Successful in 40s
Build & Deploy / build-and-deploy (push) Successful in 40s
js-dos v8's window.Dos(container, { url }) expects the URL to point
to a .jsdos ZIP archive, not a loose dosbox.conf file. The
'sockdrive' mode was serving game files loosely with a URL pointing
to a raw config file, causing: 'Unable to add .jsdos/jsdos.json
into bundle.zip'.
Changes:
- Removed SOCKDRIVE_THRESHOLD_MB and the entire sockdrive branch
- Always create a .jsdos ZIP bundle via createBundle()
- Optimized createBundle: no temp dir copy (saves 2x I/O for large
games), uses STORE compression (level 0) since DOS files are
often already compressed
- Removed dirSizeMB(), copyDir() and setup config builders —
no longer needed after removing sockdrive mode
- frontend bundleUrl()/setupBundleUrl() always use the standard
/games/{id}.jsdos path
- GameService.delete cleanup simplified
This commit is contained in:
@@ -105,17 +105,11 @@ export function artworkUrl(path) {
|
||||
/** Get game bundle URL for normal play */
|
||||
export function bundleUrl(game) {
|
||||
if (!game) return null;
|
||||
if (game.bundle_type === "sockdrive") {
|
||||
return `/api/sockdrive/${game.id}/file?path=.jsdos/dosbox.conf`;
|
||||
}
|
||||
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