diff --git a/meson.build b/meson.build index da051b7d91..f9c29cdaa8 100644 --- a/meson.build +++ b/meson.build @@ -1498,23 +1498,8 @@ sys.stdout.write(swift_ver) message('Detected Swift version: ' + swift_ver) endif -macos_10_11_features = get_option('macos-10-11-features').require( - macos_sdk_version.version_compare('>=10.11'), - error_message: 'a suitable macos sdk version could not be found!', -) - -macos_10_12_2_features = get_option('macos-10-12-2-features').require( - macos_sdk_version.version_compare('>=10.12.2'), - error_message: 'a suitable macos sdk version could not be found!', -) - -macos_10_14_features = get_option('macos-10-14-features').require( - macos_sdk_version.version_compare('>=10.14'), - error_message: 'a suitable macos sdk version could not be found!', -) - swift = get_option('swift-build').require( - darwin and macos_sdk_version.version_compare('>=10.10') and swift_ver.version_compare('>=4.1'), + darwin and macos_sdk_version.version_compare('>= 10.15') and swift_ver.version_compare('>= 4.1'), error_message: 'A suitable macos sdk version or swift version could not be found!', ) features += {'swift': swift.allowed()} @@ -1549,8 +1534,8 @@ if features['cocoa'] and features['vulkan'] and features['swift'] endif macos_media_player = get_option('macos-media-player').require( - macos_10_12_2_features.allowed() and features['swift'], - error_message: 'Either the macos sdk version is not at least 10.12.2 or swift was not found!', + features['swift'], + error_message: 'Swift was not found!', ) features += {'macos-media-player': macos_media_player.allowed()} if features['macos-media-player'] diff --git a/meson_options.txt b/meson_options.txt index f50c55e738..83cb111e82 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -104,9 +104,6 @@ option('videotoolbox-gl', type: 'feature', value: 'auto', description: 'Videotoo option('vulkan-interop', type: 'feature', value: 'auto', description: 'Vulkan graphics interop') # macOS features -option('macos-10-11-features', type: 'feature', value: 'auto', description: 'macOS 10.11 SDK Features') -option('macos-10-12-2-features', type: 'feature', value: 'auto', description: 'macOS 10.12.2 SDK Features') -option('macos-10-14-features', type: 'feature', value: 'auto', description: 'macOS 10.14 SDK Features') option('macos-cocoa-cb', type: 'feature', value: 'auto', description: 'macOS libmpv backend') option('macos-media-player', type: 'feature', value: 'auto', description: 'macOS Media Player support') option('macos-touchbar', type: 'feature', value: 'auto', description: 'macOS Touch Bar support') diff --git a/osdep/macos/swift_compat.swift b/osdep/macos/swift_compat.swift index 24c00b0ae1..1c8f28f810 100644 --- a/osdep/macos/swift_compat.swift +++ b/osdep/macos/swift_compat.swift @@ -15,23 +15,6 @@ * License along with mpv. If not, see . */ -#if !HAVE_MACOS_10_14_FEATURES -extension NSAppearance.Name { - static let darkAqua: NSAppearance.Name = NSAppearance.Name(rawValue: "NSAppearanceNameDarkAqua") - static let accessibilityHighContrastAqua: NSAppearance.Name = NSAppearance.Name(rawValue: "NSAppearanceNameAccessibilityAqua") - static let accessibilityHighContrastDarkAqua: NSAppearance.Name = NSAppearance.Name(rawValue: "NSAppearanceNameAccessibilityDarkAqua") - static let accessibilityHighContrastVibrantLight: NSAppearance.Name = NSAppearance.Name(rawValue: "NSAppearanceNameAccessibilityVibrantLight") - static let accessibilityHighContrastVibrantDark: NSAppearance.Name = NSAppearance.Name(rawValue: "NSAppearanceNameAccessibilityVibrantDark") -} - -@available(OSX 10.12, *) -extension String { - static let RGBA16Float: String = kCAContentsFormatRGBA16Float - static let RGBA8Uint: String = kCAContentsFormatRGBA8Uint - static let gray8Uint: String = kCAContentsFormatGray8Uint -} -#endif - extension NSPasteboard.PasteboardType { static let fileURLCompat: NSPasteboard.PasteboardType = { if #available(OSX 10.13, *) { diff --git a/osdep/meson.build b/osdep/meson.build index 60fc2f6d57..21baafccdd 100644 --- a/osdep/meson.build +++ b/osdep/meson.build @@ -19,14 +19,6 @@ if get_option('optimization') != '0' swift_flags += '-O' endif -if macos_10_11_features.allowed() - swift_flags += ['-D', 'HAVE_MACOS_10_11_FEATURES'] -endif - -if macos_10_14_features.allowed() - swift_flags += ['-D', 'HAVE_MACOS_10_14_FEATURES'] -endif - extra_flags = get_option('swift-flags').split() swift_flags += extra_flags diff --git a/video/out/mac/title_bar.swift b/video/out/mac/title_bar.swift index e49c2bb99c..945c8f371b 100644 --- a/video/out/mac/title_bar.swift +++ b/video/out/mac/title_bar.swift @@ -200,11 +200,7 @@ class TitleBar: NSVisualEffectView { return NSAppearance(named: .accessibilityHighContrastVibrantDark) case "0", "auto": fallthrough default: -#if HAVE_MACOS_10_14_FEATURES return nil -#else - break -#endif } } @@ -221,7 +217,6 @@ class TitleBar: NSVisualEffectView { default: break } -#if HAVE_MACOS_10_11_FEATURES if #available(macOS 10.11, *) { switch string { case "2,", "menu": return .menu @@ -232,8 +227,7 @@ class TitleBar: NSVisualEffectView { default: break } } -#endif -#if HAVE_MACOS_10_14_FEATURES + if #available(macOS 10.14, *) { switch string { case "5,", "headerView": return .headerView @@ -248,7 +242,6 @@ class TitleBar: NSVisualEffectView { default: break } } -#endif return .titlebar }