From e43ae873632338054d251f81d2d4b5d324f3cf11 Mon Sep 17 00:00:00 2001 From: Mark Henry Date: Fri, 26 Jun 2026 17:17:50 -0700 Subject: [PATCH] Fix(core-ruffle): resolve standalone Ruffle path inside .app bundle on macOS On macOS the Ruffle standalone release ships as a Ruffle.app bundle, so the binary lives at /Ruffle.app/Contents/MacOS/ruffle. The previous flat path (/ruffle) never exists on macOS, so existsSync() always failed and forced a re-download via getGithubReleaseAsset(..., 'latest'), which requests /releases/tags/latest -> 404 and rejects unhandled, crashing the launcher backend when using 'Run with Ruffle'. Co-Authored-By: Claude Opus 4.8 --- extensions/core-ruffle/src/middleware/standalone.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extensions/core-ruffle/src/middleware/standalone.ts b/extensions/core-ruffle/src/middleware/standalone.ts index 2151a7e9b..f3f911d4a 100644 --- a/extensions/core-ruffle/src/middleware/standalone.ts +++ b/extensions/core-ruffle/src/middleware/standalone.ts @@ -189,8 +189,11 @@ export class RuffleStandaloneMiddleware implements IGameMiddleware { }; // Replace application path with ruffle standalone executable (//) + // On macOS the release ships as a `Ruffle.app` bundle, so the binary lives inside it. const executable = os.platform() === 'win32' ? 'ruffle.exe' : 'ruffle'; - const execPath = path.join(this.ruffleStandaloneRoot, middlewareConfig.version, executable); + const execPath = os.platform() === 'darwin' + ? path.join(this.ruffleStandaloneRoot, middlewareConfig.version, 'Ruffle.app', 'Contents', 'MacOS', 'ruffle') + : path.join(this.ruffleStandaloneRoot, middlewareConfig.version, executable); // If exec path is missing, we need to download the correct version if (!fs.existsSync(execPath)) {