mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-20 14:10:51 +10:00
Increment PatcherSupportPkg
This commit is contained in:
@@ -15,12 +15,14 @@
|
|||||||
- WhateverGreen 1.5.6 - release
|
- WhateverGreen 1.5.6 - release
|
||||||
- Lilu 1.5.9 - release
|
- Lilu 1.5.9 - release
|
||||||
- gfxutil 1.8.2b - release
|
- gfxutil 1.8.2b - release
|
||||||
|
- PatcherSupportPkg 0.2.9 - release
|
||||||
- Re-add Content Caching support for VMM-spoofed systems
|
- Re-add Content Caching support for VMM-spoofed systems
|
||||||
- Add wxPython Based GUI
|
- Add wxPython Based GUI
|
||||||
- Superceeds Obj-C Based GUI
|
- Superceeds Obj-C Based GUI
|
||||||
- Both standard and offline builds provided
|
- Both standard and offline builds provided
|
||||||
- Allow optional spoofing on native Models
|
- Allow optional spoofing on native Models
|
||||||
- Recommended for systems that cannot update their firmware natively (ie. dead internal drive)
|
- Recommended for systems that cannot update their firmware natively (ie. dead internal drive)
|
||||||
|
- Add Dropbox fix for non-Metal on Monterey
|
||||||
|
|
||||||
## 0.3.3
|
## 0.3.3
|
||||||
- Disable Asset Caching support with spoofless approach
|
- Disable Asset Caching support with spoofless approach
|
||||||
|
|||||||
+13
-5
@@ -15,7 +15,7 @@ class Constants:
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
# Patcher Versioning
|
# Patcher Versioning
|
||||||
self.patcher_version = "0.3.4" # OpenCore-Legacy-Patcher
|
self.patcher_version = "0.3.4" # OpenCore-Legacy-Patcher
|
||||||
self.patcher_support_pkg_version = "0.2.8" # PatcherSupportPkg
|
self.patcher_support_pkg_version = "0.2.9" # 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/"
|
||||||
self.discord_link = "https://discord.gg/rqdPgH8xSN"
|
self.discord_link = "https://discord.gg/rqdPgH8xSN"
|
||||||
@@ -548,6 +548,10 @@ class Constants:
|
|||||||
def payload_apple_libexec_path(self):
|
def payload_apple_libexec_path(self):
|
||||||
return self.payload_apple_usr_path / Path("libexec")
|
return self.payload_apple_usr_path / Path("libexec")
|
||||||
|
|
||||||
|
@property
|
||||||
|
def payload_apple_application_support(self):
|
||||||
|
return self.payload_apple_root_path / Path("Application Support")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def payload_apple_private_path(self):
|
def payload_apple_private_path(self):
|
||||||
return self.payload_apple_root_path / Path("private")
|
return self.payload_apple_root_path / Path("private")
|
||||||
@@ -670,12 +674,16 @@ class Constants:
|
|||||||
return self.payload_apple_libexec_path / Path("Legacy-Wifi")
|
return self.payload_apple_libexec_path / Path("Legacy-Wifi")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def legacy_wifi_etc(self):
|
def legacy_wifi_support(self):
|
||||||
return self.payload_apple_etc_path / Path("Legacy-Wifi")
|
return self.payload_apple_application_support / Path("Legacy-Wifi")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def legacy_keyboard_backlight_etc(self):
|
def legacy_keyboard_backlight_support(self):
|
||||||
return self.payload_apple_etc_path / Path("Keyboard-Backlight")
|
return self.payload_apple_application_support / Path("Keyboard-Backlight")
|
||||||
|
|
||||||
|
@property
|
||||||
|
def legacy_dropbox_support(self):
|
||||||
|
return self.payload_apple_application_support / Path("Dropbox")
|
||||||
|
|
||||||
sbm_values = [
|
sbm_values = [
|
||||||
"j137ap", # iMacPro1,1
|
"j137ap", # iMacPro1,1
|
||||||
|
|||||||
+12
-52
@@ -62,6 +62,7 @@ class PatchSysVolume:
|
|||||||
self.mount_libexec = f"{self.mount_location}/usr/libexec"
|
self.mount_libexec = f"{self.mount_location}/usr/libexec"
|
||||||
self.mount_extensions_mux = f"{self.mount_location}/System/Library/Extensions/AppleGraphicsControl.kext/Contents/PlugIns/"
|
self.mount_extensions_mux = f"{self.mount_location}/System/Library/Extensions/AppleGraphicsControl.kext/Contents/PlugIns/"
|
||||||
self.mount_private_etc = f"{self.mount_location_data}/private/etc"
|
self.mount_private_etc = f"{self.mount_location_data}/private/etc"
|
||||||
|
self.mount_application_support = f"{self.mount_location_data}/Library/Application Support"
|
||||||
|
|
||||||
def find_mount_root_vol(self, patch):
|
def find_mount_root_vol(self, patch):
|
||||||
self.root_mount_path = utilities.get_disk_path()
|
self.root_mount_path = utilities.get_disk_path()
|
||||||
@@ -217,26 +218,6 @@ class PatchSysVolume:
|
|||||||
self.manual_root_patch_revert()
|
self.manual_root_patch_revert()
|
||||||
|
|
||||||
def rebuild_snapshot(self):
|
def rebuild_snapshot(self):
|
||||||
# Grab List.txt if appropriate
|
|
||||||
dylib_list = self.build_skylight_plugin_list()
|
|
||||||
if dylib_list is not None:
|
|
||||||
print("- Updating SkyLightPlugins List.txt")
|
|
||||||
if (Path(self.mount_private_etc) / Path("SkyLightPlugins/List.txt")).exists():
|
|
||||||
print("- Removing existing List.txt")
|
|
||||||
utilities.process_status(
|
|
||||||
utilities.elevated(
|
|
||||||
["rm", "-f", f"{self.mount_private_etc}/SkyLightPlugins/List.txt"],
|
|
||||||
stdout=subprocess.PIPE,
|
|
||||||
stderr=subprocess.STDOUT,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
utilities.process_status(
|
|
||||||
utilities.elevated(
|
|
||||||
["cp", dylib_list, f"{self.mount_private_etc}/SkyLightPlugins/"],
|
|
||||||
stdout=subprocess.PIPE,
|
|
||||||
stderr=subprocess.STDOUT,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
print("- Rebuilding Kernel Cache (This may take some time)")
|
print("- Rebuilding Kernel Cache (This may take some time)")
|
||||||
if self.constants.detected_os > os_data.os_data.catalina:
|
if self.constants.detected_os > os_data.os_data.catalina:
|
||||||
result = utilities.elevated(["kmutil", "install", "--volume-root", self.mount_location, "--update-all"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
result = utilities.elevated(["kmutil", "install", "--volume-root", self.mount_location, "--update-all"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
@@ -318,35 +299,7 @@ set million colour before rebooting"""
|
|||||||
utilities.process_status(utilities.elevated(["cp", "-R", f"{vendor_location}/{add_current_kext}", self.mount_extensions], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
utilities.process_status(utilities.elevated(["cp", "-R", f"{vendor_location}/{add_current_kext}", self.mount_extensions], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||||
utilities.process_status(utilities.elevated(["chmod", "-Rf", "755", f"{self.mount_extensions}/{add_current_kext}"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
utilities.process_status(utilities.elevated(["chmod", "-Rf", "755", f"{self.mount_extensions}/{add_current_kext}"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||||
utilities.process_status(utilities.elevated(["chown", "-Rf", "root:wheel", f"{self.mount_extensions}/{add_current_kext}"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
utilities.process_status(utilities.elevated(["chown", "-Rf", "root:wheel", f"{self.mount_extensions}/{add_current_kext}"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||||
|
|
||||||
def build_skylight_plugin_list(self):
|
|
||||||
# ASentientBot's Skylight system support injecting additional dylibs into macOS
|
|
||||||
# To do so, it parses the List.txt file in '/private/etc/SkyLightPlugins/'
|
|
||||||
# The format of this file is:
|
|
||||||
# <plugin path> : <plugin name>
|
|
||||||
# Parse all dylibs in /private/etc/SkyLightPlugins/, generate an appropriate List.txt
|
|
||||||
|
|
||||||
skylight_plugins = []
|
|
||||||
if self.constants.list_txt_path.exists():
|
|
||||||
self.constants.list_txt_path.unlink()
|
|
||||||
|
|
||||||
if (Path(self.mount_private_etc) / Path("SkyLightPlugins")).exists():
|
|
||||||
for file in (Path(self.mount_private_etc) / Path("SkyLightPlugins")).glob("*.dylib"):
|
|
||||||
skylight_plugins.append(file.name)
|
|
||||||
if len(skylight_plugins) > 0:
|
|
||||||
with open(self.constants.list_txt_path, "w") as f:
|
|
||||||
for plugin in skylight_plugins:
|
|
||||||
try:
|
|
||||||
path = dylib_data.shim_list.shim_pathing[plugin]
|
|
||||||
print(f"- Adding {plugin} to list.txt")
|
|
||||||
f.write(f"{path} : {plugin}\n")
|
|
||||||
except KeyError:
|
|
||||||
print(f"- Skipping {plugin}, unknown pathing")
|
|
||||||
continue
|
|
||||||
return self.constants.list_txt_path
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def add_brightness_patch(self):
|
def add_brightness_patch(self):
|
||||||
self.delete_old_binaries(sys_patch_data.DeleteBrightness)
|
self.delete_old_binaries(sys_patch_data.DeleteBrightness)
|
||||||
self.add_new_binaries(sys_patch_data.AddBrightness, self.constants.legacy_brightness)
|
self.add_new_binaries(sys_patch_data.AddBrightness, self.constants.legacy_brightness)
|
||||||
@@ -374,8 +327,8 @@ set million colour before rebooting"""
|
|||||||
# dylib patch to resolve password crash prompt
|
# dylib patch to resolve password crash prompt
|
||||||
# Note requires ASentientBot's SkyLight to function
|
# Note requires ASentientBot's SkyLight to function
|
||||||
# Thus Metal machines do not benefit from this patch, however install anyways as harmless
|
# Thus Metal machines do not benefit from this patch, however install anyways as harmless
|
||||||
print("- Merging Wireless private/etc")
|
print("- Merging Wireless SkyLightPlugins")
|
||||||
utilities.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.legacy_wifi_etc}/", self.mount_private_etc], stdout=subprocess.PIPE)
|
utilities.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.legacy_wifi_support}/", self.mount_application_support], stdout=subprocess.PIPE)
|
||||||
|
|
||||||
def add_legacy_mux_patch(self):
|
def add_legacy_mux_patch(self):
|
||||||
self.delete_old_binaries(sys_patch_data.DeleteDemux)
|
self.delete_old_binaries(sys_patch_data.DeleteDemux)
|
||||||
@@ -385,8 +338,12 @@ set million colour before rebooting"""
|
|||||||
)
|
)
|
||||||
|
|
||||||
def add_legacy_keyboard_backlight_patch(self):
|
def add_legacy_keyboard_backlight_patch(self):
|
||||||
print("- Merging Backlight private/etc")
|
print("- Merging Keyboard Backlight SkyLightPlugins")
|
||||||
utilities.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.legacy_keyboard_backlight_etc}/", self.mount_private_etc], stdout=subprocess.PIPE)
|
utilities.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.legacy_keyboard_backlight_support}/", self.mount_application_support], stdout=subprocess.PIPE)
|
||||||
|
|
||||||
|
def add_legacy_dropbox_patch(self):
|
||||||
|
print("- Merging DropboxHack SkyLightPlugins")
|
||||||
|
utilities.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.legacy_dropbox_support}/", self.mount_application_support], stdout=subprocess.PIPE)
|
||||||
|
|
||||||
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:
|
||||||
@@ -545,6 +502,9 @@ set million colour before rebooting"""
|
|||||||
utilities.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_private_frameworks_path_legacy_drm}/", self.mount_private_frameworks], stdout=subprocess.PIPE)
|
utilities.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_private_frameworks_path_legacy_drm}/", self.mount_private_frameworks], stdout=subprocess.PIPE)
|
||||||
|
|
||||||
def gpu_accel_legacy_extended(self):
|
def gpu_accel_legacy_extended(self):
|
||||||
|
if self.constants.detected_os == os_data.os_data.monterey:
|
||||||
|
self.add_legacy_dropbox_patch()
|
||||||
|
|
||||||
print("- Merging general legacy Frameworks")
|
print("- Merging general legacy Frameworks")
|
||||||
utilities.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_frameworks_path_accel}/", self.mount_frameworks], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
utilities.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_frameworks_path_accel}/", self.mount_frameworks], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
if self.constants.detected_os > os_data.os_data.big_sur:
|
if self.constants.detected_os > os_data.os_data.big_sur:
|
||||||
|
|||||||
Reference in New Issue
Block a user