Fix trailing whitespaces

This commit is contained in:
Mykola Grymalyuk
2021-03-10 08:28:20 -07:00
parent 8e22fc890b
commit f3ed9f4077
5 changed files with 37 additions and 37 deletions

View File

@@ -60,7 +60,7 @@ Current target:\t{self.constants.os_support}
ModelArray.SupportedSMBIOS = ModelArray.SupportedSMBIOS11
elif temp_os_support == 12.0:
ModelArray.SupportedSMBIOS = ModelArray.SupportedSMBIOS12
def change_verbose(self):
utilities.cls()
utilities.header(["Set Verbose mode"])
@@ -94,7 +94,7 @@ Current target:\t{self.constants.os_support}
self.constants.kext_debug = False
else:
print("Invalid option")
def change_metal(self):
utilities.cls()
utilities.header(["Assume Metal GPU Always in iMac"])
@@ -122,7 +122,7 @@ option is for those patching on a different machine or OCLP cannot detect.
self.constants.imac_vendor = "AMD"
else:
print("Invalid option")
def change_wifi(self):
utilities.cls()
utilities.header(["Assume Upgraded Wifi Always"])
@@ -166,7 +166,7 @@ Note: For new users we recommend leaving as default(1. Minimal)
utilities.cls()
utilities.header(["Set OpenCore Picker mode"])
print("""By default, OpenCore will show its boot picker each time on boot up,
however this can be disabled by default and be shown on command by repeatedly
however this can be disabled by default and be shown on command by repeatedly
pressing the "Esc" key
""")
change_kext_menu = input("Show OpenCore Picker by default(y/n): ")
@@ -176,11 +176,11 @@ pressing the "Esc" key
self.constants.showpicker = False
else:
print("Invalid option")
def change_vault(self):
utilities.cls()
utilities.header(["Set OpenCore Vaulting"])
print("""By default, this patcher will sign all your files and ensure none of the
print("""By default, this patcher will sign all your files and ensure none of the
contents can be tampered with. However for more advanced users, you may
want to be able to freely edit the config.plist and files.
@@ -194,11 +194,11 @@ Note: For secuirty reasons, OpenShell will be disabled when Vault is set.
self.constants.vault = False
else:
print("Invalid option")
def change_sip(self):
utilities.cls()
utilities.header(["Set SIP and SecureBootModel"])
print("""SIP and SecureBootModel are used to ensure proper OTA functionality,
print("""SIP and SecureBootModel are used to ensure proper OTA functionality,
however to patch the root volume both of these must be disabled.
Only disable is absolutely necessary.
@@ -227,12 +227,12 @@ Valid options:
self.constants.secure_status = False
else:
print("Invalid option")
def change_imac_nvidia(self):
utilities.cls()
utilities.header(["Force iMac Nvidia Patches"])
print("""Specifically for iMac10,x-12,x with Metal Nvidia GPU upgrades
By default the patcher will try to detect what hardware is
By default the patcher will try to detect what hardware is
running, however this will enforce iMac Nvidia Build Patches.
""")
change_kext_menu = input("Assume iMac Nvidia patches(y/n): ")
@@ -261,12 +261,12 @@ running, however this will enforce iMac Nvidia Build Patches.
[f"Set ShowPicker Mode:\t\tCurrently {self.constants.showpicker}", self.change_showpicker],
[f"Set Vault Mode:\t\t\tCurrently {self.constants.vault}", self.change_vault],
[f"Set SIP and SecureBootModel:\tSIP: {self.constants.sip_status} SBM: {self.constants.secure_status}", self.change_sip],
[f"Set SMBIOS Mode:\t\t\tCurrently {self.constants.serial_settings}", self.change_serial],
[f"Set SMBIOS Mode:\t\t\tCurrently {self.constants.serial_settings}", self.change_serial],
]
for option in options:
menu.add_menu_option(option[0], function=option[1])
response = menu.start()
def credits(self):

View File

@@ -43,7 +43,7 @@ To use, simply:
| ![](images/disk-start.png) | ![](images/disk-efi.png) |
* Ensure you install OpenCore onto a FAT32 partition to ensure your Mac is able to boot it, you may need to format your drive as GUID/GPT in Disk Utility
7. Reboot machine while holding `Option` to select OpenCore, then boot the macOS Installer
| Mac Boot Picker | OpenCore Picker |
@@ -67,7 +67,7 @@ To remove OpenCore is actually quite simply:
* [See here for example how to mount](https://dortania.github.io/OpenCore-Post-Install/universal/oc2hdd.html)
2. Reset NVRAM
* [Reset NVRAM or PRAM on your Mac](https://support.apple.com/HT204063)
Know that if you are on Big Sur when you remove the EFI folder, your Mac will no longer boot and show the prohibited symbol. Be ready to install an older version of macOS before you uninstall OpenCore.
## Patcher Warnings

View File

@@ -737,15 +737,15 @@ upgradableMXMGPUs = [
NVIDIAMXMGPUs = [
"0x12b9",#Quadro K610M
"0x0ff6",#Quadro K1100M
"0x11fc",#Quadro K2100M
"0x0ffc",#Quadro K1000M
"0x0ffb",#Quadro K2000M
"0x11b6",#Quadro K3100M
"0x11b7",#Quadro K4100M
"0x11bc",#Quadro K5000M
"0x11b8",#Quadro K5100M
"0x11fc",#Quadro K2100M
"0x0ffc",#Quadro K1000M
"0x0ffb",#Quadro K2000M
"0x11b6",#Quadro K3100M
"0x11b7",#Quadro K4100M
"0x11bc",#Quadro K5000M
"0x11b8",#Quadro K5100M
"0x11e1",#GTX 765M
"0x11e2",#GTX 765M
"0x11e2",#GTX 765M
"0x11e0",#GTX 770M
"0x119e",#GTX 780M Mac Edition
"0x119e",#GTX 780M
@@ -758,8 +758,8 @@ NVIDIAMXMGPUs = [
AMDMXMGPUs = [
"0x67EF",#AMD RX 460
"0x67e8",#AMD WX 4130/WX 4150
"0x67e0",#AMD WX 4170
"0x67e8",#AMD WX 4130/WX 4150
"0x67e0",#AMD WX 4170
"0x67c0",#AMD WX 7100
]

View File

@@ -125,7 +125,7 @@ class BuildOpenCore:
property_path = "PciRoot(0x0)/Pci(0x1C,0x1)/Pci(0x0,0x0)"
print("- Applying fake ID for WiFi")
self.config["DeviceProperties"]["Add"][property_path] = {"device-id": binascii.unhexlify("ba430000"), "compatible": "pci14e4,43ba"}
# CPUFriend
pp_map_path = Path(self.constants.current_path) / Path(f"payloads/Kexts/PlatformPlugin/{self.model}/Info.plist")
if self.model in ModelArray.X86PP:
@@ -152,7 +152,7 @@ class BuildOpenCore:
Path(self.constants.map_contents_folder).mkdir()
shutil.copy(usb_map_path, self.constants.map_contents_folder)
self.get_kext_by_bundle_path("USB-Map.kext")["Enabled"] = True
# AGPM Patch
if self.model in ModelArray.DualGPUPatch:
print("- Adding dual GPU patch")
@@ -179,7 +179,7 @@ class BuildOpenCore:
self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x2,0x0)"] = {"name": binascii.unhexlify("23646973706C6179"), "IOName": "#display", "class-code": binascii.unhexlify("FFFFFFFF")}
else:
print("- Failed to determine model")
def amd_patch(self):
self.constants.custom_mxm_gpu = True
print("- Adding AMD DRM patches")
@@ -188,7 +188,7 @@ class BuildOpenCore:
print("- Disabling unsupported iGPU")
self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x2,0x0)"] = {"name": binascii.unhexlify("23646973706C6179"), "IOName": "#display", "class-code": binascii.unhexlify("FFFFFFFF")}
# Check GPU Vendor
if self.constants.metal_build is True:
print("- Adding Metal GPU patches on request")
@@ -207,7 +207,7 @@ class BuildOpenCore:
amd_patch(self)
elif (self.constants.current_gpuv == "NVIDIA (0x10de)") & (self.constants.current_gpud in ModelArray.NVIDIAMXMGPUs):
nvidia_patch(self)
# Add OpenCanopy
print("- Adding OpenCanopy GUI")
shutil.rmtree(self.constants.resources_path, onerror=rmtree_handler)
@@ -254,7 +254,7 @@ class BuildOpenCore:
if self.constants.secure_status is False:
print("- Disabling SecureBootModel")
self.config["Misc"]["Security"]["SecureBootModel"] = "Disabled"
def set_smbios(self):
spoofed_model = self.model
# TODO: Set check as global variable
@@ -307,7 +307,7 @@ class BuildOpenCore:
self.spoofed_model = spoofed_model
self.spoofed_board = spoofed_board
self.config["#Revision"]["Spoofed-Model"] = self.spoofed_model
# Setup menu
def minimal_serial_patch(self):
self.config["PlatformInfo"]["PlatformNVRAM"]["BID"] = self.spoofed_board
@@ -331,7 +331,7 @@ class BuildOpenCore:
self.config["PlatformInfo"]["Generic"]["SystemSerialNumber"] = macserial_output[0]
self.config["PlatformInfo"]["Generic"]["MLB"] = macserial_output[1]
self.config["PlatformInfo"]["Generic"]["SystemUUID"] = str(uuid.uuid4()).upper()
if self.constants.serial_settings == "Moderate":
moderate_serial_patch(self)
elif self.constants.serial_settings == "Advanced":
@@ -339,7 +339,7 @@ class BuildOpenCore:
else:
self.spoofed_model = self.model
minimal_serial_patch(self)
# USB Map Patching
self.new_map_ls = Path(self.constants.map_contents_folder) / Path("Info.plist")
self.map_config = plistlib.load(Path(self.new_map_ls).open("rb"))
@@ -387,7 +387,7 @@ class BuildOpenCore:
print(f"- Could not find kext {bundle_path}!")
raise IndexError
return kext
def get_tool_by__path(self, bundle_path):
tool = self.get_item_by_kv(self.config["Misc"]["Tools"], "Path", bundle_path)
if not tool:
@@ -423,7 +423,7 @@ class BuildOpenCore:
shutil.rmtree(i)
Path(self.constants.opencore_zip_copied).unlink()
def sign_files(self):
if self.constants.vault is True:
print("- Vaulting EFI")

View File

@@ -10470,7 +10470,7 @@
<key>board-id</key>
<string>Mac-7BA5B2D9E42DDD94</string>
</dict>
<key>iMacProMax1,1</key>
<key>Dortania1,1</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.driver.AppleUSBHostMergeProperties</string>
@@ -10600,7 +10600,7 @@
</dict>
</dict>
<key>model</key>
<string>iXacProMax1,1</string>
<string>Xortania1,1</string>
</dict>
</dict>
<key>OSBundleRequired</key>