mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-13 20:28:21 +10:00
os_probe: Add RSR handling
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
- 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
|
||||
- Increment Binaries:
|
||||
- OpenCorePkg 0.8.7 - release
|
||||
- FeatureUnlock 1.1.2 - rolling (94e29ce)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
import platform
|
||||
import subprocess
|
||||
import plistlib
|
||||
|
||||
|
||||
def detect_kernel_major():
|
||||
@@ -25,4 +26,10 @@ def detect_os_version():
|
||||
def detect_os_build():
|
||||
# Return OS build
|
||||
# Example Output: 21A5522h (string)
|
||||
return subprocess.run("sw_vers -buildVersion".split(), stdout=subprocess.PIPE).stdout.decode().strip()
|
||||
|
||||
# With macOS 13.2, Apple implemented the Rapid Security Response system which
|
||||
# will change the reported build to the RSR version and not the original host
|
||||
# To get the proper versions:
|
||||
# - Host: /System/Library/CoreServices/SystemVersion.plist
|
||||
# - RSR: /System/Volumes/Preboot/Cryptexes/OS/System/Library/CoreServices/SystemVersion.plist
|
||||
return plistlib.load(open("/System/Library/CoreServices/SystemVersion.plist", "rb"))["ProductBuildVersion"]
|
||||
|
||||
Reference in New Issue
Block a user