mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-18 13:20:00 +10:00
build.py: Add Ventura USB map injection
This commit is contained in:
+6
-2
@@ -432,13 +432,17 @@ class BuildOpenCore:
|
||||
usb_map_path.exists()
|
||||
and (self.constants.allow_oc_everywhere is False or self.constants.allow_native_spoofs is True)
|
||||
and self.model not in ["Xserve2,1", "Dortania1,1"]
|
||||
and (self.model in model_array.Missing_USB_Map or self.constants.serial_settings in ["Moderate", "Advanced"])
|
||||
and (
|
||||
(self.model in model_array.Missing_USB_Map or self.model in model_array.Missing_USB_Map_Ventura)
|
||||
or self.constants.serial_settings in ["Moderate", "Advanced"])
|
||||
):
|
||||
print("- Adding USB-Map.kext")
|
||||
Path(self.constants.map_kext_folder).mkdir()
|
||||
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
|
||||
if self.model in model_array.Missing_USB_Map_Ventura and self.constants.serial_settings not in ["Moderate", "Advanced"]:
|
||||
self.get_kext_by_bundle_path("USB-Map.kext")["MinKernel"] = "22.0.0"
|
||||
|
||||
if self.constants.allow_oc_everywhere is False:
|
||||
if self.constants.serial_settings != "None":
|
||||
@@ -1199,7 +1203,7 @@ class BuildOpenCore:
|
||||
if (
|
||||
self.constants.allow_oc_everywhere is False
|
||||
and self.model not in ["Xserve2,1", "Dortania1,1"]
|
||||
and (self.model in model_array.Missing_USB_Map or self.constants.serial_settings in ["Moderate", "Advanced"])
|
||||
and ((self.model in model_array.Missing_USB_Map or self.model in model_array.Missing_USB_Map_Ventura) or self.constants.serial_settings in ["Moderate", "Advanced"])
|
||||
):
|
||||
new_map_ls = Path(self.constants.map_contents_folder) / Path("Info.plist")
|
||||
map_config = plistlib.load(Path(new_map_ls).open("rb"))
|
||||
|
||||
Reference in New Issue
Block a user