Merge branch 'main' into vmm

This commit is contained in:
Mykola Grymalyuk
2021-10-06 10:29:24 -06:00
committed by GitHub
8 changed files with 53 additions and 41 deletions
+1 -1
View File
@@ -857,7 +857,7 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
],
[
f"Set Secure Boot Model (SBM):\t\tCurrently {self.constants.secure_status}",
MenuOptions(self.constants.custom_model or self.constant.computer.real_model, self.constants).change_sbm,
MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).change_sbm,
],
[f"Set Vault Mode:\t\t\t\tCurrently {self.constants.vault}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).change_vault],
]
+9 -6
View File
@@ -13,8 +13,9 @@ from resources import device_probe
class Constants:
def __init__(self):
# Patcher Versioning
self.patcher_version = "0.3.0" # OpenCore-Legacy-Patcher
self.patcher_support_pkg_version = "0.1.5" # PatcherSupportPkg
self.patcher_support_pkg_version = "0.1.6" # PatcherSupportPkg
self.url_patcher_support_pkg = "https://github.com/dortania/PatcherSupportPkg/releases/download/"
self.nightly_url_patcher_support_pkg = "https://nightly.link/dortania/PatcherSupportPkg/workflows/build/master/"
# OpenCore Versioning
# https://github.com/acidanthera/OpenCorePkg
@@ -54,7 +55,7 @@ class Constants:
## Dortania
## https://github.com/dortania
self.backlight_injector_version = "1.0.0" # BacklightInjector
self.backlight_injector_version = "1.1.0" # BacklightInjector
self.smcspoof_version = "1.0.0" # SMC-Spoof
self.mce_version = "1.0.0" # AppleMCEReporterDisabler
self.btspoof_version = "1.0.0" # Bluetooth-Spoof
@@ -145,6 +146,7 @@ class Constants:
self.dGPU_switch = True # Set Display GPU Switching for Windows
self.force_surplus = False # Force SurPlus patch in newer OSes
self.set_kext_usage = True # Set Kext usage
self.force_latest_psp = False # Force latest PatcherSupportPkg
# OS Versions
## Based off Major Kernel Version
@@ -190,9 +192,6 @@ class Constants:
self.arch_fermi = "GF100"
self.arch_kepler = "GK100"
# External Files
self.url_patcher_support_pkg = "https://github.com/dortania/PatcherSupportPkg/releases/download/"
self.legacy_accel_support = [
self.mojave,
self.catalina,
@@ -566,6 +565,10 @@ class Constants:
@property
def payload_apple_private_frameworks_path_brightness(self):
return self.payload_apple_private_frameworks_path / Path("Brightness-Control")
@property
def payload_apple_private_frameworks_path_legacy_drm(self):
return self.payload_apple_private_frameworks_path / Path("Legacy-GVA")
# Apple Extensions
# El Capitan Extensions
+1 -1
View File
@@ -77,7 +77,7 @@ class generate_defaults():
if utilities.amfi_status() is False:
settings.amfi_status = False
if utilities.get_nvram("gpu-power-prefs", "FA4CE28D-B62F-4C99-9CC3-6815686E30F9"):
if model in ["MacBookPro8,2", "MacBookPro8,3"]:
# Users disabling TS2 most likely have a faulty dGPU
# users can override this in settings
settings.allow_ts2_accel = False
+8 -3
View File
@@ -117,7 +117,7 @@ class PatchSysVolume:
print("- Creating Backup folder")
utilities.process_status(
self.elevated(
utilities.elevated(
["cp", "-r", f"{self.mount_location}/{location}", f"{self.mount_location}/{location}-Backup"],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
@@ -125,7 +125,7 @@ class PatchSysVolume:
)
print("- Zipping Backup folder")
utilities.process_status(
self.elevated(
utilities.elevated(
["ditto", "-c", "-k", "--sequesterRsrc", "--keepParent", f"{self.mount_location}/{location}-Backup", f"{self.mount_location}/{location_zip}"],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
@@ -134,7 +134,7 @@ class PatchSysVolume:
print("- Removing Backup folder")
utilities.process_status(
self.elevated(
utilities.elevated(
["rm", "-r", f"{self.mount_location}/{location}-Backup"],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
@@ -397,6 +397,7 @@ set million colour before rebooting"""
self.gpu_accel_legacy()
self.add_new_binaries(sys_patch_data.AddIntelGen2Accel, self.constants.legacy_intel_gen2_path)
self.gpu_accel_legacy_sandybridge_board_id()
self.gpu_accel_legacy_gva()
else:
print("- Installing basic Sandy Bridge Framebuffer Kext patches for generic OS")
self.add_new_binaries(sys_patch_data.AddIntelGen2Accel, self.constants.legacy_intel_gen2_path)
@@ -435,6 +436,10 @@ set million colour before rebooting"""
else:
print("- Installing Kepler Kext patches for generic OS")
self.add_new_binaries(sys_patch_data.AddNvidiaKeplerAccel11, self.constants.legacy_nvidia_kepler_path)
def gpu_accel_legacy_gva(self):
print("- Merging AppleGVA Hardware Accel patches for non-Metal")
utilities.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_private_frameworks_path_legacy_drm}/", self.mount_private_frameworks], stdout=subprocess.PIPE)
def gpu_accel_legacy_extended(self):
print("- Merging general legacy Frameworks")