mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-14 04:38:20 +10:00
build.py: Use pythonic class name
This commit is contained in:
@@ -628,7 +628,7 @@ class wx_python_gui:
|
||||
while self.is_unpack_finished() is False:
|
||||
time.sleep(0.1)
|
||||
|
||||
build.BuildOpenCore(self.constants.custom_model or self.constants.computer.real_model, self.constants).build_opencore()
|
||||
build.build_opencore(self.constants.custom_model or self.constants.computer.real_model, self.constants).build_opencore()
|
||||
# Once finished, change build_opencore button to "Install OpenCore"
|
||||
self.build_opencore.SetLabel("🔩 Install OpenCore")
|
||||
self.build_opencore.Bind(wx.EVT_BUTTON, self.install_menu)
|
||||
|
||||
@@ -93,7 +93,7 @@ class arguments:
|
||||
print("- Building for natively supported model")
|
||||
settings.allow_oc_everywhere = True
|
||||
settings.serial_settings = "None"
|
||||
build.BuildOpenCore(settings.custom_model or settings.computer.real_model, settings).build_opencore()
|
||||
build.build_opencore(settings.custom_model or settings.computer.real_model, settings).build_opencore()
|
||||
elif self.args.patch_sys_vol:
|
||||
print("- Set System Volume patching")
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ def rmtree_handler(func, path, exc_info):
|
||||
raise # pylint: disable=misplaced-bare-raise
|
||||
|
||||
|
||||
class BuildOpenCore:
|
||||
class build_opencore:
|
||||
def __init__(self, model, versions):
|
||||
self.model = model
|
||||
self.config = None
|
||||
@@ -156,12 +156,6 @@ class BuildOpenCore:
|
||||
bluetooth.build_bluetooth(self.model, self.constants, self.config).build()
|
||||
storage.build_storage(self.model, self.constants, self.config).build()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# CPUFriend
|
||||
if self.model not in ["iMac7,1", "Xserve2,1", "Dortania1,1"] and self.constants.serial_settings != "None":
|
||||
pp_map_path = Path(self.constants.platform_plugin_plist_path) / Path(f"{self.model}/Info.plist")
|
||||
|
||||
@@ -106,7 +106,7 @@ class OpenCoreLegacyPatcher:
|
||||
menu = tui_helpers.TUIMenu(title, "Please select an option: ", in_between=in_between, auto_number=True, top_level=True)
|
||||
|
||||
options = (
|
||||
[["Build OpenCore", build.BuildOpenCore(self.constants.custom_model or self.constants.computer.real_model, self.constants).build_opencore]]
|
||||
[["Build OpenCore", build.build_opencore(self.constants.custom_model or self.constants.computer.real_model, self.constants).build_opencore]]
|
||||
if ((self.constants.custom_model or self.computer.real_model) in model_array.SupportedSMBIOS) or self.constants.allow_oc_everywhere is True
|
||||
else []
|
||||
) + [
|
||||
|
||||
@@ -43,7 +43,7 @@ def validate(settings):
|
||||
for model in model_array.SupportedSMBIOS:
|
||||
print(f"Validating predefined model: {model}")
|
||||
settings.custom_model = model
|
||||
build.BuildOpenCore(settings.custom_model, settings).build_opencore()
|
||||
build.build_opencore(settings.custom_model, settings).build_opencore()
|
||||
result = subprocess.run([settings.ocvalidate_path, f"{settings.opencore_release_folder}/EFI/OC/config.plist"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
if result.returncode != 0:
|
||||
print("Error on build!")
|
||||
@@ -57,7 +57,7 @@ def validate(settings):
|
||||
settings.computer = model
|
||||
settings.custom_model = ""
|
||||
print(f"Validating dumped model: {settings.computer.real_model}")
|
||||
build.BuildOpenCore(settings.computer.real_model, settings).build_opencore()
|
||||
build.build_opencore(settings.computer.real_model, settings).build_opencore()
|
||||
result = subprocess.run([settings.ocvalidate_path, f"{settings.opencore_release_folder}/EFI/OC/config.plist"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
if result.returncode != 0:
|
||||
print("Error on build!")
|
||||
|
||||
Reference in New Issue
Block a user