Skip to content

Commit 135125b

Browse files
committed
Update CLI
1 parent 120f893 commit 135125b

File tree

1 file changed

+6
-36
lines changed

1 file changed

+6
-36
lines changed

OCLP-CLI.command

Lines changed: 6 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ class OpenCoreLegacyPatcher:
4040
parser.add_argument("--verbose", help="Enable verbose boot", action="store_true", required=False)
4141
parser.add_argument("--debug_oc", help="Enable OpenCore DEBUG", action="store_true", required=False)
4242
parser.add_argument("--debug_kext", help="Enable kext DEBUG", action="store_true", required=False)
43-
parser.add_argument("--skip_wifi", help="Skip wifi patches", action="store_true", required=False)
4443
parser.add_argument("--hide_picker", help="Hide OpenCore picker", action="store_true", required=False)
4544
parser.add_argument("--disable_sip", help="Disable SIP", action="store_true", required=False)
4645
parser.add_argument("--disable_smb", help="Disable SecureBootModel", action="store_true", required=False)
@@ -49,10 +48,10 @@ class OpenCoreLegacyPatcher:
4948
parser.add_argument("--firewire", help="Enable FireWire Booting", action="store_true", required=False)
5049
parser.add_argument("--nvme", help="Enable NVMe Booting", action="store_true", required=False)
5150
parser.add_argument("--disable_amfi", help="Disable AMFI", action="store_true", required=False)
51+
parser.add_argument("--moderate_smbios", help="Moderate SMBIOS Patching", action="store_true", required=False)
5252

5353
# Building args requiring value values
5454
parser.add_argument("--model", action="store", help="Set custom model", required=False)
55-
parser.add_argument("--metal_gpu", action="store", help="Set Metal GPU Vendor", required=False)
5655
parser.add_argument("--smbios_spoof", action="store", help="Set SMBIOS patching mode", required=False)
5756

5857
# SysPatch args
@@ -81,9 +80,6 @@ class OpenCoreLegacyPatcher:
8180
if args.debug_kext:
8281
print("- Set kext DEBUG configuration")
8382
self.constants.kext_debug = True
84-
if args.skip_wifi:
85-
print("- Set wifi skip configuration")
86-
self.constants.wifi_build = True
8783
if args.hide_picker:
8884
print("- Set HidePicker configuration")
8985
self.constants.showpicker = False
@@ -105,19 +101,9 @@ class OpenCoreLegacyPatcher:
105101
if args.disable_amfi:
106102
print("- Set Disable AMFI configuration")
107103
self.constants.disable_amfi = True
108-
if args.metal_gpu:
109-
if args.metal_gpu == "Nvidia":
110-
print("- Set Metal GPU patches to Nvidia")
111-
self.constants.metal_build = True
112-
self.constants.imac_vendor = "Nvidia"
113-
elif args.metal_gpu == "AMD":
114-
print("- Set Metal GPU patches to AMD")
115-
self.constants.metal_build = True
116-
self.constants.imac_vendor = "AMD"
117-
else:
118-
print(f"- Unknown GPU arg passed: {args.metal_gpu}")
119-
self.constants.metal_build = False
120-
self.constants.imac_vendor = "None"
104+
if args.moderate_smbios:
105+
print("- Set Moderate SMBIOS Patching configuration")
106+
self.constants.serial_settings = "Moderate"
121107
if args.smbios_spoof:
122108
if args.smbios_spoof == "Minimal":
123109
self.constants.serial_settings = "Minimal"
@@ -160,11 +146,6 @@ If you plan to create the USB for another machine, please select the "Change Mod
160146
self.unpatch_vol()
161147

162148
def set_defaults(self, model, host_is_target):
163-
# Defaults
164-
self.constants.sip_status = True
165-
self.constants.secure_status = False # Default false for Monterey
166-
self.constants.disable_amfi = False
167-
168149
if model in ModelArray.LegacyGPU:
169150
if (
170151
host_is_target
@@ -178,27 +159,16 @@ If you plan to create the USB for another machine, please select the "Change Mod
178159
device_probe.NVIDIA.Archs.Kepler,
179160
]
180161
):
162+
print("- Detected Metal GPU, overriding default configuration")
181163
# Building on device and we have a native, supported GPU
182164
self.constants.sip_status = True
183165
# self.constants.secure_status = True # Monterey
184166
self.constants.disable_amfi = False
185-
else:
186-
self.constants.sip_status = False # Unsigned kexts
187-
self.constants.secure_status = False # Root volume modified
188-
self.constants.disable_amfi = True # Unsigned binaries
189167
if model in ModelArray.ModernGPU:
190168
if host_is_target and model in ["iMac13,1", "iMac13,3"] and self.computer.dgpu:
191169
# Some models have a supported dGPU, others don't
170+
print("- Detected Metal dGPU, overriding default configuration")
192171
self.constants.sip_status = True
193-
# self.constants.secure_status = True # Monterey
194-
# self.constants.disable_amfi = False # Signed bundles, Don't need to explicitly set currently
195-
else:
196-
self.constants.sip_status = False # Unsigned kexts
197-
self.constants.secure_status = False # Modified root volume
198-
# self.constants.disable_amfi = False # Signed bundles, Don't need to explicitly set currently
199-
if model == "MacBook8,1":
200-
# MacBook8,1 has an odd bug where it cannot install Monterey with Minimal spoofing
201-
self.constants.serial_settings == "Moderate"
202172

203173
def patch_vol(self):
204174
SysPatch.PatchSysVolume(self.constants.custom_model or self.constants.computer.real_model, self.constants).start_patch()

0 commit comments

Comments
 (0)