fix: remove sockdrive mode, always create .jsdos ZIP bundles
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:
David Alvarez
2026-05-28 09:45:45 +02:00
parent 6840b3eee1
commit e11f19c769
3 changed files with 36 additions and 164 deletions
-6
View File
@@ -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`;
}