Fix macOS iconset 512@2x generation#2579
Conversation
There was a problem hiding this comment.
Pull request overview
Adjusts the macOS build-time .iconset generation in CMakeLists.txt so the icon_512x512@2x.png slot is produced at the correct Retina size (1024×1024), preventing iconutil from rejecting the iconset during .icns creation.
Changes:
- Update the
sipsresize dimensions foricon_512x512@2x.pngfrom 768×768 to 1024×1024.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ten9876
left a comment
There was a problem hiding this comment.
Claude here, reviewing on Jeremy's behalf.
Verdict
Sharp one-character fix. Merge.
What's wrong and what's right
Apple's iconset naming convention: icon_NxN.png is N×N pixels; icon_NxN@2x.png is 2N×2N pixels (Retina). The 2× multiplier is the whole point of the @2x suffix.
Cross-checking every entry in the add_custom_command that landed in #2558:
| File | Should be | Was | Correct? |
|---|---|---|---|
icon_16x16.png |
16×16 | 16×16 | ✓ |
icon_16x16@2x.png |
32×32 | 32×32 | ✓ |
icon_32x32.png |
32×32 | 32×32 | ✓ |
icon_32x32@2x.png |
64×64 | 64×64 | ✓ |
icon_128x128.png |
128×128 | 128×128 | ✓ |
icon_128x128@2x.png |
256×256 | 256×256 | ✓ |
icon_256x256.png |
256×256 | 256×256 | ✓ |
icon_256x256@2x.png |
512×512 | 512×512 | ✓ |
icon_512x512.png |
512×512 | 512×512 | ✓ |
icon_512x512@2x.png |
1024×1024 | 768×768 | ❌ → fixed |
Only the last one was wrong — a 1.5× multiplier slipped in where a 2× should have been. PR fixes the single line.
Why the bug mattered
iconutil's behavior on size-vs-name mismatch varies by macOS version:
- Newer toolchains reject the iconset outright (the failure path the PR author describes)
- Older toolchains silently accept and let the OS upsample at display time, producing a blurry app icon at full Retina display sizes
Either way, the fix is correct per Apple's documented iconset format.
Built and verified by author
PR description confirms:
cmake --build build --target AetherSDR.icnssucceedssips -g pixelWidth -g pixelHeight build/AetherSDR.iconset/icon_512x512@2x.pngreports 1024×1024
All 5 CI checks green: build, analyze (cpp), check-paths, check-windows, CodeQL.
Recommendation
Merge.
Thanks @rfoust — these are the easy-to-miss typos in build scripts that bite Mac users with no clear error message. The cross-check against the entire iconset table to confirm only one row was off is exactly the level of rigor I'd want on infrastructure fixes.
73, Jeremy KK7GWY & Claude (AI dev partner)
Summary
Bug
The macOS icon generation rule created AetherSDR.iconset/icon_512x512@2x.png with sips -z 768 768. In an Apple .iconset, the 512x512@2x asset represents a 512 point Retina icon and must be 1024x1024 pixels. Because the generated file size did not match the filename convention, iconutil could reject the generated AetherSDR.iconset when producing AetherSDR.icns.
Fix
Changed only the icon_512x512@2x.png sips invocation from 768x768 to 1024x1024, matching iconutil's expected dimensions for that iconset slot.
Verification
The icon target completed successfully, iconutil produced build/AetherSDR.icns, and the generated icon_512x512@2x.png reports pixelWidth 1024 and pixelHeight 1024. The app was not run.