Skip to content

emrg: GUI packaged icon fix — explicit per-platform icons + window icon - #680

Merged
argszero merged 1 commit into
masterfrom
feature/gui-icon-fix
Aug 11, 2026
Merged

emrg: GUI packaged icon fix — explicit per-platform icons + window icon#680
argszero merged 1 commit into
masterfrom
feature/gui-icon-fix

Conversation

@argszero

Copy link
Copy Markdown
Owner

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.icon was set to a directory path ("../packaging/assets/"). electron-builder's resolveIcon looks 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 42KB icon.icns sat unused.

Changes:

  • emrg/gui/package.json:
    • top-level build.icon → single file ../packaging/assets/icon.png
    • build.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 icon
  • emrg/gui/main.js: createWindow() BrowserWindow gains an icon option via a windowIconPath() helper that resolves both packaged (resources/icon.png via 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).

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant