fix(launcher): force .MPQ extension uppercase on disk for WoW compatibility
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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.
|
- **`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.
|
- **`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).
|
- **`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/<name>.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`**.
|
- **`realmlist`**, **`auth`**, **`launch`**.
|
||||||
|
|||||||
@@ -45,10 +45,16 @@ function wowInstallValid(cfg) {
|
|||||||
return fsSync.existsSync(p) && fsSync.statSync(p).isFile();
|
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) {
|
async function installFile(cfg, entry) {
|
||||||
const parts = String(entry.dest).replace(/\\/g, '/').split('/').filter(Boolean);
|
const parts = String(entry.dest).replace(/\\/g, '/').split('/').filter(Boolean);
|
||||||
const root = normalizeWinGameDir(cfg.game_dir || '');
|
const root = normalizeWinGameDir(cfg.game_dir || '');
|
||||||
const destAbs = path.join(root, ...parts);
|
const destAbs = normalizeMpqDestinationPath(path.join(root, ...parts));
|
||||||
if (entry.backup) {
|
if (entry.backup) {
|
||||||
try {
|
try {
|
||||||
const st = await fs.stat(destAbs);
|
const st = await fs.stat(destAbs);
|
||||||
|
|||||||
@@ -39,7 +39,8 @@ function isExcludedFromGameSync(fileName) {
|
|||||||
|
|
||||||
function mpqDestFromSource(source) {
|
function mpqDestFromSource(source) {
|
||||||
const base = path.basename(String(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) {
|
function destForReleaseSource(source, cfg) {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "fractured-launcher-electron",
|
"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",
|
"description": "Fractured WoW launcher (Electron) — no console window, native folder picker, auto-update",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
Reference in New Issue
Block a user