Compare commits

...

2 Commits

Author SHA1 Message Date
bigjakk 9a52d6b8fc chore: bump version to 0.7.8
Build and Release / build-and-release (push) Successful in 12m59s
2026-04-16 09:38:00 -07:00
bigjakk 255befd1b8 fix: use original-fs to bypass Electron asar interception 2026-04-16 09:38:00 -07:00
4 changed files with 11 additions and 8 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "krunker-civilian-client",
"version": "0.7.7",
"version": "0.7.8",
"description": "Cross-platform Krunker game client",
"main": "dist/main/index.js",
"homepage": "https://github.com/bigjakk/Krunker-Civilian-Client",
+6 -5
View File
@@ -1,6 +1,7 @@
import { app, BrowserWindow, Menu, clipboard, ipcMain, safeStorage, session, shell } from 'electron';
import { join, dirname } from 'path';
import { existsSync, mkdirSync, unlinkSync, promises as fsp } from 'fs';
import { existsSync, mkdirSync, promises as fsp } from 'fs';
import { existsSync as origExistsSync, unlinkSync as origUnlinkSync } from 'original-fs';
import { get as httpsGet } from 'https';
import { execFile } from 'child_process';
import * as os from 'os';
@@ -179,8 +180,8 @@ app.whenReady().then(async () => {
// Clean up stale pending asar from a previous failed swap
const resourcesDir = join(dirname(app.getPath('exe')), 'resources');
const stalePending = join(resourcesDir, 'app-pending.asar');
if (existsSync(stalePending)) {
try { unlinkSync(stalePending); } catch { /* ignore */ }
if (origExistsSync(stalePending)) {
try { origUnlinkSync(stalePending); } catch { /* ignore */ }
}
try {
@@ -213,8 +214,8 @@ app.whenReady().then(async () => {
} catch (err) {
electronLog.error('[KCC] Patch download failed:', err);
// Clean up failed download
if (existsSync(pendingPath)) {
try { unlinkSync(pendingPath); } catch { /* ignore */ }
if (origExistsSync(pendingPath)) {
try { origUnlinkSync(pendingPath); } catch { /* ignore */ }
}
if (!updateWin.isDestroyed()) updateWin.close();
}
+3 -1
View File
@@ -1,5 +1,7 @@
import { get as httpsGet } from 'https';
import { createReadStream, createWriteStream, writeFileSync, renameSync, unlinkSync, existsSync, mkdirSync } from 'fs';
// Use original-fs to bypass Electron's asar interception — required for
// writing/renaming .asar files in the resources directory.
import { createReadStream, createWriteStream, writeFileSync, renameSync, unlinkSync, existsSync, mkdirSync } from 'original-fs';
import { join, dirname } from 'path';
import { createHash } from 'crypto';
import { spawn } from 'child_process';
+1 -1
View File
@@ -20,7 +20,7 @@ export default defineConfig({
outDir: 'dist/main',
emptyDirBefore: true,
rollupOptions: {
external: ['electron', 'electron-store', ...nodeBuiltins],
external: ['electron', 'electron-store', 'original-fs', ...nodeBuiltins],
},
target: 'node20',
minify: isProd,