mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-23 19:40:15 +10:00
Sync PatcherSupportPkg
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
- OpenCore 0.7.5 - release
|
- OpenCore 0.7.5 - release
|
||||||
- BrcmPatchRAM 2.6.1 - release
|
- BrcmPatchRAM 2.6.1 - release
|
||||||
- WhateverGreen 1.5.5 - release
|
- WhateverGreen 1.5.5 - release
|
||||||
- PatcherSupportPkg 0.2.5 - release
|
- PatcherSupportPkg 0.2.6 - release
|
||||||
- FeatureUnlock 1.0.4 - rolling (4161389)
|
- FeatureUnlock 1.0.4 - rolling (4161389)
|
||||||
- Fix AirPlay to Mac on macOS 12.1
|
- Fix AirPlay to Mac on macOS 12.1
|
||||||
- Add macOS InstallAssistant downloader to TUI
|
- Add macOS InstallAssistant downloader to TUI
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class Constants:
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
# Patcher Versioning
|
# Patcher Versioning
|
||||||
self.patcher_version = "0.3.2" # OpenCore-Legacy-Patcher
|
self.patcher_version = "0.3.2" # OpenCore-Legacy-Patcher
|
||||||
self.patcher_support_pkg_version = "0.2.5" # PatcherSupportPkg
|
self.patcher_support_pkg_version = "0.2.6" # PatcherSupportPkg
|
||||||
self.url_patcher_support_pkg = "https://github.com/dortania/PatcherSupportPkg/releases/download/"
|
self.url_patcher_support_pkg = "https://github.com/dortania/PatcherSupportPkg/releases/download/"
|
||||||
self.nightly_url_patcher_support_pkg = "https://nightly.link/dortania/PatcherSupportPkg/workflows/build/master/"
|
self.nightly_url_patcher_support_pkg = "https://nightly.link/dortania/PatcherSupportPkg/workflows/build/master/"
|
||||||
|
|
||||||
@@ -644,6 +644,10 @@ class Constants:
|
|||||||
@property
|
@property
|
||||||
def legacy_wifi_etc(self):
|
def legacy_wifi_etc(self):
|
||||||
return self.payload_apple_etc_path / Path("Legacy-Wifi")
|
return self.payload_apple_etc_path / Path("Legacy-Wifi")
|
||||||
|
|
||||||
|
@property
|
||||||
|
def legacy_keyboard_backlight_lauchd(self):
|
||||||
|
return self.payload_apple_lauchd_path / Path("Keyboard-Backlight")
|
||||||
|
|
||||||
sbm_values = [
|
sbm_values = [
|
||||||
"j137ap", # iMacPro1,1
|
"j137ap", # iMacPro1,1
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ from pathlib import Path
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
from resources import constants, device_probe, utilities, generate_smbios
|
from resources import constants, device_probe, utilities, generate_smbios
|
||||||
from data import sip_data, sys_patch_data, model_array, os_data
|
from data import sip_data, sys_patch_data, model_array, os_data, smbios_data, cpu_data
|
||||||
|
|
||||||
|
|
||||||
class PatchSysVolume:
|
class PatchSysVolume:
|
||||||
@@ -38,6 +38,7 @@ class PatchSysVolume:
|
|||||||
self.legacy_audio = False
|
self.legacy_audio = False
|
||||||
self.legacy_wifi = False
|
self.legacy_wifi = False
|
||||||
self.legacy_gmux = False
|
self.legacy_gmux = False
|
||||||
|
self.legacy_keyboard_backlight = False
|
||||||
self.added_legacy_kexts = False
|
self.added_legacy_kexts = False
|
||||||
self.amfi_must_disable = False
|
self.amfi_must_disable = False
|
||||||
self.check_board_id = False
|
self.check_board_id = False
|
||||||
@@ -334,6 +335,14 @@ set million colour before rebooting"""
|
|||||||
utilities.process_status(
|
utilities.process_status(
|
||||||
utilities.elevated(["cp", "-R", f"{self.constants.legacy_mux_path}/AppleMuxControl.kext", self.mount_extensions_mux], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
utilities.elevated(["cp", "-R", f"{self.constants.legacy_mux_path}/AppleMuxControl.kext", self.mount_extensions_mux], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def add_legacy_keyboard_backlight_patch(self):
|
||||||
|
print("- Adding Backlight-Fixup.plist")
|
||||||
|
utilities.process_status(
|
||||||
|
utilities.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.legacy_keyboard_backlight_lauchd}/", self.mount_lauchd], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
|
)
|
||||||
|
utilities.process_status(utilities.elevated(["chmod", "755", f"{self.mount_lauchd}/Backlight-Fixup.plist"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||||
|
utilities.process_status(utilities.elevated(["chown", "root:wheel", f"{self.mount_lauchd}/Backlight-Fixup.plist"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||||
|
|
||||||
def gpu_accel_legacy(self):
|
def gpu_accel_legacy(self):
|
||||||
if self.constants.detected_os == os_data.os_data.mojave:
|
if self.constants.detected_os == os_data.os_data.mojave:
|
||||||
@@ -616,6 +625,10 @@ set million colour before rebooting"""
|
|||||||
if self.legacy_gmux is True:
|
if self.legacy_gmux is True:
|
||||||
print("- Installing Legacy Mux Brightness support")
|
print("- Installing Legacy Mux Brightness support")
|
||||||
self.add_legacy_mux_patch()
|
self.add_legacy_mux_patch()
|
||||||
|
|
||||||
|
if self.legacy_keyboard_backlight is True:
|
||||||
|
print("- Installing Legacy Keyboard Backlight support")
|
||||||
|
self.add_legacy_keyboard_backlight_patch()
|
||||||
|
|
||||||
if self.validate is False:
|
if self.validate is False:
|
||||||
self.rebuild_snapshot()
|
self.rebuild_snapshot()
|
||||||
@@ -695,6 +708,7 @@ set million colour before rebooting"""
|
|||||||
if self.constants.detected_os > non_metal_os:
|
if self.constants.detected_os > non_metal_os:
|
||||||
self.nvidia_legacy = True
|
self.nvidia_legacy = True
|
||||||
self.amfi_must_disable = True
|
self.amfi_must_disable = True
|
||||||
|
self.legacy_keyboard_backlight = self.check_legacy_keyboard_backlight()
|
||||||
elif gpu.arch == device_probe.NVIDIA.Archs.Kepler:
|
elif gpu.arch == device_probe.NVIDIA.Archs.Kepler:
|
||||||
if self.constants.detected_os > os_data.os_data.big_sur:
|
if self.constants.detected_os > os_data.os_data.big_sur:
|
||||||
# Kepler drivers were dropped with Beta 7
|
# Kepler drivers were dropped with Beta 7
|
||||||
@@ -753,6 +767,17 @@ set million colour before rebooting"""
|
|||||||
if igpu and not dgpu:
|
if igpu and not dgpu:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def check_legacy_keyboard_backlight(self):
|
||||||
|
# With Big Sur and newer, Skylight patch set unfortunately breaks native keyboard backlight
|
||||||
|
# Penryn Macs are able to re-enable the keyboard backlight by simply running '/usr/libexec/TouchBarServer'
|
||||||
|
# For Arrendale and newer, this has no effect.
|
||||||
|
if self.model.startswith("MacBookPro") or self.model.startswith("MacBookAir"):
|
||||||
|
# non-Metal MacBooks never had keyboard backlight
|
||||||
|
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.penryn.value:
|
||||||
|
if self.constants.detected_os > os_data.os_data.catalina:
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
def detect_patch_set(self):
|
def detect_patch_set(self):
|
||||||
self.detect_gpus()
|
self.detect_gpus()
|
||||||
@@ -811,6 +836,8 @@ set million colour before rebooting"""
|
|||||||
print("- Add legacy WiFi Control")
|
print("- Add legacy WiFi Control")
|
||||||
if self.legacy_gmux is True:
|
if self.legacy_gmux is True:
|
||||||
print("- Add Legacy Mux Brightness Control")
|
print("- Add Legacy Mux Brightness Control")
|
||||||
|
if self.legacy_keyboard_backlight is True:
|
||||||
|
print("- Add Legacy Keyboard Backlight Control")
|
||||||
|
|
||||||
self.no_patch = not any(
|
self.no_patch = not any(
|
||||||
[
|
[
|
||||||
|
|||||||
Reference in New Issue
Block a user