BUILD(client): Raise macOS deployment target to 14#7069
BUILD(client): Raise macOS deployment target to 14#7069nicholas-lonsinger wants to merge 3 commits intomumble-voip:masterfrom
Conversation
WalkthroughThis PR modernizes macOS support by raising the deployment target to macOS 14 and removing legacy compatibility code. It replaces deprecated Core Audio APIs with updated equivalents, eliminates platform-specific overlay injection mechanisms, and refactors text-to-speech implementation from NSSpeechSynthesizer to AVSpeechSynthesizer. The PR removes macOS-specific compilation guards throughout the codebase, making several code paths unconditional. The overlay implementation for macOS is completely removed, with overlay support now using the Unix implementation instead. The changes simplify the codebase by dropping support for older macOS versions and deprecated frameworks. Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/mumble/CMakeLists.txt (1)
1035-1041:⚠️ Potential issue | 🟠 MajorAVFoundation is only linked when
coreaudiois enabled, butTextToSpeech_macx.mmdepends on it unconditionally.
TextToSpeech_macx.mmis added unconditionally for Apple builds (line 794) and imports<AVFoundation/AVFoundation.h>. However, AVFoundation is currently linked only at line 1039 within theif(coreaudio)block. If a user disables CoreAudio (-Dcoreaudio=OFF), the build will fail with a linker error.Move the AVFoundation framework linkage to the unconditional Apple block at lines 711–716, where other Apple frameworks are already linked.
Proposed fix
Add to the unconditional Apple linking block (lines 711–716):
target_link_libraries(mumble_client_object_lib PUBLIC ${LIB_APPKIT} ${LIB_APPLICATIONSERVICES} ${LIB_CARBON} + "-framework AVFoundation" )Remove from the
coreaudioblock (line 1039):target_link_libraries(mumble_client_object_lib PUBLIC ${LIB_AUDIOUNIT} ${LIB_COREAUDIO} - "-framework AVFoundation" )
🤖 Fix all issues with AI agents
In `@src/mumble/CoreAudio.mm`:
- Around line 513-519: Update the denied-access message in the
AVAuthorizationStatusDenied case in CoreAudio.mm: replace the outdated "System
Preferences -> Security & Privacy -> Privacy -> Microphone" text with the
correct macOS 14 string "System Settings -> Privacy & Security -> Microphone" in
the QObject::tr(...) passed to Global::get().mw->msgBox, keeping the surrounding
wording and translation call intact (the code location is the
AVAuthorizationStatusDenied branch handling microphone access in CoreAudioInput
/ CoreAudio.mm).
Raise CMAKE_OSX_DEPLOYMENT_TARGET from 10.15 to 14 (Sonoma), removing compatibility shims for macOS 10.5-10.14 that are now dead code. Disable overlay for all macOS builds since it relies on mach_override (no ARM support) and deprecated APIs like AuthorizationExecuteWithPrivileges. Changes: - Replace kAudioObjectPropertyElementMaster with kAudioObjectPropertyElementMain - Replace deprecated AudioDeviceGetProperty with AudioObjectGetPropertyData - Remove @available() version guards for macOS 10.12/10.14 - Replace NSAutoreleasePool with @autoreleasepool blocks - Remove Carbon API fallback code (GetScriptManagerVariable, etc.) - Remove respondsToSelector: checks for APIs available since macOS 10.5+ - Remove macOS overlay build targets and dependencies (ScriptingBridge, Security, xar) - Remove USE_MAC_UNIVERSAL preprocessor guard in VersionCheck Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…nthesizer NSSpeechSynthesizer (AppKit) was deprecated in macOS 14. This switches to AVSpeechSynthesizer (AVFoundation), which has built-in utterance queuing, eliminating the manual NSMutableArray queue and delegate chain. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ed117b8 to
2a9f2db
Compare
2a9f2db to
221e0c4
Compare
With the macOS overlay disabled for all builds, clean up the dead code left behind: files, directories, a git submodule, and conditional blocks that are no longer reachable. File and directory removals: - Remove overlay scripts from macx/scripts/ (build-overlay-installer, gendmg.pl); retain release tooling (osxdist.py, DS_Store, codesign-requirements.tmpl) used by CI - Remove macx/osax/ directory (overlay scripting addition) - Remove 3rdparty/mach-override-src submodule and mach-override-build wrapper - Delete overlay_gl macOS files (avail_mac.h, avail_mac.pl, init_mac.c) - Delete dead Overlay_macx.mm and helpers/g15helper/g15helper_macx.c Code cleanup: - Remove dead deprecation pragma from CoreAudio.mm - Remove macOS else() branch from overlay_gl/CMakeLists.txt - Remove USE_OVERLAY blocks, dead forwardEvent slot, and unused forward variable from GlobalShortcut_macx.mm/.h - Remove Q_OS_MAC blocks from OverlayClient.cpp/.h and OverlayUserGroup.cpp - Remove Q_OS_MAC+USE_OVERLAY guard from MainWindow.cpp - Remove macOS overlay style default and simplify font #ifdef in Settings.cpp - Remove macOS overlay UI string from GlobalShortcut.cpp/.ui and translations Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
221e0c4 to
5e7f82e
Compare
|
Continuing our conversation from #7066 The only thing that I could find supporting overlay was steam for steam games, everyone else had it dropped due to the security model of macOS. I'm submitting a new PR with changes taking the target to macOS 14 (this is oldest "actively" supported build by Apple, older version don't get security updates, just a recent certificate update). This update is in 3 commits as it's quite a lot of cleanup code. The actual "bump" did not require much, and the middle commit was not required due to the previous API only being deprecated but felt like it would be needed eventually anyway so I added it in. Estimates are ~90% of user base is on 14, 15 or 26 (yes the numbering jumped from incremental to year based). Machines from the year ~2018 (+/- 1 for a single line) are still supported by this version of the OS. |
|
Thank you for the detailed explanation. |
| else() | ||
| target_sources(mumble_client_object_lib PRIVATE "Overlay_unix.cpp") | ||
| endif() | ||
| target_sources(mumble_client_object_lib PRIVATE "Overlay_unix.cpp") |
There was a problem hiding this comment.
Can we wrap this in a if NOT(APPLE) block? With the overlay option disabled there shouldn't be a hard dependency on the definition.
Krzmbrzl
left a comment
There was a problem hiding this comment.
See Davide's comment - other than that I guess this is fine.
|
@davidebeatrici @Hartmnt should we wait with merging this until we have split the 1.6 branch? I feel like this is a reasonably large change and I would probably feel better if it lived in |
Yep, 100%. 1.7.x as target |
Summary
CMAKE_OSX_DEPLOYMENT_TARGETfrom 10.15 to 14 (Sonoma), removing compatibility shims and dead code for macOS 10.5–10.14mach_override(no ARM support) and deprecated APIs likeAuthorizationExecuteWithPrivilegesNSSpeechSynthesizer(AppKit) withAVSpeechSynthesizer(AVFoundation), eliminating the manual utterance queue and delegate chainmach-overridesubmodule left behind after disabling the overlayCoreAudio.mmdeprecation pragma that is no longer needed afterkAudioObjectPropertyElementMastermigrationChanges by commit
5adac2d—BUILD(client): Raise macOS deployment target to 14 and disable overlaykAudioObjectPropertyElementMaster→kAudioObjectPropertyElementMainAudioDeviceGetProperty→AudioObjectGetPropertyData@available()guards for macOS 10.12/10.14NSAutoreleasePool→@autoreleasepoolblocksrespondsToSelector:checks for long-available APIsUSE_MAC_UNIVERSALpreprocessor guard in VersionCheck2231a65—REFAC(client): Replace deprecated NSSpeechSynthesizer with AVSpeechSynthesizerAVSpeechSynthesizerhas built-in utterance queuing, so the manualNSMutableArrayqueue and delegate chain are no longer needed5e7f82e—MAINT(client): Remove dead macOS overlay code, files, and submodule3rdparty/mach-override-srcsubmodule andmach-override-buildwrappermacx/scripts/andmacx/osax/directoryoverlay_glmacOS files and deadOverlay_macx.mmUSE_OVERLAYblocks and deadforwardEventslot fromGlobalShortcut_macx.mm/.hQ_OS_MACblocks fromOverlayClient.cpp/.handOverlayUserGroup.cppGlobalShortcut.cpp/.uiand translations#ifdefinSettings.cppCoreAudio.mmg15helper_macx.cTest plan
cmake -B build -Dserver=OFF -Dtests=ON && cmake --build build🤖 Generated with Claude Code