Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8f3a74ddb4 | |||
| 93775cc36a |
@@ -25,7 +25,6 @@ files:
|
|||||||
- node_modules/mimic-fn/**/*
|
- node_modules/mimic-fn/**/*
|
||||||
- node_modules/semver/**/*
|
- node_modules/semver/**/*
|
||||||
- node_modules/onetime/**/*
|
- node_modules/onetime/**/*
|
||||||
- node_modules/uuid/**/*
|
|
||||||
- "!node_modules/**/*.ts"
|
- "!node_modules/**/*.ts"
|
||||||
- "!node_modules/**/*.map"
|
- "!node_modules/**/*.map"
|
||||||
asar: true
|
asar: true
|
||||||
@@ -43,6 +42,7 @@ nsis:
|
|||||||
allowToChangeInstallationDirectory: true
|
allowToChangeInstallationDirectory: true
|
||||||
createDesktopShortcut: true
|
createDesktopShortcut: true
|
||||||
createStartMenuShortcut: true
|
createStartMenuShortcut: true
|
||||||
|
shortcutName: Krunker Civilian Client
|
||||||
artifactName: "${productName}-${version}-Setup.${ext}"
|
artifactName: "${productName}-${version}-Setup.${ext}"
|
||||||
|
|
||||||
portable:
|
portable:
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "krunker-civilian-client",
|
"name": "krunker-civilian-client",
|
||||||
"version": "0.5.3",
|
"version": "0.5.5",
|
||||||
"description": "Cross-platform Krunker game client",
|
"description": "Cross-platform Krunker game client",
|
||||||
"main": "dist/main/index.js",
|
"main": "dist/main/index.js",
|
||||||
"homepage": "https://gitea.crjlab.net/bigjakk/krunker-civilian-client",
|
"homepage": "https://gitea.crjlab.net/bigjakk/krunker-civilian-client",
|
||||||
|
|||||||
@@ -54,6 +54,9 @@ const advancedConfig = { ...advancedDefaults, ...config.get('advanced') };
|
|||||||
const perfConfig = { fpsUnlocked: true, ...config.get('performance') };
|
const perfConfig = { fpsUnlocked: true, ...config.get('performance') };
|
||||||
applyPlatformFlags(platformInfo, advancedConfig, perfConfig);
|
applyPlatformFlags(platformInfo, advancedConfig, perfConfig);
|
||||||
|
|
||||||
|
// ── App identity (must match electron-builder appId for taskbar pin persistence) ──
|
||||||
|
app.setAppUserModelId('com.krunkercivilian.client');
|
||||||
|
|
||||||
// ── Resource swapper protocol (must register before app.ready) ──
|
// ── Resource swapper protocol (must register before app.ready) ──
|
||||||
initSwapperProtocol();
|
initSwapperProtocol();
|
||||||
|
|
||||||
|
|||||||
+6
-2
@@ -35,7 +35,7 @@ export function initSwapperProtocol(): void {
|
|||||||
* Must be called AFTER app.ready.
|
* Must be called AFTER app.ready.
|
||||||
*/
|
*/
|
||||||
export function registerSwapperFileProtocol(ses: Session): void {
|
export function registerSwapperFileProtocol(ses: Session): void {
|
||||||
ses.protocol.handle(PROTOCOL_NAME, (request) => {
|
ses.protocol.handle(PROTOCOL_NAME, async (request) => {
|
||||||
const url = new URL(request.url);
|
const url = new URL(request.url);
|
||||||
// Reconstruct the file path from the URL
|
// Reconstruct the file path from the URL
|
||||||
// Windows: kpc-swap://C/foo/bar → C:/foo/bar
|
// Windows: kpc-swap://C/foo/bar → C:/foo/bar
|
||||||
@@ -47,7 +47,11 @@ export function registerSwapperFileProtocol(ses: Session): void {
|
|||||||
} else {
|
} else {
|
||||||
filePath = url.pathname;
|
filePath = url.pathname;
|
||||||
}
|
}
|
||||||
return net.fetch(`file://${filePath}`);
|
try {
|
||||||
|
return await net.fetch(`file://${filePath}`);
|
||||||
|
} catch {
|
||||||
|
return new Response('Not found', { status: 404 });
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user