mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-15 13:18:56 +10:00
Compare commits
309 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
29d3e98b81 | ||
|
|
462fff9d66 | ||
|
|
158f6f2da9 | ||
|
|
a57c29d35e | ||
|
|
bc18bdce03 | ||
|
|
ef9b5bb64a | ||
|
|
c225b77400 | ||
|
|
b69cf09556 | ||
|
|
85203aef5b | ||
|
|
ec80afdd17 | ||
|
|
e288e27b7b | ||
|
|
961c9c7a68 | ||
|
|
55abbab145 | ||
|
|
2986aea152 | ||
|
|
0135d6cccf | ||
|
|
fd2f58da84 | ||
|
|
efb1d81231 | ||
|
|
7fe0432a47 | ||
|
|
88fa7a4b7a | ||
|
|
e0e74ee494 | ||
|
|
e579199246 | ||
|
|
1108d248e5 | ||
|
|
6013eaffe9 | ||
|
|
ea96c546ca | ||
|
|
531fc8ab18 | ||
|
|
35a6f5183c | ||
|
|
afd1b5d2a7 | ||
|
|
d5ffa9a8cf | ||
|
|
0c68618ddf | ||
|
|
ea80d41ff6 | ||
|
|
483819caef | ||
|
|
0ca8ccd3dc | ||
|
|
a1f1da25b5 | ||
|
|
e105d6077e | ||
|
|
eedd4d771a | ||
|
|
3f2aadc016 | ||
|
|
e980054a5d | ||
|
|
a89a7740ca | ||
|
|
2767f35fc5 | ||
|
|
48cf258366 | ||
|
|
8e7706fb12 | ||
|
|
2eb6542931 | ||
|
|
e66e851933 | ||
|
|
9bfcf78ff9 | ||
|
|
8d3ab82ddd | ||
|
|
7b7f68453a | ||
|
|
adec8ebd05 | ||
|
|
ca24aa6ce5 | ||
|
|
e8f44e4eaa | ||
|
|
6a3023301a | ||
|
|
44369e2faa | ||
|
|
0d7186236e | ||
|
|
8806d29a35 | ||
|
|
12b7cf7fcd | ||
|
|
0f7f079dd8 | ||
|
|
040edfdd25 | ||
|
|
2e7afae29b | ||
|
|
b81899092b | ||
|
|
418a966081 | ||
|
|
520c9c315c | ||
|
|
cffc463bde | ||
|
|
2f7965440c | ||
|
|
56efd9743d | ||
|
|
b5b4d84bc9 | ||
|
|
594f6dcbe5 | ||
|
|
c5eb52ac5e | ||
|
|
e83e260db7 | ||
|
|
66a5f5a9ad | ||
|
|
4154b01d40 | ||
|
|
925003e3f1 | ||
|
|
d40d6607b3 | ||
|
|
3aadfe6002 | ||
|
|
d305515c28 | ||
|
|
48471ce4d3 | ||
|
|
f9c7273106 | ||
|
|
e076260a1a | ||
|
|
0671828c9b | ||
|
|
61e5ff1c83 | ||
|
|
3b5e4f10f6 | ||
|
|
dd06932fe5 | ||
|
|
7ee631859d | ||
|
|
7be168bf14 | ||
|
|
6b86e64b5b | ||
|
|
4ae494db86 | ||
|
|
c5f72c10ff | ||
|
|
971a2b0d02 | ||
|
|
8b18c59d8a | ||
|
|
0d38bc0edf | ||
|
|
4c4cacf114 | ||
|
|
dd1afd77e4 | ||
|
|
2a91b2a11c | ||
|
|
b3ed101ad9 | ||
|
|
7b33e77947 | ||
|
|
ea35eaca2e | ||
|
|
b5c613242f | ||
|
|
2eb98b6327 | ||
|
|
6629e9dcef | ||
|
|
6c441e835c | ||
|
|
fe8a2d253a | ||
|
|
68af20d2fa | ||
|
|
625da17f1e | ||
|
|
118d635264 | ||
|
|
bd471df48f | ||
|
|
d70daaf5a4 | ||
|
|
7fc9f3af7c | ||
|
|
6f4c110318 | ||
|
|
dfdb5b4c68 | ||
|
|
5ac3343205 | ||
|
|
42dddfdccf | ||
|
|
ace93b8a3e | ||
|
|
6081ec0d73 | ||
|
|
fc85789f86 | ||
|
|
52fbe23a16 | ||
|
|
99968dbb57 | ||
|
|
b141452005 | ||
|
|
b97a3bc4d8 | ||
|
|
f4ed623c76 | ||
|
|
ad9ae96c7f | ||
|
|
bece5d4b3b | ||
|
|
f915199b92 | ||
|
|
cba9d1e224 | ||
|
|
4782ccdab1 | ||
|
|
1ab2409176 | ||
|
|
3d8bae1142 | ||
|
|
baf25319d7 | ||
|
|
43ef3e18ec | ||
|
|
08710bc47b | ||
|
|
6c294902c2 | ||
|
|
976f14eeb3 | ||
|
|
eb1e29f95b | ||
|
|
4d89c220bf | ||
|
|
571f297906 | ||
|
|
7bf4fd0150 | ||
|
|
d4f42c8b32 | ||
|
|
664972fd2e | ||
|
|
f33cc2d5bb | ||
|
|
da45a964cb | ||
|
|
6c555db237 | ||
|
|
c093f400a6 | ||
|
|
92d57cb6d5 | ||
|
|
3a6f87c9c8 | ||
|
|
08a67e5d37 | ||
|
|
6ed55ff462 | ||
|
|
ef912277b6 | ||
|
|
cef860dbf1 | ||
|
|
e5b89e9c6b | ||
|
|
7ebdb83af7 | ||
|
|
da2fc5c4c3 | ||
|
|
94cfeabdfd | ||
|
|
e7727adcc6 | ||
|
|
8becb554fc | ||
|
|
97024361cd | ||
|
|
71ca6731fa | ||
|
|
ac2147684a | ||
|
|
e16b6e4c22 | ||
|
|
e84f3425d0 | ||
|
|
e1b99b9084 | ||
|
|
b3775d35a5 | ||
|
|
498042ccb3 | ||
|
|
7d4ee0d110 | ||
|
|
cff1aaf3f4 | ||
|
|
a776535e72 | ||
|
|
f7dea97289 | ||
|
|
37e99ba49c | ||
|
|
288b827616 | ||
|
|
e8a6f45329 | ||
|
|
a1ffadf582 | ||
|
|
a6c4890d0f | ||
|
|
00b47aef47 | ||
|
|
92f85feda5 | ||
|
|
21778e8d92 | ||
|
|
57d2597c86 | ||
|
|
20baf8c417 | ||
|
|
99a145e7cb | ||
|
|
28b9948b45 | ||
|
|
79f4ba17d9 | ||
|
|
659d842023 | ||
|
|
037ff0f2c3 | ||
|
|
fac1298a6e | ||
|
|
273910b69a | ||
|
|
1974cd6341 | ||
|
|
bef429b758 | ||
|
|
bebbf646e1 | ||
|
|
6504442d4f | ||
|
|
ff0012e214 | ||
|
|
91e7ff40e4 | ||
|
|
07d09d8eb2 | ||
|
|
b95ab91b43 | ||
|
|
4cc9e414d2 | ||
|
|
a5d56147c0 | ||
|
|
3e8963c372 | ||
|
|
f4d6ef1741 | ||
|
|
abbb9c1c66 | ||
|
|
22b66e0a87 | ||
|
|
fd6c3d818d | ||
|
|
5fa0636f5c | ||
|
|
cefdd1df66 | ||
|
|
fcda4a26bf | ||
|
|
60f6482d43 | ||
|
|
c316e6f5fe | ||
|
|
d30972e5ef | ||
|
|
5206028478 | ||
|
|
00043087c4 | ||
|
|
d7ecdf3871 | ||
|
|
6fe7ed614c | ||
|
|
09f77490a5 | ||
|
|
1cc6d50474 | ||
|
|
549cb9fc9a | ||
|
|
a8ef84acf9 | ||
|
|
f55d3ba5b2 | ||
|
|
e46a5213a6 | ||
|
|
2331aeb6d9 | ||
|
|
1277fef735 | ||
|
|
5fdde346cf | ||
|
|
907ce75295 | ||
|
|
915d38eab1 | ||
|
|
8678200385 | ||
|
|
66e1cbcf1e | ||
|
|
e1568d9391 | ||
|
|
89069a85f0 | ||
|
|
5b2917cb03 | ||
|
|
73afdc37c3 | ||
|
|
f71fcf6f58 | ||
|
|
6169d593c5 | ||
|
|
f463e505d4 | ||
|
|
6c6ae6145d | ||
|
|
90310fcaca | ||
|
|
27d1ee3b02 | ||
|
|
2fba826f80 | ||
|
|
1f63dffd3f | ||
|
|
f4f4f3e1f3 | ||
|
|
4ffe6bed9b | ||
|
|
d3878e34a2 | ||
|
|
501b228b6b | ||
|
|
c707047530 | ||
|
|
1c24cfee24 | ||
|
|
ebd605d459 | ||
|
|
f4cb0bed68 | ||
|
|
0a395b47ae | ||
|
|
1627f264a2 | ||
|
|
23c0759d7a | ||
|
|
26154d4fdf | ||
|
|
c99805bee5 | ||
|
|
d284dc6248 | ||
|
|
70402af1d7 | ||
|
|
b94a1bf9cf | ||
|
|
a0a740de4f | ||
|
|
8876823ae8 | ||
|
|
94b91b2918 | ||
|
|
1bdc3ef5ff | ||
|
|
be7b0e6492 | ||
|
|
30e2a4471c | ||
|
|
41188edf39 | ||
|
|
9296350e58 | ||
|
|
f06d7f2179 | ||
|
|
d5d2a7fbfe | ||
|
|
a672183880 | ||
|
|
9b7074bde5 | ||
|
|
7543606a1e | ||
|
|
48de65dd30 | ||
|
|
e7e2b0dcad | ||
|
|
8b43727b0b | ||
|
|
9c28d77826 | ||
|
|
93c1983a3f | ||
|
|
7fcef65837 | ||
|
|
93a1d0fb11 | ||
|
|
94b33f6029 | ||
|
|
1d2a7e080b | ||
|
|
b448a4b6dd | ||
|
|
235a9985f4 | ||
|
|
34aa75422a | ||
|
|
3a56f13480 | ||
|
|
50d730b45a | ||
|
|
2e5a61b7fd | ||
|
|
7c43cf0901 | ||
|
|
956d0cffcc | ||
|
|
f8e91feff4 | ||
|
|
55061bc86d | ||
|
|
21c40277bb | ||
|
|
4b05b12a0a | ||
|
|
168930919e | ||
|
|
423a6bc255 | ||
|
|
d8f9c60f0c | ||
|
|
0ef84c1751 | ||
|
|
286df94c87 | ||
|
|
ca11b2741e | ||
|
|
ed9f9a05b5 | ||
|
|
82b4cc26d5 | ||
|
|
003a40a039 | ||
|
|
a1cc9a399a | ||
|
|
1659f8c25e | ||
|
|
8c23ea137b | ||
|
|
4dc14eb9c0 | ||
|
|
2ea3933720 | ||
|
|
ff5139463e | ||
|
|
b0d4dd158f | ||
|
|
71439916b6 | ||
|
|
66a9be5be4 | ||
|
|
55478fd81c | ||
|
|
d2d68fd08f | ||
|
|
2ea982b343 | ||
|
|
9741ef794e | ||
|
|
eb9531f768 | ||
|
|
45e0d5b155 | ||
|
|
47fe853334 | ||
|
|
cd5ff61138 | ||
|
|
59b473a4ce | ||
|
|
5a67212bdc | ||
|
|
f0991d2cd0 |
1
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
1
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -95,7 +95,6 @@ body:
|
||||
description: What variant of our software are you running?
|
||||
options:
|
||||
- GUI (Graphical User Interface)
|
||||
- TUI (Text User Interface)
|
||||
- CLI (Command Line Interface)
|
||||
- Other/Non-Applicable
|
||||
validations:
|
||||
|
||||
12
.github/workflows/build-app-wxpython.yml
vendored
12
.github/workflows/build-app-wxpython.yml
vendored
@@ -10,16 +10,21 @@ jobs:
|
||||
build:
|
||||
name: Build wxPython
|
||||
runs-on: x86_64_mojave
|
||||
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_NOTARIZATION_USERNAME: ${{ secrets.MAC_NOTARIZATION_USERNAME }}
|
||||
MAC_NOTARIZATION_PASSWORD: ${{ secrets.MAC_NOTARIZATION_PASSWORD }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 Build-Binary.command --reset_binaries --branch "${{ env.branch }}" --commit "${{ env.commiturl }}" --commit_date "${{ env.commitdate }}"
|
||||
- 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 }}"
|
||||
- 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: ./../sign-wxpython.sh
|
||||
- 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: Upload App to Artifacts
|
||||
@@ -27,11 +32,13 @@ jobs:
|
||||
with:
|
||||
name: OpenCore-Patcher.app (GUI)
|
||||
path: OpenCore-Patcher-GUI.app.zip
|
||||
|
||||
- name: Upload Package to Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: AutoPkg-Assets.pkg
|
||||
path: ./dist/AutoPkg-Assets.pkg
|
||||
|
||||
- name: Upload Binary to Release
|
||||
if: github.event_name == 'release'
|
||||
uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d
|
||||
@@ -40,6 +47,7 @@ jobs:
|
||||
file: OpenCore-Patcher-GUI.app.zip
|
||||
tag: ${{ github.ref }}
|
||||
file_glob: true
|
||||
|
||||
- name: Upload Package to Release
|
||||
if: github.event_name == 'release'
|
||||
uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d
|
||||
|
||||
30
.github/workflows/build-app.yml
vendored
30
.github/workflows/build-app.yml
vendored
@@ -1,30 +0,0 @@
|
||||
name: CI - Build TUI
|
||||
|
||||
on:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build TUI
|
||||
runs-on: x86_64_mojave
|
||||
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 }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 Build-Binary.command --build_tui --reset_binaries --branch "${{ env.branch }}" --commit "${{ env.commiturl }}" --commit_date "${{ env.commitdate }}"
|
||||
- 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; zip -r ../OpenCore-Patcher-TUI.app.zip OpenCore-Patcher.app
|
||||
- run: ./../sign-tui.sh
|
||||
- name: Upload App to Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: OpenCore-Patcher-TUI.app
|
||||
path: OpenCore-Patcher-TUI.app.zip
|
||||
|
||||
- name: Validate OpenCore
|
||||
run: ./dist/OpenCore-Patcher.app/Contents/MacOS/OpenCore-Patcher --validate
|
||||
1
.github/workflows/build-site.yml
vendored
1
.github/workflows/build-site.yml
vendored
@@ -9,6 +9,7 @@ jobs:
|
||||
build:
|
||||
name: Build Site and Deploy
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'dortania'
|
||||
steps:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
|
||||
20
.github/workflows/validate.yml
vendored
Normal file
20
.github/workflows/validate.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
name: CI - Validation
|
||||
|
||||
on:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Validate
|
||||
runs-on: x86_64_mojave
|
||||
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 }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: /Library/Frameworks/Python.framework/Versions/3.10/bin/python3 OpenCore-Patcher-GUI.command --validate
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -32,3 +32,4 @@ __pycache__/
|
||||
/payloads.dmg
|
||||
/payloads/OpenCore-Legacy-Patcher-*.plist
|
||||
/payloads/KDK.dmg
|
||||
*.log
|
||||
|
||||
@@ -1,14 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# This script's main purpose is to handle the following:
|
||||
# - Download PatcherSupportPkg resources
|
||||
# - Convert payloads directory into DMG (GUI only)
|
||||
# - Build Binary via Pyinstaller
|
||||
# - Add Launcher.sh (TUI only)
|
||||
# - Patch 'LC_VERSION_MIN_MACOSX' to OS X 10.10
|
||||
# - Add commit data to Info.plist
|
||||
|
||||
# Copyright (C) 2022 - Mykola Grymalyuk
|
||||
# Generate stand alone application for OpenCore-Patcher
|
||||
# Copyright (C) 2022-2023 - Mykola Grymalyuk
|
||||
|
||||
from pathlib import Path
|
||||
import time
|
||||
@@ -21,26 +14,49 @@ import sys
|
||||
|
||||
from resources import constants
|
||||
|
||||
class create_binary:
|
||||
|
||||
class CreateBinary:
|
||||
"""
|
||||
Library for creating OpenCore-Patcher application
|
||||
|
||||
This script's main purpose is to handle the following:
|
||||
- Download external dependancies (ex. PatcherSupportPkg)
|
||||
- Convert payloads directory into DMG
|
||||
- Build Binary via Pyinstaller
|
||||
- Patch 'LC_VERSION_MIN_MACOSX' to OS X 10.10
|
||||
- Add commit data to Info.plist
|
||||
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
start = time.time()
|
||||
print("- Starting build script")
|
||||
self.set_cwd()
|
||||
self.args = self.parse_arguments()
|
||||
|
||||
self.preflight_processes()
|
||||
self.build_binary()
|
||||
self.postflight_processes()
|
||||
self.args = self._parse_arguments()
|
||||
|
||||
self._set_cwd()
|
||||
|
||||
self._preflight_processes()
|
||||
self._build_binary()
|
||||
self._postflight_processes()
|
||||
print(f"- Build script completed in {str(round(time.time() - start, 2))} seconds")
|
||||
|
||||
def set_cwd(self):
|
||||
|
||||
def _set_cwd(self):
|
||||
"""
|
||||
Initialize current working directory to parent of this script
|
||||
"""
|
||||
|
||||
os.chdir(Path(__file__).resolve().parent)
|
||||
print(f"- Current Working Directory: \n\t{os.getcwd()}")
|
||||
|
||||
def parse_arguments(self):
|
||||
|
||||
def _parse_arguments(self):
|
||||
"""
|
||||
Parse arguments passed to script
|
||||
"""
|
||||
|
||||
parser = argparse.ArgumentParser(description='Builds OpenCore-Patcher binary')
|
||||
parser.add_argument('--build_tui', action='store_true', help='Builds TUI binary, if omitted GUI binary is built')
|
||||
parser.add_argument('--branch', type=str, help='Git branch name')
|
||||
parser.add_argument('--commit', type=str, help='Git commit URL')
|
||||
parser.add_argument('--commit_date', type=str, help='Git commit date')
|
||||
@@ -48,7 +64,12 @@ class create_binary:
|
||||
args = parser.parse_args()
|
||||
return args
|
||||
|
||||
def setup_pathing(self):
|
||||
|
||||
def _setup_pathing(self):
|
||||
"""
|
||||
Initialize pathing for pyinstaller
|
||||
"""
|
||||
|
||||
python_path = sys.executable
|
||||
python_binary = python_path.split("/")[-1]
|
||||
python_bin_dir = python_path.strip(python_binary)
|
||||
@@ -70,23 +91,36 @@ class create_binary:
|
||||
|
||||
self.pyinstaller_path = pyinstaller_path
|
||||
|
||||
def preflight_processes(self):
|
||||
|
||||
def _preflight_processes(self):
|
||||
"""
|
||||
Start preflight processes
|
||||
"""
|
||||
|
||||
print("- Starting preflight processes")
|
||||
self.setup_pathing()
|
||||
self.delete_extra_binaries()
|
||||
self.download_resources()
|
||||
if not self.args.build_tui:
|
||||
# payloads.dmg is only needed for GUI builds
|
||||
self.generate_payloads_dmg()
|
||||
self._setup_pathing()
|
||||
self._delete_extra_binaries()
|
||||
self._download_resources()
|
||||
self._generate_payloads_dmg()
|
||||
|
||||
|
||||
def _postflight_processes(self):
|
||||
"""
|
||||
Start postflight processes
|
||||
"""
|
||||
|
||||
def postflight_processes(self):
|
||||
print("- Starting postflight processes")
|
||||
if self.args.build_tui:
|
||||
self.move_launcher()
|
||||
self.patch_load_command()
|
||||
self.add_commit_data()
|
||||
self._patch_load_command()
|
||||
self._add_commit_data()
|
||||
self._post_flight_cleanup()
|
||||
self._mini_validate()
|
||||
|
||||
|
||||
def _build_binary(self):
|
||||
"""
|
||||
Build binary via pyinstaller
|
||||
"""
|
||||
|
||||
def build_binary(self):
|
||||
if Path(f"./dist/OpenCore-Patcher.app").exists():
|
||||
print("- Found OpenCore-Patcher.app, removing...")
|
||||
rm_output = subprocess.run(
|
||||
@@ -99,12 +133,8 @@ class create_binary:
|
||||
raise Exception("Remove failed")
|
||||
|
||||
|
||||
if self.args.build_tui:
|
||||
print("- Building TUI binary...")
|
||||
build_args = [self.pyinstaller_path, "./OpenCore-Patcher.spec", "--noconfirm"]
|
||||
else:
|
||||
print("- Building GUI binary...")
|
||||
build_args = [self.pyinstaller_path, "./OpenCore-Patcher-GUI.spec", "--noconfirm"]
|
||||
print("- Building GUI binary...")
|
||||
build_args = [self.pyinstaller_path, "./OpenCore-Patcher-GUI.spec", "--noconfirm"]
|
||||
|
||||
build_result = subprocess.run(build_args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
if build_result.returncode != 0:
|
||||
@@ -112,27 +142,52 @@ class create_binary:
|
||||
print(build_result.stderr.decode('utf-8'))
|
||||
raise Exception("Build failed")
|
||||
|
||||
def delete_extra_binaries(self):
|
||||
delete_files = [
|
||||
"AutoPkg-Assets.pkg",
|
||||
"AutoPkg-Assets.pkg.zip",
|
||||
"InstallAssistant.pkg",
|
||||
"InstallAssistant.pkg.integrityDataV1",
|
||||
"KDK.dmg",
|
||||
|
||||
def _delete_extra_binaries(self):
|
||||
"""
|
||||
Delete extra binaries from payloads directory
|
||||
"""
|
||||
|
||||
whitelist_folders = [
|
||||
"ACPI",
|
||||
"Config",
|
||||
"Drivers",
|
||||
"Icon",
|
||||
"InstallPackage",
|
||||
"Kexts",
|
||||
"OpenCore",
|
||||
"Tools",
|
||||
]
|
||||
|
||||
whitelist_files = [
|
||||
"com.dortania.opencore-legacy-patcher.auto-patch.plist",
|
||||
"entitlements.plist",
|
||||
"launcher.sh",
|
||||
"OC-Patcher-TUI.icns",
|
||||
"OC-Patcher.icns",
|
||||
"Universal-Binaries.zip",
|
||||
]
|
||||
|
||||
|
||||
print("- Deleting extra binaries...")
|
||||
for file in Path("payloads").glob(pattern="*"):
|
||||
if file.name in delete_files or file.name.startswith("OpenCore-Legacy-Patcher"):
|
||||
if file.is_dir():
|
||||
if file.name in whitelist_folders:
|
||||
continue
|
||||
print(f" - Deleting {file.name}")
|
||||
file.unlink()
|
||||
elif (Path(file) / Path("Contents/Resources/createinstallmedia")).exists():
|
||||
print(f" - Deleting {file}")
|
||||
subprocess.run(["rm", "-rf", file])
|
||||
elif Path(file).is_dir() and file.name == "Universal-Binaries":
|
||||
print(f" - Deleting {file}")
|
||||
subprocess.run(["rm", "-rf", file])
|
||||
else:
|
||||
if file.name in whitelist_files:
|
||||
continue
|
||||
print(f" - Deleting {file.name}")
|
||||
subprocess.run(["rm", "-f", file])
|
||||
|
||||
|
||||
def _download_resources(self):
|
||||
"""
|
||||
Download required dependencies
|
||||
"""
|
||||
|
||||
def download_resources(self):
|
||||
patcher_support_pkg_version = constants.Constants().patcher_support_pkg_version
|
||||
required_resources = [
|
||||
"Universal-Binaries.zip"
|
||||
@@ -179,21 +234,29 @@ class create_binary:
|
||||
print(mv_output.stderr.decode('utf-8'))
|
||||
raise Exception("Move failed")
|
||||
|
||||
def generate_payloads_dmg(self):
|
||||
|
||||
def _generate_payloads_dmg(self):
|
||||
"""
|
||||
Generate disk image containing all payloads
|
||||
Disk image will be password protected due to issues with
|
||||
Apple's notarization system and inclusion of kernel extensions
|
||||
"""
|
||||
|
||||
if Path("./payloads.dmg").exists():
|
||||
if self.args.reset_binaries:
|
||||
print(" - Removing old payloads.dmg")
|
||||
rm_output = subprocess.run(
|
||||
["rm", "-rf", "./payloads.dmg"],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||
)
|
||||
if rm_output.returncode != 0:
|
||||
print("- Remove failed")
|
||||
print(rm_output.stderr.decode('utf-8'))
|
||||
raise Exception("Remove failed")
|
||||
else:
|
||||
if not self.args.reset_binaries:
|
||||
print(" - payloads.dmg already exists, skipping creation")
|
||||
return
|
||||
|
||||
print(" - Removing old payloads.dmg")
|
||||
rm_output = subprocess.run(
|
||||
["rm", "-rf", "./payloads.dmg"],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||
)
|
||||
if rm_output.returncode != 0:
|
||||
print("- Remove failed")
|
||||
print(rm_output.stderr.decode('utf-8'))
|
||||
raise Exception("Remove failed")
|
||||
|
||||
print(" - Generating DMG...")
|
||||
dmg_output = subprocess.run([
|
||||
'hdiutil', 'create', './payloads.dmg',
|
||||
@@ -211,7 +274,12 @@ class create_binary:
|
||||
|
||||
print(" - DMG generation complete")
|
||||
|
||||
def add_commit_data(self):
|
||||
|
||||
def _add_commit_data(self):
|
||||
"""
|
||||
Add commit data to Info.plist
|
||||
"""
|
||||
|
||||
if not self.args.branch and not self.args.commit and not self.args.commit_date:
|
||||
print(" - No commit data provided, adding source info")
|
||||
branch = "Built from source"
|
||||
@@ -231,20 +299,25 @@ class create_binary:
|
||||
}
|
||||
plistlib.dump(plist, Path(plist_path).open("wb"), sort_keys=True)
|
||||
|
||||
def patch_load_command(self):
|
||||
# Patches LC_VERSION_MIN_MACOSX in Load Command to report 10.10
|
||||
#
|
||||
# By default Pyinstaller will create binaries supporting 10.13+
|
||||
# However this limitation is entirely arbitrary for our libraries
|
||||
# and instead we're able to support 10.10 without issues.
|
||||
#
|
||||
# To verify set version:
|
||||
# otool -l ./dist/OpenCore-Patcher.app/Contents/MacOS/OpenCore-Patcher
|
||||
#
|
||||
# cmd LC_VERSION_MIN_MACOSX
|
||||
# cmdsize 16
|
||||
# version 10.13
|
||||
# sdk 10.9
|
||||
|
||||
def _patch_load_command(self):
|
||||
"""
|
||||
Patch LC_VERSION_MIN_MACOSX in Load Command to report 10.10
|
||||
|
||||
By default Pyinstaller will create binaries supporting 10.13+
|
||||
However this limitation is entirely arbitrary for our libraries
|
||||
and instead we're able to support 10.10 without issues.
|
||||
|
||||
To verify set version:
|
||||
otool -l ./dist/OpenCore-Patcher.app/Contents/MacOS/OpenCore-Patcher
|
||||
|
||||
cmd LC_VERSION_MIN_MACOSX
|
||||
cmdsize 16
|
||||
version 10.13
|
||||
sdk 10.9
|
||||
|
||||
"""
|
||||
|
||||
print(" - Patching LC_VERSION_MIN_MACOSX")
|
||||
path = './dist/OpenCore-Patcher.app/Contents/MacOS/OpenCore-Patcher'
|
||||
find = b'\x00\x0D\x0A\x00' # 10.13 (0xA0D)
|
||||
@@ -255,16 +328,39 @@ class create_binary:
|
||||
with open(path, 'wb') as f:
|
||||
f.write(data)
|
||||
|
||||
def move_launcher(self):
|
||||
print(" - Adding TUI launcher")
|
||||
mv_output = subprocess.run(
|
||||
["cp", "./payloads/launcher.sh", "./dist/OpenCore-Patcher.app/Contents/MacOS/Launcher"],
|
||||
|
||||
def _post_flight_cleanup(self):
|
||||
"""
|
||||
Post flight cleanup
|
||||
"""
|
||||
|
||||
path = "./dist/OpenCore-Patcher"
|
||||
print(f" - Removing {path}")
|
||||
rm_output = subprocess.run(
|
||||
["rm", "-rf", path],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||
)
|
||||
if mv_output.returncode != 0:
|
||||
print(" - Move failed")
|
||||
print(mv_output.stderr.decode('utf-8'))
|
||||
raise Exception("Move failed")
|
||||
if rm_output.returncode != 0:
|
||||
print(f" - Remove failed: {path}")
|
||||
print(rm_output.stderr.decode('utf-8'))
|
||||
raise Exception(f"Remove failed: {path}")
|
||||
|
||||
|
||||
def _mini_validate(self):
|
||||
"""
|
||||
Validate generated binary
|
||||
"""
|
||||
|
||||
print(" - Validating binary")
|
||||
validate_output = subprocess.run(
|
||||
["./dist/OpenCore-Patcher.app/Contents/MacOS/OpenCore-Patcher", "--build", "--model", "MacPro3,1"],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||
)
|
||||
if validate_output.returncode != 0:
|
||||
print(" - Validation failed")
|
||||
print(validate_output.stderr.decode('utf-8'))
|
||||
raise Exception("Validation failed")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
create_binary()
|
||||
CreateBinary()
|
||||
185
CHANGELOG.md
185
CHANGELOG.md
@@ -1,5 +1,190 @@
|
||||
# OpenCore Legacy Patcher changelog
|
||||
|
||||
## 0.6.2
|
||||
- Work around Black Box rendering issues on certain Display Color Profiles
|
||||
- Limited to Ventura currently due to limitations with other color profiles
|
||||
- Applicable for HD3000-based machines (ex. MacBookAir4,x, MacBookPro8,x, Macmini5,x)
|
||||
- Ensure `Moraea_BlurBeta` is set on non-Metal systems
|
||||
- Implement proper Root Unpatching verification in GUI
|
||||
- Removes arbitrary patch requirements used against unpatching (ex. network connection)
|
||||
- Implement Kernel Debug Kit installation during OS installs
|
||||
- Avoids network requirement for first time installs
|
||||
- Paired along side AutoPkgInstaller
|
||||
- Implement Kernel Debug Kit backup system
|
||||
- Allows for easy restoration of KDKs if OS updates corrupted installed KDKs
|
||||
- Update Wireless binaries
|
||||
- Fixed WiFi preferences crash with legacy wifi patches
|
||||
- Update non-Metal Binaries
|
||||
- Improved menubar blur saturation
|
||||
- Fixed System Settings hover effects, including Bluetooth connect button
|
||||
- Add Books hacks (reimplement cover image generation, disable broken page curl animation)
|
||||
- Fixed unresponsive buttons
|
||||
- Implement Hardware Encoding support for AMD GCN 1-3, Polaris and Vega GPUs
|
||||
- Applicable for pre-Haswell Macs on macOS Ventura
|
||||
- Resolves DRM playback issues on Netflix, Disney+, etc.
|
||||
- Note: GCN 1-3 DRM is functional, however hardware video encoding is still experimental
|
||||
- AppleTV+ may be unstable due to this
|
||||
- Implement support for AMD Navi and Lexa MXM GPUs in 2009-2011 iMacs
|
||||
- Primarily applicable for MXM 3.0 variants of AMD WX3200 (0x6981) and AMD RX5500XT (0x7340)
|
||||
- Credit to [Ausdauersportler](https://github.com/Ausdauersportler) for implementation
|
||||
- Implement Continuity Camera Unlocking for pre-Kaby Lake CPUs
|
||||
- Applicable for all legacy Macs in macOS Ventura
|
||||
- Resolve boot support for 3802-based GPUs with macOS 13.3
|
||||
- Applicable for following GPUs:
|
||||
- Intel Ivy Bridge and Haswell iGPUs
|
||||
- Nvidia Kepler dGPUs
|
||||
- Note: patchset now requires AMFI to be disabled, patchset still in active development to remove this requirement
|
||||
- Backend Changes:
|
||||
- Refactored kdk_handler.py
|
||||
- Prioritizes KdkSupportPkg repository for downloads
|
||||
- Skips calls to Apple's now defunct Developer Portal API
|
||||
- Support local loose matching when no network connection is available
|
||||
- Implement pkg receipt verification to validate integrity of KDKs
|
||||
- Implemented logging framework usage for more reliable logging
|
||||
- Logs are stored under `~/Library/Logs/OpenCore-Patcher.log`
|
||||
- Subsequent runs are appended to the log, allowing for easy debugging
|
||||
- Implemented new network_handler.py module
|
||||
- Allows for more reliable network calls and downloads
|
||||
- Better supports network timeouts and disconnects
|
||||
- Dramatically less noise in console during downloads
|
||||
- Implemented new macOS Installer handler
|
||||
- Removed unused modules:
|
||||
- sys_patch_downloader.py
|
||||
- run.py
|
||||
- TUI modules
|
||||
- Build Server Changes:
|
||||
- Upgrade Python backend to 3.10.9
|
||||
- Upgrade Python modules:
|
||||
- requests - 2.28.2
|
||||
- pyobjc - 9.0.1
|
||||
- wxpython - 4.2.0
|
||||
- pyinstaller - 5.7.0
|
||||
- packaging - 23.0
|
||||
- Increment Binaries:
|
||||
- PatcherSupportPkg 0.8.7 - release
|
||||
- AutoPkgInstaller 1.0.2 - release
|
||||
- FeatureUnlock 1.1.4 - rolling (0e8d87f)
|
||||
- Lilu 1.6.4 - release
|
||||
- WhateverGreen 1.6.4 - release
|
||||
- NVMeFix 1.1.0 - release
|
||||
- Innie 1.3.1 - release
|
||||
- OpenCorePkg 0.9.0 - release
|
||||
|
||||
## 0.6.1
|
||||
- Avoid usage of KDKlessWorkaround on hardware not requiring it
|
||||
- Resolves AMD Graphics Regression from 0.5.3
|
||||
- Increment Binaries:
|
||||
- KDKlessWorkaround 1.0.0 - rolling (8e41f39)
|
||||
|
||||
## 0.6.0
|
||||
- Resolve external NVMe reporting regression from 0.5.2
|
||||
- Implement Legacy Wireless support for Ventura
|
||||
- Applicable for BCM94328, BCM94322 and Atheros chipsets
|
||||
- Implement Wifi-only patches when no internet connection available but required (ie. KDKs)
|
||||
- Allows users to install Legacy Wireless patches, then connect to the internet to install remaining patches
|
||||
- Resolve `/Library/Extensions` not being cleaned on KDK-less root patches
|
||||
- Add AMD Vega Graphics support for pre-AVX2.0 systems on Ventura
|
||||
- ex. AMD Vega 56 and 64, AMD Radeon VII
|
||||
- Note: As with Polaris, Vega GPUs cannot be mixed with AMD GCN 1-3 patches
|
||||
- Patcher will prioritize the AMD GCN 1-3 (assumption that GCN is primary GPU, ex. MacPro6,1)
|
||||
- Implement proper `APPLE SSD TS0128F/256F` detection
|
||||
- Allows all Macs to utilize patch if required
|
||||
- Avoids usage of patch when host lacks affected drive (ex. MacBookAir6,x with upgraded SSD)
|
||||
- Prompt with auto patcher when booted OpenCore is out of date to root patcher
|
||||
- ex. Booted OCLP is 0.5.2, root patcher is 0.5.3
|
||||
- Disable native AMD Graphics on pre-Haswell Macs in Ventura
|
||||
- Allows for easy root patching, dropping reliance on Safe Mode to boot
|
||||
- Primarily applicable for iMacs and Mac Pros with AMD Polaris and Vega GPUs
|
||||
- Implement mini validation during GUI build
|
||||
- Add early UHCI/OHCI support (USB1.1)
|
||||
- Implemented via Root Volume patching, ie. no installer support at this time
|
||||
- Support should be seen as experimental, especially for laptops
|
||||
- Applicable for Penryn Macs and Cheese Grater Mac Pros (MacPro3,1 - MacPro5,1)
|
||||
- See associated issue for current limitations: [Legacy UHCI/OHCI support in Ventura](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1021)
|
||||
- USB 3.0 controllers cannot be used along side USB 1.1 patches, OCLP will prioritize USB 3.0 support
|
||||
- Add early non-Metal Graphics Acceleration support for macOS Ventura
|
||||
- Applicable for following GPU architectures:
|
||||
- Intel Ironlake and Sandy Bridge
|
||||
- Nvidia Tesla, Maxwell and Pascal
|
||||
- AMD TeraScale 1 and 2
|
||||
- Notes:
|
||||
- Bluetooth Pairing is currently semi-functional, see here for work around: [Tab+Space work-around](https://forums.macrumors.com/threads/macos-13-ventura-on-unsupported-macs-thread.2346881/post-31858759)
|
||||
- AMFI currently needs to be outright disabled in Ventura
|
||||
- Overall non-Metal improvements:
|
||||
- Improved fake rim
|
||||
- Fixed full screen animation
|
||||
- Fixed split screen
|
||||
- Improved menubar blur
|
||||
- Add Nvidia Kepler GOP Driver injection
|
||||
- Primarily for GPUs lacking GOPs and can't have a newer VBIOS flashed
|
||||
- Resolve Rapid Security Response support for Haswell+ Macs requiring KDKs
|
||||
- Implemented via:
|
||||
- Userspace: [RSRRepair](https://github.com/flagersgit/RSRRepair) at `/etc/rc.server` (2b1c9e3)
|
||||
- Kernelspace: [RSRHelper.kext](https://github.com/khronokernel/RSRHelper) (cbe1be9)
|
||||
- Add APFS Trim Configuration
|
||||
- Settings -> Misc Settings -> APFS Trim
|
||||
- Increment Binaries:
|
||||
- OpenCorePkg 0.8.8 - release
|
||||
- PatcherSupportPkg 0.8.2 - release
|
||||
- KDKlessWorkaround 1.0.0 - rolling (4924276)
|
||||
- FeatureUnlock 1.1.2 - release
|
||||
- CPUFriend 1.2.6 - release
|
||||
- Lilu 1.6.3 - release
|
||||
|
||||
## 0.5.3
|
||||
- Integrate FixPCIeLinkrate.efi v0.1.0
|
||||
- Fixes link rate for PCIe 3.0 devices on MacPro3,1
|
||||
- Resolve AppleIntelCPUPowerManagement Panic in Safe Mode
|
||||
- Applicable for pre-Haswell Macs on Ventura
|
||||
- Revert AppleALC 1.7.6 update back to 1.6.3
|
||||
- Resolves audio issues on certain Intel HDEF devices
|
||||
- Regression currently being investigated within AppleALC
|
||||
- Remove `Force Web Drivers` option
|
||||
- Avoids accidental use of non-Metal Web Drivers on Kepler GPUs
|
||||
- Resolve silent auto patcher crash when new OCLP version is available
|
||||
- Implement [`py_sip_xnu`](https://github.com/khronokernel/py_sip_xnu) module
|
||||
- Resolve Content Caching Patch Regression
|
||||
- Resolve KDK Versioning Fallback crashing when primary KDK site is down
|
||||
- Resolve AirPlay to Mac support on Ventura with VMM
|
||||
- Resolve WindowServer crashing on KDK-less with macOS 13.2 and Rapid Security Response updates
|
||||
- Resolve Host Versioning when RSR is installed
|
||||
- Resolve iMac7,1-8,1 and MacBookPro4,1 boot support in Ventura
|
||||
- Increment Binaries:
|
||||
- OpenCorePkg 0.8.7 - release
|
||||
- FeatureUnlock 1.1.2 - rolling (94e29ce)
|
||||
- WhateverGreen 1.6.2 - release
|
||||
|
||||
## 0.5.2
|
||||
- Ventura Specific Updates:
|
||||
- Resolve AMD Polaris external display output support
|
||||
- AMD Polaris and legacy GCN cannot be mixed in the same system
|
||||
- Legacy GCN support will be prioritized when both are present
|
||||
- AMD Polaris GPU can still be used headless for rendering with legacy GCN (ex. [macOS: Prefer External GPU option](https://support.apple.com/en-ca/HT208544))
|
||||
- Disables unsupported `mediaanalysisd` on Metal 1 GPUs
|
||||
- Alleviates kernel panic when on prolonged idle
|
||||
- Automatically remove unsupported News Widgets on Ivy Bridge and Haswell iGPUs
|
||||
- Alleviates Notification Centre Crashing
|
||||
- Implement downloading from Kernel Debug Kit Backup Repository
|
||||
- Alleviates issues with Apple blocking KDK downloads from OCLP (Ref: [Issue #1016](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1016))
|
||||
- Work-around MacPro6,1 and Lilu race condition
|
||||
- Ensure Model and Board ID are set correctly before Lilu loads
|
||||
- Publish Application Version in UI header
|
||||
- Allows for easier identification of version when reporting issues
|
||||
- Drop usage of `HW_BID` rerouting in boot.efi
|
||||
- Patch out PlatformSupport.plist instead, allows for less maintenance overall
|
||||
- Add support for AMD GOP injection (AMDGOP.efi)
|
||||
- For MXM iMacs and Mac Pros with GPU VBIOS lacking GOP support (ie. no UEFI output even after OC loads)
|
||||
- Hide OpenCore Boot Picker when waking from hibernation
|
||||
- Increment Binaries:
|
||||
- AirPortBrcmFixup 2.1.6 - release
|
||||
- AppleALC 1.7.6 - release
|
||||
- CryptexFixup 1.0.1 - release
|
||||
- DebugEnhancer 1.0.7 - release
|
||||
- FeatureUnlock 1.1.0 - release
|
||||
- OpenCorePkg 0.8.7 - rolling (fcb4e33)
|
||||
- RestrictEvents 1.0.9 - release
|
||||
- WhateverGreen 1.6.1 - release
|
||||
|
||||
## 0.5.1
|
||||
- Add support for `APPLE SSD TS0128F/256F` SSDs in macOS Ventura
|
||||
- ie. stock SSD found in MacBookAir6,x
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
from resources import main
|
||||
|
||||
if __name__ == '__main__':
|
||||
main.OpenCoreLegacyPatcher(True)
|
||||
main.OpenCoreLegacyPatcher()
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright (C) 2020-2022, Dhinak G, Mykola Grymalyuk
|
||||
from resources import main
|
||||
|
||||
if __name__ == '__main__':
|
||||
main.OpenCoreLegacyPatcher()
|
||||
@@ -1,44 +0,0 @@
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
import sys, os
|
||||
sys.path.append(os.path.abspath(os.getcwd()))
|
||||
from resources import constants
|
||||
block_cipher = None
|
||||
|
||||
|
||||
a = Analysis(['OpenCore-Patcher.command'],
|
||||
pathex=['resources', 'data'],
|
||||
binaries=[],
|
||||
datas=[('payloads', 'payloads')],
|
||||
hiddenimports=[],
|
||||
hookspath=[],
|
||||
runtime_hooks=[],
|
||||
excludes=['wxPython', 'wxpython'],
|
||||
win_no_prefer_redirects=False,
|
||||
win_private_assemblies=False,
|
||||
cipher=block_cipher,
|
||||
noarchive=False)
|
||||
pyz = PYZ(a.pure, a.zipped_data,
|
||||
cipher=block_cipher)
|
||||
exe = EXE(pyz,
|
||||
a.scripts,
|
||||
a.binaries,
|
||||
a.zipfiles,
|
||||
a.datas,
|
||||
[],
|
||||
name='OpenCore-Patcher',
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
upx=True,
|
||||
upx_exclude=[],
|
||||
runtime_tmpdir=None,
|
||||
console=True )
|
||||
app = BUNDLE(exe,
|
||||
name='OpenCore-Patcher.app',
|
||||
icon="payloads/OC-Patcher-TUI.icns",
|
||||
bundle_identifier="com.dortania.opencore-legacy-patcher-tui",
|
||||
info_plist={
|
||||
"CFBundleShortVersionString": constants.Constants().patcher_version,
|
||||
"CFBundleExecutable": "MacOS/Launcher",
|
||||
"NSHumanReadableCopyright": constants.Constants().copyright_date,
|
||||
})
|
||||
18
README.md
18
README.md
@@ -15,7 +15,7 @@ Our project's main goal is to breath new life to Macs no longer supported by App
|
||||
|
||||
Noteworthy features of OpenCore Legacy Patcher:
|
||||
|
||||
* Support for macOS Big Sur and Monterey
|
||||
* Support for macOS Big Sur, Monterey and Ventura
|
||||
* Native Over the Air(OTA) System Updates
|
||||
* Supports Penryn and newer Macs
|
||||
* Full support for WPA Wifi and Personal Hotspot on BCM943224 and newer chipsets
|
||||
@@ -32,7 +32,7 @@ Note: Only clean-installs and upgrades are supported, macOS Big Sur installs alr
|
||||
|
||||
* You can however reinstall macOS with this patcher and retain your original data
|
||||
|
||||
Note 2: Currently OpenCore Legacy Patcher officially supports patching to run macOS Big Sur and Monterey installs. For older OSes, OpenCore may function however support is currently not provided from Dortania.
|
||||
Note 2: Currently OpenCore Legacy Patcher officially supports patching to run macOS Big Sur through Ventura installs. For older OSes, OpenCore may function however support is currently not provided from Dortania.
|
||||
|
||||
* For macOS Mojave and Catalina support, we recommend the use of [dosdude1's patchers](http://dosdude1.com)
|
||||
|
||||
@@ -44,8 +44,10 @@ To start using the project, please see our in-depth guide:
|
||||
|
||||
## Support
|
||||
|
||||
To get aid with the patcher, we recommend joining the [OpenCore Patcher Paradise Discord Server](https://discord.gg/rqdPgH8xSN). We're actively there and is the quickest way to receive help.
|
||||
This project is offered on an AS-IS basis, we do not guarantee support for any issues that may arise. However, there is a community server with other passionate users and developers that can aid you:
|
||||
|
||||
* [OpenCore Patcher Paradise Discord Server](https://discord.gg/rqdPgH8xSN)
|
||||
* Keep in mind that the Discord is maintained by the community, so we ask everyone to be respectful.
|
||||
* Please review our docs on [how to debug with OpenCore](https://dortania.github.io/OpenCore-Legacy-Patcher/DEBUG.html) to gather important information to help others with troubleshooting.
|
||||
|
||||
## Running from source
|
||||
@@ -87,6 +89,16 @@ To run the project from source, see here: [Build and run from source](./SOURCE.m
|
||||
* Endless hours helping architect and troubleshoot many portions of the project
|
||||
* [flagers](https://github.com/flagersgit)
|
||||
* Aid with Nvidia Web Driver research and development
|
||||
* [joevt](https://github.com/joevt)
|
||||
* [FixPCIeLinkrate](https://github.com/joevt/joevtApps)
|
||||
* Amazing users who've graciously donate hardware:
|
||||
* [JohnD](https://forums.macrumors.com/members/johnd.53633/) - 2013 Mac Pro
|
||||
* [SpiGAndromeda](https://github.com/SpiGAndromeda) - AMD Vega 64
|
||||
* [turbomacs](https://github.com/turbomacs) - 2014 5k iMac
|
||||
* [vinaypundith](https://forums.macrumors.com/members/vinaypundith.1212357/) - MacBook7,1
|
||||
* zephar - 2008 Mac Pro
|
||||
* jazo97 - 2011 15" MacBook Pro
|
||||
* And others (reach out if we forgot you!)
|
||||
* MacRumors and Unsupported Mac Communities
|
||||
* Endless testing, reporting issues
|
||||
* Apple
|
||||
|
||||
24
SOURCE.md
24
SOURCE.md
@@ -1,11 +1,10 @@
|
||||
# Build and run from source
|
||||
|
||||
OpenCore Legacy Patcher at its core is a python-based TUI/CLI based application. This means that to run the project from source, you simply need to invoke the OpenCore-Patcher.command file via Python.
|
||||
OpenCore Legacy Patcher at its core is a python-based GUI/CLI based application. This means that to run the project from source, you simply need to invoke the OpenCore-Patcher-GUI.command file via Python.
|
||||
|
||||
For developers wishing to validate mainline changes, you may use these nightly links:
|
||||
|
||||
* [GUI (Graphical Based App)](https://nightly.link/dortania/OpenCore-Legacy-Patcher/workflows/build-app-wxpython/main/OpenCore-Patcher.app%20%28GUI%29.zip)
|
||||
* [TUI (Text Based App)](https://nightly.link/dortania/OpenCore-Legacy-Patcher/workflows/build-app/main/OpenCore-Patcher-TUI.app.zip)
|
||||
|
||||
**Warning**: These binaries should not be used without first consulting the [CHANGELOG](./CHANGELOG.md). Do not distribute these links in forums, instead direct to this file.
|
||||
|
||||
@@ -32,41 +31,31 @@ pip3 install -r requirements.txt
|
||||
|
||||
If you have installation error, see following troubleshooting options:
|
||||
|
||||
* Use Python 3.9
|
||||
* Currently our build server uses py3.9 for generating binaries used in releases
|
||||
* Use Python 3.10
|
||||
* Currently our build server uses py3.10 for generating binaries used in releases
|
||||
* Use .whl snapshots for installing additional dependencies
|
||||
* [wxPython 4.1.1 wheel for py3.9](https://files.pythonhosted.org/packages/2c/a8/7027e8ca3ba20dc2ed2acd556e31941cb44097ab87d6f81d646a79de4eab/wxPython-4.1.1-cp39-cp39-macosx_10_10_x86_64.whl)
|
||||
* [PyObjc 8.5 wheel for py3](https://files.pythonhosted.org/packages/69/3d/786f379dd669a078cf0c4a686e242c9b643071c23367bfbd3d9a7eb589ec/pyobjc-8.5-py3-none-any.whl)
|
||||
* [Requests 2.27.1 for py2/py3](https://files.pythonhosted.org/packages/2d/61/08076519c80041bc0ffa1a8af0cbd3bf3e2b62af10435d269a9d0f40564d/requests-2.27.1-py2.py3-none-any.whl)
|
||||
* [pyinstaller 5.3 for py3](https://files.pythonhosted.org/packages/65/70/625e86e5a45cb975a9c32a10a721394d10771275c69207308b80bc6a758e/pyinstaller-5.3-py3-none-macosx_10_13_universal2.whl)
|
||||
|
||||
|
||||
## Running OpenCore Legacy Patcher
|
||||
|
||||
To run the project from source, simply invoke via python3:
|
||||
|
||||
```sh
|
||||
# Launch TUI
|
||||
python3 OpenCore-Patcher.command
|
||||
```
|
||||
|
||||
```sh
|
||||
# Launch GUI
|
||||
python3 OpenCore-Patcher-GUI.command
|
||||
```
|
||||
|
||||
Note that the OpenCore-Patcher.command file can be run as both a TUI and a CLI utility for other programs to call. If no core arguments are passed, the TUI is initialized. Otherwise the CLI will start:
|
||||
Note that the OpenCore-Patcher-GUI.command file can be run as both a GUI and a CLI utility for other programs to call. If no core arguments are passed, the GUI is initialized. Otherwise the CLI will start:
|
||||
|
||||
```sh
|
||||
# Launch CLI
|
||||
python3 OpenCore-Patcher.command --build --model iMac12,2 --verbose
|
||||
python3 OpenCore-Patcher-GUI.command --build --model iMac12,2 --verbose
|
||||
```
|
||||
|
||||
See `-h`/`--help` for more information on supported CLI arguments.
|
||||
|
||||
## Generating prebuilt binaries
|
||||
|
||||
The main goal of generating prebuilt binaries is to strip the requirement of a local python installation for users. For developers, there's very little benefit besides enabling dark mode support in the GUI. For development, simply use the OpenCore-Patcher.command file with a python3 installation.
|
||||
The main goal of generating prebuilt binaries is to strip the requirement of a local python installation for users. For developers, there's very little benefit besides enabling dark mode support in the GUI. For development, simply use the OpenCore-Patcher-GUI.command file with a python3 installation.
|
||||
|
||||
* Note that due to PyInstaller's linking mechanism, binaries generated on Catalina and newer are not compatible with High Sierra and older
|
||||
* To ensure the largest compatibility, generate binaries on macOS Mojave. These binaries will be compatible with macOS 10.9 to macOS 12.
|
||||
@@ -79,7 +68,6 @@ pip3 install pyinstaller
|
||||
cd ~/Developer/OpenCore-Legacy-Patcher/
|
||||
# Create the pyinstaller based Application
|
||||
# Optional Arguments
|
||||
# '--build_tui': Create TUI vairant
|
||||
# '--reset_binaries': Redownload and generate support files
|
||||
python3 Build-Binary.command
|
||||
# Open build folder
|
||||
|
||||
@@ -6,19 +6,20 @@
|
||||
# - 0x3 used in 11.0.1 dyld source:
|
||||
# - https://github.com/apple-oss-distributions/dyld/blob/5c9192436bb195e7a8fe61f22a229ee3d30d8222/testing/test-cases/kernel-hello-world.dtest/main.c#L2
|
||||
|
||||
class apple_mobile_file_integrity:
|
||||
import enum
|
||||
|
||||
class AppleMobileFileIntegrity(enum.IntEnum):
|
||||
# Names set are solely for readability
|
||||
# Internal names are unknown
|
||||
amfi_values = {
|
||||
"AMFI_ALLOW_TASK_FOR_PID": False, # 0x1 - Allow Task for PID (alt. amfi_unrestrict_task_for_pid=0x1)
|
||||
"AMFI_ALLOW_INVALID_SIGNATURE": False, # 0x2 - Reduce sig enforcement (alt. amfi_allow_any_signature=0x1)
|
||||
"AMFI_LV_ENFORCE_THIRD_PARTY": False, # 0x4 - Don't mark external binaries as platform binaries
|
||||
"AMFI_UNKNOWN_1": False, # 0x8
|
||||
"AMFI_UNKNOWN_2": False, # 0x10
|
||||
"AMFI_UNKNOWN_3": False, # 0x20
|
||||
"AMFI_UNKNOWN_4": False, # 0x40
|
||||
"AMFI_ALLOW_EVERYTHING": False, # 0x80 - Disable sig enforcement and Library Validation (alt. amfi_get_out_of_my_way=0x1)
|
||||
},
|
||||
AMFI_ALLOW_TASK_FOR_PID: int = 0x1 # Allow Task for PID (alt. amfi_unrestrict_task_for_pid=0x1)
|
||||
AMFI_ALLOW_INVALID_SIGNATURE: int = 0x2 # Reduce sig enforcement (alt. amfi_allow_any_signature=0x1)
|
||||
AMFI_LV_ENFORCE_THIRD_PARTY: int = 0x4 # Don't mark external binaries as platform binaries
|
||||
AMFI_UNKNOWN_1: int = 0x8
|
||||
AMFI_UNKNOWN_2: int = 0x10
|
||||
AMFI_UNKNOWN_3: int = 0x20
|
||||
AMFI_UNKNOWN_4: int = 0x40
|
||||
AMFI_ALLOW_EVERYTHING: int = 0x80 # Disable sig enforcement and Library Validation (alt. amfi_get_out_of_my_way=0x1)
|
||||
|
||||
|
||||
# Internally within AMFI.kext, Apple references 0x2 and 0x80 as both 'Disable signature enforcement'
|
||||
# However 0x80 is a higher privilege than 0x2, and breaks TCC support in OS (ex. Camera, Microphone, etc prompts)
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
# Data for SkyLightShim Plugin systems
|
||||
class shim_list:
|
||||
shim_pathing = {
|
||||
"CoreWLAN.dylib": "/System/Library/CoreServices/WiFiAgent.app/Contents/MacOS/WiFiAgent",
|
||||
"BacklightFixup.dylib": "/System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow",
|
||||
}
|
||||
|
||||
shim_legacy_accel = [
|
||||
"CoreWLAN.dylib",
|
||||
]
|
||||
|
||||
shim_legacy_accel_keyboard = [
|
||||
"BacklightFixup.dylib",
|
||||
]
|
||||
@@ -1,11 +0,0 @@
|
||||
# Mirrors of Apple's InstallAssistant.pkg
|
||||
# Currently only listing important Installers no longer on Apple's servers
|
||||
|
||||
Install_macOS_Big_Sur_11_2_3 = {
|
||||
"Version": "11.2.3",
|
||||
"Build": "20D91",
|
||||
"Link": "https://archive.org/download/install-assistant-20D91/InstallAssistant.pkg",
|
||||
"Size": 12211077798,
|
||||
"Source": "Archive.org",
|
||||
"integrity": None,
|
||||
}
|
||||
@@ -249,6 +249,9 @@ IntelNvidiaDRM = [
|
||||
# Mac Pro and Xserve
|
||||
MacPro = ["MacPro3,1", "MacPro4,1", "MacPro5,1", "Xserve2,1", "Xserve3,1", "Dortania1,1"]
|
||||
|
||||
# MXM iMac
|
||||
MXMiMac = ["iMac11,1", "iMac11,2", "iMac11,3", "iMac10,1", "iMac12,1", "iMac12,2", "Dortania1,1"]
|
||||
|
||||
NoAGPMSupport = ["MacBook4,1", "MacBookPro4,1", "iMac7,1", "iMac8,1", "MacPro3,1", "Xserve2,1", "Dortania1,1"]
|
||||
|
||||
AGDPSupport = [
|
||||
@@ -350,4 +353,4 @@ Missing_USB_Map_Ventura = [
|
||||
"iMac16,1",
|
||||
"iMac16,2",
|
||||
"iMac17,1",
|
||||
]
|
||||
]
|
||||
|
||||
@@ -796,6 +796,11 @@ class amd_ids:
|
||||
0x67CF, # Unknown
|
||||
]
|
||||
|
||||
polaris_spoof_ids = [
|
||||
# Polaris 12 (Lexa)
|
||||
0x6981, # Lexa XT [Radeon PRO WX 3200]
|
||||
]
|
||||
|
||||
vega_ids = [
|
||||
# GCN v5
|
||||
# AMDRadeonX5000
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
11
data/video_bios_data.py
Normal file
11
data/video_bios_data.py
Normal file
File diff suppressed because one or more lines are too long
@@ -13,8 +13,9 @@
|
||||
* [Unable to allow Safari Extensions](#unable-to-allow-Safari-Extensions)
|
||||
* [Cannot Login on 2011 15" and 17" MacBook Pros](#cannot-login-on-2011-15-and-17-macbook-pros)
|
||||
* [Black Boxes on HD3000 iGPUs](#black-boxes-on-hd3000-igpus)
|
||||
* [Cannot Pair Bluetooth Devices](#cannot-pair-bluetooth-devices)
|
||||
|
||||
The below page is for users experiencing issues with their overall usage of macOS Big Sur / macOS Monterey and the Legacy Graphics Acceleration patches. Note that the following GPUs currently do not have acceleration support in Big Sur / Monterey:
|
||||
The below page is for users experiencing issues with their overall usage of macOS Big Sur / Monterey / Ventura and the Legacy Graphics Acceleration patches. Note that the following GPUs currently do not have acceleration support in Big Sur / Monterey / Ventura:
|
||||
|
||||
* Intel 3rd and 4th Gen - GMA series
|
||||
|
||||
@@ -22,7 +23,7 @@ For those unfamiliar with what is considered a non-Metal GPU, see the chart belo
|
||||
|
||||
::: details macOS GPU Chart
|
||||
|
||||
Metal is Apple's in-house graphics API that acts as a replacement for OpenGL/OpenCL, introduced in 2015. With the release of macOS Mojave, every system without a Metal-capable GPU was dropped.
|
||||
Metal is Apple's in-house graphics API that acts as a replacement for OpenGL/OpenCL, introduced in 2015. With the release of macOS Mojave, every system without a Metal-capable GPU was dropped.
|
||||
|
||||
| Graphics Vendor | Architecture | Series | Supports Metal |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
@@ -30,7 +31,7 @@ Metal is Apple's in-house graphics API that acts as a replacement for OpenGL/Ope
|
||||
| ^^ | TeraScale 2 | HD5000 - HD6000 | ^^ |
|
||||
| AMD | GCN (and newer) | HD7000+ | <span style="color:green">Yes</span> |
|
||||
| NVIDIA | Tesla | 8000GT - GT300 | <span style="color:red">No</span> |
|
||||
| ^^ | Fermi | GT400 - GT500 | ^^ |
|
||||
| ^^ | Fermi | GT400 - GT500 | ^^ |
|
||||
| ^^ | Kepler | GT600 - GT700 | <span style="color:green">Yes</span> |
|
||||
| Intel | GMA | GMA900 - GMA3000 | <span style="color:red">No</span> |
|
||||
| ^^ | Iron Lake | HD series | ^^ |
|
||||
@@ -101,7 +102,7 @@ Due to the Metal Backend, the enhanced color output of these apps seems to heavi
|
||||
|
||||
## Cannot press "Done" when editing a Sidebar Widget
|
||||
|
||||
Workaround: Press some combination of Tab, or Tab and then Shift-Tab, or just Shift-Tab until the "Done" button is highlighted. Then press spacebar to activate the button, the same as in any other dialog with a highlighted button halo.
|
||||
Workaround: Press some combination of Tab, or Tab and then Shift-Tab, or just Shift-Tab until the "Done" button is highlighted. Then press spacebar to activate the button, the same as in any other dialog with a highlighted button halo.
|
||||
|
||||
## Wake from sleep heavily distorted on AMD/ATI in macOS 11.3 and newer
|
||||
|
||||
@@ -179,8 +180,18 @@ A somewhat strange issue on Intel HD3000-based Macs, on 3rd party displays somet
|
||||
|
||||
* Mainly applicable for HDMI Displays, DVI and DisplayPort are generally unaffected.
|
||||
* If you're inside Setup Assistant, press `Cmd` + `Option` + `Control` + `T` to launch Terminal. From there, run `open /System/Applications/System\ Preferences.app`
|
||||
|
||||
* Issue has spread to more Macs with macOS Ventura, including MacBook Airs and MacBook Pros
|
||||
|
||||
| Default Color Profile | Display/Display P3 Profile |
|
||||
| :--- | :--- |
|
||||
|  |  |
|
||||
|
||||
## Cannot Pair Bluetooth Devices
|
||||
|
||||
In macOS Ventura, hover states may not function correctly which results in the "Connect" button not appearing in System Settings. To resolve:
|
||||
|
||||
1. Enable Keyboard Navigation in System Settings -> Keyboard
|
||||
2. Tab + space over Bluetooth devices in System Settings -> Bluetooth
|
||||
3. Pair button should appear
|
||||
|
||||
For more information, see [ASentientBot's post](https://forums.macrumors.com/threads/macos-13-ventura-on-unsupported-macs-thread.2346881/page-116?post=31858759#post-31858759).
|
||||
|
||||
@@ -10,6 +10,11 @@ Next, run the `OpenCore-Patcher.app`:
|
||||
|
||||

|
||||
|
||||
::: warning
|
||||
OpenCore configurations are hardware specific.
|
||||
If you're building OpenCore for a different model than you're currently running, it is absolutely necessary to select the proper model from Settings.
|
||||
:::
|
||||
|
||||
Here we'll select Build and Install OpenCore and start building:
|
||||
|
||||
| Start Building | Finished Building |
|
||||
|
||||
@@ -18,11 +18,11 @@ The below table will list all supported and unsupported functions of the patcher
|
||||
|
||||
Regarding OS support, see below:
|
||||
|
||||
* Machines listing `YES - Monterey 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.
|
||||
* 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.command` located in the repo |
|
||||
| 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 |
|
||||
| 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. |
|
||||
|
||||
### MacBook
|
||||
@@ -32,12 +32,12 @@ Regarding OS support, see below:
|
||||
| MacBook1,1 | Mid-2006 | <span style="color:red"> NO </span> | 32-Bit CPU limitation |
|
||||
| MacBook2,1 | Late 2006 | ^^ | 32-Bit Firmware limitation |
|
||||
| MacBook3,1 | Late 2007 | ^^ | ^^ |
|
||||
| MacBook4,1 | Early 2008 | <span style="color:#30BCD5"> YES - Monterey and older</span> | - No GPU Acceleration in Mavericks and newer<br/>- No Keyboard and Trackpad<br/>- No USB |
|
||||
| MacBook5,1 | Late 2008 | ^^ | - GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/> - Supports macOS Monterey and older ([Ventura support in development](./VENTURA-DROP.md))|
|
||||
| MacBook4,1 | Early 2008 | ^^ | - No GPU Acceleration in Mavericks and newer<br/>- No Keyboard and Trackpad<br/>- No USB |
|
||||
| MacBook5,1 | Late 2008 | <span style="color:#30BCD5"> YES </span> | - GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/> - UHCI/OHCI support in Public Beta, see current issues ([#1021](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1021))|
|
||||
| MacBook5,2 | Early 2009 | ^^ | ^^ |
|
||||
| MacBook6,1 | Late 2009 | ^^ | ^^ |
|
||||
| MacBook7,1 | Mid-2010 | ^^ | ^^ |
|
||||
| MacBook8,1 | Mid-2015 | <span style="color:#30BCD5"> YES </span> | <span style="color:green"> Everything is supported</span> |
|
||||
| MacBook8,1 | Mid-2015 | ^^ | <span style="color:green"> Everything is supported</span> |
|
||||
| MacBook9,1 | Early 2016 | ^^ | ^^ |
|
||||
|
||||
### MacBook Air
|
||||
@@ -45,12 +45,12 @@ Regarding OS support, see below:
|
||||
| SMBIOS | Year | Supported | Comment |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| MacBookAir1,1 | Early 2008 | <span style="color:red"> NO </span> | Requires SSE4.1 CPU |
|
||||
| MacBookAir2,1 | Late 2008 | <span style="color:#30BCD5"> YES - Monterey and older</span> | - GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/> - Supports macOS Monterey and older ([Ventura support in development](./VENTURA-DROP.md))|
|
||||
| MacBookAir2,1 | Late 2008 | <span style="color:#30BCD5"> YES </span> | - GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/> - UHCI/OHCI support in Public Beta, see current issues ([#1021](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1021))|
|
||||
| MacBookAir3,1 | Late 2010 | ^^ | ^^ |
|
||||
| MacBookAir3,2 | ^^ | ^^ | ^^ |
|
||||
| MacBookAir4,1 | Mid-2011 | ^^ | ^^ |
|
||||
| MacBookAir4,1 | Mid-2011 | ^^ | - GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))|
|
||||
| MacBookAir4,2 | ^^ | ^^ | ^^ |
|
||||
| MacBookAir5,1 | Mid-2012 | <span style="color:#30BCD5"> YES </span> | <span style="color:green"> Everything is supported</span> |
|
||||
| MacBookAir5,1 | Mid-2012 | ^^ | <span style="color:green"> Everything is supported</span> |
|
||||
| MacBookAir5,2 | ^^ | ^^ | ^^ |
|
||||
| MacBookAir6,1 | Mid-2013, Early 2014 | ^^ | ^^ |
|
||||
| MacBookAir6,2 | ^^ | ^^ | ^^ |
|
||||
@@ -66,19 +66,19 @@ Regarding OS support, see below:
|
||||
| MacBookPro2,1 | Late 2006 | ^^ | 32-Bit Firmware limitation |
|
||||
| MacBookPro2,2 | Late 2006 | ^^ | ^^ |
|
||||
| MacBookPro3,1 | Mid-2007 | ^^ | Requires SSE4.1 CPU |
|
||||
| MacBookPro4,1 | Early 2008 | <span style="color:#30BCD5"> YES - Monterey and older</span> | - GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/> - Supports macOS Monterey and older ([Ventura support in development](./VENTURA-DROP.md))|
|
||||
| MacBookPro4,1 | Early 2008 | <span style="color:#30BCD5"> YES </span> | - GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/> - UHCI/OHCI support in Public Beta, see current issues ([#1021](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1021))|
|
||||
| MacBookPro5,1 | Late 2008 | ^^ | ^^ |
|
||||
| MacBookPro5,2 | Early 2009 | ^^ | ^^ |
|
||||
| MacBookPro5,3 | Mid-2009 | ^^ | ^^ |
|
||||
| MacBookPro5,4 | ^^ | ^^ | ^^ |
|
||||
| MacBookPro5,5 | ^^ | ^^ | ^^ |
|
||||
| MacBookPro6,1 | Mid-2010 | ^^ | ^^ |
|
||||
| MacBookPro6,1 | Mid-2010 | ^^ | - GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))|
|
||||
| MacBookPro6,2 | ^^ | ^^ | ^^ |
|
||||
| MacBookPro7,1 | ^^ | ^^ | ^^ |
|
||||
| MacBookPro8,1 | Early 2011 | ^^ | ^^ |
|
||||
| MacBookPro7,1 | ^^ | ^^ | - GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/> - UHCI/OHCI support in Public Beta, see current issues ([#1021](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1021))|
|
||||
| MacBookPro8,1 | Early 2011 | ^^ | - GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))|
|
||||
| MacBookPro8,2 | ^^ | ^^ | ^^ |
|
||||
| MacBookPro8,3 | ^^ | ^^ | ^^ |
|
||||
| MacBookPro9,1 | Mid-2012 | <span style="color:#30BCD5"> YES </span> | <span style="color:green"> Everything is supported</span> |
|
||||
| MacBookPro9,1 | Mid-2012 | ^^ | <span style="color:green"> Everything is supported</span> |
|
||||
| MacBookPro9,2 | ^^ | ^^ | ^^ |
|
||||
| MacBookPro10,1 | Mid-2012, Early 2013 | ^^ | ^^ |
|
||||
| MacBookPro10,2 | Late 2012, Early 2013 | ^^ | ^^ |
|
||||
@@ -98,12 +98,12 @@ Regarding OS support, see below:
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| Macmini1,1 | Early 2006 | <span style="color:red"> NO </span> | 32-Bit CPU limitation |
|
||||
| Macmini2,1 | Mid-2007 | ^^ | 32-Bit Firmware limitation |
|
||||
| Macmini3,1 | Early 2009 | <span style="color:#30BCD5"> YES - Monterey and older</span> | - GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)) <br/> - Supports macOS Monterey and older ([Ventura support in development](./VENTURA-DROP.md)) |
|
||||
| Macmini3,1 | Early 2009 | <span style="color:#30BCD5"> YES </span> | - GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/> - UHCI/OHCI support in Public Beta, see current issues ([#1021](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1021))|
|
||||
| Macmini4,1 | Mid-2010 | ^^ | ^^ |
|
||||
| Macmini5,1 | Mid-2011 | ^^ | ^^ |
|
||||
| Macmini5,1 | Mid-2011 | ^^ | - GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))|
|
||||
| Macmini5,2 | ^^ | ^^ | ^^ |
|
||||
| Macmini5,3 | ^^ | ^^ | ^^ |
|
||||
| Macmini6,1 | Late 2012 | <span style="color:#30BCD5"> YES </span> | <span style="color:green"> Everything is supported</span> |
|
||||
| Macmini6,1 | Late 2012 | ^^ | <span style="color:green"> Everything is supported</span> |
|
||||
| Macmini6,2 | ^^ | ^^ | ^^ |
|
||||
| Macmini7,1 | Mid-2014 | ^^ | ^^ |
|
||||
|
||||
@@ -116,16 +116,16 @@ Regarding OS support, see below:
|
||||
| iMac5,1 | Late 2006 | ^^ | 32-Bit Firmware limitation |
|
||||
| iMac5,2 | ^^ | ^^ | ^^ |
|
||||
| iMac6,1 | ^^ | ^^ | ^^ |
|
||||
| iMac7,1 | Mid-2007 | <span style="color:#30BCD5"> YES - Monterey and older</span> | - Requires an [SSE4.1 CPU Upgrade](https://lowendmac.com/2018/penryn-t9300-9500-cpu-upgrades-for-the-2007-imac/)<br/>- GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/>- Stock Bluetooth 2.0 card non-functional<br/> - Supports macOS Monterey and older ([Ventura support in development](./VENTURA-DROP.md)) |
|
||||
| iMac8,1 | Early 2008 | ^^ | - GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)))<br/> - Supports macOS Monterey and older ([Ventura support in development](./VENTURA-DROP.md))|
|
||||
| iMac7,1 | Mid-2007 | <span style="color:#30BCD5"> YES </span> | - Requires an [SSE4.1 CPU Upgrade](https://lowendmac.com/2018/penryn-t9300-9500-cpu-upgrades-for-the-2007-imac/)<br/>- GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/>- Stock Bluetooth 2.0 card non-functional<br/> - UHCI/OHCI support in Public Beta, see current issues ([#1021](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1021))|
|
||||
| iMac8,1 | Early 2008 | ^^ | - GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/> - UHCI/OHCI support in Public Beta, see current issues ([#1021](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1021))|
|
||||
| iMac9,1 | Early 2009 | ^^ | ^^ |
|
||||
| iMac10,1 | Late 2009 | ^^ | - GPU is socketed, [recommend upgrading to Metal GPU](https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/?post=17425857#post-17425857) <br/>- GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)) <br/> - Supports macOS Monterey and older ([Ventura support in development](./VENTURA-DROP.md))|
|
||||
| iMac11,1 | ^^ | ^^ | ^^ |
|
||||
| iMac10,1 | Late 2009 | ^^ | - GPU is socketed, [recommend upgrading to Metal GPU](https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/?post=17425857#post-17425857) <br/>- GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)) <br/> - UHCI/OHCI support in Public Beta, see current issues ([#1021](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1021))|
|
||||
| iMac11,1 | ^^ | ^^ | - GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))|
|
||||
| iMac11,2 | Mid-2010 | ^^ | ^^ |
|
||||
| iMac11,3 | ^^ | ^^ | ^^ |
|
||||
| iMac12,1 | Mid-2011 | ^^ | ^^ |
|
||||
| iMac12,2 | ^^ | ^^ | ^^ |
|
||||
| iMac13,1 | Late 2012 | <span style="color:#30BCD5"> YES </span> | <span style="color:green"> Everything is supported</span> |
|
||||
| iMac13,1 | Late 2012 | ^^ | <span style="color:green"> Everything is supported</span> |
|
||||
| iMac13,2 | ^^ | ^^ | ^^ |
|
||||
| iMac13,3 | ^^ | ^^ | ^^ |
|
||||
| iMac14,1 | Late 2013 | ^^ | ^^ |
|
||||
@@ -145,17 +145,17 @@ 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 - Monterey and older</span> | - Potential boot issues with built-in USB 1.1 ports (recommend using a USB 2.0 hub or dedicated USB PCIe controller) <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/> - Supports macOS Monterey and older ([Ventura support in development](./VENTURA-DROP.md)) |
|
||||
| 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))|
|
||||
| MacPro5,1 | Mid-2010, Mid-2012 | ^^ | ^^ |
|
||||
| MacPro6,1 | Late 2013 | <span style="color:red"> NO </span> | Unsupported, [currently under active development](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1009) |
|
||||
| MacPro6,1 | Late 2013 | ^^ | - CPU Power Management currently unsupported<br/> - No DRM support |
|
||||
|
||||
### Xserve
|
||||
|
||||
| SMBIOS | Year | Supported | Comment |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| Xserve1,1 | Mid-2006 | <span style="color:red"> NO </span> | 32-Bit Firmware limitation |
|
||||
| Xserve2,1 | Early 2008 | <span style="color:#30BCD5"> YES - Monterey and older</span> | - Everything is supported as long as GPU is Metal capable <br/> - Supports macOS Monterey and older ([Ventura support in development](./VENTURA-DROP.md))|
|
||||
| Xserve2,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))|
|
||||
| Xserve3,1 | Early 2009 | ^^ | ^^ |
|
||||
|
||||
# Once you've verified your hardware is supported, head to [Download and build macOS Installers](./INSTALLER.md)
|
||||
|
||||
@@ -20,14 +20,11 @@ And voila! No more USB drive required.
|
||||
|
||||
To do this, run the OpenCore Patcher and head to Patcher Settings:
|
||||
|
||||
| GUI Settings | TUI Settings
|
||||
| :--- | :--- |
|
||||
| |  |
|
||||

|
||||
|
||||
Here you can change different patcher settings, however the main interest is:
|
||||
|
||||
* Show Boot Picker (GUI)
|
||||
* Set ShowPicker Mode (TUI)
|
||||
* Show Boot Picker
|
||||
|
||||
Once you've toggled them both off, build your OpenCore EFI once again and install to your desired drive. Now to show the OpenCore selector, you can simply hold down the "ESC" key while clicking on EFI boot, and then you can release the "ESC" key when you see the cursor arrow at the top left.
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ Here are some common errors users may experience while using this patcher:
|
||||
* [Cannot Disable SIP in recoveryOS](#cannot-disable-sip-in-recoveryos)
|
||||
* [Stuck on "Less than a minute remaining..."](#stuck-on-less-than-a-minute-remaining)
|
||||
* [No acceleration after a Metal GPU swap on Mac Pro](#no-acceleration-after-a-metal-gpu-swap-on-mac-pro)
|
||||
|
||||
* [Keyboard, Mouse and Trackpad not working in installer or after update](#keyboard-mouse-and-trackpad-not-working-in-installer-or-after-update)
|
||||
|
||||
|
||||
## OpenCore Legacy Patcher not launching
|
||||
@@ -161,3 +161,26 @@ Alternatively, you can remove "AutoPkg-Assets.pkg" from /Library/Packages on the
|
||||
|
||||
The reason for this is that the autopatcher will assume that you will be using the original graphics card and therefore does non-metal patching, which includes removing some drivers for other cards. This causes Metal cards to not accelerate after swapping.
|
||||
|
||||
## Keyboard, Mouse and Trackpad not working in installer or after update
|
||||
|
||||
For Macs using legacy USB 1.1 controllers, OpenCore Legacy Patcher can only restore support once it has performed root volume patches. Thus to install macOS, you need to hook up a USB hub between your Mac and Keyboard/Mouse.
|
||||
|
||||
* For MacBook users, you'll need to find an external keyboard/mouse in addition to the USB hub
|
||||
|
||||
More information can be found here:
|
||||
|
||||
* [Legacy UHCI/OHCI support in Ventura #1021](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1021)
|
||||
|
||||
Applicable models include:
|
||||
|
||||
| Family | Year | Model | Notes |
|
||||
| :---------- | :--------------------| :---------------------------- | :----------------------------------------------- |
|
||||
| MacBook | Mid 2010 and older | MacBook4,1 - MacBook7,1 | |
|
||||
| MacBook Air | Late 2010 and older | MacBookAir2,1 - MacBookAir3,x | |
|
||||
| MacBook Pro | Mid 2010 and older | MacBookPro4,1 - MacBookPro7,x | Excludes Mid 2010 15" and 17" (MacBookPro6,x) |
|
||||
| iMac | Late 2009 and older | iMac7,1 - iMac10,x | Excludes Core i5/7 27" late 2009 iMac (iMac11,1) |
|
||||
| Mac mini | Mid 2011 and older | Macmini3,1 - Macmini5,x | |
|
||||
| Mac Pro | Mid 2010 and older | MacPro3,1 - MacPro5,1 | |
|
||||
|
||||
|
||||

|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
# Universal Control on unsupported Macs
|
||||
|
||||
Introduced in macOS 12 Monterey, Universal Control is a feature that allows a Mac to control other Macs and/or iPads, share input devices, and share files across them simultaneously. With OpenCore and FeatureUnlock, Universal Control can be unlocked for most unsupported Macs, as long as they meet the technical requirements listed on this page.
|
||||
@@ -202,11 +203,50 @@ Before we continue, please keep in mind that SMBIOS Spoofing is an advanced feat
|
||||
|
||||
### How to spoof
|
||||
|
||||
Firstly, run the GUI version of OpenCore Legacy Patcher, go to **Settings** and tick **Allow native models**.
|
||||
Ventura has dropped more models which includes all of the blacklisted Macs in question, making the procedure slightly different. It is important to follow the guide for the version you're on, failing to do so is likely to cause boot issues.
|
||||
|
||||
**Note:** Unless you are building OpenCore on a different machine than it's targeted for, **do not** change the model in the main settings view. It is important to understand that OCLP targets this model regardless of what you may have spoofed to, as your Mac is still what the Native SMBIOS shows.
|
||||
::: details macOS Ventura
|
||||
|
||||
Secondly, go to **SMBIOS Settings**, tick **Allow Native Spoofs**, set SMBIOS Spoof Level to **Moderate**. Set SMBIOS Spoof Model to **one listed next to your native model in the table for spoofed models below.**
|
||||
Firstly run the GUI version of OpenCore Legacy Patcher.
|
||||
|
||||
Then go to **Settings**, go to **SMBIOS Settings**, set SMBIOS Spoof Level to **Moderate**. Set SMBIOS Spoof Model **one listed next to your native model in the table for spoofed models below.**
|
||||
|
||||
Notice that "Allow native models" and "Allow Native Spoofs" **are NOT** enabled unlike on Monterey, this is on purpose. They are no longer relevant on Ventura and enabling them will cause boot issues.
|
||||
|
||||
| Main Settings view | SMBIOS settings |
|
||||
| :--- | :--- |
|
||||
|  |  |
|
||||
|
||||
|
||||
|
||||
::: details Table for spoofed models (click to expand)
|
||||
|
||||
Spoofing to any model with native Ventura support should work, but these are the earliest Macs natively supported by Ventura and thus chosen for the sake of simplicity.
|
||||
|
||||
**Reminder:** Macs that are not listed on this table work without spoofing, including systems that do not natively support Ventura as long as the other requirements are met, since they aren't blacklisted.
|
||||
|
||||
|
||||
| Mac by name | Native SMBIOS | Spoof SMBIOS | Tested | Tested by |
|
||||
|-------------|---------------|--------------|--------|-----------|
|
||||
| MacBook Air Early 2015 11" / 13" | MacBookAir7,x | MacBookAir8,1 | <span style="color:red"> NO </span> | N/A |
|
||||
| MacBook Pro Early 2015 13" | MacBookPro12,x | MacBookPro14,1 | ^^ | ^^ |
|
||||
| MacBook Pro Mid 2015 15" | MacBookPro11,4 / 11,5 | MacBookPro14,3 | ^^ | ^^
|
||||
| iMac Late 2015 21" | iMac16,x | iMac18,2 | ^^ | ^^
|
||||
| Mac mini Late 2014 | Macmini7,x | MacMini8,1 | <span style="color:red"> NO </span> | N/A |
|
||||
| Mac Pro Late 2013 | MacPro6,x | MacPro7,1 | <span style="color:red"> NO </span> | N/A |
|
||||
|
||||
:::
|
||||
|
||||
::: details macOS Monterey
|
||||
|
||||
Firstly, run the GUI version of OpenCore Legacy Patcher. Secondly, go to **Settings** and tick **Allow native models**.
|
||||
|
||||
Then, go to **SMBIOS Settings**, tick **Allow Native Spoofs**, set SMBIOS Spoof Level to **Moderate**. Set SMBIOS Spoof Model to **one listed next to your native model in the table for spoofed models below.**
|
||||
|
||||
|
||||
| Main Settings view | SMBIOS settings |
|
||||
| :--- | :--- |
|
||||
|  |  |
|
||||
|
||||
|
||||
::: details Table for spoofed models (click to expand)
|
||||
@@ -227,12 +267,9 @@ Any model after the list of officially blacklisted Macs should be supported, but
|
||||
|
||||
:::
|
||||
|
||||
| Main Settings view | SMBIOS settings |
|
||||
| :--- | :--- |
|
||||
|  |  |
|
||||
**Note:** Unless you are building OpenCore on a different machine than it's targeted for, **do not** change the model in the main settings view. It is important to understand that OCLP targets this model regardless of what you may have spoofed to, as your Mac is still what the Native SMBIOS shows.
|
||||
|
||||
|
||||
Build and install OpenCore again, and reboot back to the OS. Enable Universal Control as explained in the [Enabling Universal Control section.](#enabling-universal-control)
|
||||
Lastly, Build and install OpenCore again, and reboot back to the OS. Enable Universal Control as explained in the [Enabling Universal Control section.](#enabling-universal-control)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -24,20 +24,12 @@ Ventura's release dropped a large amount of Intel hardware, thus requiring the u
|
||||
|
||||
## Current status
|
||||
|
||||
Overall, macOS Ventura is useable on most Metal-capable machines (ie. 2012 and newer). The graphics patches implemented have near feature parity to macOS Monterey, with patches still being under heavy development. See [Legacy Metal Graphics Support and macOS Ventura #1008](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1008) issue for more information.
|
||||
|
||||
* The sole exception for 2012+ hardware support in Ventura is the Late 2013, Trash Can Mac Pro. Currently we're in the process of researching and developing patches for this unit, however at this time the machine is not bootable on Ventura.
|
||||
* More information can be found here: [2013 Mac Pro and macOS Ventura Boot Issues #1009](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1009)
|
||||
|
||||
<img width="625" alt="" src="../images/OCLP-050-Initial-Support.png">
|
||||
<img width="625" alt="" src="../images/OCLP-060-Initial-Support.png">
|
||||
|
||||
For older hardware, see below sections:
|
||||
|
||||
* [Currently Unsupported/Broken Hardware in Ventura](#currently-unsupportedbroken-hardware-in-ventura)
|
||||
* [Late 2013 Mac Pro Boot Issues](#late-2013-mac-pro-boot-issues)
|
||||
* [AMD Polaris, Vega and Navi support on pre-2013 Mac Pros and pre-2012 iMacs](#amd-polaris-vega-and-navi-support-on-pre-2013-mac-pros-and-pre-2012-imacs)
|
||||
* [Non-Metal Graphics Acceleration](#non-metal-graphics-acceleration)
|
||||
* [Legacy Wireless Support](#legacy-wireless-support)
|
||||
* [AMD Polaris, Vega and Navi support on pre-2019 Mac Pros and pre-2012 iMacs](#amd-polaris-vega-and-navi-support-on-pre-2019-mac-pros-and-pre-2012-imacs)
|
||||
* [USB 1.1 (OHCI/UHCI) Support](#usb-11-ohciuhci-support)
|
||||
* [Ethernet issue with Early 2008 Mac Pro](#ethernet-issue-with-early-2008-mac-pro)
|
||||
|
||||
@@ -45,33 +37,79 @@ The team is doing their best to investigate and fix the aforementioned issues, h
|
||||
|
||||
## Currently Unsupported/Broken Hardware in Ventura
|
||||
|
||||
### Late 2013 Mac Pro Boot Issues
|
||||
### AMD Polaris, Vega and Navi support on pre-2019 Mac Pros and pre-2012 iMacs
|
||||
|
||||
As mentioned above, users of the Late 2013 Trash Can Mac Pro (MacPro6,1) currently cannot boot macOS Ventura. This issue is still being actively researched, however no overall time estimate can be given. See below for more information:
|
||||
|
||||
* [2013 Mac Pro and macOS Ventura Boot Issues #1009](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1009)
|
||||
|
||||
### AMD Polaris, Vega and Navi support on pre-2013 Mac Pros and pre-2012 iMacs
|
||||
|
||||
For users with 2008 to 2012 Mac Pros (MacPro3,1-5,1) and 2009 to 2011 iMacs (iMac9,1-12,2), keep in mind macOS Ventura now requires [AVX2.0 support in the CPU](https://en.wikipedia.org/wiki/Advanced_Vector_Extensions#Advanced_Vector_Extensions_2) for native graphics acceleration. Thus while your GPU may be natively supported, you cannot run Ventura officially with these GPUs.
|
||||
For users with 2008 to 2013 Mac Pros (MacPro3,1-6,1) and 2009 to 2011 iMacs (iMac9,1-12,2), keep in mind macOS Ventura now requires [AVX2.0 support in the CPU](https://en.wikipedia.org/wiki/Advanced_Vector_Extensions#Advanced_Vector_Extensions_2) for native graphics acceleration. Thus while your GPU may be natively supported, you cannot run Ventura officially with these GPUs.
|
||||
|
||||
* CPUs supporting AVX2.0 are Haswell or newer, which no pre-2019 Mac Pros can be upgraded with.
|
||||
|
||||
Currently at this time, OpenCore Legacy Patcher only supports patching the AMD Polaris Graphics stack to no longer require AVX2.0. However due to lack of hardware on-hand, we cannot support AMD Vega or Navi on Ventura.
|
||||
|
||||
* If you have spare Vega or Navi GPUs you'd like to donate, feel free to reach out: khronokernel@icloud.com
|
||||
|
||||
Additionally, the native stack will crash over and over on macOS Ventura as it fails to load the AVX2.0-based binaries. Thus to patch Ventura, you will need to boot in Safe Mode and run OCLP's Root Volume Patcher
|
||||
|
||||
* To enter Safe Mode, hold Shift+Enter when selecting Ventura in OCLP's Boot Picker
|
||||
Currently at this time, OpenCore Legacy Patcher only supports patching the AMD Polaris and Vega Graphics stack to no longer require AVX2.0. We're recently received an AMD RX 6600 donation, so hopefully in the future the project can support AMD Navi with pre-Haswell Macs. However no time estimates can be given.
|
||||
|
||||
Following GPUs are applicable:
|
||||
|
||||
| GPU Architecture | Model Families | Supported |
|
||||
| :--- | :--- | :--- |
|
||||
| AMD Polaris | RX 4xx/5xx (10/20 series) | <span style="color:#30BCD5"> Supported with patching </span> |
|
||||
| AMD Vega | Vega 56/64/VII (10/20 series) | <span style="color:red"> Unsupported </span> |
|
||||
| AMD Navi | RX 5xxx/6xxx (10/20 series) | ^^ |
|
||||
| AMD Vega | Vega 56/64/VII (10/20 series) | ^^ |
|
||||
| AMD Navi | RX 5xxx/6xxx (10/20 series) | <span style="color:red"> Unsupported </span> |
|
||||
|
||||
|
||||
### USB 1.1 (OHCI/UHCI) Support
|
||||
|
||||
For Penryn systems and pre-2013 Mac Pros, USB 1.1 support was outright removed in macOS Ventura. While USB 1.1 may seem unimportant, it handles many important devices on your system. These include:
|
||||
|
||||
* Keyboard and Trackpad for laptops
|
||||
* IR Receivers
|
||||
* Bluetooth
|
||||
|
||||
With OpenCore Legacy Patcher v0.6.0, basic support has been implemented via Root Volume patching. However due to this, users will need to use a USB hub for installation and post-OS updates when patches are cleaned:
|
||||
|
||||

|
||||
|
||||
::: warning The following systems rely on USB 1.1
|
||||
|
||||
* iMac10,x and older
|
||||
* Macmini3,1 and older
|
||||
* MacBook7,1 and older
|
||||
* MacBookAir3,1 and older
|
||||
* MacBookPro7,1 and older
|
||||
* MacBookPro6,x is exempt
|
||||
* MacPro5,1 and older
|
||||
|
||||
:::
|
||||
|
||||
### Ethernet issue with Early 2008 Mac Pro
|
||||
|
||||
MacPro3,1 suffers from Ethernet driver dying after returning from sleep, current workaround is to use a USB Ethernet adapter or disable sleep.
|
||||
|
||||
|
||||
::: details Legacy Wireless Support (Resolved in v0.6.0 and newer)
|
||||
|
||||
|
||||
### Legacy Wireless Support
|
||||
|
||||
For systems that required Root Patches in macOS Monterey to achieve Wireless support, unfortunately macOS Ventura has broken the patch set. Currently the following Wifi cards are unsupported:
|
||||
|
||||
* Atheros: All models
|
||||
* Broadcom: BCM94328 and BCM94322
|
||||
|
||||
The following machines shipped stock with these cards:
|
||||
|
||||
* iMac12,x and older
|
||||
* Macmini3,1 and older
|
||||
* MacBook5,x and older
|
||||
* MacBookAir2,1 and older
|
||||
* MacBookPro7,1 and older
|
||||
* MacBookPro6,x is exempt
|
||||
* MacPro5,1 and older
|
||||
|
||||
|
||||
Currently BCM943224, BCM94331, BCM94360 and BCM943602 are still fully supported by OpenCore Legacy Patcher. Consider upgrading to these cards if possible.
|
||||
|
||||
:::
|
||||
|
||||
|
||||
::: details Non-Metal Graphics Acceleration (Resolved in v0.6.0 and newer)
|
||||
|
||||
|
||||
### Non-Metal Graphics Acceleration
|
||||
@@ -93,8 +131,6 @@ The following GPUs are applicable:
|
||||
|
||||
The following machines shipped stock with an unsupported GPU:
|
||||
|
||||
::: warning Systems shipped with non-Metal Graphics Cards
|
||||
|
||||
* iMac7,1 - iMac12,x
|
||||
* MacBook4,1 - MacBook7,1
|
||||
* MacBookAir2,1 - MacBookAir4,x
|
||||
@@ -103,53 +139,5 @@ The following machines shipped stock with an unsupported GPU:
|
||||
* MacPro3,1 - MacPro5,1
|
||||
* Xserve2,1 - Xserve3,1
|
||||
|
||||
:::
|
||||
|
||||
|
||||
### Legacy Wireless Support
|
||||
|
||||
For systems that required Root Patches in macOS Monterey to achieve Wireless support, unfortunately macOS Ventura has broken the patch set. Currently the following Wifi cards are unsupported:
|
||||
|
||||
* Atheros: All models
|
||||
* Broadcom: BCM94328 and BCM94322
|
||||
|
||||
The following machines shipped stock with these cards:
|
||||
|
||||
::: warning Systems shipped with applicable cards
|
||||
|
||||
* iMac12,x and older
|
||||
* Macmini3,1 and older
|
||||
* MacBook5,x and older
|
||||
* MacBookAir2,1 and older
|
||||
* MacBookPro7,1 and older
|
||||
* MacBookPro6,x is exempt
|
||||
* MacPro5,1 and older
|
||||
|
||||
:::
|
||||
|
||||
Currently BCM943224, BCM94331, BCM94360 and BCM943602 are still fully supported by OpenCore Legacy Patcher. Consider upgrading to these cards if possible.
|
||||
|
||||
|
||||
### USB 1.1 (OHCI/UHCI) Support
|
||||
|
||||
For Penryn systems and pre-2013 Mac Pros, USB 1.1 support was outright removed in macOS Ventura. While USB 1.1 may seem unimportant, it handles many important devices on your system. These include:
|
||||
|
||||
* Keyboard and Trackpad for laptops
|
||||
* IR Receivers
|
||||
* Bluetooth
|
||||
|
||||
|
||||
::: warning The following systems rely on USB 1.1
|
||||
|
||||
* iMac10,x and older
|
||||
* Macmini3,1 and older
|
||||
* MacBook7,1 and older
|
||||
* MacBookAir3,1 and older
|
||||
* MacBookPro7,1 and older
|
||||
* MacBookPro6,x is exempt
|
||||
* MacPro5,1 and older
|
||||
|
||||
:::
|
||||
|
||||
### Ethernet issue with Early 2008 Mac Pro
|
||||
MacPro3,1 suffers from Ethernet driver dying after returning from sleep, current workaround is to use a USB Ethernet adapter or disable sleep.
|
||||
:::
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 759 KiB |
BIN
images/OCLP-051-Initial-Support.png
Normal file
BIN
images/OCLP-051-Initial-Support.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 782 KiB |
BIN
images/OCLP-060-Initial-Support.png
Normal file
BIN
images/OCLP-060-Initial-Support.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 984 KiB |
BIN
images/usb11-chart.png
Normal file
BIN
images/usb11-chart.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 787 KiB |
BIN
images/ventura_uc1.png
Normal file
BIN
images/ventura_uc1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 405 KiB |
BIN
images/ventura_uc2.png
Normal file
BIN
images/ventura_uc2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 330 KiB |
@@ -1527,6 +1527,42 @@
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>BundlePath</key>
|
||||
<string>KDKlessWorkaround.kext</string>
|
||||
<key>Comment</key>
|
||||
<string>KDKlessWorkaround</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>ExecutablePath</key>
|
||||
<string>Contents/MacOS/KDKlessWorkaround</string>
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string>22.3.0</string>
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Arch</key>
|
||||
<string>x86_64</string>
|
||||
<key>BundlePath</key>
|
||||
<string>RSRHelper.kext</string>
|
||||
<key>Comment</key>
|
||||
<string>RSRHelper</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>ExecutablePath</key>
|
||||
<string>Contents/MacOS/RSRHelper</string>
|
||||
<key>MaxKernel</key>
|
||||
<string></string>
|
||||
<key>MinKernel</key>
|
||||
<string>20.0.0</string>
|
||||
<key>PlistPath</key>
|
||||
<string>Contents/Info.plist</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>Block</key>
|
||||
<array/>
|
||||
@@ -1977,6 +2013,8 @@
|
||||
<integer>0</integer>
|
||||
<key>HibernateMode</key>
|
||||
<string>Auto</string>
|
||||
<key>HibernateSkipsPicker</key>
|
||||
<true/>
|
||||
<key>HideAuxiliary</key>
|
||||
<true/>
|
||||
<key>LauncherPath</key>
|
||||
@@ -2173,6 +2211,8 @@
|
||||
<string>OCLP-Spoofed-MLB</string>
|
||||
<string>revcpu</string>
|
||||
<string>revcpuname</string>
|
||||
<string>revblock</string>
|
||||
<string>revpatch</string>
|
||||
</array>
|
||||
<key>7C436110-AB2A-4BBB-A880-FE41995C9F82</key>
|
||||
<array>
|
||||
@@ -2361,6 +2401,12 @@
|
||||
<integer>0</integer>
|
||||
<key>KeySubsequentDelay</key>
|
||||
<integer>5</integer>
|
||||
<key>PointerDwellClickTimeout</key>
|
||||
<integer>0</integer>
|
||||
<key>PointerDwellDoubleClickTimeout</key>
|
||||
<integer>0</integer>
|
||||
<key>PointerDwellRadius</key>
|
||||
<integer>0</integer>
|
||||
<key>PointerPollMask</key>
|
||||
<integer>-1</integer>
|
||||
<key>PointerPollMax</key>
|
||||
@@ -2499,6 +2545,42 @@
|
||||
<key>LoadEarly</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
<string></string>
|
||||
<key>Path</key>
|
||||
<string>AMDGOP.efi</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>Arguments</key>
|
||||
<string></string>
|
||||
<key>LoadEarly</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
<string></string>
|
||||
<key>Path</key>
|
||||
<string>NVGOP_GK.efi</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>Arguments</key>
|
||||
<string></string>
|
||||
<key>LoadEarly</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Comment</key>
|
||||
<string></string>
|
||||
<key>Path</key>
|
||||
<string>FixPCIeLinkRate.efi</string>
|
||||
<key>Enabled</key>
|
||||
<false/>
|
||||
<key>Arguments</key>
|
||||
<string></string>
|
||||
<key>LoadEarly</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</array>
|
||||
<key>Input</key>
|
||||
<dict>
|
||||
@@ -2617,6 +2699,8 @@
|
||||
<true/>
|
||||
<key>ResizeGpuBars</key>
|
||||
<integer>-1</integer>
|
||||
<key>ResizeUsePciRbIo</key>
|
||||
<false/>
|
||||
<key>TscSyncTimeout</key>
|
||||
<integer>0</integer>
|
||||
<key>UnblockFsConnect</key>
|
||||
|
||||
BIN
payloads/Drivers/AMDGOP.efi
Normal file
BIN
payloads/Drivers/AMDGOP.efi
Normal file
Binary file not shown.
BIN
payloads/Drivers/FixPCIeLinkRate.efi
Normal file
BIN
payloads/Drivers/FixPCIeLinkRate.efi
Normal file
Binary file not shown.
BIN
payloads/Drivers/NVGOP_GK.efi
Normal file
BIN
payloads/Drivers/NVGOP_GK.efi
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/AirportBrcmFixup-v2.1.6-DEBUG.zip
Normal file
BIN
payloads/Kexts/Acidanthera/AirportBrcmFixup-v2.1.6-DEBUG.zip
Normal file
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/AirportBrcmFixup-v2.1.6-RELEASE.zip
Normal file
BIN
payloads/Kexts/Acidanthera/AirportBrcmFixup-v2.1.6-RELEASE.zip
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/AutoPkgInstaller-v1.0.2-DEBUG.zip
Normal file
BIN
payloads/Kexts/Acidanthera/AutoPkgInstaller-v1.0.2-DEBUG.zip
Normal file
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/AutoPkgInstaller-v1.0.2-RELEASE.zip
Normal file
BIN
payloads/Kexts/Acidanthera/AutoPkgInstaller-v1.0.2-RELEASE.zip
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/CPUFriend-v1.2.6-DEBUG.zip
Normal file
BIN
payloads/Kexts/Acidanthera/CPUFriend-v1.2.6-DEBUG.zip
Normal file
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/CPUFriend-v1.2.6-RELEASE.zip
Normal file
BIN
payloads/Kexts/Acidanthera/CPUFriend-v1.2.6-RELEASE.zip
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/DebugEnhancer-v1.0.7-DEBUG.zip
Normal file
BIN
payloads/Kexts/Acidanthera/DebugEnhancer-v1.0.7-DEBUG.zip
Normal file
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/DebugEnhancer-v1.0.7-RELEASE.zip
Normal file
BIN
payloads/Kexts/Acidanthera/DebugEnhancer-v1.0.7-RELEASE.zip
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/FeatureUnlock-v1.1.4-DEBUG.zip
Normal file
BIN
payloads/Kexts/Acidanthera/FeatureUnlock-v1.1.4-DEBUG.zip
Normal file
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/FeatureUnlock-v1.1.4-RELEASE.zip
Normal file
BIN
payloads/Kexts/Acidanthera/FeatureUnlock-v1.1.4-RELEASE.zip
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/Lilu-v1.6.4-DEBUG.zip
Normal file
BIN
payloads/Kexts/Acidanthera/Lilu-v1.6.4-DEBUG.zip
Normal file
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/Lilu-v1.6.4-RELEASE.zip
Normal file
BIN
payloads/Kexts/Acidanthera/Lilu-v1.6.4-RELEASE.zip
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/NVMeFix-v1.1.0-DEBUG.zip
Normal file
BIN
payloads/Kexts/Acidanthera/NVMeFix-v1.1.0-DEBUG.zip
Normal file
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/NVMeFix-v1.1.0-RELEASE.zip
Normal file
BIN
payloads/Kexts/Acidanthera/NVMeFix-v1.1.0-RELEASE.zip
Normal file
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/RSRHelper-v1.0.0-DEBUG.zip
Normal file
BIN
payloads/Kexts/Acidanthera/RSRHelper-v1.0.0-DEBUG.zip
Normal file
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/RSRHelper-v1.0.0-RELEASE.zip
Normal file
BIN
payloads/Kexts/Acidanthera/RSRHelper-v1.0.0-RELEASE.zip
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,12 +0,0 @@
|
||||
diff --git a/RestrictEvents/RestrictEvents.cpp b/RestrictEvents/RestrictEvents.cpp
|
||||
index 27562f0..66365a3 100644
|
||||
--- a/RestrictEvents/RestrictEvents.cpp
|
||||
+++ b/RestrictEvents/RestrictEvents.cpp
|
||||
@@ -61,6 +61,7 @@ struct RestrictEventsPolicy {
|
||||
static const char *procBlacklist[] {
|
||||
"/System/Library/CoreServices/ExpansionSlotNotification",
|
||||
"/System/Library/CoreServices/MemorySlotNotification",
|
||||
+ "/usr/libexec/displaypolicyd",
|
||||
};
|
||||
|
||||
char pathbuf[MAXPATHLEN];
|
||||
Binary file not shown.
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/RestrictEvents-v1.0.9-DEBUG.zip
Normal file
BIN
payloads/Kexts/Acidanthera/RestrictEvents-v1.0.9-DEBUG.zip
Normal file
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/RestrictEvents-v1.0.9-RELEASE.zip
Normal file
BIN
payloads/Kexts/Acidanthera/RestrictEvents-v1.0.9-RELEASE.zip
Normal file
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
Following patch required for iMacs with Navi MXM GPUs
|
||||
Source: https://github.com/kingo132/a51m-r2-5700m-hackintosh/issues/13
|
||||
3319
payloads/Kexts/Acidanthera/WhateverGreen-Navi-Backlight.patch
Normal file
3319
payloads/Kexts/Acidanthera/WhateverGreen-Navi-Backlight.patch
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/WhateverGreen-v1.6.4-DEBUG.zip
Normal file
BIN
payloads/Kexts/Acidanthera/WhateverGreen-v1.6.4-DEBUG.zip
Normal file
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/WhateverGreen-v1.6.4-Navi-DEBUG.zip
Normal file
BIN
payloads/Kexts/Acidanthera/WhateverGreen-v1.6.4-Navi-DEBUG.zip
Normal file
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/WhateverGreen-v1.6.4-Navi-RELEASE.zip
Normal file
BIN
payloads/Kexts/Acidanthera/WhateverGreen-v1.6.4-Navi-RELEASE.zip
Normal file
Binary file not shown.
BIN
payloads/Kexts/Acidanthera/WhateverGreen-v1.6.4-RELEASE.zip
Normal file
BIN
payloads/Kexts/Acidanthera/WhateverGreen-v1.6.4-RELEASE.zip
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
payloads/Kexts/Misc/Innie-v1.3.1-DEBUG.zip
Normal file
BIN
payloads/Kexts/Misc/Innie-v1.3.1-DEBUG.zip
Normal file
Binary file not shown.
BIN
payloads/Kexts/Misc/Innie-v1.3.1-RELEASE.zip
Normal file
BIN
payloads/Kexts/Misc/Innie-v1.3.1-RELEASE.zip
Normal file
Binary file not shown.
BIN
payloads/Kexts/Misc/KDKlessWorkaround-v1.0.0-DEBUG.zip
Normal file
BIN
payloads/Kexts/Misc/KDKlessWorkaround-v1.0.0-DEBUG.zip
Normal file
Binary file not shown.
BIN
payloads/Kexts/Misc/KDKlessWorkaround-v1.0.0-RELEASE.zip
Normal file
BIN
payloads/Kexts/Misc/KDKlessWorkaround-v1.0.0-RELEASE.zip
Normal file
Binary file not shown.
253
payloads/Kexts/Update-Kexts.command
Executable file
253
payloads/Kexts/Update-Kexts.command
Executable file
@@ -0,0 +1,253 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
import requests
|
||||
import packaging.version
|
||||
import tempfile
|
||||
|
||||
|
||||
# For kexts with basic handling requirements
|
||||
KEXT_DICTIONARY = {
|
||||
|
||||
"Acidanthera": {
|
||||
"AirportBrcmFixup": {
|
||||
"Repository": "https://github.com/acidanthera/AirportBrcmFixup",
|
||||
"Constants Variable": "self.airportbcrmfixup_version",
|
||||
},
|
||||
# Due to issues with legacy Macs, don't update
|
||||
# "AppleALC": {
|
||||
# "Repository": "https://github.com/acidanthera/AppleALC",
|
||||
# "Constants Variable": "self.applealc_version",
|
||||
# },
|
||||
"BlueToolFixup": {
|
||||
"Repository": "https://github.com/acidanthera/BrcmPatchRAM",
|
||||
"Constants Variable": "self.bluetoolfixup_version",
|
||||
"Override": "BrcmPatchRAM",
|
||||
},
|
||||
"CPUFriend": {
|
||||
"Repository": "https://github.com/acidanthera/CPUFriend",
|
||||
"Constants Variable": "self.cpufriend_version",
|
||||
},
|
||||
"CryptexFixup": {
|
||||
"Repository": "https://github.com/acidanthera/CryptexFixup",
|
||||
"Constants Variable": "self.cryptexfixup_version",
|
||||
},
|
||||
"DebugEnhancer": {
|
||||
"Repository": "https://github.com/acidanthera/DebugEnhancer",
|
||||
"Constants Variable": "self.debugenhancer_version",
|
||||
},
|
||||
"FeatureUnlock": {
|
||||
"Repository": "https://github.com/acidanthera/FeatureUnlock",
|
||||
"Constants Variable": "self.featureunlock_version",
|
||||
},
|
||||
"Lilu": {
|
||||
"Repository": "https://github.com/acidanthera/Lilu",
|
||||
"Constants Variable": "self.lilu_version",
|
||||
},
|
||||
"NVMeFix": {
|
||||
"Repository": "https://github.com/acidanthera/NVMeFix",
|
||||
"Constants Variable": "self.nvmefix_version",
|
||||
},
|
||||
"RestrictEvents": {
|
||||
"Repository": "https://github.com/acidanthera/RestrictEvents",
|
||||
"Constants Variable": "self.restrictevents_version",
|
||||
},
|
||||
"RSRHelper": {
|
||||
"Repository": "https://github.com/khronokernel/RSRHelper",
|
||||
"Constants Variable": "self.rsrhelper_version",
|
||||
},
|
||||
"WhateverGreen": {
|
||||
"Repository": "https://github.com/acidanthera/WhateverGreen",
|
||||
"Constants Variable": "self.whatevergreen_version",
|
||||
},
|
||||
},
|
||||
|
||||
"Misc": {
|
||||
"Innie": {
|
||||
"Repository": "https://github.com/cdf/Innie",
|
||||
"Constants Variable": "self.innie_version",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
|
||||
class GenerateKexts:
|
||||
|
||||
def __init__(self):
|
||||
self.weg_version = None
|
||||
self.weg_old = None
|
||||
self.lilu_version = None
|
||||
|
||||
self._set_cwd()
|
||||
self._iterate_over_kexts()
|
||||
self._special_kext_handling()
|
||||
|
||||
|
||||
def _set_cwd(self):
|
||||
# Set working directory to script location
|
||||
script_path = Path(__file__).parent.absolute()
|
||||
os.chdir(script_path)
|
||||
|
||||
def _special_kext_handling(self):
|
||||
# Generate custom WhateverGreen
|
||||
if self.weg_version is None or self.lilu_version is None or self.weg_old is None:
|
||||
raise Exception("Unable to find latest WEG version!")
|
||||
|
||||
if packaging.version.parse(self.weg_version) <= packaging.version.parse(self.weg_old):
|
||||
print(" WEG is up to date!")
|
||||
return
|
||||
|
||||
# WhateverGreen
|
||||
print("Building modified WhateverGreen...")
|
||||
# We have to compile WEG ourselves
|
||||
weg_source_url = f"https://github.com/acidanthera/WhateverGreen/archive/refs/tags/{self.weg_version}.zip"
|
||||
lilu_url = f"https://github.com/acidanthera/Lilu/releases/download/{self.lilu_version}/Lilu-{self.lilu_version}-DEBUG.zip"
|
||||
with tempfile.TemporaryDirectory() as temp_dir:
|
||||
# Download source
|
||||
weg_source_zip = f"{temp_dir}/WhateverGreen-{self.weg_version}.zip"
|
||||
subprocess.run(["curl", "-L", weg_source_url, "-o", weg_source_zip], check=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||
|
||||
# Unzip source
|
||||
subprocess.run(["unzip", weg_source_zip, "-d", temp_dir], check=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||
|
||||
# Git clone MacKernelSDK into source
|
||||
subprocess.run(["git", "clone", "https://github.com/acidanthera/MacKernelSDK", f"{temp_dir}/WhateverGreen-{self.weg_version}/MacKernelSDK"], check=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||
|
||||
# Grab latest Lilu release, debug version
|
||||
lilu_zip = f"{temp_dir}/Lilu-{self.lilu_version}-DEBUG.zip"
|
||||
subprocess.run(["curl", "-L", lilu_url, "-o", lilu_zip], check=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||
|
||||
# Unzip Lilu into WEG source
|
||||
subprocess.run(["unzip", lilu_zip, "-d", f"{temp_dir}/WhateverGreen-{self.weg_version}"], check=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||
|
||||
# Apply patch
|
||||
patch_path = Path("./Acidanthera/WhateverGreen-Navi-Backlight.patch").absolute()
|
||||
subprocess.run(["git", "apply", patch_path], check=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, cwd=f"{temp_dir}/WhateverGreen-{self.weg_version}")
|
||||
|
||||
# Build WEG
|
||||
for variant in ["Release", "Debug"]:
|
||||
subprocess.run(["xcodebuild", "-configuration", variant], cwd=f"{temp_dir}/WhateverGreen-{self.weg_version}", check=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||
|
||||
|
||||
# Zip Release
|
||||
for variant in ["RELEASE", "DEBUG"]:
|
||||
dst_path = Path(f"./Acidanthera/WhateverGreen-v{self.weg_version}-Navi-{variant}.zip").absolute()
|
||||
subprocess.run(["zip", "-r", dst_path, "WhateverGreen.kext"], check=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, cwd=f"{temp_dir}/WhateverGreen-{self.weg_version}/build/{'Release' if variant == 'RELEASE' else 'Debug'}")
|
||||
if Path(f"./Acidanthera/WhateverGreen-v{self.weg_old}-Navi-{variant}.zip").exists():
|
||||
subprocess.run(["rm", f"./Acidanthera/WhateverGreen-v{self.weg_old}-Navi-{variant}.zip"], check=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||
|
||||
self._update_constants_file("self.whatevergreen_navi_version", f"{self.weg_old}-Navi", f"{self.weg_version}-Navi")
|
||||
|
||||
|
||||
def _iterate_over_kexts(self):
|
||||
for kext_folder in KEXT_DICTIONARY:
|
||||
for kext_name in KEXT_DICTIONARY[kext_folder]:
|
||||
print(f"Checking {kext_name}...")
|
||||
if "Override" in KEXT_DICTIONARY[kext_folder][kext_name]:
|
||||
self._get_latest_release(kext_folder, kext_name, override_kext_zip_name=KEXT_DICTIONARY[kext_folder][kext_name]["Override"])
|
||||
else:
|
||||
self._get_latest_release(kext_folder, kext_name)
|
||||
|
||||
|
||||
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")
|
||||
latest_release = requests.get(f"{repo_url}/releases/latest").json()
|
||||
|
||||
for variant in ["RELEASE", "DEBUG"]:
|
||||
|
||||
if "tag_name" not in latest_release:
|
||||
print(f" Error: {latest_release['message']}")
|
||||
continue
|
||||
|
||||
remote_version = latest_release["tag_name"]
|
||||
if remote_version.startswith("v"):
|
||||
remote_version = remote_version[1:]
|
||||
|
||||
if kext_name == "WhateverGreen":
|
||||
self.weg_version = remote_version
|
||||
elif kext_name == "Lilu":
|
||||
self.lilu_version = remote_version
|
||||
|
||||
local_version = self._get_local_version(kext_folder, kext_name, variant)
|
||||
if kext_name == "WhateverGreen":
|
||||
self.weg_old = local_version
|
||||
|
||||
if packaging.version.parse(remote_version) <= packaging.version.parse(local_version):
|
||||
print(f" {kext_name} {variant} is up to date: v{local_version}")
|
||||
continue
|
||||
|
||||
for asset in latest_release["assets"]:
|
||||
if not asset["name"].endswith(f"{variant}.zip"):
|
||||
continue
|
||||
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():
|
||||
subprocess.run(["rm", "-rf", f"./{kext_folder}/{zip_name.replace(f'v{remote_version}', f'v{local_version}')}"])
|
||||
self._update_constants_file(KEXT_DICTIONARY[kext_folder][kext_name]["Constants Variable"], local_version, remote_version)
|
||||
|
||||
if override_kext_zip_name:
|
||||
# rename zip file
|
||||
os.rename(f"./{kext_folder}/{zip_name}", f"./{kext_folder}/{kext_name}-v{remote_version}-{variant}.zip")
|
||||
subprocess.run(["rm", "-rf", f"./{kext_folder}/{kext_name}-v{local_version}-{variant}.zip"])
|
||||
|
||||
|
||||
def _get_local_version(self, kext_folder, kext_name, variant):
|
||||
loose_name_start = f"{kext_name}-v"
|
||||
loose_name_end = f"-{variant}.zip"
|
||||
|
||||
for file in Path(f"./{kext_folder}").iterdir():
|
||||
if file.name.startswith(loose_name_start) and file.name.endswith(loose_name_end):
|
||||
local_version = file.name.replace(loose_name_start, "").replace(loose_name_end, "")
|
||||
if local_version.startswith("v"):
|
||||
local_version = local_version[1:]
|
||||
return local_version[:5]
|
||||
|
||||
raise Exception(f"Could not find local version for {kext_name} {variant}")
|
||||
|
||||
|
||||
def _download_file(self, url, file_path, file):
|
||||
# Download file
|
||||
if Path(file_path).exists():
|
||||
os.remove(file_path)
|
||||
|
||||
with tempfile.TemporaryDirectory() as temp_dir:
|
||||
download = requests.get(url)
|
||||
with open(f"{temp_dir}/temp.zip", "wb") as f:
|
||||
f.write(download.content)
|
||||
|
||||
# Unzip file
|
||||
subprocess.run(["unzip", "-q", f"{temp_dir}/temp.zip", "-d", f"{temp_dir}"], check=True)
|
||||
|
||||
print(f" Moving {file} to {file_path}...")
|
||||
# Zip file
|
||||
subprocess.run(["zip", "-q", "-r", Path(file_path).name, file], cwd=f"{temp_dir}", check=True)
|
||||
|
||||
# Move file
|
||||
subprocess.run(["mv", f"{temp_dir}/{Path(file_path).name}", file_path], check=True)
|
||||
|
||||
|
||||
def _update_constants_file(self, variable_name, old_version, new_version):
|
||||
print(f" Updating {variable_name} to {new_version}...")
|
||||
constants_file = Path("../../resources/constants.py")
|
||||
if not constants_file.exists():
|
||||
raise Exception("Constants file does not exist")
|
||||
constants_file_contents = constants_file.read_text()
|
||||
|
||||
# Replace version
|
||||
for line in constants_file_contents.splitlines():
|
||||
if variable_name in line:
|
||||
constants_file_contents = constants_file_contents.replace(line, line.replace(old_version, new_version))
|
||||
break
|
||||
|
||||
# Write file
|
||||
constants_file.write_text(constants_file_contents)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
GenerateKexts()
|
||||
Binary file not shown.
Binary file not shown.
286
payloads/OpenCore/Update-OpenCore.command
Executable file
286
payloads/OpenCore/Update-OpenCore.command
Executable file
@@ -0,0 +1,286 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# Script to download and generate valid OpenCorePkg folder/file structure for use with OpenCore-Legacy-Patcher
|
||||
# To use:
|
||||
# - Download OpenCore-{VERSION}-{VARIANT}.zip
|
||||
# - If no files are found, the script will download the latest version
|
||||
# - Place zips in same directory as this script
|
||||
# - Run script
|
||||
|
||||
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
import requests
|
||||
|
||||
REPO_URL = "https://api.github.com/repos/acidanthera/OpenCorePkg/releases/latest"
|
||||
|
||||
BUILD_VARIANTS = [
|
||||
"DEBUG",
|
||||
"RELEASE"
|
||||
]
|
||||
|
||||
UNUSED_DRIVERS = [
|
||||
"AudioDxe.efi",
|
||||
"BiosVideo.efi",
|
||||
"CrScreenshotDxe.efi",
|
||||
"Ext4Dxe.efi",
|
||||
"HiiDatabase.efi",
|
||||
"NvmExpressDxe.efi",
|
||||
"OpenHfsPlus.efi",
|
||||
"OpenNtfsDxe.efi",
|
||||
"OpenPartitionDxe.efi",
|
||||
"OpenUsbKbDxe.efi",
|
||||
"OpenVariableRuntimeDxe.efi",
|
||||
"Ps2KeyboardDxe.efi",
|
||||
"Ps2MouseDxe.efi",
|
||||
"ToggleSipEntry.efi",
|
||||
"UsbMouseDxe.efi",
|
||||
"XhciDxe.efi",
|
||||
"Udp4Dxe.efi",
|
||||
"TcpDxe.efi",
|
||||
"SnpDxe.efi",
|
||||
"MnpDxe.efi",
|
||||
"Ip4Dxe.efi",
|
||||
"HttpUtilitiesDxe.efi",
|
||||
"HttpDxe.efi",
|
||||
"HttpBootDxe.efi",
|
||||
"DpcDxe.efi",
|
||||
"DnsDxe.efi",
|
||||
"Dhcp4Dxe.efi",
|
||||
"ArpDxe.efi",
|
||||
]
|
||||
|
||||
UNUSED_TOOLS = [
|
||||
"ChipTune.efi",
|
||||
"CleanNvram.efi",
|
||||
"ControlMsrE2.efi",
|
||||
"GopStop.efi",
|
||||
"KeyTester.efi",
|
||||
"MmapDump.efi",
|
||||
"OpenControl.efi",
|
||||
"ResetSystem.efi",
|
||||
"RtcRw.efi",
|
||||
"CsrUtil.efi",
|
||||
"TpmInfo.efi",
|
||||
]
|
||||
|
||||
IMPORTANT_UTILITIES = [
|
||||
"macserial",
|
||||
"ocvalidate",
|
||||
]
|
||||
|
||||
|
||||
|
||||
class GenerateOpenCore:
|
||||
|
||||
def __init__(self):
|
||||
print("Generating new OpenCore bundles...")
|
||||
|
||||
self.working_dir = None
|
||||
|
||||
self.set_directory()
|
||||
self.validate_files()
|
||||
self.generate()
|
||||
|
||||
print("New OpenCore bundles generated!")
|
||||
|
||||
def set_directory(self):
|
||||
self.working_dir = Path(__file__).parent.absolute()
|
||||
print(f"Working directory: {self.working_dir}")
|
||||
|
||||
self.debug_zip = None
|
||||
self.release_zip = None
|
||||
|
||||
# Find OpenCore DEBUG zip
|
||||
for file in self.working_dir.iterdir():
|
||||
if file.name.endswith("DEBUG.zip") and file.name != "OpenCore-DEBUG.zip":
|
||||
print(f" Found DEBUG zip: {file.name}")
|
||||
self.debug_zip = file
|
||||
|
||||
# Find OpenCore RELEASE zip
|
||||
for file in self.working_dir.iterdir():
|
||||
if file.name.endswith("RELEASE.zip") and file.name != "OpenCore-RELEASE.zip":
|
||||
print(f" Found RELEASE zip: {file.name}")
|
||||
self.release_zip = file
|
||||
|
||||
if self.debug_zip is None:
|
||||
self.download_new_binaries("DEBUG")
|
||||
|
||||
if self.release_zip is None:
|
||||
self.download_new_binaries("RELEASE")
|
||||
|
||||
|
||||
# Unzip both, rename to OpenCore-DEBUG and OpenCore-RELEASE
|
||||
print("Unzipping DEBUG zip...")
|
||||
subprocess.run (
|
||||
["unzip", f"{self.debug_zip}", "-d", f"{self.working_dir}/OpenCore-DEBUG-ROOT"],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||
)
|
||||
|
||||
print("Unzipping RELEASE zip...")
|
||||
subprocess.run (
|
||||
["unzip", f"{self.release_zip}", "-d", f"{self.working_dir}/OpenCore-RELEASE-ROOT"],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||
)
|
||||
|
||||
for variant in BUILD_VARIANTS:
|
||||
print(f"Moving {variant} folder...")
|
||||
subprocess.run (
|
||||
["mv", f"{self.working_dir}/OpenCore-{variant}-ROOT/X64", f"{self.working_dir}/OpenCore-{variant}"],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||
)
|
||||
if variant == "DEBUG":
|
||||
for utility in IMPORTANT_UTILITIES:
|
||||
print(f"Moving {utility} from {variant} variant...")
|
||||
subprocess.run (
|
||||
["rm", "-rf", f"{self.working_dir}/{utility}"],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||
)
|
||||
subprocess.run (
|
||||
["mv", f"{self.working_dir}/OpenCore-{variant}-ROOT/Utilities/{utility}/{utility}", f"{self.working_dir}/{utility}"],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||
)
|
||||
|
||||
# Remove root folder
|
||||
subprocess.run (
|
||||
["rm", "-rf", f"{self.working_dir}/OpenCore-{variant}-ROOT"],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||
)
|
||||
|
||||
# Remove zip files
|
||||
print("Removing zip files...")
|
||||
# remove debug_zip
|
||||
subprocess.run (
|
||||
["rm", "-rf", self.debug_zip],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||
)
|
||||
# remove release_zip
|
||||
subprocess.run (
|
||||
["rm", "-rf", self.release_zip],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||
)
|
||||
|
||||
def download_new_binaries(self, variant):
|
||||
# Get latest release
|
||||
print(f"Getting latest {variant}...")
|
||||
latest_release = requests.get(REPO_URL).json()
|
||||
|
||||
# Get latest release download url
|
||||
print(f" Getting latest {variant} download url...")
|
||||
for asset in latest_release["assets"]:
|
||||
if asset["name"].endswith(f"{variant}.zip"):
|
||||
download_url = asset["browser_download_url"]
|
||||
print(f" Download url: {download_url}")
|
||||
break
|
||||
|
||||
if variant == "DEBUG":
|
||||
self.debug_zip = f"{self.working_dir}/{asset['name']}"
|
||||
elif variant == "RELEASE":
|
||||
self.release_zip = f"{self.working_dir}/{asset['name']}"
|
||||
else:
|
||||
raise ValueError("Invalid variant!")
|
||||
|
||||
# Download latest release
|
||||
print(f" Downloading latest {variant}...")
|
||||
download = requests.get(download_url)
|
||||
with open(f"{self.working_dir}/{asset['name']}", "wb") as f:
|
||||
f.write(download.content)
|
||||
|
||||
def clean_old_bundles(self):
|
||||
print("Cleaning old bundles...")
|
||||
for variant in BUILD_VARIANTS:
|
||||
if (self.working_dir / f"OpenCore-{variant}").exists():
|
||||
print(f" Deleting old {variant} variant...")
|
||||
subprocess.run (
|
||||
["rm", "-rf", f"{self.working_dir}/OpenCore-{variant}"],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||
)
|
||||
|
||||
def validate_files(self):
|
||||
for variant in BUILD_VARIANTS:
|
||||
if not (self.working_dir / f"OpenCore-{variant}").exists():
|
||||
raise FileNotFoundError(f"OpenCore-{variant} folder not found!")
|
||||
|
||||
def generate(self):
|
||||
for variant in BUILD_VARIANTS:
|
||||
print(f"Generating {variant} variant...")
|
||||
self.generate_opencore(variant)
|
||||
|
||||
def generate_opencore(self, variant):
|
||||
# Create S/L/C
|
||||
print(" Creating SLC folder")
|
||||
subprocess.run (
|
||||
["mkdir", "-p", f"{self.working_dir}/OpenCore-{variant}/System/Library/CoreServices"],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||
)
|
||||
|
||||
# Relocate contents of /EFI/BOOT to /S/L/C
|
||||
print(" Relocating BOOT folder to SLC")
|
||||
for file in (self.working_dir / f"OpenCore-{variant}/EFI/BOOT").iterdir():
|
||||
subprocess.run (
|
||||
["mv", f"{file}", f"{self.working_dir}/OpenCore-{variant}/System/Library/CoreServices"],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||
)
|
||||
|
||||
# Rename BOOTx64.efi to boot.efi
|
||||
print(" Renaming BOOTx64.efi to boot.efi")
|
||||
subprocess.run (
|
||||
["mv", f"{self.working_dir}/OpenCore-{variant}/System/Library/CoreServices/BOOTx64.efi", f"{self.working_dir}/OpenCore-{variant}/System/Library/CoreServices/boot.efi"],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||
)
|
||||
|
||||
# Delete BOOT folder
|
||||
print(" Deleting BOOT folder")
|
||||
subprocess.run (
|
||||
["rm", "-rf", f"{self.working_dir}/OpenCore-{variant}/EFI/BOOT"],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||
)
|
||||
|
||||
# Delete unused drivers
|
||||
print(" Deleting unused drivers")
|
||||
for driver in UNUSED_DRIVERS:
|
||||
if Path(f"{self.working_dir}/OpenCore-{variant}/EFI/OC/Drivers/{driver}").exists():
|
||||
print(f" Deleting {driver}")
|
||||
subprocess.run (
|
||||
["rm", f"{self.working_dir}/OpenCore-{variant}/EFI/OC/Drivers/{driver}"],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||
)
|
||||
else:
|
||||
print(f" {driver} not found")
|
||||
|
||||
# Delete unused tools
|
||||
print(" Deleting unused tools")
|
||||
for tool in UNUSED_TOOLS:
|
||||
if Path(f"{self.working_dir}/OpenCore-{variant}/EFI/OC/Tools/{tool}").exists():
|
||||
print(f" Deleting {tool}")
|
||||
subprocess.run (
|
||||
["rm", f"{self.working_dir}/OpenCore-{variant}/EFI/OC/Tools/{tool}"],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||
)
|
||||
else:
|
||||
print(f" {tool} not found")
|
||||
|
||||
# Rename OpenCore-<variant> to OpenCore-Build
|
||||
print(" Renaming OpenCore folder")
|
||||
subprocess.run (
|
||||
["mv", f"{self.working_dir}/OpenCore-{variant}", f"{self.working_dir}/OpenCore-Build"],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||
)
|
||||
|
||||
# Create OpenCore-<variant>.zip
|
||||
print(" Creating OpenCore.zip")
|
||||
subprocess.run (
|
||||
["ditto", "-c", "-k", "--sequesterRsrc", "--keepParent", f"{self.working_dir}/OpenCore-Build", f"{self.working_dir}/OpenCore-{variant}.zip"],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||
)
|
||||
|
||||
# Delete OpenCore-Build
|
||||
print(" Deleting OpenCore-Build")
|
||||
subprocess.run (
|
||||
["rm", "-rf", f"{self.working_dir}/OpenCore-Build"],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
GenerateOpenCore()
|
||||
@@ -1,89 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# Simple script to delete unnecessary files from OpenCore and move into place
|
||||
# To use, simply :
|
||||
# - Download an OpenCore build
|
||||
# - 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-Build)
|
||||
# - Zip folders
|
||||
# TODO:
|
||||
# - Download latest builds from dortania.github.io
|
||||
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
|
||||
build_types = [
|
||||
"DEBUG",
|
||||
"RELEASE",
|
||||
]
|
||||
|
||||
bad_drivers = [
|
||||
"AudioDxe.efi",
|
||||
"BiosVideo.efi",
|
||||
"CrScreenshotDxe.efi",
|
||||
"Ext4Dxe.efi",
|
||||
"HiiDatabase.efi",
|
||||
"NvmExpressDxe.efi",
|
||||
"OpenHfsPlus.efi",
|
||||
"OpenNtfsDxe.efi",
|
||||
"OpenPartitionDxe.efi",
|
||||
"OpenUsbKbDxe.efi",
|
||||
"OpenVariableRuntimeDxe.efi",
|
||||
"Ps2KeyboardDxe.efi",
|
||||
"Ps2MouseDxe.efi",
|
||||
"ToggleSipEntry.efi",
|
||||
"UsbMouseDxe.efi",
|
||||
"XhciDxe.efi",
|
||||
"Udp4Dxe.efi",
|
||||
"TcpDxe.efi",
|
||||
"SnpDxe.efi",
|
||||
"MnpDxe.efi",
|
||||
"Ip4Dxe.efi",
|
||||
"HttpUtilitiesDxe.efi",
|
||||
"HttpDxe.efi",
|
||||
"HttpBootDxe.efi",
|
||||
"DpcDxe.efi",
|
||||
"DnsDxe.efi",
|
||||
"Dhcp4Dxe.efi",
|
||||
"ArpDxe.efi",
|
||||
]
|
||||
|
||||
bad_tools = [
|
||||
"ChipTune.efi",
|
||||
"CleanNvram.efi",
|
||||
"ControlMsrE2.efi",
|
||||
"GopStop.efi",
|
||||
"KeyTester.efi",
|
||||
"MmapDump.efi",
|
||||
"OpenControl.efi",
|
||||
"ResetSystem.efi",
|
||||
"RtcRw.efi",
|
||||
"CsrUtil.efi",
|
||||
"TpmInfo.efi",
|
||||
]
|
||||
|
||||
for version in build_types:
|
||||
print("- Creating S/L/C")
|
||||
subprocess.run(f"mkdir -p ./OpenCore-{version}/System/Library/CoreServices".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
print("- Creating boot.efi Bootstrap")
|
||||
subprocess.run(f"cp ./OpenCore-{version}/EFI/BOOT/BOOTx64.efi ./OpenCore-{version}/System/Library/CoreServices/boot.efi".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
print("- Deleting old BOOTx64.efi")
|
||||
subprocess.run(f"rm -R ./OpenCore-{version}/EFI/BOOT/".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
for delete_drivers in bad_drivers:
|
||||
if Path(f"./OpenCore-{version}/EFI/OC/Drivers/{delete_drivers}").exists():
|
||||
print(f"- Deleting {delete_drivers}")
|
||||
subprocess.run(f"rm ./OpenCore-{version}/EFI/OC/Drivers/{delete_drivers}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
else:
|
||||
print(f"- Unable to find {delete_drivers}, skipping")
|
||||
for delete_tools in bad_tools:
|
||||
if Path(f".//OpenCore-{version}/EFI/OC/Tools/{delete_tools}").exists():
|
||||
print(f"- Deleting {delete_tools}")
|
||||
subprocess.run(f"rm ./OpenCore-{version}/EFI/OC/Tools/{delete_tools}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
else:
|
||||
print(f"- Unable to find {delete_tools}, skipping")
|
||||
|
||||
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()
|
||||
BIN
payloads/OpenCore/macserial
Executable file
BIN
payloads/OpenCore/macserial
Executable file
Binary file not shown.
BIN
payloads/OpenCore/ocvalidate
Executable file
BIN
payloads/OpenCore/ocvalidate
Executable file
Binary file not shown.
BIN
payloads/Tools/RSRRepair
Executable file
BIN
payloads/Tools/RSRRepair
Executable file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user