Skip to content

Commit dc22094

Browse files
dbfxclaude
andcommitted
fix: generate app-update.yml for electron-updater compatibility
The auto-updater was failing with ENOENT because electron-updater expects an app-update.yml in the resources directory, but Electron Forge doesn't generate one. Added a generateAssets hook that creates the file during build and extraResource config to include it. Also bumps sidebar icons from 22px to 28px. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 624a391 commit dc22094

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

forge.config.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import path from 'path';
2+
import fs from 'fs';
23
import type { ForgeConfig } from '@electron-forge/shared-types';
34
import { MakerSquirrel } from '@electron-forge/maker-squirrel';
45
import { MakerZIP } from '@electron-forge/maker-zip';
@@ -10,6 +11,16 @@ const config: ForgeConfig = {
1011
icon: path.resolve(__dirname, 'build', 'icon'),
1112
name: 'Modern MTR',
1213
executableName: 'modern-mtr',
14+
extraResource: [path.resolve(__dirname, 'build', 'app-update.yml')],
15+
},
16+
hooks: {
17+
generateAssets: async () => {
18+
// Generate app-update.yml required by electron-updater
19+
const yml = 'provider: github\nowner: dbfx\nrepo: modern-win-mtr\n';
20+
const buildDir = path.resolve(__dirname, 'build');
21+
if (!fs.existsSync(buildDir)) fs.mkdirSync(buildDir, { recursive: true });
22+
fs.writeFileSync(path.join(buildDir, 'app-update.yml'), yml, 'utf-8');
23+
},
1324
},
1425
rebuildConfig: {},
1526
makers: [

src/renderer/components/Layout.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ function SidebarButton({
116116

117117
function TraceSvg() {
118118
return (
119-
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
119+
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
120120
<circle cx="5" cy="6" r="2" />
121121
<circle cx="12" cy="12" r="2" />
122122
<circle cx="19" cy="18" r="2" />
@@ -128,7 +128,7 @@ function TraceSvg() {
128128

129129
function GlobeSvg() {
130130
return (
131-
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
131+
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
132132
<circle cx="12" cy="12" r="10" />
133133
<line x1="2" y1="12" x2="22" y2="12" />
134134
<path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" />
@@ -138,7 +138,7 @@ function GlobeSvg() {
138138

139139
function SignalSvg() {
140140
return (
141-
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
141+
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
142142
<rect x="4" y="14" width="3" height="6" rx="1" />
143143
<rect x="10" y="10" width="3" height="10" rx="1" />
144144
<rect x="16" y="6" width="3" height="14" rx="1" />
@@ -148,7 +148,7 @@ function SignalSvg() {
148148

149149
function RouteSvg() {
150150
return (
151-
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
151+
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
152152
<circle cx="6" cy="19" r="3" />
153153
<path d="M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H18" />
154154
<circle cx="18" cy="5" r="3" />
@@ -158,7 +158,7 @@ function RouteSvg() {
158158

159159
function BellSvg() {
160160
return (
161-
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
161+
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
162162
<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9" />
163163
<path d="M13.73 21a2 2 0 0 1-3.46 0" />
164164
</svg>
@@ -167,7 +167,7 @@ function BellSvg() {
167167

168168
function InfoSvg() {
169169
return (
170-
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
170+
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
171171
<circle cx="12" cy="12" r="10" />
172172
<line x1="12" y1="16" x2="12" y2="12" />
173173
<line x1="12" y1="8" x2="12.01" y2="8" />

0 commit comments

Comments
 (0)