From 24d1ae71d91a4c204aa85eff04f0f8c62cd70acd Mon Sep 17 00:00:00 2001 From: Docker Build Date: Sun, 10 May 2026 22:06:48 -0500 Subject: [PATCH] fix(launcher): install release MPQs under Data/enUS (not Data root) Co-authored-by: Cursor --- tools/fractured-launcher-electron/README.md | 2 +- tools/fractured-launcher-electron/lib/release-sync.js | 9 +++++++-- tools/fractured-launcher-electron/package.json | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/tools/fractured-launcher-electron/README.md b/tools/fractured-launcher-electron/README.md index ef93dfd..f435525 100644 --- a/tools/fractured-launcher-electron/README.md +++ b/tools/fractured-launcher-electron/README.md @@ -169,5 +169,5 @@ Schema is defined by **`default-launcher.json`** (shipped in the app; first run - **`gitea`**: **`base_url`**, **`owner`**, **`repo`**, **`release_tag`**, **`token_env`** — when **`base_url`** is set (and owner/repo set), **`from_release`** downloads and (with token if needed) the **generic** updater feed use **Gitea**. **Required** for players if your CI mirrors patches/launchers to Gitea only. - **`github`**: used for **non-release** repo paths (`from_release`: false) and for **GitHub** **`from_release`** when **`gitea.base_url`** is empty. - **`patch_manifest`**: **`enabled`**, **`source`** (default `patch-manifest.json`), **`from_release`** — checksum-based skip + verify (see above). -- **`files`**: default **`[]`**. **Download updates** resolves what to pull in order: (**1**) non-empty **`files`** if you set explicit **`source`** → **`dest`** pairs; (**2**) else each key in **`patch-manifest.json`** on the release (recommended); (**3**) else release attachments except launcher artifacts (`Fractured-Launcher*`, `*.blockmap`, `latest*.yml`, `.AppImage`, `patch-manifest.json`): **`.MPQ`** → **`Data/`**, one **`.exe`** → **`launch.exe`**. Multiple `.exe` attachments require a manifest. Legacy **`Wow-patched.exe`** entries are removed when merging **`launcher.json`**. +- **`files`**: default **`[]`**. **Download updates** resolves what to pull in order: (**1**) non-empty **`files`** if you set explicit **`source`** → **`dest`** pairs; (**2**) else each key in **`patch-manifest.json`** on the release (recommended); (**3**) else release attachments except launcher artifacts (`Fractured-Launcher*`, `*.blockmap`, `latest*.yml`, `.AppImage`, `patch-manifest.json`): **`.MPQ`** → **`Data/enUS/`**, one **`.exe`** → **`launch.exe`**. Multiple `.exe` attachments require a manifest. Legacy **`Wow-patched.exe`** entries are removed when merging **`launcher.json`**. - **`realmlist`**, **`auth`**, **`launch`**. diff --git a/tools/fractured-launcher-electron/lib/release-sync.js b/tools/fractured-launcher-electron/lib/release-sync.js index 8f390b5..1f428a8 100644 --- a/tools/fractured-launcher-electron/lib/release-sync.js +++ b/tools/fractured-launcher-electron/lib/release-sync.js @@ -37,9 +37,14 @@ function isExcludedFromGameSync(fileName) { return false; } +function mpqDestFromSource(source) { + const base = path.basename(String(source || '')); + return `Data/enUS/${base}`; +} + function destForReleaseSource(source, cfg) { const base = path.basename(String(source || '')); - if (/\.mpq$/i.test(base)) return `Data/${base}`; + if (/\.mpq$/i.test(base)) return mpqDestFromSource(source); if (/\.exe$/i.test(base)) return (cfg.launch && cfg.launch.exe) || 'Wow.exe'; return base; } @@ -90,7 +95,7 @@ async function buildResolvedReleaseFiles(cfg, manifestMaybeNull) { for (const n of mpqs) { out.push({ source: n, - dest: path.posix.join('Data', path.basename(n)), + dest: mpqDestFromSource(n), backup: true, from_release: true, }); diff --git a/tools/fractured-launcher-electron/package.json b/tools/fractured-launcher-electron/package.json index c281431..566ba59 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.7", + "version": "1.0.8", "description": "Fractured WoW launcher (Electron) — no console window, native folder picker, auto-update", "main": "main.js", "repository": {