Merge branch 'main' into vault_2

This commit is contained in:
Mykola Grymalyuk
2023-10-21 09:59:57 -06:00
committed by GitHub
35 changed files with 413 additions and 238 deletions

View File

@@ -2,12 +2,21 @@
## 1.1.0
- Resolve rendering issues on Intel Broadwell iGPUs
- Resolve Paravirtualized Graphics support for 3802 GPUs on macOS Sonoma
- Update non-Metal Binaries for macOS Sonoma:
- Resolve unresponsive Weather app
- Resolve full screen menubar covering the app toolbar
- Resolve unfocused password windows
- OpenCore Vaulting (Jazzzny)
- Ensures that OpenCore is not corrupted or maliciously tampered with
- Resolve USB 1.1 kernel panics on macOS 14.1
- Resolve PCIe FaceTime camera support on macOS 14.1
- Resolve T1 Security Chip support on macOS 14
- Applicable for MacBookPro13,2, MacBookPro13,3, MacBookPro14,2, MacBookPro14,3
- Add support for stand alone OpenCore Vaulting without Xcode Command Line Tools (Jazzzny)
- Increment Binaries:
- PatcherSupportPkg 1.4.2 - release
- AirportBrcmFixup 2.1.8 - release
- BlueToolFixup 2.6.8 - release
- RestrictEvents 1.1.3 - release
## 1.0.1
- Resolve rendering issues on Intel Ivy Bridge iGPUs

View File

@@ -13,7 +13,7 @@ class SystemPatchDictionary():
Patchset Schema:
Supports 6 types of higher level keys:
Supports following types of higher level keys:
- OS Support: Supported OSes by patches
- Minimum OS Support: Minimum supported OS version
- OS Major: Major XNU Kernel version
@@ -30,6 +30,9 @@ class SystemPatchDictionary():
- Remove: Files to remove
- Location:
- File (array: [ "File" ])
- Remove Non-Root: Files to remove from data partition
- Location:
- File (array: [ "File" ])
- Processes: Additional processes to run
- Process (dict: { "Process": "Requires Root" })
- Display Name: User-friendly name (string, "" if user-friendly name is not required)
@@ -67,6 +70,7 @@ class SystemPatchDictionary():
self.macOS_12_4: float = 21.5
self.macOS_12_5: float = 21.6
self.macOS_13_3: float = 22.4
self.macOS_14_1: float = 23.1
self._generate_sys_patch_dict()
@@ -378,6 +382,7 @@ class SystemPatchDictionary():
"/System/Library/Frameworks": {
"Metal.framework": f"13.2.1-{self.os_major}",
**({ "CoreImage.framework": "14.0 Beta 3" } if self.os_major >= os_data.os_data.sonoma else {}),
**({ "ParavirtualizedGraphics.framework": "13.6" } if self.os_major >= os_data.os_data.sonoma else {}),
},
"/System/Library/PrivateFrameworks": {
**({ "MTLCompiler.framework": "13.2.1" } if self.os_major == os_data.os_data.ventura else {}),
@@ -1264,6 +1269,29 @@ class SystemPatchDictionary():
},
},
},
# Injection of UHCI/OHCI causes a panic on 14.1+
"Legacy USB 1.1 Extended": {
"Display Name": "",
"OS Support": {
"Minimum OS Support": {
"OS Major": os_data.os_data.sonoma,
"OS Minor": 1 # macOS 14.1 (XNU 23.1)
},
"Maximum OS Support": {
"OS Major": os_data.os_data.max_os,
"OS Minor": 99
},
},
"Install": {
"/System/Library/Extensions/IOUSBHostFamily.kext/Contents/PlugIns": {
"AppleUSBOHCI.kext": "12.6.2-USB",
"AppleUSBOHCIPCI.kext": "12.6.2-USB",
"AppleUSBUHCI.kext": "12.6.2-USB",
"AppleUSBUHCIPCI.kext": "12.6.2-USB",
},
},
},
# With macOS 14.1, daemon won't load if not on root volume
"PCIe FaceTime Camera": {
"Display Name": "Miscellaneous: PCIe FaceTime Camera",
"OS Support": {
@@ -1276,14 +1304,58 @@ class SystemPatchDictionary():
"OS Minor": 99
},
},
"Install Non-Root": {
"/Library/CoreMediaIO/Plug-Ins/DAL": {
"Install": {
"/System/Library/Frameworks/CoreMediaIO.framework/Versions/A/Resources": {
"AppleCamera.plugin": "14.0 Beta 1"
},
"/Library/LaunchDaemons": {
"/System/Library/LaunchDaemons": {
"com.apple.cmio.AppleCameraAssistant.plist": "14.0 Beta 1"
},
},
"Remove Non-Root": {
"/Library/CoreMediaIO/Plug-Ins/DAL": [
"AppleCamera.plugin"
],
"/Library/LaunchDaemons": [
"com.apple.cmio.AppleCameraAssistant.plist"
],
}
},
"T1 Security Chip": {
"Display Name": "Miscellaneous: T1 Security Chip",
"OS Support": {
"Minimum OS Support": {
"OS Major": os_data.os_data.sonoma,
"OS Minor": 0
},
"Maximum OS Support": {
"OS Major": os_data.os_data.max_os,
"OS Minor": 99
},
},
"Install": {
"/System/Library/Frameworks": {
"LocalAuthentication.framework": "13.6" # Required for Password Authentication (SharedUtils.framework)
},
"/System/Library/PrivateFrameworks": {
"EmbeddedOSInstall.framework": "13.6" # Required for biometrickitd
},
# Required for Apple Pay
"/usr/lib": {
"libNFC_Comet.dylib": "13.6",
"libNFC_HAL.dylib": "13.6",
"libnfshared.dylib": "13.6",
"libnfshared.dylibOld.dylib": "13.6",
"libnfstorage.dylib": "13.6",
"libPN548_API.dylib": "13.6"
},
"/usr/libexec": {
"biometrickitd": "13.6", # Required for Touch ID
"nfcd": "13.6", # Required for Apple Pay
},
},
},
},
}

View File

