mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-20 14:10:51 +10:00
products.py: Better handle Apple Silicon installers
This commit is contained in:
@@ -55,7 +55,7 @@ class CatalogProducts:
|
|||||||
# Ensure Apple Silicon specific Installers are not listed
|
# Ensure Apple Silicon specific Installers are not listed
|
||||||
if "VMM-x86_64" not in data["MobileAssetProperties"]["SupportedDeviceModels"]:
|
if "VMM-x86_64" not in data["MobileAssetProperties"]["SupportedDeviceModels"]:
|
||||||
if self.vmm_only:
|
if self.vmm_only:
|
||||||
return {}
|
return {"Missing VMM Support": True}
|
||||||
|
|
||||||
version = data["MobileAssetProperties"]["OSVersion"]
|
version = data["MobileAssetProperties"]["OSVersion"]
|
||||||
build = data["MobileAssetProperties"]["Build"]
|
build = data["MobileAssetProperties"]["Build"]
|
||||||
@@ -82,7 +82,7 @@ class CatalogProducts:
|
|||||||
|
|
||||||
With macOS Sequoia, the Info.plist is no longer present in the InstallAssistant's assets
|
With macOS Sequoia, the Info.plist is no longer present in the InstallAssistant's assets
|
||||||
"""
|
"""
|
||||||
|
_does_support_vmm = False
|
||||||
for entry in data["Assets"]:
|
for entry in data["Assets"]:
|
||||||
if "SupportedDeviceModels" not in entry:
|
if "SupportedDeviceModels" not in entry:
|
||||||
continue
|
continue
|
||||||
@@ -94,6 +94,8 @@ class CatalogProducts:
|
|||||||
if self.vmm_only:
|
if self.vmm_only:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
_does_support_vmm = True
|
||||||
|
|
||||||
build = entry["Build"]
|
build = entry["Build"]
|
||||||
version = entry["OSVersion"]
|
version = entry["OSVersion"]
|
||||||
|
|
||||||
@@ -109,6 +111,10 @@ class CatalogProducts:
|
|||||||
"Catalog": CatalogURL().catalog_url_to_seed(catalog_url),
|
"Catalog": CatalogURL().catalog_url_to_seed(catalog_url),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if _does_support_vmm is False:
|
||||||
|
if self.vmm_only:
|
||||||
|
return {"Missing VMM Support": True}
|
||||||
|
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
||||||
@@ -325,9 +331,18 @@ class CatalogProducts:
|
|||||||
|
|
||||||
if plist_contents:
|
if plist_contents:
|
||||||
if Path(package["URL"]).name == "Info.plist":
|
if Path(package["URL"]).name == "Info.plist":
|
||||||
_product_map.update(self._legacy_parse_info_plist(plist_contents))
|
result = self._legacy_parse_info_plist(plist_contents)
|
||||||
else:
|
else:
|
||||||
_product_map.update(self._parse_mobile_asset_plist(plist_contents))
|
result = self._parse_mobile_asset_plist(plist_contents)
|
||||||
|
|
||||||
|
if result == {"Missing VMM Support": True}:
|
||||||
|
_product_map = {}
|
||||||
|
break
|
||||||
|
|
||||||
|
_product_map.update(result)
|
||||||
|
|
||||||
|
if _product_map == {}:
|
||||||
|
continue
|
||||||
|
|
||||||
if _product_map["Version"] is not None:
|
if _product_map["Version"] is not None:
|
||||||
_product_map["Title"] = self._build_installer_name(_product_map["Version"], _product_map["Catalog"])
|
_product_map["Title"] = self._build_installer_name(_product_map["Version"], _product_map["Catalog"])
|
||||||
|
|||||||
@@ -366,7 +366,7 @@ class HardwarePatchsetDetection:
|
|||||||
logging.error("Stripping out Non-Metal GPUs")
|
logging.error("Stripping out Non-Metal GPUs")
|
||||||
for hardware in list(present_hardware):
|
for hardware in list(present_hardware):
|
||||||
if hardware.hardware_variant_graphics_subclass() == HardwareVariantGraphicsSubclass.NON_METAL_GRAPHICS:
|
if hardware.hardware_variant_graphics_subclass() == HardwareVariantGraphicsSubclass.NON_METAL_GRAPHICS:
|
||||||
print(f" Stripping out {hardware.name()}")
|
logging.info(f" Stripping out {hardware.name()}")
|
||||||
present_hardware.remove(hardware)
|
present_hardware.remove(hardware)
|
||||||
|
|
||||||
if metal_3802_gpu_present and metal_31001_gpu_present and self._xnu_major >= os_data.sequoia.value:
|
if metal_3802_gpu_present and metal_31001_gpu_present and self._xnu_major >= os_data.sequoia.value:
|
||||||
|
|||||||
Reference in New Issue
Block a user