Highlight selected SMBIOS line

This commit is contained in:
Hoang Hong Quan
2024-10-08 00:40:01 +07:00
parent 431be0dbc1
commit bc942277ad
2 changed files with 5 additions and 4 deletions

View File

@@ -194,7 +194,7 @@ class OCPE:
self.k.kext_configuration_menu(hardware_report, smbios_model, macos_version, self.ac.patches)
elif option == 5:
smbios_model = self.s.customize_smbios_model(hardware_report, smbios_model, macos_version)
self.k.kext_configuration_menu(hardware_report, smbios_model, macos_version, self.ac.patches)
self.k.select_required_kexts(hardware_report, smbios_model, macos_version, self.ac.patches)
elif option == 6:
self.gathering_files()
self.b.build_efi(hardware_report, unsupported_devices, smbios_model, macos_version, self.ac, self.k)

View File

@@ -161,13 +161,14 @@ class SMBIOS:
current_category = category
category_header = "Category: {}".format(current_category if current_category else "Uncategorized")
contents.append(f"\n{category_header}\n" + "=" * len(category_header))
checkbox = "[*]" if device.name == selected_smbios_model else "[ ]"
line = "{:2}. {:15} - {:10} {:20}{}".format(index, device.name, device.cpu, "({})".format(device.cpu_generation), "" if not device.discrete_gpu else " - {}".format(device.discrete_gpu))
line = "{} {:2}. {:15} - {:10} {:20}{}".format(checkbox, index, device.name, device.cpu, "({})".format(device.cpu_generation), "" if not device.discrete_gpu else " - {}".format(device.discrete_gpu))
if not self.utils.parse_darwin_version(device.initial_support) <= self.utils.parse_darwin_version(macos_version) <= self.utils.parse_darwin_version(device.last_supported_version):
line = "\033[90m{}\033[0m".format(line)
elif device.name == selected_smbios_model:
line = "\033[1;32m{}\033[0m".format(line)
contents.append(line)
contents.append("")
contents.append("Current SMBIOS: {}".format(selected_smbios_model))
contents.append("\033[1;36m")
contents.append("Note:")
contents.append("- Lines in gray indicate mac models that are not supported by the current macOS version ({}).".format(macos_version))