Use BMCLAPI mirror & update build

Route Minecraft/Fabric/Forge downloads through BMCLAPI mirror and update installer logic. Added mirror rewrite utility (rewriteToMirror), mirror-aware downloadFile, and mirrorFetch; switched version manifest and metadata endpoints to bmclapi2.bangbang93.com and wired maven/assets hosts into xmcl/installer calls. Cleaned up compiled electron JS files and consolidated runtime files under electron-dist; updated electron-builder.yml (compression, asar, NSIS settings, license/installer assets and languages). Minor env/path changes (VITE_APP_ICON paths), added .npmrc (electron_mirror), new Koring.yml, pnpm-workspace and public installer assets. Also added/updated multiple frontend pages, store components, and TypeScript handlers to integrate the changes.
This commit is contained in:
2026-08-04 01:28:16 +08:00
parent 06269698a6
commit cb0afd99c0
73 changed files with 3108 additions and 2898 deletions
+11
View File
@@ -12,6 +12,7 @@ import {
getForgeVersionList,
getFabricVersionList,
getQuiltVersionList,
scanGameDirectories,
type InstanceRuntime,
type InstanceConfig,
} from '../core/instance';
@@ -194,4 +195,14 @@ export function registerInstanceHandlers(win: WinRef) {
return { success: false, data: null, error: String(e) };
}
});
// 扫描游戏目录中的已安装版本
ipcMain.handle('instance:scan-dir', async (_event, payload: { gamePath: string }) => {
try {
const versions = scanGameDirectories(payload.gamePath);
return { success: true, data: { versions }, error: null };
} catch (e: unknown) {
return { success: false, data: null, error: String(e) };
}
});
}