Skip to content

Commit

Permalink
paylods: Resolve malformed CFBundleExecutable property
Browse files Browse the repository at this point in the history
  • Loading branch information
khronokernel committed Nov 26, 2023
1 parent 3467670 commit 03842d4
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# OpenCore Legacy Patcher changelog

## 1.3.0
- Resolve mismatched `CFBundleExecutable` and binary name for kexts.
- Resolves ProperTree binary detection (Thanks @CorpNewt).
- Applicable extensions:
- corecrypto_T1.kext
- corecaptureElCap.kext
- IO80211ElCap.kext

## 1.2.1
- Resolve `TeraScale 2 Acceleration` checkbox in Settings not being saved
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
21 changes: 21 additions & 0 deletions resources/build/support.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,27 @@ def validate_pathing(self) -> None:
logging.info(f"- Found extra driver: {driver_file.name}")
raise Exception(f"Found extra driver: {driver_file.name}")

self._validate_malformed_kexts(self.constants.opencore_release_folder / Path("EFI/OC/Kexts"))


def _validate_malformed_kexts(self, directory: str | Path) -> None:
"""
Validate Info.plist and executable pathing for kexts
"""
for kext_folder in Path(directory).glob("*.kext"):
if not Path(kext_folder / Path("Contents/Info.plist")).exists():
continue

kext_data = plistlib.load(Path(kext_folder / Path("Contents/Info.plist")).open("rb"))
if "CFBundleExecutable" in kext_data:
expected_executable = Path(kext_folder / Path("Contents/MacOS") / Path(kext_data["CFBundleExecutable"]))
if not expected_executable.exists():
logging.info(f"- Missing executable for {kext_folder.name}: Contents/MacOS/{expected_executable.name}")
raise Exception(f" - Missing executable for {kext_folder.name}: Contents/MacOS/{expected_executable.name}")

if Path(kext_folder / Path("Contents/PlugIns")).exists():
self._validate_malformed_kexts(kext_folder / Path("Contents/PlugIns"))


def cleanup(self) -> None:
"""
Expand Down
6 changes: 3 additions & 3 deletions resources/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ def __init__(self) -> None:
self.apple_camera_version: str = "1.0.0" # AppleCameraInterface (14.0 Beta 1)
self.t1_sse_version: str = "1.1.0" # AppleSSE (13.6 - T1 support)
self.t1_key_store_version: str = "1.1.0" # AppleKeyStore (13.6 - T1 support)
self.t1_corecrypto_version: str = "1.0.0" # corecrypto (13.6 - T1 support)
self.t1_corecrypto_version: str = "1.0.1" # corecrypto (13.6 - T1 support)

## Apple - Dortania Modified
self.bcm570_version: str = "1.0.2" # CatalinaBCM5701Ethernet
self.i210_version: str = "1.0.0" # CatalinaIntelI210Ethernet
self.corecaptureelcap_version: str = "1.0.1" # corecaptureElCap
self.io80211elcap_version: str = "2.0.0" # IO80211ElCap
self.corecaptureelcap_version: str = "1.0.2" # corecaptureElCap
self.io80211elcap_version: str = "2.0.1" # IO80211ElCap
self.io80211legacy_version: str = "1.0.0" # IO80211FamilyLegacy (Ventura)
self.ioskywalk_version: str = "1.0.0" # IOSkywalkFamily (Ventura)
self.bigsursdxc_version: str = "1.0.0" # BigSurSDXC
Expand Down

0 comments on commit 03842d4

Please sign in to comment.