mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-21 06:30:52 +10:00
build.py: Add WhateverGreen for Web Driver configs
This commit is contained in:
@@ -694,6 +694,8 @@ class BuildOpenCore:
|
|||||||
self.config["DeviceProperties"]["Add"][device.pci_path].update({"disable-metal": 1, "force-compat": 1})
|
self.config["DeviceProperties"]["Add"][device.pci_path].update({"disable-metal": 1, "force-compat": 1})
|
||||||
if "nvda_drv_vrl=1" not in self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"]:
|
if "nvda_drv_vrl=1" not in self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"]:
|
||||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " nvda_drv_vrl=1"
|
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " nvda_drv_vrl=1"
|
||||||
|
if self.get_kext_by_bundle_path("WhateverGreen.kext")["Enabled"] is False:
|
||||||
|
self.enable_kext("WhateverGreen.kext", self.constants.whatevergreen_version, self.constants.whatevergreen_path)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print(f"- Failed to find Device path for dGPU {i + 1}")
|
print(f"- Failed to find Device path for dGPU {i + 1}")
|
||||||
@@ -715,6 +717,8 @@ class BuildOpenCore:
|
|||||||
if "ngfxgl=1 ngfxcompat=1 nvda_drv_vrl=1" not in self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"]:
|
if "ngfxgl=1 ngfxcompat=1 nvda_drv_vrl=1" not in self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"]:
|
||||||
print("- Adding Web Driver Patches")
|
print("- Adding Web Driver Patches")
|
||||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " ngfxgl=1 ngfxcompat=1 nvda_drv_vrl=1"
|
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " ngfxgl=1 ngfxcompat=1 nvda_drv_vrl=1"
|
||||||
|
if self.get_kext_by_bundle_path("WhateverGreen.kext")["Enabled"] is False:
|
||||||
|
self.enable_kext("WhateverGreen.kext", self.constants.whatevergreen_version, self.constants.whatevergreen_path)
|
||||||
|
|
||||||
if not self.computer.gpus:
|
if not self.computer.gpus:
|
||||||
print("- No socketed dGPU found")
|
print("- No socketed dGPU found")
|
||||||
|
|||||||
@@ -66,8 +66,6 @@ def validate(settings):
|
|||||||
host_os_float = float(f"{major_kernel}.{minor_kernel}")
|
host_os_float = float(f"{major_kernel}.{minor_kernel}")
|
||||||
for patch_subject in patchset:
|
for patch_subject in patchset:
|
||||||
for patch_core in patchset[patch_subject]:
|
for patch_core in patchset[patch_subject]:
|
||||||
if patch_core == "Nvidia Web Drivers":
|
|
||||||
continue
|
|
||||||
patch_os_min_float = float(f'{patchset[patch_subject][patch_core]["OS Support"]["Minimum OS Support"]["OS Major"]}.{patchset[patch_subject][patch_core]["OS Support"]["Minimum OS Support"]["OS Minor"]}')
|
patch_os_min_float = float(f'{patchset[patch_subject][patch_core]["OS Support"]["Minimum OS Support"]["OS Major"]}.{patchset[patch_subject][patch_core]["OS Support"]["Minimum OS Support"]["OS Minor"]}')
|
||||||
patch_os_max_float = float(f'{patchset[patch_subject][patch_core]["OS Support"]["Maximum OS Support"]["OS Major"]}.{patchset[patch_subject][patch_core]["OS Support"]["Maximum OS Support"]["OS Minor"]}')
|
patch_os_max_float = float(f'{patchset[patch_subject][patch_core]["OS Support"]["Maximum OS Support"]["OS Major"]}.{patchset[patch_subject][patch_core]["OS Support"]["Maximum OS Support"]["OS Minor"]}')
|
||||||
if (host_os_float < patch_os_min_float or host_os_float > patch_os_max_float):
|
if (host_os_float < patch_os_min_float or host_os_float > patch_os_max_float):
|
||||||
|
|||||||
Reference in New Issue
Block a user