mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-15 21:28:55 +10:00
Compare commits
45 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3040c621a7 | ||
|
|
2f49a36ccc | ||
|
|
d551df34ed | ||
|
|
2fadae2e3d | ||
|
|
2e3ae755ea | ||
|
|
067206b536 | ||
|
|
96b126588d | ||
|
|
a70039abb5 | ||
|
|
6fca3339fc | ||
|
|
c668ac0004 | ||
|
|
88d6fc29f0 | ||
|
|
e556b0227a | ||
|
|
d7b8f91223 | ||
|
|
f2cddcae7c | ||
|
|
c9304bdbba | ||
|
|
117e7fa6ff | ||
|
|
6bec4ca2d2 | ||
|
|
1b8dcd1c1b | ||
|
|
f2f81f5239 | ||
|
|
7d7c94cd91 | ||
|
|
dde6a3d805 | ||
|
|
71dbb512a6 | ||
|
|
b7ddeb3b50 | ||
|
|
175cb3d3f4 | ||
|
|
73508835c8 | ||
|
|
336c6b43fb | ||
|
|
bfed55318c | ||
|
|
a3e80a6378 | ||
|
|
92b78a893d | ||
|
|
758fdb9854 | ||
|
|
44f8f64935 | ||
|
|
8f0a74df6b | ||
|
|
0efe4c4365 | ||
|
|
04337059e4 | ||
|
|
af0663317b | ||
|
|
e4d0e471d9 | ||
|
|
cb45138c5f | ||
|
|
917631181a | ||
|
|
9ac58e605d | ||
|
|
6d21b1a8fe | ||
|
|
ae7fa3bbb9 | ||
|
|
2895136eab | ||
|
|
7b83c8d2cc | ||
|
|
43cc83edf4 | ||
|
|
a33af67494 |
37
.github/workflows/build-app-wxpython.yml
vendored
37
.github/workflows/build-app-wxpython.yml
vendored
@@ -9,26 +9,49 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
name: Build wxPython
|
||||
runs-on: x86_64_mojave
|
||||
runs-on: x86_64_monterey
|
||||
if: github.repository_owner == 'dortania'
|
||||
|
||||
env:
|
||||
branch: ${{ github.ref }}
|
||||
commiturl: ${{ github.event.head_commit.url }}${{ github.event.release.html_url }}
|
||||
commitdate: ${{ github.event.head_commit.timestamp }}${{ github.event.release.published_at }}
|
||||
MAC_CODESIGN_IDENTITY: ${{ secrets.MAC_CODESIGN_IDENTITY }}
|
||||
MAC_CODESIGN_CERT: ${{ secrets.MAC_CODESIGN_CERT }}
|
||||
MAC_NOTARIZATION_USERNAME: ${{ secrets.MAC_NOTARIZATION_USERNAME }}
|
||||
MAC_NOTARIZATION_PASSWORD: ${{ secrets.MAC_NOTARIZATION_PASSWORD }}
|
||||
MAC_NOTARIZATION_TEAM_ID: ${{ secrets.MAC_NOTARIZATION_TEAM_ID }}
|
||||
ANALYTICS_KEY: ${{ secrets.ANALYTICS_KEY }}
|
||||
ANALYTICS_SITE: ${{ secrets.ANALYTICS_SITE }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: /Library/Frameworks/Python.framework/Versions/3.10/bin/python3 Build-Binary.command --reset_binaries --branch "${{ env.branch }}" --commit "${{ env.commiturl }}" --commit_date "${{ env.commitdate }}" --key "${{ env.ANALYTICS_KEY }}" --site "${{ env.ANALYTICS_SITE }}"
|
||||
- run: 'codesign -s "Developer ID Application: Mykola Grymalyuk (S74BDJXQMD)" -v --force --deep --timestamp --entitlements ./payloads/entitlements.plist -o runtime "dist/OpenCore-Patcher.app"'
|
||||
- run: cd dist; ditto -c -k --sequesterRsrc --keepParent OpenCore-Patcher.app ../OpenCore-Patcher-wxPython.app.zip
|
||||
- run: xcrun altool --notarize-app --primary-bundle-id "com.dortania.opencore-legacy-patcher" --username "${{ env.MAC_NOTARIZATION_USERNAME }}" --password "${{ env.MAC_NOTARIZATION_PASSWORD }}" --file OpenCore-Patcher-wxPython.app.zip
|
||||
- run: packagesbuild ./payloads/InstallPackage/AutoPkg-Assets-Setup.pkgproj
|
||||
- run: mv ./OpenCore-Patcher-wxPython.app.zip ./OpenCore-Patcher-GUI.app.zip
|
||||
|
||||
- name: Build Binary
|
||||
run: /Library/Frameworks/Python.framework/Versions/3.10/bin/python3 Build-Binary.command --reset_binaries --branch "${{ env.branch }}" --commit "${{ env.commiturl }}" --commit_date "${{ env.commitdate }}" --key "${{ env.ANALYTICS_KEY }}" --site "${{ env.ANALYTICS_SITE }}"
|
||||
|
||||
# Uncomment when using Github Runners or first run on self-hosted
|
||||
# - name: Import Certificate
|
||||
# uses: apple-actions/import-codesign-certs@v1
|
||||
# with:
|
||||
# p12-file-base64: ${{ secrets.MAC_CODESIGN_CERT }}
|
||||
# p12-password: ${{ secrets.MAC_NOTARIZATION_PASSWORD }}
|
||||
|
||||
- name: Codesign Binary
|
||||
run: 'codesign -s "${{ env.MAC_CODESIGN_IDENTITY }}" -v --force --deep --timestamp --entitlements ./payloads/entitlements.plist -o runtime "dist/OpenCore-Patcher.app"'
|
||||
|
||||
- name: Package Binary
|
||||
run: cd dist; ditto -c -k --sequesterRsrc --keepParent OpenCore-Patcher.app ../OpenCore-Patcher-wxPython.app.zip
|
||||
|
||||
- name: Notarize Binary
|
||||
run: xcrun notarytool submit OpenCore-Patcher-wxPython.app.zip --apple-id "${{ env.MAC_NOTARIZATION_USERNAME }}" --password "${{ env.MAC_NOTARIZATION_PASSWORD }}" --team-id "${{ env.MAC_NOTARIZATION_TEAM_ID }}"
|
||||
|
||||
- name: Generate support package
|
||||
run: packagesbuild ./payloads/InstallPackage/AutoPkg-Assets-Setup.pkgproj
|
||||
|
||||
- name: Prepare App for Upload
|
||||
run: mv ./OpenCore-Patcher-wxPython.app.zip ./OpenCore-Patcher-GUI.app.zip
|
||||
|
||||
- name: Upload App to Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
|
||||
5
.github/workflows/validate.yml
vendored
5
.github/workflows/validate.yml
vendored
@@ -9,7 +9,7 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
name: Validate
|
||||
runs-on: x86_64_mojave
|
||||
runs-on: x86_64_monterey
|
||||
if: github.repository_owner == 'dortania'
|
||||
env:
|
||||
branch: ${{ github.ref }}
|
||||
@@ -17,4 +17,5 @@ jobs:
|
||||
commitdate: ${{ github.event.head_commit.timestamp }}${{ github.event.release.published_at }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: /Library/Frameworks/Python.framework/Versions/3.10/bin/python3 OpenCore-Patcher-GUI.command --validate
|
||||
- name: Validate
|
||||
run: /Library/Frameworks/Python.framework/Versions/3.10/bin/python3 OpenCore-Patcher-GUI.command --validate
|
||||
|
||||
@@ -231,6 +231,7 @@ class CreateBinary:
|
||||
|
||||
whitelist_files = [
|
||||
"com.dortania.opencore-legacy-patcher.auto-patch.plist",
|
||||
"com.dortania.opencore-legacy-patcher.rsr-monitor.plist",
|
||||
"entitlements.plist",
|
||||
"launcher.sh",
|
||||
"OC-Patcher-TUI.icns",
|
||||
|
||||
31
CHANGELOG.md
31
CHANGELOG.md
@@ -1,5 +1,36 @@
|
||||
# OpenCore Legacy Patcher changelog
|
||||
|
||||
## 0.6.5
|
||||
- Update 3802 Patchset Binaries:
|
||||
- Resolves additional 3rd party app crashes on Metal with macOS 13.3+
|
||||
- ex: PowerPoint's "Presentation Mode"
|
||||
- Update non-Metal Binaries:
|
||||
- Resolves Safari 16.4 frozen canvas rendering
|
||||
- ex: Google Docs
|
||||
- Allow for coexistence of USB 3.0 controllers and USB 1.1 patches on macOS 13+
|
||||
- Restores USB 3.0 expansion card support on USB 1.1 machines such as MacPro5,1
|
||||
- Resolve OpenCL rendering on Nvidia Web Drivers
|
||||
- thanks [@jazzzny](https://github.com/Jazzzny)
|
||||
- Resolve UI unable to download macOS installers on unknown models
|
||||
- ex. M2 Macs and Hackintoshes
|
||||
- Implement minimum OS check for installer creation
|
||||
- Prevents vague errors when creating Ventura installers on Yosemite
|
||||
- Resolve WindowServer crashing with Rapid Security Response (RSR) installation
|
||||
- Primarily applicable for Haswell iGPUs on 13.3.1 (a)
|
||||
- Update legacy Wireless binaries
|
||||
- Resolve wifi crashing on 13.4 with BCM94322, BCM943224 and Atheros chipsets
|
||||
- Backend changes:
|
||||
- macos_installer_handler.py:
|
||||
- Expand OS support for IA parsing in SUCatalog
|
||||
- gui_main.py:
|
||||
- Fix spacing regression introduced with `.AppleSystemUIFont` implementation
|
||||
- Increment Binaries:
|
||||
- PatcherSupportPkg 0.9.7 - release
|
||||
- Build Server Changes:
|
||||
- Upgrade CI Host to macOS Monterey
|
||||
- Upgrade Xcode to 14.2
|
||||
- Switch from `altool` to `notarytool` for notarization
|
||||
|
||||
## 0.6.4
|
||||
- Backend changes:
|
||||
- Implement new analytics_handler.py module
|
||||
|
||||
@@ -28,22 +28,51 @@ class os_data(enum.IntEnum):
|
||||
|
||||
class os_conversion:
|
||||
|
||||
def os_to_kernel(os):
|
||||
# Convert OS version to major XNU version
|
||||
def os_to_kernel(os: str) -> int:
|
||||
"""
|
||||
Convert OS version to major XNU version
|
||||
|
||||
Parameters:
|
||||
os (str): OS version
|
||||
|
||||
Returns:
|
||||
int: Major XNU version
|
||||
"""
|
||||
if os.startswith("10."):
|
||||
return (int(os.split(".")[1]) + 4)
|
||||
else:
|
||||
return (int(os.split(".")[0]) + 9)
|
||||
|
||||
def kernel_to_os(kernel):
|
||||
# Convert major XNU version to OS version
|
||||
|
||||
def kernel_to_os(kernel: int) -> str:
|
||||
"""
|
||||
Convert major XNU version to OS version
|
||||
|
||||
Parameters:
|
||||
kernel (int): Major XNU version
|
||||
|
||||
Returns:
|
||||
str: OS version
|
||||
"""
|
||||
if kernel >= os_data.big_sur:
|
||||
return str((kernel - 9))
|
||||
else:
|
||||
return str((f"10.{kernel - 4}"))
|
||||
|
||||
def is_os_newer(source_major, source_minor, target_major, target_minor):
|
||||
# Check if OS version 1 is newer than OS version 2
|
||||
|
||||
def is_os_newer(source_major: int, source_minor: int, target_major: int, target_minor: int) -> bool:
|
||||
"""
|
||||
Check if OS version 1 is newer than OS version 2
|
||||
|
||||
Parameters:
|
||||
source_major (int): Major XNU version of OS version 1
|
||||
source_minor (int): Minor XNU version of OS version 1
|
||||
target_major (int): Major XNU version of OS version 2
|
||||
target_minor (int): Minor XNU version of OS version 2
|
||||
|
||||
Returns:
|
||||
bool: True if OS version 1 is newer than OS version 2
|
||||
"""
|
||||
if source_major < target_major:
|
||||
return True
|
||||
elif source_major == target_major:
|
||||
@@ -52,8 +81,17 @@ class os_conversion:
|
||||
else:
|
||||
return False
|
||||
|
||||
def convert_kernel_to_marketing_name(kernel):
|
||||
# Convert major XNU version to Marketing Name
|
||||
|
||||
def convert_kernel_to_marketing_name(kernel: int) -> str:
|
||||
"""
|
||||
Convert major XNU version to Marketing name
|
||||
|
||||
Parameters:
|
||||
kernel (int): Major XNU version
|
||||
|
||||
Returns:
|
||||
str: Marketing name of OS
|
||||
"""
|
||||
try:
|
||||
# Find os_data enum name
|
||||
os_name = os_data(kernel).name
|
||||
@@ -70,8 +108,17 @@ class os_conversion:
|
||||
|
||||
return os_name
|
||||
|
||||
def convert_marketing_name_to_kernel(marketing_name):
|
||||
# Convert Marketing Name to major XNU version
|
||||
|
||||
def convert_marketing_name_to_kernel(marketing_name: str) -> int:
|
||||
"""
|
||||
Convert Marketing Name to major XNU version
|
||||
|
||||
Parameters:
|
||||
marketing_name (str): Marketing Name of OS
|
||||
|
||||
Returns:
|
||||
int: Major XNU version
|
||||
"""
|
||||
try:
|
||||
# Find os_data enum value
|
||||
os_kernel = os_data[marketing_name.lower().replace(" ", "_")]
|
||||
@@ -81,16 +128,18 @@ class os_conversion:
|
||||
return int(os_kernel)
|
||||
|
||||
|
||||
def find_largest_build(build_array):
|
||||
# Find the newest version within an array of versions
|
||||
# These builds will have both numbers and letters in the version
|
||||
# ex:
|
||||
# [
|
||||
# "22A5295i",
|
||||
# "22A5266r",
|
||||
# "22A5286j",
|
||||
# "22A5295h",
|
||||
# ]
|
||||
def find_largest_build(build_array: list) -> str:
|
||||
"""
|
||||
Find the newest version within an array of versions
|
||||
These builds will have both numbers and letters in the version
|
||||
ex:
|
||||
[
|
||||
"22A5295i",
|
||||
"22A5266r",
|
||||
"22A5286j",
|
||||
"22A5295h",
|
||||
]
|
||||
"""
|
||||
|
||||
max_length = 0 # Length of the longest build
|
||||
build_array_split = [] # 'build_array', converted into individual array of elements
|
||||
|
||||
@@ -58,9 +58,15 @@ class SystemPatchDictionary():
|
||||
|
||||
self.os_major: int = os_major
|
||||
self.os_minor: int = os_minor
|
||||
self.os_float: float = float(f"{self.os_major}.{self.os_minor}")
|
||||
self.non_metal_os_support: list = non_metal_os_support
|
||||
self.patchset_dict: dict = {}
|
||||
|
||||
# XNU Kernel versions
|
||||
self.macOS_12_0_B7: float = 21.1
|
||||
self.macOS_12_4: float = 21.5
|
||||
self.macOS_12_5: float = 21.6
|
||||
|
||||
self._generate_sys_patch_dict()
|
||||
|
||||
|
||||
@@ -135,8 +141,9 @@ class SystemPatchDictionary():
|
||||
},
|
||||
"Processes": {
|
||||
# 'When Space Allows' option introduced in 12.4 (XNU 21.5)
|
||||
**({"defaults write /Library/Preferences/.GlobalPreferences.plist ShowDate -int 1": True } if os_data.os_conversion.is_os_newer(os_data.os_data.monterey, 4, self.os_major, self.os_minor) else {}),
|
||||
**({"defaults write /Library/Preferences/.GlobalPreferences.plist ShowDate -int 1": True } if self.os_float >= self.macOS_12_4 else {}),
|
||||
"defaults write /Library/Preferences/.GlobalPreferences.plist InternalDebugUseGPUProcessForCanvasRenderingEnabled -bool false": True,
|
||||
"defaults write /Library/Preferences/.GlobalPreferences.plist WebKitExperimentalUseGPUProcessForCanvasRenderingEnabled -bool false": True,
|
||||
},
|
||||
},
|
||||
"Non-Metal IOAccelerator Common": {
|
||||
@@ -538,7 +545,7 @@ class SystemPatchDictionary():
|
||||
"NVDANV50HalTesla.kext": "10.13.6",
|
||||
"NVDAResmanTesla.kext": "10.13.6",
|
||||
# Apple dropped NVDAStartup in 12.0 Beta 7 (XNU 21.1)
|
||||
**({ "NVDAStartup.kext": "12.0 Beta 6" } if os_data.os_conversion.is_os_newer(os_data.os_data.monterey, 0, self.os_major, self.os_minor) else {})
|
||||
**({ "NVDAStartup.kext": "12.0 Beta 6" } if self.os_float >= self.macOS_12_0_B7 else {})
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -569,7 +576,7 @@ class SystemPatchDictionary():
|
||||
},
|
||||
"/System/Library/Frameworks": {
|
||||
# XNU 21.6 (macOS 12.5)
|
||||
**({ "Metal.framework": "12.5 Beta 2"} if (os_data.os_conversion.is_os_newer(os_data.os_data.monterey, 5, self.os_major, self.os_minor) and self.os_major < os_data.os_data.ventura) else {}),
|
||||
**({ "Metal.framework": "12.5 Beta 2"} if (self.os_float >= self.macOS_12_5 and self.os_major < os_data.os_data.ventura) else {}),
|
||||
},
|
||||
"/System/Library/PrivateFrameworks": {
|
||||
"GPUCompiler.framework": "11.6",
|
||||
@@ -600,6 +607,10 @@ class SystemPatchDictionary():
|
||||
"GeForceTeslaGLDriverWeb.bundle": "WebDriver-387.10.10.10.40.140",
|
||||
"GeForceTeslaVADriverWeb.bundle": "WebDriver-387.10.10.10.40.140",
|
||||
},
|
||||
"/System/Library/PrivateFrameworks": {
|
||||
# Restore OpenCL by adding missing compiler files
|
||||
**({ "GPUCompiler.framework": "11.6"} if self.os_major >= os_data.os_data.monterey else {}),
|
||||
},
|
||||
},
|
||||
"Install Non-Root": {
|
||||
"/Library/Extensions": {
|
||||
|
||||
@@ -18,13 +18,13 @@ The below table will list all supported and unsupported functions of the patcher
|
||||
|
||||
Regarding OS support, see below:
|
||||
|
||||
* Machines listing `YES - Ventura and older` means they cannot run macOS Ventura at this time. Machines with only `YES` can run all of the supported macOS versions offered by OpenCore Legacy Patcher.
|
||||
|
||||
| Support Entry | Supported OSes | Description | Comment |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| HostOS | macOS 10.9 - macOS 13 | Refers to OSes where running OpenCore-Patcher.app are supported | Supports 10.7+ if [Python 3.9 or higher](https://www.python.org/downloads/) is manually installed, simply run the `OpenCore-Patcher-GUI.command` located in the repo |
|
||||
| HostOS | macOS 10.10 - macOS 13 | Refers to OSes where running OpenCore-Patcher.app are supported | Supports 10.7+ if [Python 3.9 or higher](https://www.python.org/downloads/) is manually installed, simply run the `OpenCore-Patcher-GUI.command` located in the repo |
|
||||
| TargetOS | macOS 11 - macOS 13 | Refers to OSes that can be patched to run with OpenCore | May support 10.4 and newer (in a potentially broken state). No support provided. |
|
||||
|
||||
* macOS Ventura installer creation requires 10.11 or later
|
||||
|
||||
### MacBook
|
||||
|
||||
| SMBIOS | Year | Supported | Comment |
|
||||
@@ -145,8 +145,8 @@ Regarding OS support, see below:
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| MacPro1,1 | Mid-2006 | <span style="color:red"> NO </span> | 32-Bit Firmware limitation |
|
||||
| MacPro2,1 | Mid-2007 | ^^ | ^^ |
|
||||
| MacPro3,1 | Early 2008 | <span style="color:#30BCD5"> YES </span> | - UHCI/OHCI support in Public Beta, see current issues ([#1021](https://github.com/dortania/OpenCore-Legacy-Patcher/issesues/1021)) <br/>- Potential boot issues with stock Bluetooth card, recommend removing to avoid kernel panics |
|
||||
| MacPro4,1 | Early 2009 | ^^ | - Everything is supported as long as GPU is Metal capable <br/> - UHCI/OHCI support in Public Beta, see current issues ([#1021](https://github.com/dortania/OpenCore-Legacy-Patcher/issesues/1021))|
|
||||
| MacPro3,1 | Early 2008 | <span style="color:#30BCD5"> YES </span> | - UHCI/OHCI support in Public Beta, see current issues ([#1021](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1021)) <br/>- Potential boot issues with stock Bluetooth card, recommend removing to avoid kernel panics |
|
||||
| MacPro4,1 | Early 2009 | ^^ | - Everything is supported as long as GPU is Metal capable <br/> - UHCI/OHCI support in Public Beta, see current issues ([#1021](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1021))|
|
||||
| MacPro5,1 | Mid-2010, Mid-2012 | ^^ | ^^ |
|
||||
| MacPro6,1 | Late 2013 | ^^ | - CPU Power Management currently unsupported<br/> - No DRM support |
|
||||
|
||||
|
||||
@@ -139,6 +139,10 @@ Below is a rundown of the main logic that OpenCore Legacy Patcher uses to gain n
|
||||
* Reason: Enables Content Caching when using VMM spoofing
|
||||
* Logic: Adds args to NVRAM
|
||||
* Models: Any model using VMM spoofing
|
||||
* `amfi=0x80`
|
||||
* Reason: Disables Apple Mobile File Integrity to allow for root patches
|
||||
* Logic: Adds args to NVRAM
|
||||
* Models: Any model that requires unsigned root patches
|
||||
|
||||
### UEFI -> ProtocolOverrides
|
||||
|
||||
@@ -184,6 +188,16 @@ Below is an explanation of what Kexts OpenCore Legacy Patcher will inject into m
|
||||
* RestrictEvents
|
||||
* Reason: Disables memory errors on MacPro7,1
|
||||
* Models: Mac Pros and Xserves
|
||||
* CryptexFixup
|
||||
* Reason: Installs non AVX2.0 Cryptex on non AVX2.0 CPUs
|
||||
* Models: All CPUs Ivy Bridge and older
|
||||
* AutoPkgInstaller
|
||||
* Reason: Allows for automatic root patching
|
||||
* NVMeFix
|
||||
* Reason: Fixes 3rd party NVMe support
|
||||
* RSRHelper
|
||||
* Reason: Fixes Rapid Security Response Support on root patched installs
|
||||
*
|
||||
|
||||
### Ethernet
|
||||
|
||||
@@ -197,6 +211,23 @@ Below is an explanation of what Kexts OpenCore Legacy Patcher will inject into m
|
||||
* Reason: Inject old Broadcom Ethernet kext to resolve networking in Big Sur
|
||||
* Logic: Patch out conflicting symbols to not collide existing BCM5701Ethernet
|
||||
* Models: 2011 and older Broadcom Ethernet require
|
||||
* Intel82574L
|
||||
* Reason: Resolves Ethernet Support on MacPros
|
||||
* Models: MacPro3,1 - 5,1
|
||||
* CatalinaIntelI210Ethernet
|
||||
* Reason: Fixes Intel i210/i225 NIC support on pre-Ivy Macs
|
||||
* AppleIntel8254XEthernet
|
||||
* Reason: Resolves Ethernet Support on MacPros
|
||||
* Models: MacPro3,1 - 5,1
|
||||
|
||||
### Firewire
|
||||
|
||||
* IOFireWireFamily
|
||||
* Reason: Allows for FireWire Boot Support
|
||||
* IOFireWireSBP2
|
||||
* Reason: Allows for FireWire Boot Support
|
||||
* IOFireWireSerialBusProtoColTransport
|
||||
* Reason: Allows for FireWire Boot Support
|
||||
|
||||
### Maps
|
||||
|
||||
@@ -215,14 +246,12 @@ Below is an explanation of what Kexts OpenCore Legacy Patcher will inject into m
|
||||
|
||||
### Wifi
|
||||
|
||||
* IO80211HighSierra
|
||||
* Reason: Re-inject Atheros wifi drivers from High Sierra
|
||||
* Logic: Patch out conflicting symbols to not collide existing IO80211Family
|
||||
* Models: Atheros cards
|
||||
* IO80211Mojave
|
||||
* Reason: Re-inject Broadcom wifi drivers from Mojave
|
||||
* Logic: Patch out conflicting symbols to not collide existing IO80211Family
|
||||
* Models: BCM94322
|
||||
* IO80211ElCap
|
||||
* Reason: Re-inject WiFi drivers from El Capitan
|
||||
* Models: BCM94328, BCM94322 and Atheros chipsets
|
||||
* corecaptureElCap.kext
|
||||
* Reason: Re-inject WiFi drivers from El Capitan
|
||||
* Models: BCM94328, BCM94322 and Atheros chipsets
|
||||
|
||||
### Misc
|
||||
|
||||
@@ -238,6 +267,40 @@ Below is an explanation of what Kexts OpenCore Legacy Patcher will inject into m
|
||||
* SMC-Spoof
|
||||
* Reason: Spoofs SMC version to 9.9999
|
||||
* Models: All models require when spoofing minimal or higher
|
||||
* AppleRAIDCard
|
||||
* Adds AppleRaidCard Support for Xserves
|
||||
* AMDGPUWakeHandler
|
||||
* Reason: Adds Software Based Demux for 2011 15/17 Macbook Pros
|
||||
* AppleIntelCPUPowerManagement and AppleIntelCPUPowerManagementClient
|
||||
* Reason: Restores Ivy Bridge and older CPU Power Management
|
||||
* AppleUSBTopCase
|
||||
* Reason: Restore USB Keyboard support on Mac OS Ventura
|
||||
* AppleUSBMultitouch and AppleUSBTrackpad
|
||||
* Reason: Restore USB Trackpad support on Mac OS Ventura
|
||||
* ASPP-Override
|
||||
* Reason: Forces ACPI_SMC_PlatformPlugin to outmatch X86PlatformPlugin and disable firmware throttling
|
||||
* BacklightInjector
|
||||
* Reason: Fixes Brightness in iMacs with upgraded GPUs
|
||||
* BigSurSDXC
|
||||
* Reason: Restores SDXC Support in Pre Ivy-Bridge Macs
|
||||
* Bluetooth-spoof
|
||||
* Reason: Spoofs legacy Bluetooth to work on Monterey and newer
|
||||
* Innie
|
||||
* Reason: Makes all PCIe drives appear internal
|
||||
* Models: MacPro3,1 and newer & Xserve3,1 and newer
|
||||
* KDKlessWorkaround
|
||||
* Reason: Helps with Mac os updates on KDKless patched systems
|
||||
* LegacyUSBVieoSupport
|
||||
* Reason: Fixes Legacy USB iSight support
|
||||
* MonteAHCIPort
|
||||
* Reason: Fixes SSD support for stock SSD found in MacBookAir6,x
|
||||
* NoAVXFSCompressionTypeZlib
|
||||
* Reason: Prevents AVXFSCompressionTypeZlib crash on pre AVX1.0 systems in 12.4+
|
||||
* SimpleMSR
|
||||
* Reason: Disables BD PROCHOT to prevent firmware throttling on Nehalem+ MacBooks
|
||||
|
||||
|
||||
|
||||
:::
|
||||
|
||||
## On-Disk Patches
|
||||
@@ -286,6 +349,15 @@ Applicable for BCM94328, BCM94322 and Atheros Wifi cards
|
||||
|
||||
* OpenCL (libCLVMNVPTXPlugin.dylib, NVPTX.dylib)
|
||||
* Reason: Re-add Kepler hardware acceleration support
|
||||
* Metal
|
||||
* Reason: 3802 based GPU's broken by 13.3, requiring a Metal downgrade to 13.2.1
|
||||
|
||||
### PrivateFrameworks
|
||||
|
||||
* MTLCompiler
|
||||
* Reason: 3802 based GPU's broken by 13.3, requiring a MTLCompiler downgrade to 13.2.1
|
||||
* GPUCompiler
|
||||
* Reason: 3802 based GPU's broken by 13.3, requiring a GPUCompiler downgrade to 13.2.1
|
||||
|
||||
:::
|
||||
|
||||
@@ -306,6 +378,10 @@ Applicable for BCM94328, BCM94322 and Atheros Wifi cards
|
||||
|
||||
* AppleGVA/AppleGVACore
|
||||
* Reason: Enable DRM support
|
||||
* MTLCompiler
|
||||
* Reason: 3802 based GPU's broken by 13.3, requiring a MTLCompiler downgrade to 13.2.1
|
||||
* GPUCompiler
|
||||
* Reason: 3802 based GPU's broken by 13.3, requiring a GPUCompiler downgrade to 13.2.1
|
||||
|
||||
### Frameworks
|
||||
|
||||
@@ -313,12 +389,117 @@ Applicable for BCM94328, BCM94322 and Atheros Wifi cards
|
||||
* Reason: Re-add Ivy Bridge hardware acceleration support
|
||||
* WebKit (com.apple.WebProcess.sb)
|
||||
* Reason: Re-add Ivy Bridge Safari rendering support
|
||||
* Metal
|
||||
* Reason: 3802 based GPU's broken by 13.3, requiring a Metal downgrade to 13.2.1
|
||||
:::
|
||||
|
||||
::: details non-Metal Graphics Acceleration Patches (11.0+)
|
||||
::: details Intel Haswell Graphics Acceleration Patches (13.0+)
|
||||
|
||||
### Extensions
|
||||
|
||||
* AppleIntelFramebufferAzul.kext
|
||||
* AppleIntelHD5000Graphics.kext
|
||||
* AppleIntelHD5000GraphicsGLDriver.bundle
|
||||
* AppleIntelHD5000GraphicsMTLDriver.bundle
|
||||
* AppleIntelHD5000GraphicsVADriver.bundle
|
||||
* AppleIntelHSWVA.bundle
|
||||
* AppleIntelGraphicsShared.bundle
|
||||
|
||||
### Frameworks
|
||||
|
||||
* Metal
|
||||
* Reason: 3802 based GPU's broken by 13.3, requiring a Metal downgrade to 13.2.1
|
||||
|
||||
### PrivateFrameworks
|
||||
|
||||
* MTLCompiler
|
||||
* Reason: 3802 based GPU's broken by 13.3, requiring a MTLCompiler downgrade to 13.2.1
|
||||
* GPUCompiler
|
||||
* Reason: 3802 based GPU's broken by 13.3, requiring a GPUCompiler downgrade to 13.2.1
|
||||
|
||||
:::
|
||||
|
||||
::: details Intel Broadwell Graphics Acceleration Patches (13.0+)
|
||||
|
||||
### Extensions
|
||||
|
||||
* AppleIntelBDWGraphics.kext
|
||||
* AppleIntelBDWGraphicsFramebuffer.kext
|
||||
* AppleIntelBDWGraphicsGLDriver.bundle
|
||||
* AppleIntelBDWGraphicsMTLDriver.bundle
|
||||
* AppleIntelBDWGraphicsVADriver.bundle
|
||||
* AppleIntelBDWGraphicsVAME.bundle
|
||||
* AppleIntelGraphicsShared.bundle
|
||||
|
||||
|
||||
|
||||
:::
|
||||
|
||||
::: details Intel Skylake Graphics Acceleration Patches (13.0+)
|
||||
|
||||
### Extensions
|
||||
|
||||
* AppleIntelSKLGraphics.kext
|
||||
* AppleIntelSKLGraphicsFramebuffer.kext
|
||||
* AppleIntelSKLGraphicsGLDriver.bundle
|
||||
* AppleIntelSKLGraphicsMTLDriver.bundle
|
||||
* AppleIntelSKLGraphicsVADriver.bundle
|
||||
* AppleIntelSKLGraphicsVAME.bundle
|
||||
* AppleIntelGraphicsShared.bundle
|
||||
|
||||
|
||||
:::
|
||||
|
||||
::: details AMD Legacy Vega Graphics Acceleration Patches (13.0+)
|
||||
|
||||
### Extensions
|
||||
|
||||
* AMDRadeonX5000.kext
|
||||
* AMDRadeonVADriver2.bundle
|
||||
* AMDRadeonX5000GLDriver.bundle
|
||||
* AMDRadeonX5000MTLDriver.bundle
|
||||
* AMDRadeonX5000Shared.bundle
|
||||
* AMDShared.bundle
|
||||
|
||||
:::
|
||||
|
||||
::: details AMD Legacy Polaris Graphics Acceleration Patches (13.0+)
|
||||
|
||||
### Extensions
|
||||
|
||||
* AMDRadeonX4000.kext
|
||||
* AMDRadeonX4000HWServices.kext
|
||||
* AMDRadeonVADriver2.bundle
|
||||
* AMDRadeonX4000GLDriver.bundle
|
||||
* AMDMTLBronzeDriver.bundle
|
||||
* AMDShared.bundle
|
||||
|
||||
:::
|
||||
|
||||
::: details AMD Legacy GCN Graphics Acceleration Patches
|
||||
|
||||
### Extensions
|
||||
|
||||
* AMD7000Controller.kext
|
||||
* AMD8000Controller.kext
|
||||
* AMD9000Controller.kext
|
||||
* AMD9500Controller.kext
|
||||
* AMD10000Controller.kext
|
||||
* AMDRadeonX4000.kext
|
||||
* AMDRadeonX4000HWServices.kext
|
||||
* AMDFramebuffer.kext
|
||||
* AMDSupport.kext
|
||||
* AMDRadeonVADriver.bundle
|
||||
* AMDRadeonVADriver2.bundle
|
||||
* AMDRadeonX4000GLDriver.bundle
|
||||
* AMDMTLBronzeDriver.bundle
|
||||
* AMDShared.bundle
|
||||
|
||||
|
||||
|
||||
|
||||
::: details non-Metal Graphics Acceleration Patches (11.0+)
|
||||
|
||||
#### General Patches
|
||||
|
||||
* IOSurface.kext
|
||||
@@ -343,6 +524,19 @@ Applicable for BCM94328, BCM94322 and Atheros Wifi cards
|
||||
* 0x1ea59a - 0x1ea5b3: nop
|
||||
* Replace VSLGestalt to IOLockLock or any other known symbol of the same length.
|
||||
|
||||
* NVIDIA Web Drivers Binaries
|
||||
* GeForceWeb.kext
|
||||
* NVDAGF100HalWeb.kext
|
||||
* NVDAGK100HalWeb.kext
|
||||
* NVDAGM100HalWeb.kext
|
||||
* NVDAGP100HalWeb.kext
|
||||
* NVDAResmanWeb.kext
|
||||
* NVDAStartupWeb.kext
|
||||
* GeForceTeslaWeb.kext
|
||||
* NVDANV50HalTeslaWeb.kext
|
||||
* NVDAResmanTeslaWeb.kext
|
||||
* Reason: Allows for non-Metal Acceleration for NVIDIA Maxwell and Pascal GPUs
|
||||
|
||||
* AMD/ATI Binaries
|
||||
* AMD2400Controller.kext
|
||||
* AMD2600Controller.kext
|
||||
|
||||
@@ -19,4 +19,4 @@ nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:OCLP-Version
|
||||
|
||||

|
||||
|
||||
From this, we can see that we're running a RELEASE version of OpenCore 0.6.8 built on March 27th, 2021 with Patcher Version 0.0.20!
|
||||
From this, we can see that we're running a RELEASE version of OpenCore 0.8.0 built on April 18th, 2022 with Patcher Version 0.4.5!
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AssociatedBundleIdentifiers</key>
|
||||
<string>com.dortania.opencore-legacy-patcher</string>
|
||||
<key>Label</key>
|
||||
<string>com.dortania.opencore-legacy-patcher.rsr-monitor</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>rm</string>
|
||||
<string>-rf</string>
|
||||
<string>/Library/Extensions/example.kext</string> <!-- Update kext to correct name -->
|
||||
</array>
|
||||
<key>WatchPaths</key>
|
||||
<array>
|
||||
<string>/System/Volumes/Preboot/UUID/cryptex1/OS.dmg</string> <!-- Update UUID to host's booted Preboot folder -->
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -12,8 +12,8 @@ from data import os_data
|
||||
class Constants:
|
||||
def __init__(self) -> None:
|
||||
# Patcher Versioning
|
||||
self.patcher_version: str = "0.6.4" # OpenCore-Legacy-Patcher
|
||||
self.patcher_support_pkg_version: str = "0.9.3" # PatcherSupportPkg
|
||||
self.patcher_version: str = "0.6.5" # OpenCore-Legacy-Patcher
|
||||
self.patcher_support_pkg_version: str = "0.9.7" # PatcherSupportPkg
|
||||
self.copyright_date: str = "Copyright © 2020-2023 Dortania"
|
||||
|
||||
# URLs
|
||||
@@ -238,6 +238,10 @@ class Constants:
|
||||
def auto_patch_launch_agent_path(self):
|
||||
return self.payload_path / Path("com.dortania.opencore-legacy-patcher.auto-patch.plist")
|
||||
|
||||
@property
|
||||
def rsr_monitor_launch_daemon_path(self):
|
||||
return self.payload_path / Path("com.dortania.opencore-legacy-patcher.rsr-monitor.plist")
|
||||
|
||||
# ACPI
|
||||
@property
|
||||
def pci_ssdt_path(self):
|
||||
|
||||
@@ -1782,7 +1782,7 @@ class wx_python_gui:
|
||||
if model in ["MacPro3,1", "MacPro4,1", "MacPro5,1"]:
|
||||
has_legacy_usb = True
|
||||
issues_list = "- Lack of Keyboard/Mouse in macOS installer without a USB hub\n"
|
||||
elif model in smbios_data.smbios_dictionary[model]:
|
||||
elif model in smbios_data.smbios_dictionary:
|
||||
if "CPU Generation" in smbios_data.smbios_dictionary[model]:
|
||||
if smbios_data.smbios_dictionary[model]["CPU Generation"] <= cpu_data.cpu_data.penryn:
|
||||
has_legacy_usb = True
|
||||
@@ -2060,7 +2060,17 @@ class wx_python_gui:
|
||||
logging.info("Installer(s) found:")
|
||||
for app in available_installers:
|
||||
logging.info(f"- {available_installers[app]['Short Name']}: {available_installers[app]['Version']} ({available_installers[app]['Build']})")
|
||||
self.install_selection = wx.Button(self.frame, label=f"{available_installers[app]['Short Name']}: {available_installers[app]['Version']} ({available_installers[app]['Build']})", size=(320, 30))
|
||||
|
||||
app_str = f"{available_installers[app]['Short Name']}"
|
||||
unsupported: bool = available_installers[app]['Minimum Host OS'] > self.constants.detected_os
|
||||
|
||||
if unsupported:
|
||||
min_str = os_data.os_conversion.convert_kernel_to_marketing_name(available_installers[app]['Minimum Host OS'])
|
||||
app_str += f" (Requires {min_str})"
|
||||
else:
|
||||
app_str += f": {available_installers[app]['Version']} ({available_installers[app]['Build']})"
|
||||
|
||||
self.install_selection = wx.Button(self.frame, label=app_str, size=(320, 30))
|
||||
i = i + 25
|
||||
self.install_selection.SetPosition(
|
||||
wx.Point(
|
||||
@@ -2070,6 +2080,9 @@ class wx_python_gui:
|
||||
)
|
||||
self.install_selection.Bind(wx.EVT_BUTTON, lambda event, temp=app: self.format_usb_menu(available_installers[temp]['Short Name'], available_installers[temp]['Path']))
|
||||
self.install_selection.Centre(wx.HORIZONTAL)
|
||||
|
||||
if unsupported:
|
||||
self.install_selection.Disable()
|
||||
else:
|
||||
logging.info("No installers found")
|
||||
# Label: No Installers Found
|
||||
@@ -2099,6 +2112,7 @@ class wx_python_gui:
|
||||
def format_usb_menu(self, installer_name, installer_path):
|
||||
self.frame.DestroyChildren()
|
||||
logging.info(installer_path)
|
||||
self.frame.SetSize(370, -1)
|
||||
|
||||
# Header
|
||||
self.header = wx.StaticText(self.frame, label="Format USB")
|
||||
@@ -2171,7 +2185,7 @@ class wx_python_gui:
|
||||
|
||||
def format_usb_progress(self, disk, installer_name, installer_path):
|
||||
self.frame.DestroyChildren()
|
||||
self.frame.SetSize(500, -1)
|
||||
self.frame.SetSize(520, -1)
|
||||
# Header
|
||||
self.header = wx.StaticText(self.frame, label=f"Creating Installer: {installer_name}")
|
||||
self.header.SetFont(wx.Font(19, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, False, ".AppleSystemUIFont"))
|
||||
|
||||
@@ -13,10 +13,24 @@ from resources import network_handler, utilities
|
||||
|
||||
APPLICATION_SEARCH_PATH: str = "/Applications"
|
||||
SFR_SOFTWARE_UPDATE_PATH: str = "SFR/com_apple_MobileAsset_SFRSoftwareUpdate/com_apple_MobileAsset_SFRSoftwareUpdate.xml"
|
||||
|
||||
CATALOG_URL_BASE: str = "https://swscan.apple.com/content/catalogs/others/index"
|
||||
CATALOG_URL_EXTENSION: str = "13-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog"
|
||||
CATALOG_URL_VERSION: str = "13"
|
||||
CATALOG_URL_BASE: str = "https://swscan.apple.com/content/catalogs/others/index"
|
||||
CATALOG_URL_EXTENSION: str = ".merged-1.sucatalog"
|
||||
CATALOG_URL_VARIANTS: list = [
|
||||
"13",
|
||||
"12",
|
||||
"10.16",
|
||||
"10.15",
|
||||
"10.14",
|
||||
"10.13",
|
||||
"10.12",
|
||||
"10.11",
|
||||
"10.10",
|
||||
"10.9",
|
||||
"mountainlion",
|
||||
"lion",
|
||||
"snowleopard",
|
||||
"leopard",
|
||||
]
|
||||
|
||||
tmp_dir = tempfile.TemporaryDirectory()
|
||||
|
||||
@@ -222,15 +236,15 @@ class RemoteInstallerCatalog:
|
||||
Parses Apple's Software Update catalog and finds all macOS installers.
|
||||
"""
|
||||
|
||||
def __init__(self, seed_override: SeedType = SeedType.PublicRelease) -> None:
|
||||
def __init__(self, seed_override: SeedType = SeedType.PublicRelease, os_override: int = os_data.os_data.ventura) -> None:
|
||||
|
||||
self.catalog_url: str = self._construct_catalog_url(seed_override)
|
||||
self.catalog_url: str = self._construct_catalog_url(seed_override, os_override)
|
||||
|
||||
self.available_apps: dict = self._parse_catalog()
|
||||
self.available_apps_latest: dict = self._list_newest_installers_only()
|
||||
|
||||
|
||||
def _construct_catalog_url(self, seed_type: SeedType) -> str:
|
||||
def _construct_catalog_url(self, seed_type: SeedType, os_kernel: int) -> str:
|
||||
"""
|
||||
Constructs the catalog URL based on the seed type
|
||||
|
||||
@@ -241,17 +255,30 @@ class RemoteInstallerCatalog:
|
||||
str: The catalog URL
|
||||
"""
|
||||
|
||||
url: str = CATALOG_URL_BASE
|
||||
|
||||
url: str = ""
|
||||
os_version: str = os_data.os_conversion.kernel_to_os(os_kernel)
|
||||
os_version = "10.16" if os_version == "11" else os_version
|
||||
if os_version not in CATALOG_URL_VARIANTS:
|
||||
logging.error(f"OS version {os_version} is not supported, defaulting to latest")
|
||||
os_version = CATALOG_URL_VARIANTS[0]
|
||||
|
||||
url += f"-{os_version}"
|
||||
if seed_type == SeedType.DeveloperSeed:
|
||||
url = f"{CATALOG_URL_BASE}-{CATALOG_URL_VERSION}seed-{CATALOG_URL_EXTENSION}"
|
||||
url += f"seed"
|
||||
elif seed_type == SeedType.PublicSeed:
|
||||
url = f"{CATALOG_URL_BASE}-{CATALOG_URL_VERSION}beta-{CATALOG_URL_EXTENSION}"
|
||||
url += f"beta"
|
||||
elif seed_type == SeedType.CustomerSeed:
|
||||
url = f"{CATALOG_URL_BASE}-{CATALOG_URL_VERSION}customerseed-{CATALOG_URL_EXTENSION}"
|
||||
else:
|
||||
url = f"{CATALOG_URL_BASE}-{CATALOG_URL_EXTENSION}"
|
||||
url += f"customerseed"
|
||||
|
||||
did_find_variant: bool = False
|
||||
for variant in CATALOG_URL_VARIANTS:
|
||||
if variant in url:
|
||||
did_find_variant = True
|
||||
if did_find_variant:
|
||||
url += f"-{variant}"
|
||||
|
||||
url += f"{CATALOG_URL_EXTENSION}"
|
||||
|
||||
return url
|
||||
|
||||
@@ -356,13 +383,10 @@ class RemoteInstallerCatalog:
|
||||
continue
|
||||
if "IntegrityDataURL" not in ia_package:
|
||||
continue
|
||||
if "Size" not in ia_package:
|
||||
size = 0
|
||||
|
||||
download_link = ia_package["URL"]
|
||||
integrity = ia_package["IntegrityDataURL"]
|
||||
size = ia_package["Size"]
|
||||
|
||||
size = ia_package["Size"] if ia_package["Size"] else 0
|
||||
|
||||
if any([version, build, download_link, size, integrity]) is None:
|
||||
continue
|
||||
@@ -518,28 +542,34 @@ class LocalInstallerCatalog:
|
||||
if "CFBundleDisplayName" not in application_info_plist:
|
||||
continue
|
||||
|
||||
app_version = application_info_plist["DTPlatformVersion"]
|
||||
clean_name = application_info_plist["CFBundleDisplayName"]
|
||||
app_version: str = application_info_plist["DTPlatformVersion"]
|
||||
clean_name: str = application_info_plist["CFBundleDisplayName"]
|
||||
app_sdk: str = application_info_plist["DTSDKBuild"] if "DTSDKBuild" in application_info_plist else "Unknown"
|
||||
min_required: str = application_info_plist["LSMinimumSystemVersion"] if "LSMinimumSystemVersion" in application_info_plist else "Unknown"
|
||||
|
||||
if "DTSDKBuild" in application_info_plist:
|
||||
app_sdk = application_info_plist["DTSDKBuild"]
|
||||
else:
|
||||
app_sdk = "Unknown"
|
||||
kernel: int = 0
|
||||
try:
|
||||
kernel = int(app_sdk[:2])
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
min_required = os_data.os_conversion.os_to_kernel(min_required) if min_required != "Unknown" else 0
|
||||
|
||||
if min_required == os_data.os_data.sierra and kernel == os_data.os_data.ventura:
|
||||
# Ventura's installer requires El Capitan minimum
|
||||
# Ref: https://github.com/dortania/OpenCore-Legacy-Patcher/discussions/1038
|
||||
min_required = os_data.os_data.el_capitan
|
||||
|
||||
# app_version can sometimes report GM instead of the actual version
|
||||
# This is a workaround to get the actual version
|
||||
if app_version.startswith("GM"):
|
||||
try:
|
||||
app_version = int(app_sdk[:2])
|
||||
if app_version < 20:
|
||||
app_version = f"10.{app_version - 4}"
|
||||
else:
|
||||
app_version = f"{app_version - 9}.0"
|
||||
except ValueError:
|
||||
if kernel == 0:
|
||||
app_version = "Unknown"
|
||||
else:
|
||||
app_version = os_data.os_conversion.kernel_to_os(kernel)
|
||||
|
||||
# Check if App Version is High Sierra or newer
|
||||
if os_data.os_conversion.os_to_kernel(app_version) < os_data.os_data.high_sierra:
|
||||
if kernel < os_data.os_data.high_sierra:
|
||||
continue
|
||||
|
||||
results = self._parse_sharedsupport_version(Path(APPLICATION_SEARCH_PATH) / Path(application)/ Path("Contents/SharedSupport/SharedSupport.dmg"))
|
||||
@@ -554,6 +584,7 @@ class LocalInstallerCatalog:
|
||||
"Version": app_version,
|
||||
"Build": app_sdk,
|
||||
"Path": application,
|
||||
"Minimum Host OS": min_required,
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -312,9 +312,71 @@ class AutomaticSysPatch:
|
||||
utilities.process_status(utilities.elevated(["chmod", "644", "/Library/LaunchAgents/com.dortania.opencore-legacy-patcher.auto-patch.plist"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
utilities.process_status(utilities.elevated(["chown", "root:wheel", "/Library/LaunchAgents/com.dortania.opencore-legacy-patcher.auto-patch.plist"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
# Copy over our launch daemon
|
||||
if self._create_rsr_monitor_daemon() is True:
|
||||
logging.info("- Copying rsr-monitor.plist Launch Daemon to /Library/LaunchDaemons/")
|
||||
if Path("/Library/LaunchDaemons/com.dortania.opencore-legacy-patcher.rsr-monitor.plist").exists():
|
||||
logging.info("- Deleting existing rsr-monitor.plist")
|
||||
utilities.process_status(utilities.elevated(["rm", "/Library/LaunchDaemons/com.dortania.opencore-legacy-patcher.rsr-monitor.plist"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
if not Path("/Library/LaunchDaemons/").exists():
|
||||
logging.info("- Creating /Library/LaunchDaemons/")
|
||||
utilities.process_status(utilities.elevated(["mkdir", "-p", "/Library/LaunchDaemons/"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
utilities.process_status(utilities.elevated(["cp", self.constants.rsr_monitor_launch_daemon_path, "/Library/LaunchDaemons/"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
# Set the permissions on the com.dortania.opencore-legacy-patcher.rsr-monitor.plist
|
||||
logging.info("- Setting permissions on rsr-monitor.plist")
|
||||
utilities.process_status(utilities.elevated(["chmod", "644", "/Library/LaunchDaemons/com.dortania.opencore-legacy-patcher.rsr-monitor.plist"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
utilities.process_status(utilities.elevated(["chown", "root:wheel", "/Library/LaunchDaemons/com.dortania.opencore-legacy-patcher.rsr-monitor.plist"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
# Making app alias
|
||||
# Simply an easy way for users to notice the app
|
||||
# If there's already an alias or exiting app, skip
|
||||
if not Path("/Applications/OpenCore-Patcher.app").exists():
|
||||
logging.info("- Making app alias")
|
||||
utilities.process_status(utilities.elevated(["ln", "-s", "/Library/Application Support/Dortania/OpenCore-Patcher.app", "/Applications/OpenCore-Patcher.app"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
utilities.process_status(utilities.elevated(["ln", "-s", "/Library/Application Support/Dortania/OpenCore-Patcher.app", "/Applications/OpenCore-Patcher.app"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
|
||||
def _create_rsr_monitor_daemon(self) -> bool:
|
||||
# Get kext list in /Library/Extensions that have the 'GPUCompanionBundles' property
|
||||
# This is used to determine if we need to run the RSRMonitor
|
||||
logging.info("- Checking if RSRMonitor is needed")
|
||||
|
||||
cryptex_path = f"/System/Volumes/Preboot/{utilities.get_preboot_uuid()}/cryptex1/current/OS.dmg"
|
||||
if not Path(cryptex_path).exists():
|
||||
logging.info("- No OS.dmg, skipping RSRMonitor")
|
||||
return False
|
||||
|
||||
kexts = []
|
||||
for kext in Path("/Library/Extensions").glob("*.kext"):
|
||||
if not Path(f"{kext}/Contents/Info.plist").exists():
|
||||
continue
|
||||
kext_plist = plistlib.load(open(f"{kext}/Contents/Info.plist", "rb"))
|
||||
if "GPUCompanionBundles" not in kext_plist:
|
||||
continue
|
||||
logging.info(f" - Found kext with GPUCompanionBundles: {kext.name}")
|
||||
kexts.append(kext.name)
|
||||
|
||||
# If we have no kexts, we don't need to run the RSRMonitor
|
||||
if not kexts:
|
||||
logging.info("- No kexts found with GPUCompanionBundles, skipping RSRMonitor")
|
||||
return False
|
||||
|
||||
# Load the RSRMonitor plist
|
||||
rsr_monitor_plist = plistlib.load(open(self.constants.rsr_monitor_launch_daemon_path, "rb"))
|
||||
|
||||
arguments = ["rm", "-Rfv"]
|
||||
arguments += [f"/Library/Extensions/{kext}" for kext in kexts]
|
||||
|
||||
# Add the arguments to the RSRMonitor plist
|
||||
rsr_monitor_plist["ProgramArguments"] = arguments
|
||||
|
||||
# Next add monitoring for '/System/Volumes/Preboot/{UUID}/cryptex1/OS.dmg'
|
||||
logging.info(f" - Adding monitor: {cryptex_path}")
|
||||
rsr_monitor_plist["WatchPaths"] = [
|
||||
cryptex_path,
|
||||
]
|
||||
|
||||
# Write the RSRMonitor plist
|
||||
plistlib.dump(rsr_monitor_plist, Path(self.constants.rsr_monitor_launch_daemon_path).open("wb"))
|
||||
|
||||
return True
|
||||
|
||||
@@ -477,12 +477,6 @@ class DetectRootPatch:
|
||||
if self.constants.detected_os < os_data.os_data.ventura:
|
||||
return False
|
||||
|
||||
for controller in self.constants.computer.usb_controllers:
|
||||
if (isinstance(controller, device_probe.XHCIController)):
|
||||
# Currently USB 1.1 patches are incompatible with USB 3.0 controllers
|
||||
# TODO: Downgrade remaining USB stack to ensure full support
|
||||
return False
|
||||
|
||||
# If we're on a hackintosh, check for UHCI/OHCI controllers
|
||||
if self.constants.host_is_hackintosh is True:
|
||||
for controller in self.constants.computer.usb_controllers:
|
||||
|
||||
@@ -264,13 +264,6 @@ class SysPatchHelpers:
|
||||
logging.info(f"- Merging GPUCompiler.framework libraries to match binary")
|
||||
|
||||
src_dir = f"{LIBRARY_DIR}/{file.name}"
|
||||
for file in ["module.modulemap", "opencl-c.h"]:
|
||||
# Copy on Write to reduce disk usage
|
||||
dst_path = f"{DEST_DIR}/include/{file}"
|
||||
if Path(dst_path).exists():
|
||||
continue
|
||||
utilities.process_status(utilities.elevated(["cp", "-c", f"{src_dir}/include/{file}", f"{DEST_DIR}/include/"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
if not Path(f"{DEST_DIR}/lib").exists():
|
||||
utilities.process_status(utilities.elevated(["cp", "-cR", f"{src_dir}/lib", f"{DEST_DIR}/"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
|
||||
@@ -451,6 +451,15 @@ def monitor_disk_output(disk):
|
||||
return output
|
||||
|
||||
|
||||
def get_preboot_uuid() -> str:
|
||||
"""
|
||||
Get the UUID of the Preboot volume
|
||||
"""
|
||||
args = ["ioreg", "-a", "-n", "chosen", "-p", "IODeviceTree", "-r"]
|
||||
output = plistlib.loads(subprocess.run(args, stdout=subprocess.PIPE).stdout)
|
||||
return output[0]["apfs-preboot-uuid"].strip(b"\0").decode()
|
||||
|
||||
|
||||
def block_os_updaters():
|
||||
# Disables any processes that would be likely to mess with
|
||||
# the root volume while we're working with it.
|
||||
|
||||
Reference in New Issue
Block a user