Compare commits

..

2 Commits

Author SHA1 Message Date
Dhinak G
e2a6d35c27 Fix last 2025-12-13 03:12:45 -05:00
Dhinak G
b3cc808e8d Test FV2 fix 2025-12-13 03:07:33 -05:00
27 changed files with 47 additions and 10921 deletions

View File

@@ -1,12 +1,5 @@
# OpenCore Legacy Patcher changelog
## 3.0.0
- Restore support for FileVault 2 on macOS 26
- Add USB mappings for macOS 26
- Adopt Liquid Glass-conformant app icon
- Increment Binaries:
- OpenCorePkg 1.0.5 - rolling (f03819e)
## 2.4.1
- Switch installer source to AppleDB
- Resolves missing or incorrect installers showing up when downloading an installer

View File

@@ -83,5 +83,4 @@ app = BUNDLE(coll,
"Build Date": time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),
"BuildMachineOSBuild": subprocess.run(["/usr/bin/sw_vers", "-buildVersion"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode().strip(),
"NSPrincipalClass": "NSApplication",
"CFBundleIconName": "oclp",
})

View File

@@ -131,26 +131,6 @@ class GenerateApplication:
f.write(data)
def _patch_sdk_version(self) -> None:
"""
Patch LC_BUILD_VERSION in Load Command to report the macOS 26 SDK
This will enable the Solarium refresh when running on macOS 26
Minor visual anomalies and padding issues exist, disable if not addressed before release
"""
_file = self._application_output / "Contents" / "MacOS" / "OpenCore-Patcher"
_find = b'\x00\x01\x0C\x00'
_replace = b'\x00\x00\x1A\x00'
print("Patching LC_BUILD_VERSION")
with open(_file, "rb") as f:
data = f.read()
data = data.replace(_find, _replace)
with open(_file, "wb") as f:
f.write(data)
def _embed_git_data(self) -> None:
"""
Embed git data
@@ -182,11 +162,6 @@ class GenerateApplication:
stdout=subprocess.PIPE, stderr=subprocess.PIPE
)
subprocess_wrapper.run_and_verify(
generate_copy_arguments("payloads/Icon/AppIcons/Assets.car", self._application_output / "Contents/Resources/"),
stdout=subprocess.PIPE, stderr=subprocess.PIPE
)
def generate(self) -> None:
"""
@@ -197,6 +172,5 @@ class GenerateApplication:
self._remove_analytics_key()
self._patch_load_command()
self._patch_sdk_version() if not self._git_branch or not self._git_branch.startswith('refs/tags') else None
self._embed_git_data()
self._embed_resources()

View File

@@ -44,7 +44,6 @@ class InstallerBackup:
os_data.os_data.ventura,
os_data.os_data.sonoma,
os_data.os_data.sequoia,
os_data.os_data.tahoe,
],
first_run: bool = False
) -> None:
@@ -60,7 +59,6 @@ class InstallerBackup:
os_data.os_data.ventura: Path(self._directory, "13 Ventura"),
os_data.os_data.sonoma: Path(self._directory, "14 Sonoma"),
os_data.os_data.sequoia: Path(self._directory, "15 Sequoia"),
os_data.os_data.tahoe: Path(self._directory, "26 Tahoe"),
}
for os_version in self._supported_oses:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 639 KiB

After

Width:  |  Height:  |  Size: 270 KiB

View File

