mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-17 12:50:00 +10:00
Increment binaries
This commit is contained in:
+20
-10
@@ -596,7 +596,7 @@ class BuildOpenCore:
|
||||
# device_id = Utilities.hexswap(binascii.hexlify(devices[0]["device-id"]).decode()[:4])
|
||||
# print("- Found XHCI Controller, adding Boot Support")
|
||||
# shutil.copy(self.constants.xhci_driver_path, self.constants.drivers_path)
|
||||
# self.config["UEFI"]["Drivers"] += ["XhciDxe.efi"]
|
||||
# self.get_efi_binary_by_path("XhciDxe.efi", "UEFI", "Drivers")["Enabled"] = True
|
||||
# except ValueError:
|
||||
# print("- No XHCI Controller Found (V)")
|
||||
# except IndexError:
|
||||
@@ -605,18 +605,20 @@ class BuildOpenCore:
|
||||
if self.constants.nvme_boot is True:
|
||||
print("- Enabling NVMe boot support")
|
||||
shutil.copy(self.constants.nvme_driver_path, self.constants.drivers_path)
|
||||
self.config["UEFI"]["Drivers"] += ["NvmExpressDxe.efi"]
|
||||
self.get_efi_binary_by_path("NvmExpressDxe.efi", "UEFI", "Drivers")["Enabled"] = True
|
||||
|
||||
# Add OpenCanopy
|
||||
print("- Adding OpenCanopy GUI")
|
||||
shutil.rmtree(self.constants.resources_path, onerror=rmtree_handler)
|
||||
shutil.copy(self.constants.gui_path, self.constants.oc_folder)
|
||||
self.config["UEFI"]["Drivers"] += ["OpenCanopy.efi", "OpenRuntime.efi"]
|
||||
self.get_efi_binary_by_path("OpenCanopy.efi", "UEFI", "Drivers")["Enabled"] = True
|
||||
self.get_efi_binary_by_path("OpenRuntime.efi", "UEFI", "Drivers")["Enabled"] = True
|
||||
self.get_efi_binary_by_path("OpenLinuxBoot.efi", "UEFI", "Drivers")["Enabled"] = True
|
||||
# Exfat check
|
||||
if self.model in ModelArray.NoExFat:
|
||||
print("- Adding ExFatDxeLegacy.efi")
|
||||
shutil.copy(self.constants.exfat_legacy_driver_path, self.constants.drivers_path)
|
||||
self.config["UEFI"]["Drivers"] += ["ExFatDxeLegacy.efi"]
|
||||
self.get_efi_binary_by_path("ExFatDxeLegacy.efi", "UEFI", "Drivers")["Enabled"] = True
|
||||
|
||||
# Add UGA to GOP layer
|
||||
if self.model in ModelArray.UGAtoGOP:
|
||||
@@ -651,7 +653,7 @@ class BuildOpenCore:
|
||||
if self.constants.vault is True:
|
||||
print("- Setting Vault configuration")
|
||||
self.config["Misc"]["Security"]["Vault"] = "Secure"
|
||||
self.get_tool_by__path("OpenShell.efi")["Enabled"] = False
|
||||
self.get_efi_binary_by_path("OpenShell.efi", "Misc", "Tools")["Enabled"] = False
|
||||
if self.constants.sip_status is False:
|
||||
print("- Disabling SIP")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["csr-active-config"] = binascii.unhexlify("EF0F0000")
|
||||
@@ -831,12 +833,13 @@ class BuildOpenCore:
|
||||
raise IndexError
|
||||
return kext
|
||||
|
||||
def get_tool_by__path(self, bundle_path):
|
||||
tool = self.get_item_by_kv(self.config["Misc"]["Tools"], "Path", bundle_path)
|
||||
if not tool:
|
||||
print(f"- Could not find Tool {bundle_path}!")
|
||||
def get_efi_binary_by_path(self, bundle_path, entry_location, efi_type):
|
||||
efi_binary = self.get_item_by_kv(self.config[entry_location][efi_type], "Path", bundle_path)
|
||||
if not efi_binary:
|
||||
print(f"- Could not find {efi_type}: {bundle_path}!")
|
||||
raise IndexError
|
||||
return tool
|
||||
return efi_binary
|
||||
|
||||
|
||||
def enable_kext(self, kext_name, kext_version, kext_path, check=False):
|
||||
kext = self.get_kext_by_bundle_path(kext_name)
|
||||
@@ -852,6 +855,7 @@ class BuildOpenCore:
|
||||
def cleanup(self):
|
||||
print("- Cleaning up files")
|
||||
# Remove unused entries
|
||||
# TODO: Consolidate into a single for loop
|
||||
for entry in list(self.config["ACPI"]["Add"]):
|
||||
if not entry["Enabled"]:
|
||||
self.config["ACPI"]["Add"].remove(entry)
|
||||
@@ -864,6 +868,12 @@ class BuildOpenCore:
|
||||
for entry in list(self.config["Kernel"]["Patch"]):
|
||||
if not entry["Enabled"]:
|
||||
self.config["Kernel"]["Patch"].remove(entry)
|
||||
for entry in list(self.config["Misc"]["Tools"]):
|
||||
if not entry["Enabled"]:
|
||||
self.config["Misc"]["Tools"].remove(entry)
|
||||
for entry in list(self.config["UEFI"]["Drivers"]):
|
||||
if not entry["Enabled"]:
|
||||
self.config["UEFI"]["Drivers"].remove(entry)
|
||||
|
||||
plistlib.dump(self.config, Path(self.constants.plist_path).open("wb"), sort_keys=True)
|
||||
for kext in self.constants.kexts_path.rglob("*.zip"):
|
||||
|
||||
@@ -13,10 +13,10 @@ from Resources import device_probe
|
||||
class Constants:
|
||||
def __init__(self):
|
||||
self.patcher_version = "0.2.5"
|
||||
self.opencore_commit = "ff5ad67 - 08-02-2021"
|
||||
self.opencore_version = "0.7.2"
|
||||
self.lilu_version = "1.5.5"
|
||||
self.whatevergreen_version = "1.5.2"
|
||||
self.opencore_commit = "ff4b099 - 09-06-2021"
|
||||
self.opencore_version = "0.7.3"
|
||||
self.lilu_version = "1.5.6"
|
||||
self.whatevergreen_version = "1.5.3"
|
||||
self.airportbcrmfixup_version = "2.1.3"
|
||||
self.bcm570_version = "1.0.1"
|
||||
self.marvel_version = "1.0.0"
|
||||
@@ -38,7 +38,7 @@ class Constants:
|
||||
self.smcspoof_version = "1.0.0"
|
||||
self.nvmefix_version = "1.0.9"
|
||||
self.featureunlock_version = "1.0.3"
|
||||
self.debugenhancer_version = "1.0.3"
|
||||
self.debugenhancer_version = "1.0.4"
|
||||
self.innie_version = "1.3.0"
|
||||
self.fw_kext = "1.0.0"
|
||||
self.latebloom_version = "0.19"
|
||||
|
||||
@@ -1073,8 +1073,7 @@
|
||||
<key>Misc</key>
|
||||
<dict>
|
||||
<key>BlessOverride</key>
|
||||
<array>
|
||||
</array>
|
||||
<array/>
|
||||
<key>Boot</key>
|
||||
<dict>
|
||||
<key>ConsoleAttributes</key>
|
||||
@@ -1457,7 +1456,56 @@
|
||||
<key>ConnectDrivers</key>
|
||||
<true/>
|
||||
<key>Drivers</key>
|
||||
<array/>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Path</key>
|
||||
<string>OpenRuntime.efi</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>Arguments</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Path</key>
|
||||
<string>OpenCanopy.efi</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>Arguments</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Path</key>
|
||||
<string>NvmExpressDxe.efi</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>Arguments</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Path</key>
|
||||
<string>ExFatDxeLegacy.efi</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>Arguments</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Path</key>
|
||||
<string>XhciDxe.efi</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>Arguments</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Path</key>
|
||||
<string>OpenLinuxBoot.efi</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>Arguments</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>Input</key>
|
||||
<dict>
|
||||
<key>KeyFiltering</key>
|
||||
@@ -1555,6 +1603,8 @@
|
||||
<false/>
|
||||
<key>ExitBootServicesDelay</key>
|
||||
<integer>0</integer>
|
||||
<key>ForceOcWriteFlash</key>
|
||||
<false/>
|
||||
<key>ForgeUefiSupport</key>
|
||||
<false/>
|
||||
<key>IgnoreInvalidFlexRatio</key>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -5,12 +5,10 @@
|
||||
# - Place the X64 folder in the /payloads/OpenCore folder
|
||||
# - Rename to OpenCore-VERSION (ie. DEBUG or RELEASE)
|
||||
# - Run script
|
||||
# - Rename folders to appropriate versions (ie. OpenCore-v0.6.8)
|
||||
# - Rename folders to appropriate versions (ie. OpenCore-Build)
|
||||
# - Zip folders
|
||||
# TODO:
|
||||
# - Import OC version from Constants.py
|
||||
# - Download latest builds from dortania.github.io
|
||||
# - Automatically rename and zip folders
|
||||
from __future__ import print_function
|
||||
|
||||
import subprocess
|
||||
@@ -69,7 +67,7 @@ for version in build_types:
|
||||
else:
|
||||
print(f"- Unable to find {delete_tools}, skipping")
|
||||
|
||||
print("Renaming folder to OpenCore-Build and zipping")
|
||||
print("- Renaming folder to OpenCore-Build and zipping")
|
||||
subprocess.run(f"mv ./OpenCore-{version} ./OpenCore-Build".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
subprocess.run(f"zip -r ./OpenCore-{version}.zip ./OpenCore-Build".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
subprocess.run(f"rm -rf ./OpenCore-Build".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
subprocess.run(f"rm -rf ./OpenCore-Build".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user