Clean unused variables

This commit is contained in:
Mykola Grymalyuk
2021-06-18 13:19:12 -06:00
parent 0dc40318d0
commit ac055a633c
3 changed files with 0 additions and 70 deletions

View File

@@ -140,11 +140,9 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True)
options = [
[f"Assume Metal GPU Always:\t\tCurrently {self.constants.imac_vendor}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_metal],
# [f"Assume Upgraded Wifi Always:\tCurrently {self.constants.wifi_build}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_wifi],
[f"Set SMBIOS Mode:\t\t\tCurrently {self.constants.serial_settings}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_serial],
[f"DRM Preferences:\t\t\tCurrently {self.constants.drm_support}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).drm_setting],
[f"Set Generic Bootstrap:\t\tCurrently {self.constants.boot_efi}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).bootstrap_setting],
# [f"Assume Legacy GPU:\t\t\tCurrently {self.constants.assume_legacy}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).force_accel_setting],
[
f"Disable CPU Friend:\t\t\tCurrently {self.constants.disallow_cpufriend}",
CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).disable_cpufriend,

View File

@@ -76,24 +76,6 @@ option is for those patching on a different machine or OCLP cannot detect.
else:
print("Invalid option")
def change_wifi(self):
Utilities.cls()
Utilities.header(["Assume Upgraded Wifi Always"])
print(
"""This is for Macs with upgraded wifi cards(ie. BCM94360/2)
Note: Patcher will detect whether hardware has been upgraded regardless, this
option is for those patching on a different machine or cannot detect.
"""
)
change_menu = input("Enable Upgraded Wifi build algorithm?(y/n): ")
if change_menu in {"y", "Y", "yes", "Yes"}:
self.constants.wifi_build = True
elif change_menu in {"n", "N", "no", "No"}:
self.constants.wifi_build = False
else:
print("Invalid option")
def change_serial(self):
Utilities.cls()
Utilities.header(["Set SMBIOS Mode"])
@@ -260,24 +242,6 @@ Recommend only disabling if absolutely required.
else:
print("Invalid option")
def force_accel_setting(self):
Utilities.cls()
Utilities.header(["Assume Legacy GPU"])
print(
"""Allows any model to force install Legacy Acceleration
patches. Only required for Mac Pro and Xserve users.
DO NOT RUN IF METAL GPU IS INSTALLED
"""
)
change_menu = input("Enable Beta Acceleration Patches(y/n): ")
if change_menu in {"y", "Y", "yes", "Yes"}:
self.constants.assume_legacy = True
elif change_menu in {"n", "N", "no", "No"}:
self.constants.assume_legacy = False
else:
print("Invalid option")
def allow_native_models(self):
Utilities.cls()
Utilities.header(["Allow OpenCore on native Models"])
@@ -353,22 +317,6 @@ Custom names will report as follows:
else:
print("Invalid option")
def download_more_ram_dot_com(self):
Utilities.cls()
Utilities.header(["Download more RAM"])
print(
"""Downloads more RAM to your Mac!
Currently only offers 1.5TB bundles
"""
)
change_menu = input("Download more RAM?(y/n): ")
if change_menu == "y":
self.constants.download_ram = True
elif change_menu == "n":
self.constants.download_ram = False
else:
print("Invalid option")
def disable_cpufriend(self):
Utilities.cls()
Utilities.header(["Disable CPU Friend?"])

View File

@@ -37,14 +37,11 @@ class Constants:
self.cpufriend_version = "1.2.4"
self.nightshift_version = "1.1.0"
self.smcspoof_version = "1.0.0"
self.cputscsync = "1.0.3"
self.hibernationfixup = "1.3.9"
self.nvmefix_version = "1.0.9"
self.sidecarfixup_version = "1.0.2"
self.debugenhancer_version = "1.0.3"
self.innie_version = "1.3.0"
self.fw_kext = "1.0.0"
self.payload_version = "0.0.18" # Apple-Binaries-OCLP
self.patcher_support_pkg_version = "0.0.2" # PatcherSupportPkg
# Get resource path
@@ -63,8 +60,6 @@ class Constants:
self.kext_debug = False
self.verbose_debug = False
self.os_support = 12.0
self.min_os_support = 11.0
self.max_os_support = 12.0
self.metal_build = False
self.imac_vendor = "None"
self.wifi_build = False
@@ -77,8 +72,6 @@ class Constants:
self.detected_os = 0
self.boot_efi = False
self.drm_support = False
self.legacy_acceleration_patch = True
self.assume_legacy = False
self.allow_oc_everywhere = False
self.custom_cpu_model = 2
self.custom_cpu_model_value = ""
@@ -133,7 +126,6 @@ class Constants:
self.arch_kepler = "GK100"
# External Files
self.url_apple_binaries = "https://github.com/dortania/Apple-Binaries-OCLP/archive/refs/tags/"
self.url_patcher_support_pkg = "https://github.com/dortania/PatcherSupportPkg/releases/download/"
# Payload Location
@@ -266,14 +258,6 @@ class Constants:
def smcspoof_path(self):
return self.payload_kexts_path / Path(f"Misc/SMC-Spoof-v{self.smcspoof_version}.zip")
@property
def cputscsync_path(self):
return self.payload_kexts_path / Path(f"Acidanthera/CpuTscSync-v{self.cputscsync}.zip")
@property
def hibernationfixup_path(self):
return self.payload_kexts_path / Path(f"Acidanthera/HibernationFixup-v{self.hibernationfixup}.zip")
@property
def nvmefix_path(self):
return self.payload_kexts_path / Path(f"Acidanthera/NVMeFix-v{self.nvmefix_version}.zip")