ladybird icon indicating copy to clipboard operation
ladybird copied to clipboard

Documentation: Add macOS version requirement for building AppKit in `BuildInstructionsLadybird.md`

Open abvkash opened this issue 1 year ago • 5 comments

Just a small add to BuildInstructionsLadybird.md. MacOS Sonoma (14.0) or above is required to build the AppKit chrome.

It was not building on my machine (MacOS Ventura 13.6) and gave the following build error:

/Users/abi/Stuffs/Cloned/ladybird/Ladybird/AppKit/UI/SearchPanel.mm:66:36: error: use of undeclared identifier 'NSBezelStyleAccessoryBarAction'
   66 |         [search_done setBezelStyle:NSBezelStyleAccessoryBarAction];
      |                                    ^

Reason being that NSBezelStyleAccessoryBarAction is only available for macOS 14+.

abvkash avatar Sep 19 '24 14:09 abvkash

Hello!

One or more of the commit messages in this PR do not match the Ladybird code submission policy, please check the lint_commits CI job for more details on which commits were flagged and why. Please do not close this PR and open another, instead modify your commit message(s) with git commit --amend and force push those changes to update this PR.

ladybird-bot avatar Sep 19 '24 14:09 ladybird-bot

@trflynn89 Does using this bezel style limit our minimum deployment version as well? Should we do some if available() hackery to use a different style on older macOS versions?

ADKaster avatar Sep 23 '24 17:09 ADKaster

This one is a bit unfortunate - I was thinking we should set CMAKE_OSX_DEPLOYMENT_TARGET to something reasonable, and then we'd get a compile error anytime we try to use an API that is newer than that version without an @available check. But this particular enum value has no such availability marker:

/// A bezel style that is suitable for accessory and scope bars. This style is typically used for buttons that perform an action or for pop-up buttons.
NSBezelStyleAccessoryBarAction = 12,

Compared to a value defined earlier in the enum:

/// The appearance of this bezel style is automatically determined based on the button's contents and position within the window. This bezel style is the default for all button initializers.
NSBezelStyleAutomatic API_AVAILABLE(macos(14.0)) = 0,

(Which, if I set CMAKE_OSX_DEPLOYMENT_TARGET to 13.0, I do get a compile error about using NSBezelStyleAutomatic without checking availability.)

That said, macOS Ventura is also likely to be end-of-life by the time we reach alpha in 2026.

trflynn89 avatar Sep 23 '24 18:09 trflynn89

@trflynn89 While the code details are important, this PR is focused on documentation, and, in my opinion, it looks good to merge as-is.

shlyakpavel avatar Nov 02 '24 21:11 shlyakpavel

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!

github-actions[bot] avatar Dec 07 '24 21:12 github-actions[bot]

This pull request has been closed because it has not had recent activity. Feel free to re-open if you wish to still contribute these changes. Thank you for your contributions!

github-actions[bot] avatar Dec 15 '24 02:12 github-actions[bot]

As I said on November 3, I find merging this reasonable. It is not productive to dive into implementation details under pure documentation PR, that documents current behavior and saves time for those running elder OS versions...

shlyakpavel avatar Dec 15 '24 08:12 shlyakpavel