diff --git a/frontend/src/pages/GameDetail.svelte b/frontend/src/pages/GameDetail.svelte index 6cd0910..617fc97 100644 --- a/frontend/src/pages/GameDetail.svelte +++ b/frontend/src/pages/GameDetail.svelte @@ -232,7 +232,7 @@ ▶ Unplayable {/if} - {#if game.has_setup} + {#if game.has_setup && game.platform !== 'windows'} {/if} diff --git a/src/main/java/com/dostalgia/UploadResource.java b/src/main/java/com/dostalgia/UploadResource.java index ef7a8b1..58feb76 100644 --- a/src/main/java/com/dostalgia/UploadResource.java +++ b/src/main/java/com/dostalgia/UploadResource.java @@ -85,15 +85,16 @@ public class UploadResource { Path bundlePath = svc.getGamesDir().resolve(bundleFile); createBundle(extractDir, mainExe, bundlePath); - // Create setup bundle if a setup executable was found - if (setupExe != null) { + // Detect platform (DOS vs Windows) by reading the main EXE header + String platform = detectPlatform(Path.of(mainExe)); + + // Create setup bundle only if the game is a DOS executable + // (Windows setup bundles are useless — they need Windows to run) + if (setupExe != null && !"windows".equals(platform)) { Path setupBundlePath = svc.getGamesDir().resolve(gameId + ".setup.jsdos"); createBundle(extractDir, setupExe, setupBundlePath); } - // Detect platform (DOS vs Windows) by reading the main EXE header - String platform = detectPlatform(Path.of(mainExe)); - // Save metadata Game game = new Game(gameId, title); game.setBundleFile(bundleFile);