Skip to content

Add support for macOS 26+ layered icons#4

Merged
kdroidFilter merged 1 commit intomainfrom
feat/macos-layered-icons
Feb 9, 2026
Merged

Add support for macOS 26+ layered icons#4
kdroidFilter merged 1 commit intomainfrom
feat/macos-layered-icons

Conversation

@kdroidFilter
Copy link
Copy Markdown
Owner

Summary

  • Port of JetBrains/compose-multiplatform#5451
  • Adds layeredIconDir DSL property to macOS {} block for both JVM and native targets
  • Compiles .icon directories into Assets.car via xcrun actool (requires actool >= 26.0)
  • Embeds Assets.car in the .app bundle and sets CFBundleIconName in Info.plist
  • Gracefully degrades with a warning if actool is missing or too old

Changed files

  • PlatformSettings.kt — new layeredIconDir: DirectoryProperty
  • MacAssetsTool.kt — new utility for actool compilation and version checking
  • AbstractJPackageTask.kt — layered icon support for JVM packaging
  • AbstractNativeMacApplicationPackageAppDirTask.kt — layered icon support for native packaging
  • InfoPlistBuilder.kt — added CFBundleIconName plist key
  • osUtils.kt — added plutil to MacUtils
  • configureJvmApplication.kt / configureNativeApplication.kt — DSL wiring
  • README.md — documentation with usage examples

Usage

nativeDistributions {
    macOS {
        iconFile.set(project.file("icons/MyApp.icns"))       // fallback
        layeredIconDir.set(project.file("icons/MyApp.icon")) // layered
    }
}

Test plan

  • Verify build compiles successfully on all platforms
  • Test on macOS with Xcode 26+ that Assets.car is generated and included in the .app bundle
  • Test that builds without layeredIconDir set still work unchanged
  • Test graceful degradation when actool < 26 or missing

Port of JetBrains/compose-multiplatform#5451. Adds a `layeredIconDir`
DSL property that compiles a .icon directory into Assets.car via
xcrun actool and embeds it in the .app bundle for both JVM and native
Mac targets. Requires actool >= 26.0.
@kdroidFilter kdroidFilter merged commit 42d0cff into main Feb 9, 2026
1 check failed
@kdroidFilter kdroidFilter deleted the feat/macos-layered-icons branch February 17, 2026 09:23
kdroidFilter added a commit that referenced this pull request Apr 19, 2026
X11 ICCCM compliance (#4/#5):
- SetSelectionOwner now uses real server timestamp via PropertyNotify probe,
  not XCB_CURRENT_TIME (violates ICCCM §2.1). Added get_server_timestamp_locked()
  which fires a zero-byte ChangeProperty to trigger timestamp event.
- TIMESTAMP replies now return g_own_ts (real value) instead of truncated 0.
- Verified: xclip -o -t TIMESTAMP returns non-zero after our clipboard write.

INCR cleanup (#3):
- On INCR read timeout, delete property to unblock sender waiting for
  PropertyNotify=Delete (ICCCM compliant termination).

Process lifecycle (#7):
- Wayland: runCaptureBytes, runSilently, writeBytes now escalate to
  destroyForcibly() if SIGTERM doesn't terminate after 500ms grace.

AccessBehavior mapping (#12):
- Kotlin: explicit when() mapping (0→AlwaysAllow, 1→AskEveryTime, 2→AlwaysDeny)
  instead of ordinal/entries.getOrNull (fragile with future macOS versions).
- ObjC: validate input 0..2 on set; return -1 if get() returns out-of-range.

Documentation & robustness (#13, #1):
- Clipboard.watch() doc: clarify poll interval is always honored; source of
  counter differs by backend (Mach IPC / XFixes / wl-paste).
- Re-check isActive after slow availableFormats() to avoid emitting to
  cancelled flow.

Added X11TimestampSmokeTest to verify real timestamps are used.
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