mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-14 03:16:28 +10:00
Merge branch 'main' into gui-refactor
This commit is contained in:
+1
-1
@@ -36,4 +36,4 @@ __pycache__/
|
||||
/Universal-Binaries.dmg
|
||||
/payloads/KDKInfo.plist
|
||||
/payloads/update.sh
|
||||
/payloads/OpenCore-Patcher.app
|
||||
/payloads/OpenCore-Patcher.app
|
||||
@@ -28,6 +28,11 @@
|
||||
- Implement default selections for disks and installers
|
||||
- Increment Binaries:
|
||||
- PatcherSupportPkg 1.0.0 - release
|
||||
- OpenCorePkg 0.9.2 - release
|
||||
- Lilu 1.6.5 - release
|
||||
- RestrictEvents 1.1.1 - release
|
||||
- FeatureUnlock 1.1.4 - release
|
||||
- BlueToolFixup 2.6.6 - release
|
||||
|
||||
## 0.6.5
|
||||
- Update 3802 Patchset Binaries:
|
||||
|
||||
@@ -1960,6 +1960,8 @@
|
||||
<false/>
|
||||
<key>DisableIoMapper</key>
|
||||
<false/>
|
||||
<key>DisableIoMapperMapping</key>
|
||||
<false/>
|
||||
<key>DisableLinkeditJettison</key>
|
||||
<false/>
|
||||
<key>DisableRtcChecksum</key>
|
||||
@@ -2617,6 +2619,8 @@
|
||||
<string>Disabled</string>
|
||||
<key>IgnoreTextInGraphics</key>
|
||||
<false/>
|
||||
<key>InitialMode</key>
|
||||
<string>Auto</string>
|
||||
<key>ProvideConsoleGop</key>
|
||||
<true/>
|
||||
<key>ReconnectGraphicsOnConnect</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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -152,6 +152,26 @@ class GenerateKexts:
|
||||
self._get_latest_release(kext_folder, kext_name)
|
||||
|
||||
|
||||
def _is_build_nightly(self, kext: str, version: str) -> bool:
|
||||
# Load CHANGELOG.md
|
||||
changelog_path = Path(f"../../CHANGELOG.md").absolute()
|
||||
with open(changelog_path, "r") as changelog_file:
|
||||
changelog = changelog_file.read()
|
||||
|
||||
# Check if kext is in changelog
|
||||
if kext not in changelog:
|
||||
return False
|
||||
|
||||
# Check if kext is 'rolling' or 'nightly'
|
||||
for line in changelog.split("\n"):
|
||||
if kext in line and version in line:
|
||||
if ("rolling" in line or "nightly" in line):
|
||||
return True
|
||||
break
|
||||
|
||||
return False
|
||||
|
||||
|
||||
def _get_latest_release(self, kext_folder, kext_name, override_kext_zip_name=None):
|
||||
# Get latest release from GitHub API
|
||||
repo_url = KEXT_DICTIONARY[kext_folder][kext_name]["Repository"].replace("https://github.com", "https://api.github.com/repos")
|
||||
@@ -178,7 +198,12 @@ class GenerateKexts:
|
||||
|
||||
if packaging.version.parse(remote_version) <= packaging.version.parse(local_version):
|
||||
print(f" {kext_name} {variant} is up to date: v{local_version}")
|
||||
continue
|
||||
if remote_version == local_version:
|
||||
if self._is_build_nightly(kext_name, local_version) is False:
|
||||
continue
|
||||
print(f" {kext_name} {variant} is a nightly build, updating...")
|
||||
else:
|
||||
continue
|
||||
|
||||
for asset in latest_release["assets"]:
|
||||
if not asset["name"].endswith(f"{variant}.zip"):
|
||||
@@ -186,9 +211,9 @@ class GenerateKexts:
|
||||
print(f" Downloading {kext_name} {variant}: v{remote_version}...")
|
||||
zip_name = f"{override_kext_zip_name}-v{remote_version}-{variant}.zip" if override_kext_zip_name else f"{kext_name}-v{remote_version}-{variant}.zip"
|
||||
|
||||
self._download_file(asset["browser_download_url"], f"./{kext_folder}/{zip_name}", f"{kext_name}.kext")
|
||||
if Path(f"./{kext_folder}/{zip_name}").exists():
|
||||
if Path(f"./{kext_folder}/{zip_name.replace(f'v{remote_version}', f'v{local_version}')}").exists():
|
||||
subprocess.run(["rm", "-rf", f"./{kext_folder}/{zip_name.replace(f'v{remote_version}', f'v{local_version}')}"])
|
||||
self._download_file(asset["browser_download_url"], f"./{kext_folder}/{zip_name}", f"{kext_name}.kext")
|
||||
self._update_constants_file(KEXT_DICTIONARY[kext_folder][kext_name]["Constants Variable"], local_version, remote_version)
|
||||
|
||||
if override_kext_zip_name:
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -113,7 +113,7 @@ class BuildOpenCore:
|
||||
self.config["#Revision"]["Hardware-Probe"] = pickle.dumps(computer_copy)
|
||||
else:
|
||||
self.config["#Revision"]["Build-Type"] = "OpenCore Built for External Machine"
|
||||
self.config["#Revision"]["OpenCore-Version"] = f"{self.constants.opencore_version} - {self.constants.opencore_build} - {self.constants.opencore_commit}"
|
||||
self.config["#Revision"]["OpenCore-Version"] = f"{self.constants.opencore_version} - {self.constants.opencore_build}"
|
||||
self.config["#Revision"]["Original-Model"] = self.model
|
||||
self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Version"] = f"{self.constants.patcher_version}"
|
||||
self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Model"] = self.model
|
||||
|
||||
@@ -27,13 +27,12 @@ class Constants:
|
||||
|
||||
# OpenCore Versioning
|
||||
# https://github.com/acidanthera/OpenCorePkg
|
||||
self.opencore_commit: str = "41b8aca - 04-03-2023"
|
||||
self.opencore_version: str = "0.9.1"
|
||||
self.opencore_version: str = "0.9.2"
|
||||
|
||||
# Kext Versioning
|
||||
## Acidanthera
|
||||
## https://github.com/acidanthera
|
||||
self.lilu_version: str = "1.6.4" # Lilu
|
||||
self.lilu_version: str = "1.6.5" # Lilu
|
||||
self.whatevergreen_version: str = "1.6.4" # WhateverGreen
|
||||
self.whatevergreen_navi_version: str = "1.6.4-Navi" # WhateverGreen (Navi Patch)
|
||||
self.airportbcrmfixup_version: str = "2.1.7" # AirPortBrcmFixup
|
||||
@@ -43,7 +42,7 @@ class Constants:
|
||||
self.featureunlock_version: str = "1.1.4" # FeatureUnlock
|
||||
self.debugenhancer_version: str = "1.0.7" # DebugEnhancer
|
||||
self.cpufriend_version: str = "1.2.6" # CPUFriend
|
||||
self.bluetool_version: str = "2.6.5" # BlueToolFixup (BrcmPatchRAM)
|
||||
self.bluetool_version: str = "2.6.6" # BlueToolFixup (BrcmPatchRAM)
|
||||
self.cslvfixup_version: str = "2.6.1" # CSLVFixup
|
||||
self.autopkg_version: str = "1.0.2" # AutoPkgInstaller
|
||||
self.cryptexfixup_version: str = "1.0.1" # CryptexFixup
|
||||
|
||||
@@ -166,6 +166,29 @@ class PatcherValidation:
|
||||
self.constants.computer.reported_board_id = "Mac-7BA5B2DFE22DDD8C"
|
||||
sys_patch_helpers.SysPatchHelpers(self.constants).snb_board_id_patch(self.constants.payload_local_binaries_root_path)
|
||||
|
||||
# unmount the dmg
|
||||
output = subprocess.run(
|
||||
[
|
||||
"hdiutil", "detach", Path(self.constants.payload_path / Path("Universal-Binaries")),
|
||||
"-force"
|
||||
],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.STDOUT
|
||||
)
|
||||
|
||||
if output.returncode != 0:
|
||||
logging.info("- Failed to unmount Universal-Binaries.dmg")
|
||||
logging.info(f"Output: {output.stdout.decode()}")
|
||||
logging.info(f"Return Code: {output.returncode}")
|
||||
|
||||
raise Exception("Failed to unmount Universal-Binaries.dmg")
|
||||
|
||||
subprocess.run(
|
||||
[
|
||||
"rm", "-f", Path(self.constants.payload_path / Path("Universal-Binaries_overlay"))
|
||||
],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.STDOUT
|
||||
)
|
||||
|
||||
|
||||
def _validate_configs(self) -> None:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user