@@ -13,7 +13,7 @@ from .detections import device_probe
class Constants:
def __init__(self) -> None:
# Patcher Versioning
self.patcher_version: str = "3.0.0" # OpenCore-Legacy-Patcher
self.patcher_version: str = "2.4.1" # OpenCore-Legacy-Patcher
self.patcher_support_pkg_version: str = "1.9.5" # PatcherSupportPkg
self.copyright_date: str = "Copyright © 2020-2025 Dortania"
self.patcher_name: str = "OpenCore Legacy Patcher"
@@ -28,7 +28,7 @@ class Constants:
# OpenCore Versioning
# https://github.com/acidanthera/OpenCorePkg
self.opencore_version: str = "1.0.5"
self.opencore_version: str = "1.0.4"
# Kext Versioning
## Acidanthera
@@ -322,10 +322,6 @@ class Constants:
return self.payload_path / Path("ACPI/SSDT-DGPU.aml")
# Drivers
@property
def sequoia_apfs_driver_path(self):
return self.payload_path / Path("Drivers/apfs_aligned.efi")
@property
def nvme_driver_path(self):
return self.payload_path / Path("Drivers/NvmExpressDxe.efi")
@@ -358,6 +354,10 @@ class Constants:
def link_rate_driver_path(self):
return self.payload_path / Path("Drivers/FixPCIeLinkRate.efi")
@property
def apfs_driver_path(self):
return self.payload_path / Path("Drivers/apfs_aligned.efi")
@property
def installer_sh_path(self):
return self.payload_path / Path("Installer.sh")
@@ -689,18 +689,10 @@ class Constants:
def map_kext_folder(self):
return self.kexts_path / Path("USB-Map.kext")
@property
def map_kext_folder_tahoe(self):
return self.kexts_path / Path("USB-Map-Tahoe.kext")
@property
def map_contents_folder(self):
return self.map_kext_folder / Path("Contents")
@property
def map_contents_folder_tahoe(self):
return self.map_kext_folder_tahoe / Path("Contents")
@property
def pp_kext_folder(self):
return self.kexts_path / Path("CPUFriendDataProvider.kext")
@@ -806,10 +798,6 @@ class Constants:
def icon_path_macos_sequoia(self):
return self.icns_resource_path / Path("Sequoia.icns")
@property
def icon_path_macos_tahoe(self):
return self.icns_resource_path / Path("Tahoe.icns")
@property
def gui_path(self):
return self.payload_path / Path("Icon/Resources.zip")
@@ -844,7 +832,6 @@ class Constants:
str(self.icon_path_macos_ventura),
str(self.icon_path_macos_sonoma),
str(self.icon_path_macos_sequoia),
str(self.icon_path_macos_tahoe),
]
sbm_values = [

View File

@@ -26,7 +26,6 @@ SupportedSMBIOS = [
"MacBookAir7,2",
# "MacBookAir8,1",
# "MacBookAir8,2",
# "MacBookAir9,1",
# MacBook Pro
"MacBookPro4,1",
"MacBookPro5,1",
@@ -56,11 +55,6 @@ SupportedSMBIOS = [
"MacBookPro14,1",
"MacBookPro14,2",
"MacBookPro14,3",
# "MacBookPro15,1",
# "MacBookPro15,2",
# "MacBookPro15,3",
# "MacBookPro15,4",
# "MacBookPro16,3",
# Mac Mini
"Macmini3,1",
"Macmini4,1",
@@ -70,7 +64,6 @@ SupportedSMBIOS = [
"Macmini6,1",
"Macmini6,2",
"Macmini7,1",
# "Macmini8,1",
# iMac
"iMac7,1",
"iMac8,1",
@@ -95,8 +88,6 @@ SupportedSMBIOS = [
"iMac18,1",
"iMac18,2",
"iMac18,3",
"iMac19,1",
"iMac19,2",
# Mac Pro
"MacPro3,1",
"MacPro4,1",
@@ -105,8 +96,6 @@ SupportedSMBIOS = [
# Xserve
"Xserve2,1",
"Xserve3,1",
# iMac Pro
# "iMacPro1,1",
]
# Audio

View File

@@ -216,14 +216,6 @@ class BuildFirmware:
if not "CPU Generation" in smbios_data.smbios_dictionary[self.model]:
return
# APFS check
# The macOS 26 APFS EFI driver's FileVault 2 implementation is broken, and
# must be replaced with the macOS 15 APFS EFI driver.
logging.info("- Enabling macOS 26 FileVault 2 support")
self.config["UEFI"]["APFS"]["EnableJumpstart"] = False
shutil.copy(self.constants.sequoia_apfs_driver_path, self.constants.drivers_path)
support.BuildSupport(self.model, self.constants, self.config).get_efi_binary_by_path("apfs_aligned.efi", "UEFI", "Drivers")["Enabled"] = True
# Exfat check
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.CPUGen.sandy_bridge.value:
# Sandy Bridge and newer Macs natively support ExFat

View File

@@ -285,26 +285,19 @@ xw
# USB Map
usb_map_path = Path(self.constants.plist_folder_path) / Path("AppleUSBMaps/Info.plist")
usb_map_tahoe_path = Path(self.constants.plist_folder_path) / Path("AppleUSBMaps/Info-Tahoe.plist")
if (
usb_map_path.exists()
and usb_map_tahoe_path.exists()
and (self.constants.allow_oc_everywhere is False or self.constants.allow_native_spoofs is True)
and self.model not in ["Xserve2,1", "Dortania1,1"]
and (
(self.model in model_array.Missing_USB_Map or self.model in model_array.Missing_USB_Map_Ventura)
or self.constants.serial_settings in ["Moderate", "Advanced"])
):
logging.info("- Adding USB-Map.kext and USB-Map-Tahoe.kext")
logging.info("- Adding USB-Map.kext")
Path(self.constants.map_kext_folder).mkdir()
Path(self.constants.map_kext_folder_tahoe).mkdir()
Path(self.constants.map_contents_folder).mkdir()
Path(self.constants.map_contents_folder_tahoe).mkdir()
shutil.copy(usb_map_path, self.constants.map_contents_folder)
# for the tahoe, need to copy but rename to Info.plist
shutil.copy(usb_map_tahoe_path, self.constants.map_contents_folder_tahoe / Path("Info.plist"))
support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("USB-Map.kext")["Enabled"] = True
support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("USB-Map-Tahoe.kext")["Enabled"] = True
if self.model in model_array.Missing_USB_Map_Ventura and self.constants.serial_settings not in ["Moderate", "Advanced"]:
support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("USB-Map.kext")["MinKernel"] = "22.0.0"
@@ -331,9 +324,6 @@ xw
support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("USB1.1-Injector.kext/Contents/PlugIns/AppleUSBUHCI.kext")["Enabled"] = True
support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("USB1.1-Injector.kext/Contents/PlugIns/AppleUSBUHCIPCI.kext")["Enabled"] = True
# Also remove MaxKernel from the USB-Map.kext, as USB stack will be downgraded after root patching
support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("USB-Map.kext")["MaxKernel"] = ""
def _debug_handling(self) -> None:
"""
@@ -365,6 +355,7 @@ xw
logging.info("- Adding OpenCanopy GUI")
shutil.copy(self.constants.gui_path, self.constants.oc_folder)
shutil.copy(self.constants.apfs_driver_path, self.constants.drivers_path)
support.BuildSupport(self.model, self.constants, self.config).get_efi_binary_by_path("OpenCanopy.efi", "UEFI", "Drivers")["Enabled"] = True
support.BuildSupport(self.model, self.constants, self.config).get_efi_binary_by_path("OpenRuntime.efi", "UEFI", "Drivers")["Enabled"] = True
support.BuildSupport(self.model, self.constants, self.config).get_efi_binary_by_path("OpenLinuxBoot.efi", "UEFI", "Drivers")["Enabled"] = True

View File

@@ -67,24 +67,6 @@ class BuildSMBIOS:
logging.info("- Adding -no_compat_check")
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -no_compat_check"
def _strip_usb_map(self, map_path, model, spoofed_model, serial_settings):
config = plistlib.load(Path(map_path).open("rb"))
for entry in list(config["IOKitPersonalities_x86_64"]):
if not entry.startswith(model):
config["IOKitPersonalities_x86_64"].pop(entry)
else:
try:
config["IOKitPersonalities_x86_64"][entry]["model"] = spoofed_model
if serial_settings in ["Minimal", "None"]:
if config["IOKitPersonalities_x86_64"][entry]["IONameMatch"] == "EH01":
config["IOKitPersonalities_x86_64"][entry]["IONameMatch"] = "EHC1"
if config["IOKitPersonalities_x86_64"][entry]["IONameMatch"] == "EH02":
config["IOKitPersonalities_x86_64"][entry]["IONameMatch"] = "EHC2"
if config["IOKitPersonalities_x86_64"][entry]["IONameMatch"] == "SHC1":
config["IOKitPersonalities_x86_64"][entry]["IONameMatch"] = "XHC1"
except KeyError:
continue
plistlib.dump(config, Path(map_path).open("wb"), sort_keys=True)
def set_smbios(self) -> None:
"""
@@ -160,10 +142,24 @@ class BuildSMBIOS:
and ((self.model in model_array.Missing_USB_Map or self.model in model_array.Missing_USB_Map_Ventura) or self.constants.serial_settings in ["Moderate", "Advanced"])
):
new_map_ls = Path(self.constants.map_contents_folder) / Path("Info.plist")
new_map_ls_tahoe = Path(self.constants.map_contents_folder_tahoe) / Path("Info.plist")
self._strip_usb_map(new_map_ls, self.model, self.spoofed_model, self.constants.serial_settings)
self._strip_usb_map(new_map_ls_tahoe, self.model, self.spoofed_model, self.constants.serial_settings)
map_config = plistlib.load(Path(new_map_ls).open("rb"))
# Strip unused USB maps
for entry in list(map_config["IOKitPersonalities_x86_64"]):
if not entry.startswith(self.model):
map_config["IOKitPersonalities_x86_64"].pop(entry)
else:
try:
map_config["IOKitPersonalities_x86_64"][entry]["model"] = self.spoofed_model
if self.constants.serial_settings in ["Minimal", "None"]:
if map_config["IOKitPersonalities_x86_64"][entry]["IONameMatch"] == "EH01":
map_config["IOKitPersonalities_x86_64"][entry]["IONameMatch"] = "EHC1"
if map_config["IOKitPersonalities_x86_64"][entry]["IONameMatch"] == "EH02":
map_config["IOKitPersonalities_x86_64"][entry]["IONameMatch"] = "EHC2"
if map_config["IOKitPersonalities_x86_64"][entry]["IONameMatch"] == "SHC1":
map_config["IOKitPersonalities_x86_64"][entry]["IONameMatch"] = "XHC1"
except KeyError:
continue
plistlib.dump(map_config, Path(new_map_ls).open("wb"), sort_keys=True)
if self.constants.allow_oc_everywhere is False and self.model not in ["iMac7,1", "Xserve2,1", "Dortania1,1"] and self.constants.disallow_cpufriend is False and self.constants.serial_settings != "None":
# Adjust CPU Friend Data to correct SMBIOS
new_cpu_ls = Path(self.constants.pp_contents_folder) / Path("Info.plist")

View File

@@ -29,7 +29,7 @@ class CatalogProducts:
catalog: dict,
install_assistants_only: bool = True,
only_vmm_install_assistants: bool = True,
max_install_assistant_version: CatalogVersion = CatalogVersion.TAHOE
max_install_assistant_version: CatalogVersion = CatalogVersion.SEQUOIA
) -> None:
self.catalog: dict = catalog
self.ia_only: bool = install_assistants_only
@@ -251,17 +251,6 @@ class CatalogProducts:
if installer in products_copy:
products_copy.pop(products_copy.index(installer))
# Remove duplicates of the same version (i.e. multiple betas still in catalog), keep only latest
version_map = {}
for installer in products_copy:
version = installer.get("Version")
post_date = installer.get("PostDate")
if version is None:
continue
if version not in version_map or post_date > version_map[version].get("PostDate", ""):
version_map[version] = installer
products_copy = list(version_map.values())
# Remove EOL versions (older than n-3)
for installer in products:

View File

@@ -28,7 +28,7 @@ class AppleDBProducts:
def __init__(
self,
global_constants: constants.Constants,
max_install_assistant_version: os_data = os_data.tahoe,
max_install_assistant_version: os_data = os_data.sequoia,
) -> None:
self.constants: constants.Constants = global_constants

View File

@@ -29,7 +29,7 @@ class CatalogURL:
extension (CatalogExtension): Extension for the catalog URL
"""
def __init__(self,
version: CatalogVersion = CatalogVersion.TAHOE,
version: CatalogVersion = CatalogVersion.SEQUOIA,
seed: SeedType = SeedType.PublicRelease,
extension: CatalogExtension = CatalogExtension.PLIST
) -> None:

View File

@@ -41,7 +41,6 @@ from .hardware.misc import (
gmux,
keyboard_backlight,
legacy_audio,
modern_audio,
pcie_webcam,
t1_security,
usb11,
@@ -128,12 +127,10 @@ class HardwarePatchsetDetection:
legacy_wireless.LegacyWireless,
modern_wireless.ModernWireless,
legacy_audio.LegacyAudio,
modern_audio.ModernAudio,
display_backlight.DisplayBacklight,
gmux.GraphicsMultiplexer,
keyboard_backlight.KeyboardBacklight,
legacy_audio.LegacyAudio,
pcie_webcam.PCIeFaceTimeCamera,
t1_security.T1SecurityChip,
usb11.USB11Controller,

View File

@@ -1,77 +0,0 @@
"""
modern_audio.py: Modern Audio patch set for macOS 26
"""
from ..base import BaseHardware, HardwareVariant
from ...base import PatchType
from .....constants import Constants
from .....datasets.os_data import os_data
class ModernAudio(BaseHardware):
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
def name(self) -> str:
"""
Display name for end users
"""
return f"{self.hardware_variant()}: Modern Audio"
def present(self) -> bool:
"""
AppleHDA was outright removed in macOS 26, so this patch set is always present if OS requires it
"""
return True
def native_os(self) -> bool:
"""
- Everything before macOS Tahoe 26 is considered native
"""
if self._xnu_major < os_data.tahoe.value:
return True
# Technically, macOS Tahoe Beta 1 is also native, so return True
if self._os_build == "25A5279m":
return True
return False
def hardware_variant(self) -> HardwareVariant:
"""
Type of hardware variant
"""
return HardwareVariant.MISCELLANEOUS
def _modern_audio_patches(self) -> dict:
"""
Patches for Modern Audio
"""
return {
"Modern Audio": {
PatchType.OVERWRITE_SYSTEM_VOLUME: {
"/System/Library/Extensions": {
"AppleHDA.kext": "26.0 Beta 1",
},
},
},
}
def patches(self) -> dict:
"""
Patches for modern audio
"""
if self.native_os() is True:
return {}
return self._modern_audio_patches()

View File

@@ -72,22 +72,14 @@ class MainFrame(wx.Frame):
- Text: Copyright
"""
# Logo
logo = wx.StaticBitmap(self, bitmap=wx.Bitmap(str(self.constants.icns_resource_path / "OC-Patcher.icns"), wx.BITMAP_TYPE_ICON), pos=(-1, 0), size=(128, 128))
logo.Centre(wx.HORIZONTAL)
# Title label: OpenCore Legacy Patcher v{X.Y.Z}
title_label = wx.StaticText(self, label=f"OpenCore Legacy Patcher", pos=(-1, 128))
title_label.SetFont(gui_support.font_factory(25, wx.FONTWEIGHT_BOLD))
title_label = wx.StaticText(self, label=f"OpenCore Legacy Patcher {'' if self.constants.special_build else ''}{self.constants.patcher_version}{' (Nightly)' if not self.constants.commit_info[0].startswith('refs/tags') else ''}", pos=(-1, 10))
title_label.SetFont(gui_support.font_factory(19, wx.FONTWEIGHT_BOLD))
title_label.Centre(wx.HORIZONTAL)
version_label = wx.StaticText(self, label=f"Version {self.constants.patcher_version}{' (Nightly)' if not self.constants.commit_info[0].startswith('refs/tags') else ''}", pos=(-1, title_label.GetPosition()[1] + 32))
version_label.SetFont(gui_support.font_factory(13, wx.FONTWEIGHT_NORMAL))
version_label.Centre(wx.HORIZONTAL)
version_label.SetForegroundColour(wx.Colour(128, 128, 128))
# Text: Model: {Build or Host Model}
model_label = wx.StaticText(self, label=f"Model: {self.constants.custom_model or self.constants.computer.real_model}", pos=(-1, version_label.GetPosition()[1] + 30))
model_label = wx.StaticText(self, label=f"Model: {self.constants.custom_model or self.constants.computer.real_model}", pos=(-1, title_label.GetPosition()[1] + 25
))
model_label.SetFont(gui_support.font_factory(13, wx.FONTWEIGHT_NORMAL))
model_label.Centre(wx.HORIZONTAL)
self.model_label = model_label

View File

@@ -169,20 +169,6 @@ class CheckProperties:
return True
def host_is_solarium(self) -> bool:
"""
Check if running on macOS 26, and if Solarium refresh is enabled
"""
if self.constants.detected_os < os_data.os_data.tahoe:
return False
# If we are a release build, we are not Solarium for now
if self.constants.commit_info[0].startswith('refs/tags'):
return False
return True
def host_has_cpu_gen(self, gen: int) -> bool:
"""

View File

@@ -753,7 +753,7 @@
<key>Enabled</key>
<false/>
<key>MaxKernel</key>
<string>24.99.99</string>
<string></string>
<key>MinKernel</key>
<string></string>
<key>BundlePath</key>
@@ -763,24 +763,6 @@
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>USB Map for Tahoe</string>
<key>Enabled</key>
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>25.0.0</string>
<key>BundlePath</key>
<string>USB-Map-Tahoe.kext</string>
<key>ExecutablePath</key>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
@@ -2954,18 +2936,6 @@
<key>LoadEarly</key>
<false/>
</dict>
<dict>
<key>Comment</key>
<string></string>
<key>Path</key>
<string>apfs_aligned.efi</string>
<key>Enabled</key>
<false/>
<key>Arguments</key>
<string></string>
<key>LoadEarly</key>
<false/>
</dict>
<dict>
<key>Comment</key>
<string></string>
@@ -3086,6 +3056,18 @@
<key>LoadEarly</key>
<false/>
</dict>
<dict>
<key>Comment</key>
<string></string>
<key>Path</key>
<string>apfs_aligned.efi</string>
<key>Enabled</key>
<true/>
<key>Arguments</key>
<string></string>
<key>LoadEarly</key>
<false/>
</dict>
</array>
<key>Input</key>
<dict>

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -60,13 +60,6 @@ UNUSED_DRIVERS = [
"RamDiskDxe.efi",
"Mtftp6Dxe.efi",
"OpenNetworkBoot.efi",
"Virtio10.efi",
"VirtioBlkDxe.efi",
"VirtioGpuDxe.efi",
"VirtioNetDxe.efi",
"VirtioPciDeviceDxe.efi",
"VirtioScsiDxe.efi",
"VirtioSerialDxe.efi"
]
UNUSED_TOOLS = [

Binary file not shown.

Binary file not shown.