fix(electron): configure app icons#622
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
| } | ||
| if (outputsAreFresh()) { | ||
| console.warn('No local image resizer found; existing icon.ico and icon.icns are up to date.') | ||
| process.exit(0) |
There was a problem hiding this comment.
process.exit(0) here skips the outer finally, so the temp directory created at startup is never removed on the "no resizer, outputs already fresh" path. I reproduced this locally: after running the script on Linux without magick, /tmp/neocode-icons-* was left behind. Returning normally from resizeImages() (or moving the freshness check before mkdtempSync) would avoid leaking a temp dir on every invocation.
There was a problem hiding this comment.
Fixed in 8f37dbd: the fresh-output fallback now returns normally instead of calling process.exit(0), so the outer finally always removes the temporary directory.
| "dev:electron": "node scripts/clean-electron.js && node scripts/build-gateway.js && vite --mode electron", | ||
| "build": "tsc -b && vite build", | ||
| "build:electron": "node scripts/clean-electron.js && vite build --mode electron && node scripts/build-gateway.js && node scripts/verify-electron-preload.js && electron-builder --config electron-builder.config.cjs", | ||
| "build:electron": "node scripts/clean-electron.js && node scripts/generate-icons.js && vite build --mode electron && node scripts/build-gateway.js && node scripts/verify-electron-preload.js && electron-builder --config electron-builder.config.cjs", |
There was a problem hiding this comment.
This makes build:electron depend on the new icon-generation step, but I couldn't find any README/docs update about the new prerequisite. On Linux builders without ImageMagick the command only works while the checked-in icon.ico/icon.icns are newer than build/icon.png; once the source icon changes, build:electron starts hard-failing with No local image resizer found. Please document that dependency or make the build path independent of host tooling.
There was a problem hiding this comment.
Fixed in 8f37dbd: build:electron no longer runs the icon generator, so the release build uses the checked-in icon assets without requiring host image tooling. I also documented generate:icons as a manual maintenance command and listed its Windows/macOS/Linux tool requirements.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
构建图标脚本和配置