Add user-configurable ShowPicker

This commit is contained in:
Mykola Grymalyuk
2021-03-09 14:53:04 -07:00
parent a2c603d874
commit 7db3508387
4 changed files with 24 additions and 0 deletions

View File

@@ -9,6 +9,7 @@
- Fix crash on MacBookPro4,1
- Fix External Display Support on MacBookPro10,1
- Inject Patcher version into NVRAM for easier debugging
- Add user-configurable ShowPicker
## 0.0.15
- Add user-configurable OpenCore DEBUG builds

View File

@@ -151,6 +151,20 @@ Note: For new users we recommend leaving as default(1. Minimal)
self.constants.serial_settings = "Advanced"
else:
print("Invalid option")
def change_showpicker(self):
utilities.cls()
utilities.header(["Set OpenCore Picker mode"])
print("""By default, OpenCore will show it's boot picker each time on boot up,
however this can be disabled by default and be shown on command by repeatedly
pressing the "Esc" key
""")
change_kext_menu = input("Show OpenCore Picker by default(y/n): ")
if change_kext_menu in {"y", "Y", "yes", "Yes"}:
self.constants.showpicker = True
elif change_kext_menu in {"n", "N", "no", "No"}:
self.constants.showpicker = False
else:
print("Invalid option")
def patcher_settings(self):
response = None
@@ -168,6 +182,7 @@ Note: For new users we recommend leaving as default(1. Minimal)
[f"Assume Metal GPU Always:\t\tCurrently {self.constants.kext_debug}", self.change_metal],
[f"Assume Upgraded Wifi Always:\tCurrently {self.constants.kext_debug}", self.change_wifi],
[f"Set SMBIOS Mode:\t\t\tCurrently {self.constants.serial_settings}", self.change_serial],
[f"Set Picker Mode:\t\t\tCurrently {self.constants.showpicker}", self.change_showpicker],
]
for option in options:

View File

@@ -50,6 +50,7 @@ class Constants:
self.wifi_build = False
self.gui_mode = False
self.serial_settings = "Minimal"
self.showpicker = True
# Payload Location
# OpenCore

View File

@@ -220,6 +220,13 @@ class BuildOpenCore:
if self.constants.opencore_debug == True:
print("- Enabling DEBUG OpenCore")
self.config["Misc"]["Debug"]["Target"] = 67
if self.constants.showpicker == True:
print("- Enabling ShowPicker")
self.config["Misc"]["Boot"]["ShowPicker"] = True
else:
print("- Hiding picker and enabling PollAppleHotKeys")
self.config["Misc"]["Boot"]["ShowPicker"] = False
self.config["Misc"]["Boot"]["PollAppleHotKeys"] = True
def set_smbios(self):
spoofed_model = self.model