mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-18 21:30:00 +10:00
Merge branch 'main' into ventura-alpha
This commit is contained in:
@@ -12,7 +12,7 @@ from data import os_data
|
||||
class Constants:
|
||||
def __init__(self):
|
||||
# Patcher Versioning
|
||||
self.patcher_version = "0.4.8" # OpenCore-Legacy-Patcher
|
||||
self.patcher_version = "0.4.10" # OpenCore-Legacy-Patcher
|
||||
self.patcher_support_pkg_version = "0.5.1" # PatcherSupportPkg
|
||||
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/"
|
||||
|
||||
@@ -384,6 +384,7 @@ class detect_root_patch:
|
||||
required_patches.update({"Intel Sandy Bridge": all_hardware_patchset["Graphics"]["Intel Sandy Bridge"]})
|
||||
if hardware_details["Graphics: Intel Ivy Bridge"] is True:
|
||||
required_patches.update({"Metal Common": all_hardware_patchset["Graphics"]["Metal Common"]})
|
||||
required_patches.update({"Modern GVA": all_hardware_patchset["Graphics"]["Modern GVA"]})
|
||||
required_patches.update({"Intel Ivy Bridge": all_hardware_patchset["Graphics"]["Intel Ivy Bridge"]})
|
||||
if hardware_details["Graphics: Intel Haswell"] is True:
|
||||
required_patches.update({"Metal Common": all_hardware_patchset["Graphics"]["Metal Common"]})
|
||||
@@ -405,12 +406,16 @@ class detect_root_patch:
|
||||
required_patches.update({"Non-Metal Enforcement": all_hardware_patchset["Graphics"]["Non-Metal Enforcement"]})
|
||||
if hardware_details["Graphics: Nvidia Kepler"] is True:
|
||||
required_patches.update({"Metal Common": all_hardware_patchset["Graphics"]["Metal Common"]})
|
||||
required_patches.update({"Nvidia Kepler": all_hardware_patchset["Graphics"]["Nvidia Kepler"]})
|
||||
required_patches.update({"Modern GVA": all_hardware_patchset["Graphics"]["Modern GVA"]})
|
||||
required_patches.update({"Nvidia Kepler (Kernel Space)": all_hardware_patchset["Graphics"]["Nvidia Kepler (Kernel Space)"]})
|
||||
required_patches.update({"Nvidia Kepler (Userspace)": all_hardware_patchset["Graphics"]["Nvidia Kepler (Userspace)"]})
|
||||
for gpu in self.constants.computer.gpus:
|
||||
# Handle mixed GPU situations (ie. MacBookPro11,3: Haswell iGPU + Kepler dGPU)
|
||||
if gpu.arch == device_probe.Intel.Archs.Haswell:
|
||||
if "Modern GVA" in required_patches:
|
||||
del(required_patches["Modern GVA"])
|
||||
required_patches.update({"GVA Work-Around": all_hardware_patchset["Graphics"]["GVA Work-Around"]})
|
||||
if "GVA Work-Around" not in required_patches:
|
||||
required_patches.update({"Modern GVA": all_hardware_patchset["Graphics"]["Modern GVA"]})
|
||||
break
|
||||
if hardware_details["Graphics: AMD TeraScale 1"] is True:
|
||||
required_patches.update({"Non-Metal Common": all_hardware_patchset["Graphics"]["Non-Metal Common"]})
|
||||
required_patches.update({"AMD TeraScale Common": all_hardware_patchset["Graphics"]["AMD TeraScale Common"]})
|
||||
|
||||
+9
-11
@@ -28,18 +28,16 @@ class check_binary_updates:
|
||||
return False
|
||||
|
||||
def check_if_build_newer(self):
|
||||
if self.remote_version_array[0] > self.binary_version_array[0]:
|
||||
return True
|
||||
elif self.remote_version_array[0] == self.binary_version_array[0]:
|
||||
if self.remote_version_array[1] > self.binary_version_array[1]:
|
||||
# Pad version numbers to match length (ie. 0.1.0 vs 0.1.0.1)
|
||||
while len(self.remote_version_array) > len(self.binary_version_array):
|
||||
self.binary_version_array.append(0)
|
||||
while len(self.remote_version_array) < len(self.binary_version_array):
|
||||
self.remote_version_array.append(0)
|
||||
|
||||
for i in range(0, len(self.remote_version_array)):
|
||||
if self.remote_version_array[i] > self.binary_version_array[i]:
|
||||
return True
|
||||
elif self.remote_version_array[1] == self.binary_version_array[1]:
|
||||
if self.remote_version_array[2] > self.binary_version_array[2]:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
else:
|
||||
return False
|
||||
|
||||
return False
|
||||
|
||||
def determine_local_build_type(self):
|
||||
|
||||
@@ -80,7 +80,7 @@ def validate(settings):
|
||||
print(f"File not found: {source_file}")
|
||||
raise Exception(f"Failed to find {source_file}")
|
||||
|
||||
print(f"Validating Root Patch Dictionary integrity for Darwin {major_kernel}.{minor_kernel}")
|
||||
print(f"- Validating against Darwin {major_kernel}.{minor_kernel}")
|
||||
if not sys_patch_helpers.sys_patch_helpers(settings).generate_patchset_plist(patchset, "OpenCore-Legacy-Patcher"):
|
||||
raise Exception("Failed to generate patchset plist")
|
||||
|
||||
@@ -91,12 +91,13 @@ def validate(settings):
|
||||
if not Path(settings.payload_local_binaries_root_path).exists():
|
||||
subprocess.run(["ditto", "-V", "-x", "-k", "--sequesterRsrc", "--rsrc", settings.payload_local_binaries_root_path_zip, settings.payload_path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
for supported_os in [os_data.os_data.big_sur, os_data.os_data.monterey]:
|
||||
validate_root_patch_files(supported_os, 6)
|
||||
for i in range(0, 10):
|
||||
validate_root_patch_files(supported_os, i)
|
||||
print("Validating SNB Board ID patcher")
|
||||
settings.computer.reported_board_id = "Mac-7BA5B2DFE22DDD8C"
|
||||
sys_patch_helpers.sys_patch_helpers(settings).snb_board_id_patch(settings.payload_local_binaries_root_path)
|
||||
else:
|
||||
print("Skipping Root Patch File integrity validation")
|
||||
print("- Skipping Root Patch File integrity validation")
|
||||
|
||||
# First run is with default settings
|
||||
build_prebuilt()
|
||||
|
||||
Reference in New Issue
Block a user