mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-24 20:10:14 +10:00
Add FeatureUnlock configurability
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
- Resolves Install USB Creation using incorrect installer
|
||||
- Resolves `installer` failing to extract InstallAssistant in older OSes
|
||||
- Resolves certain Samsung NVMe drives appearing as external on Mac Pros
|
||||
- Add FeatureUnlock configurability
|
||||
|
||||
## 0.3.3
|
||||
- Disable Asset Caching support with spoofless approach
|
||||
|
||||
BIN
payloads/Tools/OCLP-Helper
Executable file
BIN
payloads/Tools/OCLP-Helper
Executable file
Binary file not shown.
@@ -139,12 +139,6 @@ class BuildOpenCore:
|
||||
# IDE patch
|
||||
("AppleIntelPIIXATA.kext", self.constants.piixata_version, self.constants.piixata_path, lambda: "PATA" in smbios_data.smbios_dictionary[self.model]["Stock Storage"]),
|
||||
# Misc
|
||||
(
|
||||
"FeatureUnlock.kext",
|
||||
self.constants.featureunlock_version,
|
||||
self.constants.featureunlock_path,
|
||||
lambda: smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.kaby_lake.value,
|
||||
),
|
||||
("DebugEnhancer.kext", self.constants.debugenhancer_version, self.constants.debugenhancer_path, lambda: self.constants.kext_debug is True),
|
||||
("AppleUSBTrackpad.kext", self.constants.apple_trackpad, self.constants.apple_trackpad_path, lambda: self.model in ["MacBook4,1", "MacBook5,2"]),
|
||||
]:
|
||||
@@ -175,6 +169,14 @@ class BuildOpenCore:
|
||||
# Required for Lilu in 11.0+
|
||||
self.config["Kernel"]["Quirks"]["DisableLinkeditJettison"] = True
|
||||
|
||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.kaby_lake.value:
|
||||
if self.constants.fu_status is True:
|
||||
# Enable FeatureUnlock.kext
|
||||
self.enable_kext("FeatureUnlock.kext", self.constants.featureunlock_version, self.constants.featureunlock_path)
|
||||
if self.constants.fu_arguments is not None:
|
||||
print(f"- Adding additional FeatureUnlock args: {self.constants.fu_arguments}")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += self.constants.fu_arguments
|
||||
|
||||
if self.model in ["MacBookPro6,1", "MacBookPro6,2", "MacBookPro9,1", "MacBookPro10,1"]:
|
||||
# Modded RestrictEvents with displaypolicyd blocked to fix dGPU switching
|
||||
self.enable_kext("RestrictEvents.kext", self.constants.restrictevents_mbp_version, self.constants.restrictevents_mbp_path)
|
||||
|
||||
@@ -832,6 +832,40 @@ To disable SIP outright, set it to 0xFEF
|
||||
print("Invalid input, returning to previous menu")
|
||||
self.set_custom_sip_value()
|
||||
|
||||
def set_fu_settings(self):
|
||||
utilities.cls()
|
||||
utilities.header(["Set FeatureUnlock Settings"])
|
||||
print(
|
||||
"""
|
||||
By default OCLP will add a kext called FeatureUnlock to enable
|
||||
features locked out from older models. Including:
|
||||
|
||||
- AirPlay to Mac
|
||||
- SideCar
|
||||
- Night Shift
|
||||
|
||||
However for systems experiencing memory instability, disabling this
|
||||
kext can help.
|
||||
|
||||
Supported Options:
|
||||
|
||||
1. Enable FeatureUnlock and all patches
|
||||
2. Enable FeatureUnlock and disable AirPlay to Mac and SideCar
|
||||
3. Disable FeatureUnlock
|
||||
"""
|
||||
)
|
||||
change_menu = input("Set FeatreUnlock (ie. 1): ")
|
||||
if change_menu == "1":
|
||||
self.constants.fu_status = True
|
||||
self.constants.fu_arguments = ""
|
||||
elif change_menu == "2":
|
||||
self.constants.fu_status = True
|
||||
self.constants.fu_arguments = " -disable_sidecar_mac"
|
||||
elif change_menu == "3":
|
||||
self.constants.fu_status = False
|
||||
else:
|
||||
print("Invalid input, returning to previous menu")
|
||||
self.set_fu_settings()
|
||||
|
||||
def credits(self):
|
||||
utilities.TUIOnlyPrint(
|
||||
@@ -1054,7 +1088,7 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
|
||||
[f"Set Hibernation Workaround:\tCurrently {self.constants.disable_connectdrivers}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_hibernation_workaround],
|
||||
[f"Disable Battery Throttling:\tCurrently {self.constants.disable_msr_power_ctl}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_battery_throttle],
|
||||
[f"Set Software Demux:\tCurrently {self.constants.software_demux}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_software_demux],
|
||||
|
||||
[f"Set FeatureUnlock: \tCurrently {self.constants.fu_status}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_fu_settings],
|
||||
]
|
||||
|
||||
for option in options:
|
||||
|
||||
@@ -120,6 +120,10 @@ class Constants:
|
||||
self.serial_settings = "None" # Set SMBIOS level used
|
||||
self.override_smbios = "Default" # Set SMBIOS model used
|
||||
|
||||
## FeatureUnlock Settings
|
||||
self.fu_status = True # Enable FeatureUnlock
|
||||
self.fu_arguments = "" # Set FeatureUnlock arguments
|
||||
|
||||
## Latebloom Settings
|
||||
self.latebloom_status = False # Latebloom Enabled
|
||||
self.latebloom_delay = 0 # Delay between each PCIe Probe
|
||||
@@ -225,6 +229,10 @@ class Constants:
|
||||
def list_txt_path(self):
|
||||
return self.payload_path / Path("List.txt")
|
||||
|
||||
@property
|
||||
def installer_sh_path(self):
|
||||
return self.payload_path / Path("Installer.sh")
|
||||
|
||||
# Kexts
|
||||
@property
|
||||
def payload_kexts_path(self):
|
||||
@@ -480,6 +488,10 @@ class Constants:
|
||||
def ocvalidate_path(self):
|
||||
return self.payload_path / Path(f"Tools/ocvalidate-{self.opencore_version}")
|
||||
|
||||
@property
|
||||
def oclp_helper_path(self):
|
||||
return self.payload_path / Path("Tools/OCLP-Helper")
|
||||
|
||||
# Icons
|
||||
@property
|
||||
def app_icon_path(self):
|
||||
|
||||
Reference in New Issue
Block a user