mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-18 13:20:00 +10:00
Settings: Add additional safe guards
This commit is contained in:
@@ -9,7 +9,7 @@ import applescript
|
||||
from pathlib import Path
|
||||
|
||||
from resources import constants
|
||||
from data import model_array, os_data
|
||||
from data import model_array, os_data, cpu_data, smbios_data
|
||||
|
||||
|
||||
class AutoUpdateStages:
|
||||
@@ -122,6 +122,16 @@ class CheckProperties:
|
||||
|
||||
return True
|
||||
|
||||
def host_has_cpu_gen(self, gen: int) -> bool:
|
||||
"""
|
||||
Check if host has a CPU generation equal to or greater than the specified generation
|
||||
"""
|
||||
model = self.constants.custom_model if self.constants.custom_model else self.constants.computer.real_model
|
||||
if model in smbios_data.smbios_dictionary:
|
||||
if smbios_data.smbios_dictionary[model]["CPU Generation"] >= gen:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
class PayloadMount:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user