Skip to content

Fix macOS iconset 512@2x generation#2579

Merged
ten9876 merged 1 commit into
aethersdr:mainfrom
rfoust:codex/fix-macos-iconset
May 12, 2026
Merged

Fix macOS iconset 512@2x generation#2579
ten9876 merged 1 commit into
aethersdr:mainfrom
rfoust:codex/fix-macos-iconset

Conversation

@rfoust

@rfoust rfoust commented May 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Update the macOS build-time iconset generation so icon_512x512@2x.png is emitted at 1024x1024 pixels.
  • Keep the change narrowly scoped to the existing AetherSDR.icns custom command in CMakeLists.txt.

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

  • cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo
  • cmake --build build --target AetherSDR.icns
  • sips -g pixelWidth -g pixelHeight build/AetherSDR.iconset/icon_512x512@2x.png

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.

Copilot AI review requested due to automatic review settings May 11, 2026 09:11
@rfoust rfoust requested a review from ten9876 as a code owner May 11, 2026 09:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 sips resize dimensions for icon_512x512@2x.png from 768×768 to 1024×1024.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ten9876 ten9876 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.icns succeeds
  • sips -g pixelWidth -g pixelHeight build/AetherSDR.iconset/icon_512x512@2x.png reports 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)

@ten9876 ten9876 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved — Apple iconset convention requires 2N×2N at @2x.

@ten9876 ten9876 merged commit 63d6d8b into aethersdr:main May 12, 2026
8 of 9 checks passed
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.

3 participants