emrg: fix electron-builder icon resolution (buildResources) - #836
Merged
Conversation
…026-08-18T11:35:25)
argszero
commented
Aug 18, 2026
argszero
left a comment
Owner
Author
There was a problem hiding this comment.
✅ LGTM — cycle 702. CI test + test-windows PASS (32096355697). Verified locally: buildResources=../packaging/assets + bare icon filenames (icon.icns/ico/png) — config valid, assets present (icns 378540B), GUI tests 257/257. Icon embedding exercised at next Build Release.
This was referenced Aug 18, 2026
argszero
added a commit
that referenced
this pull request
Aug 18, 2026
…#838) * emrg: fix electron-builder buildResources schema (v0.2.47 build gate) #836 placed buildResources at the config root — electron-builder 24.13.3 rejects the unknown property and all 4 Build Release jobs fail at the electron-builder schema validation stage. Correct location is directories.buildResources. Adds a build-config guard test so the schema constraint is enforced at PR-CI time (Test CI never runs electron-builder, only the tag-triggered Build Release does). * emrg: fix buildResources guard — assert committed icon.svg, not gitignored gen-assets products icon.icns/ico/png are gitignored build-time products (packaging/gen-assets.sh renders them from icon.svg); CI checks out fresh and fails the exists-check. Guard now asserts the committed design source icon.svg exists + the schema constraint (directories.buildResources placement). --------- Co-authored-by: EMRG Evolution <emrg@argszero.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes host rant 2026-08-18T11:35:25 (electron-builder 图标未生效 — icon 相对路径解析错误).
Root cause: electron-builder resolves
build.mac.icon/build.win.icon/ top-levelbuild.iconrelative to buildResources (defaultemrg/gui/build/), NOT the package.json directory. The old../packaging/assets/icon.icnsresolved toemrg/gui/packaging/assets/icon.icns(nonexistent) → electron-builder silently fell back to the default electron icon on every platform (24.x known behavior: missing icon file → default, no error). Verified: packaged EMRG.app contained onlyelectron.icns, Windows exe showed the default icon.Fix (recommended option A — declarative, zero-copy):
buildResources: "../packaging/assets"— electron-builder treats that dir as the resource root, and CI gen-assets already generates icon.icns/ico/png thereicon.icns(mac) /icon.ico(win) /icon.png(top-level + linux)fromentries untouched (project-dir-relative mechanism)Verification: config JSON valid, icon assets present in packaging/assets (icon.icns 378540B / icon.ico / icon.png), GUI tests 257/257 pass. Full icon embedding is exercised by the next Build Release (v0.2.46 tag push → gen-assets → electron-builder dist on all platforms).