Mykola Grymalyuk
2021-03-13 08:52:53 -07:00
parent fa5266b069
commit 6f5d5922dc
10 changed files with 45 additions and 8 deletions
+4 -2
View File
@@ -42,7 +42,7 @@ class Constants:
self.opencore_debug = False
self.opencore_build = "RELEASE"
self.kext_debug = False
self.verbose_debug = True
self.verbose_debug = False
self.os_support = 11.0
self.min_os_support = 11.0
self.max_os_support = 11.0
@@ -149,6 +149,8 @@ class Constants:
@property
def app_icon_path(self): return self.current_path / Path("OC-Patcher.icns")
@property
def icon_path(self): return self.payload_path / Path("Icon/.VolumeIcon.icns")
def icon_path_external(self): return self.payload_path / Path("Icon/External/.VolumeIcon.icns")
@property
def icon_path_internal(self): return self.payload_path / Path("Icon/Internal/.VolumeIcon.icns")
@property
def gui_path(self): return self.payload_path / Path("Icon/Resources.zip")
+20
View File
@@ -816,4 +816,24 @@ NoSATAPatch = [
"iMac14,1",
"iMac14,2",
"iMac14,3",
]
NoAPFSsupport = [
"MacBook5,1",
"MacBook5,2",
"MacBookAir2,1",
"MacBookPro4,1",
"MacBookPro5,1",
"MacBookPro5,2",
"MacBookPro5,3",
"MacBookPro5,4",
"MacBookPro5,5",
"Macmini3,1",
"iMac7,1",
"iMac8,1",
"iMac9,1",
"MacPro3,1",
"MacPro4,1",
"Xserve3,1",
"Dortania1,1"
]
+10 -3
View File
@@ -208,6 +208,10 @@ class BuildOpenCore:
amd_patch(self)
elif (self.constants.current_gpuv == "NVIDIA (0x10de)") & (self.constants.current_gpud in ModelArray.NVIDIAMXMGPUs):
nvidia_patch(self)
elif self.model in ModelArray.MacPro71:
print("- Adding Mac Pro, Xserve DRM patches")
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " shikigva=128 unfairgva=1 -wegtree"
# Add OpenCanopy
print("- Adding OpenCanopy GUI")
@@ -250,7 +254,7 @@ class BuildOpenCore:
self.get_tool_by__path("OpenShell.efi")["Enabled"] = False
if self.constants.sip_status is False:
print("- Disabling SIP")
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["csr-active-config"] = binascii.unhexlify("FF0F0000")
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["csr-active-config"] = binascii.unhexlify("EF0F0000")
self.config["NVRAM"]["Delete"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"] += ["csr-active-config"]
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " amfi_get_out_of_my_way=1"
if self.constants.secure_status is False:
@@ -335,10 +339,13 @@ class BuildOpenCore:
self.config["PlatformInfo"]["Generic"]["SystemUUID"] = str(uuid.uuid4()).upper()
if self.constants.serial_settings == "Moderate":
print("- Using Moderate SMBIOS patching")
moderate_serial_patch(self)
elif self.constants.serial_settings == "Advanced":
print("- Using Advanced SMBIOS patching")
adanced_serial_patch(self)
else:
print("- Using Minimal SMBIOS patching")
self.spoofed_model = self.model
minimal_serial_patch(self)
@@ -544,7 +551,6 @@ Please build OpenCore first!"""
# TODO: Remount if readonly
partition_info = plistlib.loads(subprocess.run(f"diskutil info -plist {disk_identifier}s{response}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
mount_path = Path(partition_info["MountPoint"])
utilities.cls()
utilities.header(["Copying OpenCore"])
@@ -558,7 +564,8 @@ Please build OpenCore first!"""
print("- Coping OpenCore onto EFI partition")
shutil.copytree(self.constants.opencore_release_folder / Path("EFI/OC"), mount_path / Path("EFI/OC"))
shutil.copytree(self.constants.opencore_release_folder / Path("System"), mount_path / Path("System"))
shutil.copy(self.constants.icon_path, mount_path)
# TODO: Add drive detection for custom icons (ie. USB, etc)
shutil.copy(self.constants.icon_path_internal, mount_path)
print("- OpenCore transfer complete")
print("\nPress [Enter] to continue.\n")
input()