Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

semicube
Copy link

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+.

@ladybird-bot
Copy link
Collaborator

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.

@semicube semicube force-pushed the appkit-macosversion-buildinstructions branch from 4fafabf to da10226 Compare September 19, 2024 14:29
@semicube semicube changed the title Add macOS version requirement for building AppKit in BuildInstructionsLadybird.md Documentation: Add macOS version requirement for building AppKit in BuildInstructionsLadybird.md Sep 19, 2024
@ADKaster
Copy link
Member

@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?

@trflynn89
Copy link
Contributor

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.

@shlyakpavel
Copy link
Contributor

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

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.

5 participants