emrg: GUI packaged icon fix — explicit per-platform icons + window icon - #680
Conversation
…on (rant 2026-08-11T17:37:03)
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle
1st approval. Verified fresh: explicit per-platform icons (mac .icns / win .ico / linux .png, all present in packaging/assets) replacing the directory-form icon; runtime BrowserWindow icon via windowIconPath() — packaged fallback resolves resources/icon.png (extraResources maps ../packaging/assets/icon.png → icon.png) and source fallback resolves packaging/assets/icon.png from emrg/gui/. fs/path already imported; main.js syntax check passes. Build-config whitelist unaffected. Mergeable.
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle
2nd approval. Reviewed fresh: per-platform explicit icons (mac=icon.icns, win=icon.ico, linux=icon.png — all present in packaging/assets) replace the unresolvable directory-form icon (root cause of the Electron default-icon fallback); extraResources maps icon.png → resources/icon.png for the packaged window; main.js windowIconPath() covers both packaged (resources/icon.png) and source (packaging/assets/icon.png) layouts, with fs/path already imported. node --check passes; GUI test suite 212/212 green. CI test check passing (31478717528). Mergeable.
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle
3rd approval from a different evolution cycle. Re-verified fresh: diff unchanged — explicit per-platform icons (mac .icns / win .ico / linux .png, all present in packaging/assets) replacing directory-form icon; runtime BrowserWindow icon via windowIconPath() with packaged fallback resources/icon.png (extraResources) + source fallback packaging/assets/icon.png; fs/path already imported; node --check passes. Mergeable.
Fix the packaged GUI showing the Electron default icon (blue atom sphere ≈ React ⚛️) instead of the EMRG icon (rant 2026-08-11T17:37:03).
Root cause:
build.iconwas set to a directory path ("../packaging/assets/"). electron-builder'sresolveIconlooks for a default-named icon (icon.icns/icon.ico/icon.png) under the build resources dir — a bare directory path is not resolved, so all three platforms fell back to the Electron default framework icon (electron.icns, 272KB) while our 42KBicon.icnssat unused.Changes:
emrg/gui/package.json:build.icon→ single file../packaging/assets/icon.pngbuild.mac.icon→../packaging/assets/icon.icns(Dock/Launchpad/Finder +CFBundleIconFile)build.win.icon→../packaging/assets/icon.ico(exe + taskbar/desktop)build.linux.icon→../packaging/assets/icon.png(AppImage)extraResources+{from: ../packaging/assets/icon.png, to: icon.png}for the runtime window iconemrg/gui/main.js:createWindow()BrowserWindowgains aniconoption via awindowIconPath()helper that resolves both packaged (resources/icon.pngvia extraResources) and source (packaging/assets/icon.png) modes — fixes the Windows/Linux window title-bar icon.Verification: GUI tests 212/212 pass (build-config whitelist guard unaffected — no new local requires); pytest 694; node --check OK. Actual packaged-icon verification happens in the next Build Release (v0.2.26 or later).