mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-23 11:30:15 +10:00
build.py: Add Timeout customization
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
- ex. Allow 13.0 KDK on 13.1
|
- ex. Allow 13.0 KDK on 13.1
|
||||||
- Clean out `/Library/Extensions` on KDK-less root patches
|
- Clean out `/Library/Extensions` on KDK-less root patches
|
||||||
- Ensures old, incompatible kexts are not linked against
|
- Ensures old, incompatible kexts are not linked against
|
||||||
|
- Add OpenCore Picker timeout selection
|
||||||
|
|
||||||
## 0.5.0
|
## 0.5.0
|
||||||
- Ventura Specific Updates:
|
- Ventura Specific Updates:
|
||||||
|
|||||||
@@ -2459,13 +2459,29 @@ class wx_python_gui:
|
|||||||
if (not self.constants.custom_model and self.computer.real_model not in models) or (self.constants.custom_model and self.constants.custom_model not in models):
|
if (not self.constants.custom_model and self.computer.real_model not in models) or (self.constants.custom_model and self.constants.custom_model not in models):
|
||||||
self.gpu_dropdown.Disable()
|
self.gpu_dropdown.Disable()
|
||||||
|
|
||||||
|
# OpenCore Picker Timeout (using wxSpinCtrl)
|
||||||
|
# Label: Picker Timeout
|
||||||
|
self.label_timeout = wx.StaticText(self.frame_modal, label="Picker Timeout (seconds):", style=wx.ALIGN_CENTRE)
|
||||||
|
self.label_timeout.SetFont(wx.Font(12, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL))
|
||||||
|
self.label_timeout.SetPosition(wx.Point(0, self.gpu_dropdown.GetPosition().y + self.gpu_dropdown.GetSize().height + 2))
|
||||||
|
self.label_timeout.SetSize(wx.Size(self.frame_modal.GetSize().width, 30))
|
||||||
|
self.label_timeout.Centre(wx.HORIZONTAL)
|
||||||
|
|
||||||
|
# Picker Timeout
|
||||||
|
self.timeout_spinner = wx.SpinCtrl(self.frame_modal, value=f"{self.constants.oc_timeout}", min=0, max=60)
|
||||||
|
self.timeout_spinner.SetPosition(wx.Point(
|
||||||
|
self.label_timeout.GetPosition().x,
|
||||||
|
int(self.label_timeout.GetPosition().y + self.label_timeout.GetSize().height / 2)))
|
||||||
|
self.timeout_spinner.Bind(wx.EVT_SPINCTRL, self.timeout_spinner_click)
|
||||||
|
self.timeout_spinner.Centre(wx.HORIZONTAL)
|
||||||
|
|
||||||
# Disable Thunderbolt
|
# Disable Thunderbolt
|
||||||
self.disable_thunderbolt_checkbox = wx.CheckBox(self.frame_modal, label="Disable Thunderbolt")
|
self.disable_thunderbolt_checkbox = wx.CheckBox(self.frame_modal, label="Disable Thunderbolt")
|
||||||
self.disable_thunderbolt_checkbox.SetValue(self.constants.disable_tb)
|
self.disable_thunderbolt_checkbox.SetValue(self.constants.disable_tb)
|
||||||
self.disable_thunderbolt_checkbox.Bind(wx.EVT_CHECKBOX, self.disable_tb_click)
|
self.disable_thunderbolt_checkbox.Bind(wx.EVT_CHECKBOX, self.disable_tb_click)
|
||||||
self.disable_thunderbolt_checkbox.SetPosition(wx.Point(
|
self.disable_thunderbolt_checkbox.SetPosition(wx.Point(
|
||||||
30,
|
30,
|
||||||
self.gpu_dropdown.GetPosition().y + self.gpu_dropdown.GetSize().height + 5))
|
self.timeout_spinner.GetPosition().y + self.timeout_spinner.GetSize().height + 5))
|
||||||
self.disable_thunderbolt_checkbox.SetToolTip(wx.ToolTip("Disables Thunderbolt support on MacBookPro11,x\nMainly applicable for systems that cannot boot with Thunderbolt enabled"))
|
self.disable_thunderbolt_checkbox.SetToolTip(wx.ToolTip("Disables Thunderbolt support on MacBookPro11,x\nMainly applicable for systems that cannot boot with Thunderbolt enabled"))
|
||||||
if not self.constants.custom_model and not self.computer.real_model.startswith("MacBookPro11"):
|
if not self.constants.custom_model and not self.computer.real_model.startswith("MacBookPro11"):
|
||||||
self.disable_thunderbolt_checkbox.Disable()
|
self.disable_thunderbolt_checkbox.Disable()
|
||||||
@@ -2639,6 +2655,9 @@ class wx_python_gui:
|
|||||||
self.frame_modal.SetSize(wx.Size(-1, self.return_to_main_menu_button.GetPosition().y + self.return_to_main_menu_button.GetSize().height + 40))
|
self.frame_modal.SetSize(wx.Size(-1, self.return_to_main_menu_button.GetPosition().y + self.return_to_main_menu_button.GetSize().height + 40))
|
||||||
self.frame_modal.ShowWindowModal()
|
self.frame_modal.ShowWindowModal()
|
||||||
|
|
||||||
|
def timeout_spinner_click(self, event):
|
||||||
|
self.constants.oc_timeout = self.timeout_spinner.GetValue()
|
||||||
|
|
||||||
def delete_unused_kdks_click(self, event):
|
def delete_unused_kdks_click(self, event):
|
||||||
if self.delete_unused_kdks_checkbox.GetValue() is True:
|
if self.delete_unused_kdks_checkbox.GetValue() is True:
|
||||||
print("Nuke KDKs enabled")
|
print("Nuke KDKs enabled")
|
||||||
|
|||||||
@@ -1007,6 +1007,9 @@ class BuildOpenCore:
|
|||||||
else:
|
else:
|
||||||
print("- Hiding OpenCore picker")
|
print("- Hiding OpenCore picker")
|
||||||
self.config["Misc"]["Boot"]["ShowPicker"] = False
|
self.config["Misc"]["Boot"]["ShowPicker"] = False
|
||||||
|
if self.constants.oc_timeout != 5:
|
||||||
|
print(f"- Setting custom OpenCore picker timeout to {self.constants.oc_timeout} seconds")
|
||||||
|
self.config["Misc"]["Boot"]["Timeout"] = self.constants.oc_timeout
|
||||||
if self.constants.vault is True:
|
if self.constants.vault is True:
|
||||||
print("- Setting Vault configuration")
|
print("- Setting Vault configuration")
|
||||||
self.config["Misc"]["Security"]["Vault"] = "Secure"
|
self.config["Misc"]["Security"]["Vault"] = "Secure"
|
||||||
|
|||||||
@@ -204,6 +204,7 @@ class Constants:
|
|||||||
self.host_is_hackintosh = False # Determine if host is Hackintosh
|
self.host_is_hackintosh = False # Determine if host is Hackintosh
|
||||||
self.commit_info = (None, None, None)
|
self.commit_info = (None, None, None)
|
||||||
self.set_vmm_cpuid = False # Set VMM bit inside CPUID
|
self.set_vmm_cpuid = False # Set VMM bit inside CPUID
|
||||||
|
self.oc_timeout = 5 # Set OpenCore timeout
|
||||||
|
|
||||||
self.legacy_accel_support = [
|
self.legacy_accel_support = [
|
||||||
os_data.os_data.big_sur,
|
os_data.os_data.big_sur,
|
||||||
|
|||||||
Reference in New Issue
Block a user