Skip creating .setup.jsdos bundles for Windows games
Build & Deploy / build-and-deploy (push) Successful in 47s
Build & Deploy / build-and-deploy (push) Successful in 47s
- Move platform detection before setup bundle creation - Only create setup bundle when platform != 'windows' - Also hide the Setup button in GameDetail for Windows games - Windows setup executables (INSTALL.EXE) can't run in DOSBox anyway
This commit is contained in:
@@ -232,7 +232,7 @@
|
|||||||
▶ Unplayable
|
▶ Unplayable
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
{#if game.has_setup}
|
{#if game.has_setup && game.platform !== 'windows'}
|
||||||
<button class="btn btn-setup" onclick={handleSetup}>🛠 Setup</button>
|
<button class="btn btn-setup" onclick={handleSetup}>🛠 Setup</button>
|
||||||
{/if}
|
{/if}
|
||||||
<button class="btn" onclick={startEdit}>✏ Edit</button>
|
<button class="btn" onclick={startEdit}>✏ Edit</button>
|
||||||
|
|||||||
@@ -85,15 +85,16 @@ public class UploadResource {
|
|||||||
Path bundlePath = svc.getGamesDir().resolve(bundleFile);
|
Path bundlePath = svc.getGamesDir().resolve(bundleFile);
|
||||||
createBundle(extractDir, mainExe, bundlePath);
|
createBundle(extractDir, mainExe, bundlePath);
|
||||||
|
|
||||||
// Create setup bundle if a setup executable was found
|
// Detect platform (DOS vs Windows) by reading the main EXE header
|
||||||
if (setupExe != null) {
|
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");
|
Path setupBundlePath = svc.getGamesDir().resolve(gameId + ".setup.jsdos");
|
||||||
createBundle(extractDir, setupExe, setupBundlePath);
|
createBundle(extractDir, setupExe, setupBundlePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Detect platform (DOS vs Windows) by reading the main EXE header
|
|
||||||
String platform = detectPlatform(Path.of(mainExe));
|
|
||||||
|
|
||||||
// Save metadata
|
// Save metadata
|
||||||
Game game = new Game(gameId, title);
|
Game game = new Game(gameId, title);
|
||||||
game.setBundleFile(bundleFile);
|
game.setBundleFile(bundleFile);
|
||||||
|
|||||||
Reference in New Issue
Block a user