gui.py: Add FeatureUnlock configurability

This commit is contained in:
Mykola Grymalyuk
2022-01-07 17:12:31 -07:00
parent cb808dc7ca
commit fd67032afe
5 changed files with 92 additions and 101 deletions

View File

@@ -478,20 +478,8 @@ class BuildOpenCore:
# Used to enable Audio support for non-standard dGPUs
self.enable_kext("AppleALC.kext", self.constants.applealc_version, self.constants.applealc_path)
def check_firewire(model):
# MacBooks never supported FireWire
# Pre-Thunderbolt MacBook Airs as well
if model.startswith("MacBookPro"):
return True
elif model.startswith("MacBookAir"):
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.cpu_data.sandy_bridge.value:
return False
elif model.startswith("MacBook"):
return False
else:
return True
if self.constants.firewire_boot is True and check_firewire(self.model) is True:
if self.constants.firewire_boot is True and generate_smbios.check_firewire(self.model) is True:
# Enable FireWire Boot Support
# Applicable for both native FireWire and Thunderbolt to FireWire adapters
print("- Enabling FireWire Boot Support")

View File

@@ -857,12 +857,13 @@ Supported Options:
change_menu = input("Set FeatreUnlock (ie. 1): ")
if change_menu == "1":
self.constants.fu_status = True
self.constants.fu_arguments = ""
self.constants.fu_arguments = None
elif change_menu == "2":
self.constants.fu_status = True
self.constants.fu_arguments = " -disable_sidecar_mac"
elif change_menu == "3":
self.constants.fu_status = False
self.constants.fu_arguments = None
else:
print("Invalid input, returning to previous menu")
self.set_fu_settings()

View File

@@ -124,8 +124,8 @@ class Constants:
self.override_smbios = "Default" # Set SMBIOS model used
## FeatureUnlock Settings
self.fu_status = True # Enable FeatureUnlock
self.fu_arguments = "" # Set FeatureUnlock arguments
self.fu_status = True # Enable FeatureUnlock
self.fu_arguments = None # Set FeatureUnlock arguments
## Latebloom Settings
self.latebloom_status = False # Latebloom Enabled

View File

@@ -1,4 +1,4 @@
from data import smbios_data, os_data
from data import smbios_data, os_data, cpu_data
from resources import utilities
@@ -98,3 +98,16 @@ def find_model_off_board(board):
key = "MacPro5,1"
return key
return None
def check_firewire(model):
# MacBooks never supported FireWire
# Pre-Thunderbolt MacBook Airs as well
if model.startswith("MacBookPro"):
return True
elif model.startswith("MacBookAir"):
if smbios_data.smbios_dictionary[model]["CPU Generation"] < cpu_data.cpu_data.sandy_bridge.value:
return False
elif model.startswith("MacBook"):
return False
else:
return True