@@ -149,7 +149,6 @@ module.exports = {
sidebarDepth: 1,
children: [
'ISSUES-HOLD',
'TESTED',
'TERMS',
'HOW',
'PATCHEXPLAIN',

View File

@@ -134,8 +134,8 @@ The patcher is designed to target **macOS Big Sur 11.x to macOS Sonoma 14.x**.
| Model Name | Identifier | Tagged Issues |
| :--- | :--- | :--- |
| Mac Pro (Early 2008) | `MacPro3,1` | - Recommend upgrade to Metal GPU<br>- [non-Metal GPU (macOS 11+)](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)<br>- [USB 1.1 (macOS 13+)](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1021)<br>- Remove stock Bluetooth to prevent panics |
| Mac Pro (Early 2009) | `MacPro4,1` | - Recommend upgrade to Metal GPU<br>- [non-Metal GPU (macOS 11+)](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)<br>- [USB 1.1 (macOS 13+)](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1021) |
| Mac Pro (Early 2008) | `MacPro3,1` | - [Recommend upgrade to Metal GPU](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1008)<br>- [non-Metal GPU (macOS 11+)](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)<br>- [USB 1.1 (macOS 13+)](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1021)<br>- Remove stock Bluetooth to prevent panics |
| Mac Pro (Early 2009) | `MacPro4,1` | - [Recommend upgrade to Metal GPU](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1008)<br>- [non-Metal GPU (macOS 11+)](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)<br>- [USB 1.1 (macOS 13+)](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1021) |
| Mac Pro (Mid 2010)<br>Mac Pro (Mid 2012) | `MacPro5,1` | ^^ |
| Mac Pro (Late 2013) | `MacPro6,1` | - [Legacy Metal (macOS 13+)](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1008) |
| Mac Pro (2019) | `MacPro7,1` | - Supported by Apple |

View File

@@ -29,11 +29,18 @@ OpenCore Legacy Patcher v1.0.0 will support Sonoma for all models normally suppo
## Issues
* [T1 Security chip](t1-security-chip)
* [Bluetooth](#bluetooth)
* [T1 Security chip](#t1-security-chip)
* [USB 1.1 (OHCI/UHCI) Support](#usb-11-ohciuhci-support)
* [Graphics support and issues](#graphics-support-and-issues)
### Bluetooth
Sometimes Bluetooth may not work after boot on pre-2012 models. Running NVRAM reset can alleviate it.
Dual boots may also bring the issue back even after the reset.
### T1 Security chip
Sonoma has removed support for T1 chips found in most 2016 and 2017 Macs. Therefore on these systems, the following will not function:

View File

@@ -1,144 +0,0 @@
# Tested Models on OpenCore Legacy Patcher
To aid users in troubleshooting, we've compiled a list of users who've reported success with OpenCore Legacy Patcher as well as the version used. This should aid users in verifying whether issues with the patcher are regression-related with newer versions.
::: details MacBook
| SMBIOS | Tested | Tester | Model | Version | Comment |
| :--- | :--- | :--- | :--- | :--- | :--- |
| MacBook4,1 | <span style="color:#30BCD5"> YES </span> | Mami | Stock | Unknown | Couldn't install due to broken USB support |
| MacBook5,1 | ^^ | air.man | ^^ | 0.0.19 | N/A |
| MacBook5,2 | ^^ | Finder352 | ^^ | ^^ | ^^ |
| MacBook6,1 | ^^ | Finder352 | ^^ | ^^ | ^^ |
| MacBook7,1 | ^^ | MykolaG | ^^ | ^^ | ^^ |
| ^^ | ^^ | Jazzzny | ^^ | ^^ | ^^ |
| ^^ | ^^ | AlexSakha67 | ^^ | 0.0.20 | ^^ |
| MacBook8,1 | <span style="color:red"> NO </span> | N/A | N/A | N/A | ^^ |
:::
::: details MacBook Air
| SMBIOS | Tested | Tester | Model | Version | Comment |
| :--- | :--- | :--- | :--- | :--- | :--- |
| MacBookAir2,1 | <span style="color:#30BCD5"> YES </span> | Bruno | Stock | 0.4.5 | Slow to the point of being unusable. |
| MacBookAir3,1 | ^^ | uvesten | Stock | 0.3.3 | N/A |
| MacBookAir3,2 | ^^ | houser42 | ^^ | Unknown | ^^ |
| MacBookAir4,1 | <span style="color:red"> NO </span> | N/A | N/A | N/A | ^^ |
| MacBookAir4,2 | <span style="color:#30BCD5"> YES </span> | bdwilson1907 | Stock | 0.3.1 | Intermittent keyboard backlight |
| MacBookAir5,1 | ^^ | Ausdauersportler | ^^ | 0.0.9 | N/A |
| ^^ | ^^ | webg3 | ^^ | Unknown | ^^ |
| MacBookAir5,2 | ^^ | Bab-droid | ^^ | 0.0.19 | ^^ |
| ^^ | ^^ | K-Hobert | ^^ | Unknown | ^^ |
| ^^ | ^^ | cboukouv | ^^ | 0.0.21 | ^^ |
| MacBookAir6,1 | <span style="color:red"> NO </span> | N/A | N/A | N/A | N/A |
| MacBookAir6,2 | ^^ | ^^ | ^^ | ^^ | ^^ |
:::
::: details MacBook Pro
| SMBIOS | Tested | Tester | Model | Version | Comment |
| :--- | :--- | :--- | :--- | :--- | :--- |
| MacBookPro4,1 | <span style="color:#30BCD5"> YES </span> | cboukouv | Stock | 0.0.19 | N/A |
| MacBookPro5,1 | ^^ | GURU_Jasho#5736 | ^^ | 0.0.21 | ^^ |
| MacBookPro5,2 | ^^ | hvds | ^^ | ^^ | ^^ |
| MacBookPro5,3 | ^^ | kommtzeitkonrad | ^^ | 0.0.22 | ^^ |
| MacBookPro5,4 | <span style="color:red"> NO </span> | N/A | N/A | N/A | ^^ |
| MacBookPro5,5 | <span style="color:#30BCD5"> YES </span> | ASentientHedgehog | Stock | - | ^^ |
| ^^ | ^^ | ParaDoX1994 | Stock | 0.4.5 | Camera/Bluetooth not working (connector broken) |
| MacBookPro6,1 | <span style="color:red"> NO </span> | N/A | N/A | N/A | N/A |
| MacBookPro6,2 | <span style="color:#30BCD5"> YES </span> | Jakeluke | Stock | Unknown | dGPU broken |
| MacBookPro7,1 | ^^ | fussel132 | ^^ | 0.1.2 | N/A
| ^^ | ^^ | casey1234 | Upgraded | 0.3.3 | Upgraded SSD |
| MacBookPro8,1 | <span style="color:#30BCD5"> YES </span> | AvaQueen | Stock | 0.0.19 | N/A |
| MacBookPro8,1 | ^^ | charly-black | Upgraded | 0.3.1 | Upgraded BCM94331PCIEBT4CAX |
| MacBookPro8,2 | ^^ | air.man | Stock | 0.0.22 | dGPU disabled |
| ^^ | ^^ | cboukouv | ^^ | 0.0.19 | N/A |
| MacBookPro8,3 | ^^ | lulujyc | ^^ | 0.1.4 | dGPU disabled |
| MacBookPro9,1 | <span style="color:#30BCD5"> YES </span>| jbdamiano | Stock | 0.0.19 | N/A |
| ^^ | ^^ | dennes544 | ^^ | ^^ | ^^ |
| ^^ | ^^ | cgrazy | ^^ | ^^ | ^^ |
| ^^ | ^^ | LIPA85 | ^^ | ^^ | ^^ |
| MacBookPro9,2 | <span style="color:#30BCD5"> YES </span> | alexx17xx | ^^ | ^^ | ^^ |
| ^^ | ^^ | Arvxistanx | ^^ | ^^ | ^^ |
| ^^ | ^^ | CyberDroid1 | ^^ | 0.0.16 | ^^ |
| ^^ | ^^ | woefi | Upgraded | 0.0.13 | Upgraded BCM94331CAX |
| ^^ | ^^ | whgmkeller | Stock | 0.0.11 | N/A |
| ^^ | ^^ | vinaypundith | Unknown | 0.0.7 | ^^ |
| ^^ | ^^ | casey1234 | Upgraded | 0.3.3 | Upgraded RAM and SSD |
| ^^ | ^^ | crystall1nedev | Upgraded | 0.4.4 | ^^ |
| MacBookPro10,1 | <span style="color:#30BCD5"> YES </span> | traviswparker | Stock | 0.0.14 | N/A |
| ^^ | ^^ | il-rollino | Upgraded | 0.0.21 | Upgraded BCM94360CSAX |
| MacBookPro10,2 | ^^ | akidone | ^^ | 0.3.0 | ^^ |
| MacBookPro11,1 | <span style="color:#30BCD5"> YES </span> | ParaDoX1994 | Stock | 0.4.4 | N/A |
| MacBookPro11,2 | ^^ | casey1234 | ^^ | 0.3.3 | ^^ |
| MacBookPro11,3 | <span style="color:red"> NO </span> | N/A | N/A | N/A | N/A |
:::
::: details Mac mini
| SMBIOS | Tested | Tester | Model | Version | Comment |
| :--- | :--- | :--- | :--- | :--- | :--- |
| Macmini3,1 | <span style="color:#30BCD5"> YES </span> | ASentientHedgehog | Stock | N/A | N/A |
| Macmini4,1 | <span style="color:#30BCD5"> YES </span> | Towster15#6369 | ^^ | 0.4.4 | Does not have internal SATA cable, booted and installed to SSD over USB 2.0 instead |
| ^^ | ^^ | MykolaG | ^^ | 0.4.5 | SD card reader possibly broken. |
| Macmini5,1 | <span style="color:#30BCD5"> YES </span> | MykolaG | ^^ | 0.4.5 | N/A |
| Macmini5,2 | ^^ | charly-black | ^^ | 0.3.1 | ^^ |
| ^^ | ^^ | MykolaG | ^^ | 0.4.5 | SD card reader possibly broken. |
| Macmini5,3 | <span style="color:red"> NO </span> | N/A | N/A | N/A | N/A |
| Macmini6,1 | <span style="color:#30BCD5"> YES </span> | cicofz | Stock | 0.0.21 | ^^ |
| ^^ | ^^ | Stig124 | ^^ | 0.0.19 | ^^ |
| ^^ | ^^ | mwidjaya | ^^ |0.0.18 | ^^ |
| ^^| ^^ | MykolaG | ^^ | 0.4.5 | ^^ |
| Macmini6,2 | ^^ | Shelbs | ^^ | 0.0.16 | ^^ |
| Macmini7,1 | <span style="color:#30BCD5"> YES </span> | MykolaG | ^^ | 0.4.5 | ^^ |
| Macmini8,1 | ^^ | ^^ | ^^ | 0.4.5 | ^^ |
:::
::: details iMac
| SMBIOS | Tested | Tester | Model | Version | Comment |
| :--- | :--- | :--- | :--- | :--- | :--- |
| iMac7,1 | <span style="color:#30BCD5"> YES </span> | lulujyc | Upgraded | 0.3.1 | Upgraded with BCM94352HMB <br><br> The USB 1.1 controller is unstable on Big Sur+, using USB hubs (forcing USB 2.0) can fix unrecognized keyboard/ mouse. |
| iMac8,1 | <span style="color:#30BCD5"> YES </span> | EduCovas | Stock | 0.0.21 | N/A |
| iMac9,1 | <span style="color:#30BCD5"> YES </span> | Allanrfox | ^^ | ^^ | ^^ |
| ^^ | ^^ | Jakeluke | ^^ | ^^ | ^^ |
| iMac10,1 | <span style="color:#30BCD5"> YES </span> | Ausdauersportler | Upgraded | Unknown | Upgraded with WX4150 |
| iMac11,1 | ^^ | internetzel | ^^ | ^^ | Upgraded RX580 mobile |
| iMac11,2 | ^^ | MykolaG | Stock | 0.0.21 | N/A |
| ^^ | ^^ | iMac-iPad | ^^ | ^^ | ^^ |
| ^^ | ^^ | vinaypundith | Unknown | 0.0.19 | ^^ |
| iMac11,3 | ^^ | Ausdauersportler | Upgraded | 0.0.21 | Upgraded with Polaris GPU and BCM943602CDP |
| iMac12,1 | <span style="color:#30BCD5"> YES </span> | shnockdu | ^^ | ^^ | Upgraded with Kepler GPU |
| ^^ | ^^ | StephN999 | ^^ | ^^ | Upgraded with WX4150 GPU and BCM94360CD |
| iMac12,2 | ^^ | Ausdauersportler | ^^ | ^^ | Upgraded with Polaris GPU and BCM943602CDP |
| iMac13,1 | <span style="color:#30BCD5"> YES </span> | alexx17xx | Stock | 0.0.19 | N/A |
| iMac13,2 | ^^ | Alain13 | ^^ | ^^ | ^^ |
| ^^ | ^^ | algernonpule | ^^ | ^^ | ^^ |
| iMac13,3 | <span style="color:red"> NO </span> | N/A | N/A | N/A | ^^ |
| iMac14,1 | <span style="color:#30BCD5"> YES </span> | woefi | Upgraded | 0.0.21 | Upgraded NVMe |
| ^^ | ^^ | mikeboss | Stock | 0.0.19 | N/A |
| iMac14,2 | ^^ | OKonnel | ^^ | 0.0.22 | ^^ |
| ^^ | ^^ | mibaxx | ^^ | 0.0.21 | ^^ |
| iMac14,3 | ^^ | StupeFied | ^^ | 0.4.5 | ^^ |
| iMac15,1 | <span style="color:#30BCD5"> YES </span> | JakubMazur | Upgraded | 0.4.1 | Upgraded RAM, Radeon R9 M295X and Quad-Core Intel Core i7 |
:::
::: details Mac Pro
| SMBIOS | Tested | Tester | Model | Version | Comment |
| :--- | :--- | :--- | :--- | :--- | :--- |
| MacPro3,1 | <span style="color:#30BCD5"> YES </span> | MykolaG | Upgraded | 0.1.6 | Upgraded RX 470 and BCM94360CD.<br/>Stock Bluetooth card removed. |
| ^^ | ^^ | christiann | ^^ | 0.0.21 | Upgraded RX 560 and BCM94322.<br/>Stock Bluetooth card removed. |
| ^^ | ^^ | gw463 | ^^ | 0.0.22 | Upgraded GTX 680 and BCM94360 |
| ^^ | ^^ | AlexSakha67 | ^^ | 0.0.20 | Upgraded R9 280 |
| ^^ | ^^ | nekton1 | ^^ | ^^ | Upgraded GTX 680 |
| ^^ | ^^ | Pri-est | Unknown | 0.0.9 | N/A |
| ^^ | ^^ | vinaypundith | Upgraded | 0.0.6 | Upgraded with GTX 680 and BCM94360CD. |
| ^^ | ^^ | ParaDoX1994 | ^^ | 0.4.4 | Upgraded with HD 7950.<br/>Stock Bluetooth card removed. |
| MacPro4,1 | <span style="color:#30BCD5"> YES </span> | vinaypundith | Unknown | 0.0.9 | N/A |
| MacPro5,1 | ^^ | woefi | Upgraded | 0.0.21 | Upgraded with RX 580. |
| ^^ | ^^ | Mabrouk Oscar | Unknown | ^^ | N/A |
| ^^ | ^^ | astuffedtiger | Flashed | 0.0.18 | MacPro4,1 flashed to 5,1 |
:::

View File

@@ -15,4 +15,4 @@ To remove OpenCore:
Note that after you remove OpenCore, your Mac will no longer boot and show the "prohibited" symbol. Be ready to install an natively-supported version of macOS before you uninstall OpenCore.
* This does not apply to native to native Macs just using OpenCore to achieve features like AirPlay to Mac and Sidecar, but it is still recomended to reinstall macOS, after removing OpenCore, if using SMBIOS spoofing to enable Univeral Control.
* This does not apply to native Macs just using OpenCore to achieve features like AirPlay to Mac and Sidecar, but it is still recomended to reinstall macOS, after removing OpenCore, if using SMBIOS spoofing to enable Univeral Control.

View File

@@ -204,9 +204,41 @@ Before we continue, please keep in mind that SMBIOS Spoofing is an advanced feat
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.
::: details macOS Sonoma
Firstly run OpenCore Legacy Patcher.
Then go to **Settings** and **SMBIOS** tab, 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 Sonoma and enabling them will cause boot issues.
| Main Settings view | SMBIOS settings |
| :--- | :--- |
| ![](../images/ventura_uc1.png) | ![](../images/ventura_uc2.png) |
::: details Table for spoofed models (click to expand)
Spoofing to any model with native Sonoma support should work, but these are the earliest Macs natively supported by Sonoma 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 |
|-------------|---------------|--------------|
| MacBook Air Early 2015 11" / 13" | MacBookAir7,x | MacBookAir8,1 |
| MacBook Pro Early 2015 13" | MacBookPro12,x | MacBookPro15,2 |
| MacBook Pro Mid 2015 15" | MacBookPro11,4 / 11,5 | MacBookPro15,2 |
| iMac Late 2015 21" | iMac16,x | iMac19,2 |
| Mac mini Late 2014 | Macmini7,x | MacMini8,1 |
| Mac Pro Late 2013 | MacPro6,x | MacPro7,1 |
:::
::: details macOS Ventura
Firstly run the GUI version of OpenCore Legacy Patcher.
Firstly run OpenCore Legacy Patcher.
Then go to **Settings** and **SMBIOS** tab, set SMBIOS Spoof Level to **Moderate**. Set SMBIOS Spoof Model **one listed next to your native model in the table for spoofed models below.**
@@ -225,20 +257,20 @@ Spoofing to any model with native Ventura support should work, but these are the
**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 |
| Mac by name | Native SMBIOS | Spoof SMBIOS |
|-------------|---------------|--------------|
| MacBook Air Early 2015 11" / 13" | MacBookAir7,x | MacBookAir8,1 |
| 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 |
| Mac Pro Late 2013 | MacPro6,x | MacPro7,1 |
:::
::: details macOS Monterey
Firstly, run the GUI version of OpenCore Legacy Patcher. Secondly, go to **Settings** then the **App** tab and tick **Allow native models**.
Firstly, run OpenCore Legacy Patcher. Secondly, go to **Settings** then the **App** tab and tick **Allow native models**.
[](../images/OCLP-App-Allow-Native-Models.png)
@@ -257,14 +289,14 @@ Any model after the list of officially blacklisted Macs should be supported, but
**Reminder:** Macs that are not listed on this table work without spoofing, including systems that do not natively support Monterey, 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:#30BCD5"> YES </span> | Hzlph |
| MacBook Pro Early 2015 13" | MacBookPro12,x | MacBookPro13,1 | ^^ | ^^ |
| MacBook Pro Mid 2015 15" | MacBookPro11,4 / 11,5 | MacBookPro13,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:#30BCD5"> YES </span> | Crystall1nedev |
| Mac by name | Native SMBIOS | Spoof SMBIOS |
|-------------|---------------|--------------|
| MacBook Air Early 2015 11" / 13" | MacBookAir7,x | MacBookAir8,1 |
| MacBook Pro Early 2015 13" | MacBookPro12,x | MacBookPro13,1 |
| MacBook Pro Mid 2015 15" | MacBookPro11,4 / 11,5 | MacBookPro13,3 |
| iMac Late 2015 21" | iMac16,x | iMac18,2 |
| Mac mini Late 2014 | Macmini7,x | MacMini8,1 |
| Mac Pro Late 2013 | MacPro6,x | MacPro7,1 |
:::

View File

@@ -1377,7 +1377,7 @@
<key>ExecutablePath</key>
<string>Contents/MacOS/AppleUSBOHCI</string>
<key>MaxKernel</key>
<string></string>
<string>23.0.0</string>
<key>MinKernel</key>
<string>22.0.0</string>
<key>PlistPath</key>
@@ -1395,7 +1395,7 @@
<key>ExecutablePath</key>
<string>Contents/MacOS/AppleUSBOHCIPCI</string>
<key>MaxKernel</key>
<string></string>
<string>23.0.0</string>
<key>MinKernel</key>
<string>22.0.0</string>
<key>PlistPath</key>
@@ -1413,7 +1413,7 @@
<key>ExecutablePath</key>
<string>Contents/MacOS/AppleUSBUHCI</string>
<key>MaxKernel</key>
<string></string>
<string>23.0.0</string>
<key>MinKernel</key>
<string>22.0.0</string>
<key>PlistPath</key>
@@ -1431,7 +1431,7 @@
<key>ExecutablePath</key>
<string>Contents/MacOS/AppleUSBUHCIPCI</string>
<key>MaxKernel</key>
<string></string>
<string>23.0.0</string>
<key>MinKernel</key>
<string>22.0.0</string>
<key>PlistPath</key>
@@ -1707,6 +1707,24 @@
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>corecrypto - T1</string>
<key>Enabled</key>
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>23.0.0</string>
<key>BundlePath</key>
<string>corecrypto_T1.kext</string>
<key>ExecutablePath</key>
<string>Contents/MacOS/corecrypto_T1</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -4,4 +4,5 @@ wxpython
pyinstaller
packaging
py_sip_xnu
py-applescript
py-applescript
markdown2

View File

@@ -215,12 +215,13 @@ class BuildFirmware:
# CSM check
# For model support, check for GUID in firmware and as well as Bootcamp Assistant's Info.plist ('PreUEFIModels' key)
# Ref: https://github.com/acidanthera/OpenCorePkg/blob/0.9.5/Platform/OpenLegacyBoot/OpenLegacyBoot.c#L19
# if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.CPUGen.ivy_bridge.value and self.model != "MacPro6,1":
# logging.info("- Enabling CSM support")
# support.BuildSupport(self.model, self.constants, self.config).get_efi_binary_by_path("OpenLegacyBoot.efi", "UEFI", "Drivers")["Enabled"] = True
# else:
# # Shipped alongside OpenCorePkg, so remove if unused
# (self.constants.drivers_path / Path("OpenLegacyBoot.efi")).unlink()
if Path(self.constants.drivers_path / Path("OpenLegacyBoot.efi")).exists():
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.CPUGen.ivy_bridge.value and self.model != "MacPro6,1":
logging.info("- Enabling CSM support")
support.BuildSupport(self.model, self.constants, self.config).get_efi_binary_by_path("OpenLegacyBoot.efi", "UEFI", "Drivers")["Enabled"] = True
else:
# Shipped alongside OpenCorePkg, so remove if unused
(self.constants.drivers_path / Path("OpenLegacyBoot.efi")).unlink()
def _firmware_compatibility_handling(self) -> None:
"""
@@ -232,7 +233,7 @@ class BuildFirmware:
# Patches IOPCIConfigurator.cpp's IOPCIIsHotplugPort to skip configRead16/32 calls
# Credit to CaseySJ for original discovery:
# - Patch: https://github.com/AMD-OSX/AMD_Vanilla/pull/196
# - Source: https://github.com/apple-oss-distributions/IOPCIFamily/blob/main/IOPCIConfigurator.cpp#L968-L1022
# - Source: https://github.com/apple-oss-distributions/IOPCIFamily/blob/IOPCIFamily-583.40.1/IOPCIConfigurator.cpp#L968-L1022
#
# Currently all pre-Sandy Bridge Macs lacking an iGPU benefit from this patch as well as MacPro6,1
# Otherwise some graphics hardware will fail to wake, macOS will misreport hardware as ExpressCard-based,
@@ -247,7 +248,7 @@ class BuildFirmware:
logging.info("- Adding PCI Bus Enumeration Patch")
support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "CaseySJ - Fix PCI bus enumeration (Ventura)")["Enabled"] = True
# Sonoma slightly adjusted this line specifically
# - https://github.com/apple-oss-distributions/IOPCIFamily/blob/main/IOPCIConfigurator.cpp#L1009
# - https://github.com/apple-oss-distributions/IOPCIFamily/blob/IOPCIFamily-583.40.1/IOPCIConfigurator.cpp#L1009
support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "Fix PCI bus enumeration (Sonoma)")["Enabled"] = True
if self.constants.set_vmm_cpuid is True:

View File

@@ -43,6 +43,7 @@ class BuildMiscellaneous:
self._debug_handling()
self._cpu_friend_handling()
self._general_oc_handling()
self._t1_handling()
def _feature_unlock_handling(self) -> None:
@@ -280,6 +281,12 @@ class BuildMiscellaneous:
# - Ref: https://techcommunity.microsoft.com/t5/microsoft-usb-blog/reasons-to-avoid-companion-controllers/ba-p/270710
#
# To be paired for sys_patch_dict.py's 'Legacy USB 1.1' patchset
#
# Note: With macOS 14.1, injection of these kexts causes a panic.
# To avoid this, a MaxKernel is configured with XNU 23.0.0 (macOS 14.0).
# Additionally sys_patch.py stack will now patches the bins onto disk for 14.1+.
# Reason for keeping the dual logic is due to potential conflicts of in-cache vs injection if we start
# patching pre-14.1 hosts.
if (
smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.CPUGen.penryn.value or \
self.model in ["MacPro4,1", "MacPro5,1", "Xserve3,1"]
@@ -349,9 +356,8 @@ class BuildMiscellaneous:
logging.info("- Enabling T1 Security Chip support")
support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Block"], "Identifier", "com.apple.driver.AppleSSE")["Enabled"] = True
support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Block"], "Identifier", "com.apple.driver.AppleCredentialManager")["Enabled"] = True
support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Block"], "Identifier", "com.apple.driver.AppleKeyStore")["Enabled"] = True
support.BuildSupport(self.model, self.constants, self.config).enable_kext("corecrypto_T1.kext", self.constants.t1_corecrypto_version, self.constants.t1_corecrypto_path)
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleSSE.kext", self.constants.t1_sse_version, self.constants.t1_sse_path)
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleCredentialManager.kext", self.constants.t1_credential_version, self.constants.t1_credential_path)
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleKeyStore.kext", self.constants.t1_key_store_version, self.constants.t1_key_store_path)

View File

@@ -77,6 +77,6 @@ class BuildSecurity:
if self.constants.secure_status is False:
logging.info("- Disabling SecureBootModel")
self.config["Misc"]["Security"]["SecureBootModel"] = "Disabled"
logging.info("- Enabling AMFIPass")
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AMFIPass.kext", self.constants.amfipass_version, self.constants.amfipass_path)

View File

@@ -14,7 +14,7 @@ class Constants:
def __init__(self) -> None:
# Patcher Versioning
self.patcher_version: str = "1.1.0" # OpenCore-Legacy-Patcher
self.patcher_support_pkg_version: str = "1.3.4" # PatcherSupportPkg
self.patcher_support_pkg_version: str = "1.4.2" # PatcherSupportPkg
self.copyright_date: str = "Copyright © 2020-2023 Dortania"
self.patcher_name: str = "OpenCore Legacy Patcher"
@@ -36,7 +36,7 @@ class Constants:
self.lilu_version: str = "1.6.7" # Lilu
self.whatevergreen_version: str = "1.6.6" # WhateverGreen
self.whatevergreen_navi_version: str = "1.6.6-Navi" # WhateverGreen (Navi Patch)
self.airportbcrmfixup_version: str = "2.1.7" # AirPortBrcmFixup
self.airportbcrmfixup_version: str = "2.1.8" # AirPortBrcmFixup
self.nvmefix_version: str = "1.1.1" # NVMeFix
self.applealc_version: str = "1.6.3" # AppleALC
self.restrictevents_version: str = "1.1.3" # RestrictEvents
@@ -67,9 +67,9 @@ class Constants:
self.aicpupm_version: str = "1.0.0" # AppleIntelCPUPowerManagement/Client
self.s3x_nvme_version: str = "1.0.0" # IONVMeFamily (14.0 Beta 1, S1X and S3X classes)
self.apple_camera_version: str = "1.0.0" # AppleCameraInterface (14.0 Beta 1)
self.t1_credential_version: str = "1.0.0" # AppleCredentialManager (13.5 - T1 support)
self.t1_sse_version: str = "1.0.0" # AppleSSE (13.5 - T1 support)
self.t1_key_store_version: str = "1.0.0" # AppleKeyStore (13.5 - T1 support)
self.t1_sse_version: str = "1.1.0" # AppleSSE (13.6 - T1 support)
self.t1_key_store_version: str = "1.1.0" # AppleKeyStore (13.6 - T1 support)
self.t1_corecrypto_version: str = "1.0.0" # corecrypto (13.6 - T1 support)
## Apple - Dortania Modified
self.bcm570_version: str = "1.0.2" # CatalinaBCM5701Ethernet
@@ -439,14 +439,14 @@ class Constants:
def t1_key_store_path(self):
return self.payload_kexts_path / Path(f"Misc/AppleKeyStore-v{self.t1_key_store_version}.zip")
@property
def t1_credential_path(self):
return self.payload_kexts_path / Path(f"Misc/AppleCredentialManager-v{self.t1_credential_version}.zip")
@property
def t1_sse_path(self):
return self.payload_kexts_path / Path(f"Misc/AppleSSE-v{self.t1_sse_version}.zip")
@property
def t1_corecrypto_path(self):
return self.payload_kexts_path / Path(f"Misc/corecrypto_T1-v{self.t1_corecrypto_version}.zip")
@property
def mousse_path(self):
return self.payload_kexts_path / Path(f"SSE/AAAMouSSE-v{self.mousse_version}.zip")

View File

@@ -634,6 +634,7 @@ class Computer:
ambient_light_sensor: Optional[bool] = False
third_party_sata_ssd: Optional[bool] = False
pcie_webcam: Optional[bool] = False
t1_chip: Optional[bool] = False
secure_boot_model: Optional[str] = None
secure_boot_policy: Optional[int] = None
oclp_sys_version: Optional[str] = None
@@ -659,6 +660,7 @@ class Computer:
computer.cpu_probe()
computer.bluetooth_probe()
computer.topcase_probe()
computer.t1_probe()
computer.ambient_light_sensor_probe()
computer.pcie_webcam_probe()
computer.sata_disk_probe()
@@ -936,6 +938,18 @@ class Computer:
elif usb_device.device_id in usb_data.AppleIDs.AppleUSBMultiTouch:
self.trackpad_type = "Modern"
def t1_probe(self):
if not self.usb_devices:
return
for usb_device in self.usb_devices:
if usb_device.vendor_id != 0x5ac:
continue
if usb_device.device_id != 0x8600:
continue
self.t1_chip = True
break
def sata_disk_probe(self):
# Get all SATA Controllers/Disks from 'system_profiler SPSerialATADataType'
# Determine whether SATA SSD is present and Apple-made

View File

@@ -665,12 +665,16 @@ class PatchSysVolume:
self._preflight_checks(required_patches, source_files_path)
for patch in required_patches:
logging.info("- Installing Patchset: " + patch)
if "Remove" in required_patches[patch]:
for remove_patch_directory in required_patches[patch]["Remove"]:
logging.info("- Remove Files at: " + remove_patch_directory)
for remove_patch_file in required_patches[patch]["Remove"][remove_patch_directory]:
destination_folder_path = str(self.mount_location) + remove_patch_directory
self._remove_file(destination_folder_path, remove_patch_file)
for method_remove in ["Remove", "Remove Non-Root"]:
if method_remove in required_patches[patch]:
for remove_patch_directory in required_patches[patch][method_remove]:
logging.info("- Remove Files at: " + remove_patch_directory)
for remove_patch_file in required_patches[patch][method_remove][remove_patch_directory]:
if method_remove == "Remove":
destination_folder_path = str(self.mount_location) + remove_patch_directory
else:
destination_folder_path = str(self.mount_location_data) + remove_patch_directory
self._remove_file(destination_folder_path, remove_patch_file)
for method_install in ["Install", "Install Non-Root"]:

View File

@@ -1,6 +1,10 @@
# Copyright (C) 2022, Mykola Grymalyuk
# Copyright (c) 2023 Jazzzny
import wx
import wx.html2
import requests
import markdown2
import logging
import plistlib
import subprocess
@@ -51,19 +55,85 @@ class AutomaticSysPatch:
logging.info(f"- Found new version: {version}")
app = wx.App()
frame = wx.Frame(None, -1, "OpenCore Legacy Patcher")
dialog = wx.MessageDialog(
parent=frame,
message=f"Current Version: {self.constants.patcher_version}{' (Nightly)' if not self.constants.commit_info[0].startswith('refs/tags') else ''}\nNew version: {version}\nWould you like to update?",
caption="Update Available for OpenCore Legacy Patcher!",
style=wx.YES_NO | wx.CANCEL | wx.ICON_QUESTION
)
dialog.SetYesNoCancelLabels("Download and install", "View on Github", "Ignore")
response = dialog.ShowModal()
if response == wx.ID_YES:
gui_entry.EntryPoint(self.constants).start(entry=gui_entry.SupportedEntryPoints.UPDATE_APP)
elif response == wx.ID_NO:
mainframe = wx.Frame(None, -1, "OpenCore Legacy Patcher")
ID_GITHUB = wx.NewId()
ID_UPDATE = wx.NewId()
url = "https://api.github.com/repos/dortania/OpenCore-Legacy-Patcher/releases/latest"
response = requests.get(url).json()
changelog = response["body"].split("## Asset Information")[0]
html_markdown = markdown2.markdown(changelog)
html_css = """
<style>
body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
line-height: 1.5;
font-size: 13px;
margin-top: 20px;
background-color: rgb(238,238,238);
}
h2 {
line-height: 0.5;
padding-left: 10px;
}
a {
color: -apple-system-control-accent;
}
@media (prefers-color-scheme: dark) {
body {
color: #fff;
background-color: rgb(47,47,47);
}
}
</style>
"""
frame = wx.Dialog(None, -1, title="", size=(600, 500))
frame.SetMinSize((600, 500))
frame.SetWindowStyle(wx.STAY_ON_TOP)
panel = wx.Panel(frame)
sizer = wx.BoxSizer(wx.VERTICAL)
sizer.AddSpacer(10)
self.title_text = wx.StaticText(panel, label="A new version of OpenCore Legacy Patcher is available!")
self.description = wx.StaticText(panel, label=f"OpenCore Legacy Patcher {version} is now available - You have {self.constants.patcher_version}. Would you like to update?")
self.title_text.SetFont(wx.Font(19, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, False, ".AppleSystemUIFont"))
self.description.SetFont(wx.Font(13, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, ".AppleSystemUIFont"))
self.web_view = wx.html2.WebView.New(panel, style=wx.BORDER_SUNKEN)
html_code = html_css+html_markdown.replace("<a href=", "<a target='_blank' href=")
self.web_view.SetPage(html_code, "")
self.web_view.Bind(wx.html2.EVT_WEBVIEW_NEWWINDOW, self._onWebviewNav)
self.web_view.EnableContextMenu(False)
self.close_button = wx.Button(panel, label="Ignore")
self.close_button.Bind(wx.EVT_BUTTON, lambda event: frame.EndModal(wx.ID_CANCEL))
self.view_button = wx.Button(panel, ID_GITHUB, label="View on GitHub")
self.view_button.Bind(wx.EVT_BUTTON, lambda event: frame.EndModal(ID_GITHUB))
self.install_button = wx.Button(panel, label="Download and Install")
self.install_button.Bind(wx.EVT_BUTTON, lambda event: frame.EndModal(ID_UPDATE))
self.install_button.SetDefault()
buttonsizer = wx.BoxSizer(wx.HORIZONTAL)
buttonsizer.Add(self.close_button, 0, wx.ALIGN_CENTRE | wx.RIGHT, 5)
buttonsizer.Add(self.view_button, 0, wx.ALIGN_CENTRE | wx.LEFT|wx.RIGHT, 5)
buttonsizer.Add(self.install_button, 0, wx.ALIGN_CENTRE | wx.LEFT, 5)
sizer = wx.BoxSizer(wx.VERTICAL)
sizer.Add(self.title_text, 0, wx.ALIGN_CENTRE | wx.TOP, 20)
sizer.Add(self.description, 0, wx.ALIGN_CENTRE | wx.BOTTOM, 20)
sizer.Add(self.web_view, 1, wx.EXPAND | wx.LEFT|wx.RIGHT, 10)
sizer.Add(buttonsizer, 0, wx.ALIGN_RIGHT | wx.ALL, 20)
panel.SetSizer(sizer)
frame.Centre()
result = frame.ShowModal()
if result == ID_GITHUB:
webbrowser.open(dict["Github Link"])
elif result == ID_UPDATE:
gui_entry.EntryPoint(self.constants).start(entry=gui_entry.SupportedEntryPoints.UPDATE_APP)
return
if utilities.check_seal() is True:
@@ -127,6 +197,9 @@ class AutomaticSysPatch:
if self._determine_if_versions_match():
self._determine_if_boot_matches()
def _onWebviewNav(self, event):
url = event.GetURL()
webbrowser.open(url)
def _determine_if_versions_match(self):
"""

View File

@@ -53,6 +53,7 @@ class DetectRootPatch:
self.legacy_keyboard_backlight = False
self.legacy_uhci_ohci = False
self.legacy_pcie_webcam = False
self.legacy_t1_chip = False
# Patch Requirements
self.amfi_must_disable = False
@@ -540,6 +541,10 @@ class DetectRootPatch:
if self.constants.detected_os >= os_data.os_data.sonoma:
self.legacy_pcie_webcam = self.constants.computer.pcie_webcam
self.legacy_t1_chip = self.constants.computer.t1_chip
if self.legacy_t1_chip is True:
self.amfi_must_disable = True
if self._check_uhci_ohci() is True:
self.legacy_uhci_ohci = True
@@ -622,6 +627,7 @@ class DetectRootPatch:
"Miscellaneous: Legacy Keyboard Backlight": self.legacy_keyboard_backlight,
"Miscellaneous: Legacy USB 1.1": self.legacy_uhci_ohci,
"Miscellaneous: PCIe FaceTime Camera": self.legacy_pcie_webcam,
"Miscellaneous: T1 Security Chip": self.legacy_t1_chip,
"Settings: Requires AMFI exemption": self.amfi_must_disable,
"Settings: Supports Auxiliary Cache": not self.requires_root_kc,
"Settings: Kernel Debug Kit missing": self.missing_kdk if self.constants.detected_os >= os_data.os_data.ventura.value else False,

View File

@@ -176,10 +176,14 @@ class GenerateRootPatchSets:
if self.hardware_details["Miscellaneous: Legacy USB 1.1"] is True:
required_patches.update({"Legacy USB 1.1": all_hardware_patchset["Miscellaneous"]["Legacy USB 1.1"]})
required_patches.update({"Legacy USB 1.1 Extended": all_hardware_patchset["Miscellaneous"]["Legacy USB 1.1 Extended"]})
if self.hardware_details["Miscellaneous: PCIe FaceTime Camera"] is True:
required_patches.update({"PCIe FaceTime Camera": all_hardware_patchset["Miscellaneous"]["PCIe FaceTime Camera"]})
if self.hardware_details["Miscellaneous: T1 Security Chip"] is True:
required_patches.update({"T1 Security Chip": all_hardware_patchset["Miscellaneous"]["T1 Security Chip"]})
if required_patches:
host_os_float = float(f"{self.constants.detected_os}.{self.constants.detected_os_minor}")

View File

@@ -60,8 +60,8 @@ def seconds_to_readable_time(seconds) -> str:
seconds = int(seconds)
time = ""
if seconds == 0:
return "0m "
if 0 <= seconds < 60:
return "Less than a minute "
if seconds < 0:
return "Indeterminate time "

View File

@@ -50,7 +50,7 @@ class DownloadFrame(wx.Frame):
title_label.SetFont(gui_support.font_factory(19, wx.FONTWEIGHT_BOLD))
title_label.Centre(wx.HORIZONTAL)
progress_bar = wx.Gauge(frame, range=100, pos=(-1, title_label.GetPosition()[1] + title_label.GetSize()[1] + 5), size=(300, 20))
progress_bar = wx.Gauge(frame, range=100, pos=(-1, title_label.GetPosition()[1] + title_label.GetSize()[1] + 5), size=(300, 20), style=wx.GA_SMOOTH|wx.GA_PROGRESS)
progress_bar.Centre(wx.HORIZONTAL)
label_amount = wx.StaticText(frame, label="Preparing download", pos=(-1, progress_bar.GetPosition()[1] + progress_bar.GetSize()[1]))
@@ -68,7 +68,9 @@ class DownloadFrame(wx.Frame):
self.download_obj.download()
while self.download_obj.is_active():
percentage: int = self.download_obj.get_percent()
percentage: int = round(self.download_obj.get_percent())
if percentage == 0:
percentage = 1
if percentage == -1:
amount_str = f"{utilities.human_fmt(self.download_obj.downloaded_file_size)} downloaded ({utilities.human_fmt(self.download_obj.get_speed())}/s)"

View File

@@ -1,5 +1,10 @@
# Generate GUI for main menu
# Portions of this file Copyright (c) 2023 Jazzzny
import wx
import wx.html2
import markdown2
import requests
import sys
import logging
import threading
@@ -271,7 +276,7 @@ class MainFrame(wx.Frame):
def _check_for_updates(self):
if self.constants.has_checked_updates is True:
return
ignore_updates = global_settings.GlobalEnviromentSettings().read_property("IgnoreAppUpdates")
if ignore_updates is True:
self.constants.ignore_updates = True
@@ -285,20 +290,8 @@ class MainFrame(wx.Frame):
version = dict["Version"]
logging.info(f"New version: {version}")
dialog = wx.MessageDialog(
parent=self,
message=f"Current Version: {self.constants.patcher_version}{' (Nightly)' if not self.constants.commit_info[0].startswith('refs/tags') else ''}\nNew version: {version}\nWould you like to update?",
caption="Update Available for OpenCore Legacy Patcher!",
style=wx.YES_NO | wx.CANCEL | wx.ICON_QUESTION
)
dialog.SetYesNoCancelLabels("Download and install", "Ignore", "View on Github")
response = dialog.ShowModal()
if response == wx.ID_YES:
wx.CallAfter(self.on_update, dict["Link"], version)
elif response == wx.ID_CANCEL:
webbrowser.open(dict["Github Link"])
wx.CallAfter(self.on_update, dict["Link"], version, dict["Github Link"])
def on_build_and_install(self, event: wx.Event = None):
self.Hide()
@@ -345,12 +338,90 @@ class MainFrame(wx.Frame):
screen_location=self.GetPosition()
)
def on_update(self, oclp_url: str, oclp_version: str):
gui_update.UpdateFrame(
def on_update(self, oclp_url: str, oclp_version: str, oclp_github_url: str):
ID_GITHUB = wx.NewId()
ID_UPDATE = wx.NewId()
url = "https://api.github.com/repos/dortania/OpenCore-Legacy-Patcher/releases/latest"
response = requests.get(url).json()
changelog = response["body"].split("## Asset Information")[0]
html_markdown = markdown2.markdown(changelog)
html_css = """
<style>
body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
line-height: 1.5;
font-size: 13px;
margin-top: 20px;
background-color: rgb(238,238,238);
}
h2 {
line-height: 0.5;
}
a {
color: -apple-system-control-accent;
}
@media (prefers-color-scheme: dark) {
body {
color: #fff;
background-color: rgb(47,47,47);
}
}
</style>
"""
frame = wx.Dialog(None, -1, title="", size=(600, 500))
frame.SetMinSize((600, 500))
frame.SetWindowStyle(wx.STAY_ON_TOP)
panel = wx.Panel(frame)
sizer = wx.BoxSizer(wx.VERTICAL)
sizer.AddSpacer(10)
self.title_text = wx.StaticText(panel, label="A new version of OpenCore Legacy Patcher is available!")
self.description = wx.StaticText(panel, label=f"OpenCore Legacy Patcher {oclp_version} is now available - You have {self.constants.patcher_version}. Would you like to update?")
self.title_text.SetFont(wx.Font(19, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, False, ".AppleSystemUIFont"))
self.description.SetFont(wx.Font(13, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, ".AppleSystemUIFont"))
self.web_view = wx.html2.WebView.New(panel, style=wx.BORDER_SUNKEN)
html_code = html_css+html_markdown.replace("<a href=", "<a target='_blank' href=")
self.web_view.SetPage(html_code, "")
self.web_view.Bind(wx.html2.EVT_WEBVIEW_NEWWINDOW, self._onWebviewNav)
self.web_view.EnableContextMenu(False)
self.close_button = wx.Button(panel, label="Dismiss")
self.close_button.Bind(wx.EVT_BUTTON, lambda event: frame.EndModal(wx.ID_CANCEL))
self.view_button = wx.Button(panel, ID_GITHUB, label="View on GitHub")
self.view_button.Bind(wx.EVT_BUTTON, lambda event: frame.EndModal(ID_GITHUB))
self.install_button = wx.Button(panel, label="Download and Install")
self.install_button.Bind(wx.EVT_BUTTON, lambda event: frame.EndModal(ID_UPDATE))
self.install_button.SetDefault()
buttonsizer = wx.BoxSizer(wx.HORIZONTAL)
buttonsizer.Add(self.close_button, 0, wx.ALIGN_CENTRE | wx.RIGHT, 5)
buttonsizer.Add(self.view_button, 0, wx.ALIGN_CENTRE | wx.LEFT|wx.RIGHT, 5)
buttonsizer.Add(self.install_button, 0, wx.ALIGN_CENTRE | wx.LEFT, 5)
sizer = wx.BoxSizer(wx.VERTICAL)
sizer.Add(self.title_text, 0, wx.ALIGN_CENTRE | wx.TOP, 20)
sizer.Add(self.description, 0, wx.ALIGN_CENTRE | wx.BOTTOM, 20)
sizer.Add(self.web_view, 1, wx.EXPAND | wx.LEFT|wx.RIGHT, 10)
sizer.Add(buttonsizer, 0, wx.ALIGN_RIGHT | wx.ALL, 20)
panel.SetSizer(sizer)
frame.Centre()
result = frame.ShowModal()
if result == ID_GITHUB:
webbrowser.open(oclp_github_url)
elif result == ID_UPDATE:
gui_update.UpdateFrame(
parent=self,
title=self.title,
global_constants=self.constants,
screen_location=self.GetPosition(),
url=oclp_url,
version_label=oclp_version
)
)
def _onWebviewNav(self, event):
url = event.GetURL()
webbrowser.open(url)