Enhance user interface for hardware report and macOS version selection

This commit is contained in:
Hoang Hong Quan
2024-09-28 08:21:56 +07:00
parent cfdaba2591
commit ab190f5f4e
3 changed files with 62 additions and 52 deletions
+1 -9
View File
@@ -205,12 +205,4 @@ class CompatibilityChecker:
hardware["Storage Controllers"] = self.check_storage_compatibility(hardware.get("Storage Controllers"))
self.check_sd_controller_compatibility(hardware)
hardware["Compatibility"] = {
"macOS Version": {
"Max Version": ".".join(str(item) for item in self.max_supported_macos_version),
"Min Version": ".".join(str(item) for item in self.min_supported_macos_version)
} if self.max_supported_macos_version != (-1, -1, -1) else None,
"Unsupported Devices": self.unsupported_devices
}
return hardware
return () if self.max_supported_macos_version[0] == -1 else (".".join(str(item) for item in self.min_supported_macos_version), ".".join(str(item) for item in self.max_supported_macos_version)), self.unsupported_devices
+2 -2
View File
@@ -376,7 +376,7 @@ class builder:
print("")
self.utils.request_input()
def build_efi(self, hardware, macos_version):
def build_efi(self, hardware, unsupported_devices, macos_version):
efi_directory = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), "Results")
self.utils.create_folder(efi_directory, remove_content=True)
@@ -410,7 +410,7 @@ class builder:
hardware_shorc["Input"] = hardware.get("Input")
hardware_shorc["Storage Controllers"] = hardware.get("Storage Controllers")
hardware_shorc["Intel MEI"] = hardware.get("Intel MEI")
hardware_shorc["Unsupported Devices"] = hardware.get("Compatibility").get("Unsupported Devices")
hardware_shorc["Unsupported Devices"] = unsupported_devices
forbidden_chars = r'[<>:"/\\|?*]'
hardware_shorc["Motherboard Name"] = re.sub(forbidden_chars, '_', hardware_shorc["Motherboard Name"])