mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-13 20:28:21 +10:00
patchsets: Add handling for MacBookPro11,5 and iMac15,1
This commit is contained in:
@@ -14,7 +14,7 @@ class Constants:
|
||||
def __init__(self) -> None:
|
||||
# Patcher Versioning
|
||||
self.patcher_version: str = "1.6.0" # OpenCore-Legacy-Patcher
|
||||
self.patcher_support_pkg_version: str = "1.7.4" # PatcherSupportPkg
|
||||
self.patcher_support_pkg_version: str = "1.7.6" # PatcherSupportPkg
|
||||
self.copyright_date: str = "Copyright © 2020-2024 Dortania"
|
||||
self.patcher_name: str = "OpenCore Legacy Patcher"
|
||||
|
||||
|
||||
@@ -445,10 +445,10 @@ class HardwarePatchsetDetection:
|
||||
# During validation, don't skip missing items
|
||||
# This is to ensure we can validate all files
|
||||
if self._validation is False:
|
||||
if item.present() is False: # Skip if not present
|
||||
if item.present() is False: # Skip if not present
|
||||
continue
|
||||
if item.native_os() is True: # Skip if native OS
|
||||
continue
|
||||
if item.native_os() is True: # Skip if native OS
|
||||
continue
|
||||
present_hardware.append(item)
|
||||
|
||||
present_hardware = self._strip_incompatible_hardware(present_hardware)
|
||||
|
||||
@@ -31,6 +31,7 @@ class HardwareVariantGraphicsSubclass(StrEnum):
|
||||
NON_METAL_GRAPHICS: str = "Non-Metal Graphics"
|
||||
METAL_3802_GRAPHICS: str = "Metal 3802 Graphics"
|
||||
METAL_31001_GRAPHICS: str = "Metal 31001 Graphics"
|
||||
HEADLESS_GRAPHICS: str = "Headless Graphics"
|
||||
NOT_APPLICABLE: str = "N/A"
|
||||
|
||||
|
||||
|
||||
@@ -74,6 +74,18 @@ class AMDLegacyGCN(BaseHardware):
|
||||
"""
|
||||
Model specific patches
|
||||
"""
|
||||
# If 3802 GPU present, use stock Monterey bronze bundle even on Sequoia
|
||||
bronze_bundle_source = "12.5"
|
||||
if self._is_gpu_architecture_present(
|
||||
[
|
||||
device_probe.Intel.Archs.Ivy_Bridge,
|
||||
device_probe.Intel.Archs.Haswell,
|
||||
device_probe.NVIDIA.Archs.Kepler,
|
||||
]
|
||||
) is False:
|
||||
if self._xnu_major >= os_data.sequoia:
|
||||
bronze_bundle_source = "12.5-24"
|
||||
|
||||
return {
|
||||
"AMD Legacy GCN": {
|
||||
PatchType.INSTALL_SYSTEM_VOLUME: {
|
||||
@@ -91,7 +103,7 @@ class AMDLegacyGCN(BaseHardware):
|
||||
"AMDRadeonVADriver.bundle": "12.5",
|
||||
"AMDRadeonVADriver2.bundle": "12.5",
|
||||
"AMDRadeonX4000GLDriver.bundle": "12.5",
|
||||
"AMDMTLBronzeDriver.bundle": "12.5" if self._xnu_major < os_data.sequoia else "12.5-24",
|
||||
"AMDMTLBronzeDriver.bundle": bronze_bundle_source,
|
||||
"AMDShared.bundle": "12.5",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -21,6 +21,18 @@ class IntelHaswell(BaseHardware):
|
||||
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
|
||||
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
|
||||
|
||||
self._install_framebuffer_only = False
|
||||
|
||||
# Special case for iMac15,1
|
||||
if self._computer.real_model.startswith("iMac") and self._xnu_major >= os_data.sequoia.value and self._is_gpu_architecture_present(
|
||||
[
|
||||
device_probe.AMD.Archs.Legacy_GCN_7000,
|
||||
device_probe.AMD.Archs.Legacy_GCN_8000,
|
||||
device_probe.AMD.Archs.Legacy_GCN_9000,
|
||||
]
|
||||
):
|
||||
self._install_framebuffer_only = True
|
||||
|
||||
|
||||
def name(self) -> str:
|
||||
"""
|
||||
@@ -58,6 +70,8 @@ class IntelHaswell(BaseHardware):
|
||||
"""
|
||||
Type of hardware variant subclass
|
||||
"""
|
||||
if self._install_framebuffer_only is True:
|
||||
return HardwareVariantGraphicsSubclass.HEADLESS_GRAPHICS
|
||||
return HardwareVariantGraphicsSubclass.METAL_3802_GRAPHICS
|
||||
|
||||
|
||||
@@ -89,6 +103,21 @@ class IntelHaswell(BaseHardware):
|
||||
}
|
||||
|
||||
|
||||
def _framebuffer_only_patches(self) -> dict:
|
||||
"""
|
||||
Framebuffer only patches
|
||||
"""
|
||||
return {
|
||||
"Intel Haswell": {
|
||||
PatchType.INSTALL_SYSTEM_VOLUME: {
|
||||
"/System/Library/Extensions": {
|
||||
"AppleIntelFramebufferAzul.kext": self._resolve_monterey_framebuffers(),
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def patches(self) -> dict:
|
||||
"""
|
||||
Patches for Intel Haswell iGPUs
|
||||
@@ -96,6 +125,9 @@ class IntelHaswell(BaseHardware):
|
||||
if self.native_os() is True:
|
||||
return {}
|
||||
|
||||
if self._install_framebuffer_only is True:
|
||||
return {**self._framebuffer_only_patches()}
|
||||
|
||||
return {
|
||||
**LegacyMetal3802(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).patches(),
|
||||
**MontereyGVA(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).patches(),
|
||||
|
||||
@@ -117,6 +117,12 @@ class LegacyMetal3802(BaseSharedPatchSet):
|
||||
"CIPortraitBlurV3.metallib": "14.6.1",
|
||||
"ci_stdlib.metallib": "14.6.1",
|
||||
},
|
||||
"/System/Library/PrivateFrameworks/PhotosUICore.framework/Versions/A/Resources": {
|
||||
"default.metallib": "14.6.1",
|
||||
},
|
||||
"/System/Library/PrivateFrameworks/Tungsten.framework/Versions/A/Resources": {
|
||||
"default.metallib": "15.0 Beta 7",
|
||||
},
|
||||
"/System/iOSSupport/System/Library/PrivateFrameworks/VFX.framework/Versions/A/Resources": {
|
||||
"default.metallib": DynamicPatchset.MetallibSupportPkg,
|
||||
},
|
||||
@@ -243,9 +249,6 @@ class LegacyMetal3802(BaseSharedPatchSet):
|
||||
"/System/Library/PrivateFrameworks/NeutrinoCore.framework/Versions/A/Resources": {
|
||||
"default.metallib": DynamicPatchset.MetallibSupportPkg,
|
||||
},
|
||||
"/System/Library/PrivateFrameworks/Tungsten.framework/Versions/A/Resources": {
|
||||
"default.metallib": DynamicPatchset.MetallibSupportPkg,
|
||||
},
|
||||
"/System/Library/PrivateFrameworks/ImageHarmonizationKit.framework/Versions/A/Resources": {
|
||||
"default.metallib": DynamicPatchset.MetallibSupportPkg,
|
||||
},
|
||||
@@ -340,9 +343,6 @@ class LegacyMetal3802(BaseSharedPatchSet):
|
||||
"/System/Library/PrivateFrameworks/AltruisticBodyPoseKit.framework/Versions/A/Resources": {
|
||||
"default.metallib": DynamicPatchset.MetallibSupportPkg,
|
||||
},
|
||||
"/System/Library/PrivateFrameworks/PhotosUICore.framework/Versions/A/Resources": {
|
||||
"default.metallib": DynamicPatchset.MetallibSupportPkg,
|
||||
},
|
||||
"/System/Library/PrivateFrameworks/MusicUI.framework/Versions/A/Resources": {
|
||||
"default.metallib": DynamicPatchset.MetallibSupportPkg,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user