mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-20 22:20:53 +10:00
Fix set_defaults incorrectly disabling SIP
This commit is contained in:
+30
-30
@@ -38,36 +38,36 @@ class OpenCoreLegacyPatcher:
|
|||||||
self.constants.secure_status = False # Default false for Monterey
|
self.constants.secure_status = False # Default false for Monterey
|
||||||
self.constants.disable_amfi = False
|
self.constants.disable_amfi = False
|
||||||
|
|
||||||
if (
|
if model in ModelArray.LegacyGPU:
|
||||||
model in ModelArray.LegacyGPU
|
if (
|
||||||
and host_is_target
|
host_is_target
|
||||||
and self.computer.dgpu.arch
|
and self.computer.dgpu.arch
|
||||||
in [
|
in [
|
||||||
device_probe.AMD.Archs.Legacy_GCN,
|
device_probe.AMD.Archs.Legacy_GCN,
|
||||||
device_probe.AMD.Archs.Polaris,
|
device_probe.AMD.Archs.Polaris,
|
||||||
device_probe.AMD.Archs.Vega,
|
device_probe.AMD.Archs.Vega,
|
||||||
device_probe.AMD.Archs.Navi,
|
device_probe.AMD.Archs.Navi,
|
||||||
device_probe.NVIDIA.Archs.Kepler,
|
device_probe.NVIDIA.Archs.Kepler,
|
||||||
]
|
]
|
||||||
):
|
):
|
||||||
# Building on device and we have a native, supported GPU
|
# Building on device and we have a native, supported GPU
|
||||||
self.constants.sip_status = True
|
self.constants.sip_status = True
|
||||||
# self.constants.secure_status = True # Monterey
|
# self.constants.secure_status = True # Monterey
|
||||||
self.constants.disable_amfi = False
|
self.constants.disable_amfi = False
|
||||||
else:
|
else:
|
||||||
self.constants.sip_status = False # Unsigned kexts
|
self.constants.sip_status = False # Unsigned kexts
|
||||||
self.constants.secure_status = False # Root volume modified
|
self.constants.secure_status = False # Root volume modified
|
||||||
self.constants.disable_amfi = True # Unsigned binaries
|
self.constants.disable_amfi = True # Unsigned binaries
|
||||||
|
if model in ModelArray.ModernGPU:
|
||||||
if model in ModelArray.ModernGPU and host_is_target and model in ["iMac13,1", "iMac13,3"] and self.computer.dgpu:
|
if host_is_target and model in ["iMac13,1", "iMac13,3"] and self.computer.dgpu:
|
||||||
# Some models have a supported dGPU, others don't
|
# Some models have a supported dGPU, others don't
|
||||||
self.constants.sip_status = True
|
self.constants.sip_status = True
|
||||||
# self.constants.secure_status = True # Monterey
|
# self.constants.secure_status = True # Monterey
|
||||||
self.constants.disable_amfi = False
|
#self.constants.disable_amfi = False # Signed bundles, Don't need to explicitly set currently
|
||||||
else:
|
else:
|
||||||
self.constants.sip_status = False # Unsigned kexts
|
self.constants.sip_status = False # Unsigned kexts
|
||||||
self.constants.secure_status = False # Modified root volume
|
self.constants.secure_status = False # Modified root volume
|
||||||
self.constants.disable_amfi = False # Signed bundles
|
#self.constants.disable_amfi = False # Signed bundles, Don't need to explicitly set currently
|
||||||
|
|
||||||
def build_opencore(self):
|
def build_opencore(self):
|
||||||
Build.BuildOpenCore(self.constants.custom_model or self.constants.computer.real_model, self.constants).build_opencore()
|
Build.BuildOpenCore(self.constants.custom_model or self.constants.computer.real_model, self.constants).build_opencore()
|
||||||
|
|||||||
Reference in New Issue
Block a user