mirror of
https://github.com/dream-pep/koring-launcher.git
synced 2026-09-12 05:45:18 +08:00
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:
@@ -2,7 +2,7 @@ import electron from 'electron';
|
||||
import { execSync } from 'child_process';
|
||||
import * as os from 'os';
|
||||
|
||||
const { ipcMain, app } = electron;
|
||||
const { ipcMain, app, shell } = electron;
|
||||
|
||||
function getBiosId(): string {
|
||||
if (process.platform !== 'win32') return 'N/A (non-Windows)';
|
||||
@@ -60,4 +60,14 @@ export function registerSystemHandlers() {
|
||||
return { success: false, data: null, error: String(e) };
|
||||
}
|
||||
});
|
||||
|
||||
// 在系统文件管理器中打开指定路径(用于"打开游戏目录"等操作)
|
||||
ipcMain.handle('system:open-path', async (_event, payload: { path: string }) => {
|
||||
try {
|
||||
const error = await shell.openPath(payload.path);
|
||||
return { success: !error, data: { error }, error: error || null };
|
||||
} catch (e: unknown) {
|
||||
return { success: false, data: null, error: String(e) };
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user