diff --git a/tools/fractured-launcher-electron/README.md b/tools/fractured-launcher-electron/README.md index f435525..1fd9546 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/enUS/`**, 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/.MPQ`** (extension forced to **`.MPQ`** caps for client compatibility), 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/patch.js b/tools/fractured-launcher-electron/lib/patch.js index ec40efe..3bd4c3b 100644 --- a/tools/fractured-launcher-electron/lib/patch.js +++ b/tools/fractured-launcher-electron/lib/patch.js @@ -45,10 +45,16 @@ function wowInstallValid(cfg) { return fsSync.existsSync(p) && fsSync.statSync(p).isFile(); } +/** WoW expects patch MPQ names with a literal .MPQ extension (case-sensitive clients). */ +function normalizeMpqDestinationPath(absPath) { + const s = String(absPath || ''); + return /\.mpq$/i.test(s) ? s.replace(/\.mpq$/i, '.MPQ') : s; +} + async function installFile(cfg, entry) { const parts = String(entry.dest).replace(/\\/g, '/').split('/').filter(Boolean); const root = normalizeWinGameDir(cfg.game_dir || ''); - const destAbs = path.join(root, ...parts); + const destAbs = normalizeMpqDestinationPath(path.join(root, ...parts)); if (entry.backup) { try { const st = await fs.stat(destAbs); diff --git a/tools/fractured-launcher-electron/lib/release-sync.js b/tools/fractured-launcher-electron/lib/release-sync.js index 1f428a8..293d41d 100644 --- a/tools/fractured-launcher-electron/lib/release-sync.js +++ b/tools/fractured-launcher-electron/lib/release-sync.js @@ -39,7 +39,8 @@ function isExcludedFromGameSync(fileName) { function mpqDestFromSource(source) { const base = path.basename(String(source || '')); - return `Data/enUS/${base}`; + const stem = base.replace(/\.mpq$/i, ''); + return `Data/enUS/${stem}.MPQ`; } function destForReleaseSource(source, cfg) { diff --git a/tools/fractured-launcher-electron/package.json b/tools/fractured-launcher-electron/package.json index 566ba59..be7b63d 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.8", + "version": "1.0.9", "description": "Fractured WoW launcher (Electron) — no console window, native folder picker, auto-update", "main": "main.js", "repository": {