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 <cursoragent@cursor.com>
This commit is contained in:
Docker Build
2026-05-10 21:32:43 -05:00
parent 362084b829
commit ebd8d81924
3 changed files with 7 additions and 3 deletions
+2 -2
View File
@@ -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.
@@ -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');
@@ -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": {