From ebd8d81924465e0b18467b543c0bf955a3cf068c Mon Sep 17 00:00:00 2001 From: Docker Build Date: Sun, 10 May 2026 21:32:43 -0500 Subject: [PATCH] fix(launcher): Linux/macOS packaged config in userData (AppImage EROFS) AppImage mounts read-only at /tmp/.mount_*; writing launcher.json beside execPath failed. Use app.getPath('userData') for linux/darwin when packaged. Bump version to 1.0.3. Co-authored-by: Cursor --- tools/fractured-launcher-electron/README.md | 4 ++-- tools/fractured-launcher-electron/lib/config-store.js | 4 ++++ tools/fractured-launcher-electron/package.json | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/fractured-launcher-electron/README.md b/tools/fractured-launcher-electron/README.md index dc45501..face290 100644 --- a/tools/fractured-launcher-electron/README.md +++ b/tools/fractured-launcher-electron/README.md @@ -14,7 +14,7 @@ npm install npm start ``` -On first run, `launcher.json` is created next to the app (dev: in this folder). +On first run, **`launcher.json`** is created: **dev** — next to the app in this folder; **Windows packaged** — beside the `.exe`; **Linux AppImage / macOS packaged** — under Electron **`userData`** (e.g. `~/.config/Fractured Launcher/` on Linux), because the app mount is read-only. ### Where patches download from @@ -159,7 +159,7 @@ Workflow **Fractured launcher CI** (`.github/workflows/fractured-launcher-ci.yml ## Config -Schema is defined by **`default-launcher.json`** (shipped in the app; first run copies to `launcher.json` beside the executable): +Schema is defined by **`default-launcher.json`** (shipped in the app; first run copies to **`launcher.json`** — beside the **Windows** exe, or under **`userData`** on **Linux/macOS** packaged builds): - **`game_dir`**: WoW 3.3.5a root (contains `Wow.exe`). - **`update_feed_url`**: optional generic HTTPS base for launcher auto-update. diff --git a/tools/fractured-launcher-electron/lib/config-store.js b/tools/fractured-launcher-electron/lib/config-store.js index 89bec51..54ef7b3 100644 --- a/tools/fractured-launcher-electron/lib/config-store.js +++ b/tools/fractured-launcher-electron/lib/config-store.js @@ -45,6 +45,10 @@ function applyBakedGitea(cfg) { function getConfigPath(app) { if (process.env.FRACTURED_LAUNCHER_CONFIG) return process.env.FRACTURED_LAUNCHER_CONFIG; if (app && app.isPackaged) { + // AppImage (and macOS .app) run from a read-only mount — cannot write beside execPath. + if (process.platform === 'linux' || process.platform === 'darwin') { + return path.join(app.getPath('userData'), 'launcher.json'); + } return path.join(path.dirname(process.execPath), 'launcher.json'); } return path.join(__dirname, '..', 'launcher.json'); diff --git a/tools/fractured-launcher-electron/package.json b/tools/fractured-launcher-electron/package.json index fd8188a..5b77335 100644 --- a/tools/fractured-launcher-electron/package.json +++ b/tools/fractured-launcher-electron/package.json @@ -1,6 +1,6 @@ { "name": "fractured-launcher-electron", - "version": "1.0.2", + "version": "1.0.3", "description": "Fractured WoW launcher (Electron) — no console window, native folder picker, auto-update", "main": "main.js", "repository": {