Allow native Macs to use OpenCore

Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/178
This commit is contained in:
Mykola Grymalyuk
2021-04-30 23:27:43 -06:00
parent d5ff1edc44
commit d40e9c869d
7 changed files with 79 additions and 61 deletions

View File

@@ -71,6 +71,8 @@ class OpenCoreLegacyPatcher():
parser.add_argument('--disable_sip', help='Disable SIP', action='store_true', required=False)
parser.add_argument('--disable_smb', help='Disable SecureBootModel', action='store_true', required=False)
parser.add_argument('--vault', help='Enable OpenCore Vaulting', action='store_true', required=False)
parser.add_argument('--support_all', help='Allow OpenCore on natively supported Models', action='store_true', required=False)
parser.add_argument('--force_legacy', help='Allow acceleration on Mac Pros and Xserves', action='store_true', required=False)
# Building args requiring value values
parser.add_argument('--model', action='store', help='Set custom model', required=False)
@@ -140,6 +142,15 @@ class OpenCoreLegacyPatcher():
else:
print(f"- Unknown SMBIOS arg passed: {args.smbios_spoof}")
if args.support_all:
print("- Building for natively supported model")
self.constants.allow_oc_everywhere = True
self.constants.serial_settings = "None"
if args.force_legacy:
print("- Allowing legacy acceleration patches on newer models")
self.constants.assume_legacy = True
if args.build:
if args.model:
print(f"- Using custom model: {args.model}")