mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-19 13:46:05 +10:00
sys_patch_helpers: Write KDK used to patchset plist
This commit is contained in:
@@ -348,7 +348,7 @@ class PatchSysVolume:
|
|||||||
destination_path = f"{self.mount_location}/System/Library/CoreServices"
|
destination_path = f"{self.mount_location}/System/Library/CoreServices"
|
||||||
file_name = "OpenCore-Legacy-Patcher.plist"
|
file_name = "OpenCore-Legacy-Patcher.plist"
|
||||||
destination_path_file = f"{destination_path}/{file_name}"
|
destination_path_file = f"{destination_path}/{file_name}"
|
||||||
if sys_patch_helpers.sys_patch_helpers(self.constants).generate_patchset_plist(patchset, file_name):
|
if sys_patch_helpers.sys_patch_helpers(self.constants).generate_patchset_plist(patchset, file_name, self.kdk_path):
|
||||||
print("- Writing patchset information to Root Volume")
|
print("- Writing patchset information to Root Volume")
|
||||||
if Path(destination_path_file).exists():
|
if Path(destination_path_file).exists():
|
||||||
utilities.process_status(utilities.elevated(["rm", destination_path_file], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
utilities.process_status(utilities.elevated(["rm", destination_path_file], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||||
|
|||||||
@@ -51,15 +51,20 @@ class sys_patch_helpers:
|
|||||||
raise Exception("Failed to find AppleIntelSNBGraphicsFB.kext, cannot patch!!!")
|
raise Exception("Failed to find AppleIntelSNBGraphicsFB.kext, cannot patch!!!")
|
||||||
|
|
||||||
|
|
||||||
def generate_patchset_plist(self, patchset, file_name):
|
def generate_patchset_plist(self, patchset, file_name, kdk_used):
|
||||||
source_path = f"{self.constants.payload_path}"
|
source_path = f"{self.constants.payload_path}"
|
||||||
source_path_file = f"{source_path}/{file_name}"
|
source_path_file = f"{source_path}/{file_name}"
|
||||||
|
|
||||||
|
kdk_string = "Not applicable"
|
||||||
|
if kdk_used:
|
||||||
|
kdk_string = kdk_used
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
"OpenCore Legacy Patcher": f"v{self.constants.patcher_version}",
|
"OpenCore Legacy Patcher": f"v{self.constants.patcher_version}",
|
||||||
"PatcherSupportPkg": f"v{self.constants.patcher_support_pkg_version}",
|
"PatcherSupportPkg": f"v{self.constants.patcher_support_pkg_version}",
|
||||||
"Time Patched": f"{datetime.now().strftime('%B %d, %Y @ %H:%M:%S')}",
|
"Time Patched": f"{datetime.now().strftime('%B %d, %Y @ %H:%M:%S')}",
|
||||||
"Commit URL": f"{self.constants.commit_info[2]}"
|
"Commit URL": f"{self.constants.commit_info[2]}",
|
||||||
|
"Kernel Debug Kit Used": f"{kdk_string}",
|
||||||
}
|
}
|
||||||
data.update(patchset)
|
data.update(patchset)
|
||||||
if Path(source_path_file).exists():
|
if Path(source_path_file).exists():
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ def validate(settings):
|
|||||||
raise Exception(f"Failed to find {source_file}")
|
raise Exception(f"Failed to find {source_file}")
|
||||||
|
|
||||||
print(f"- Validating against Darwin {major_kernel}.{minor_kernel}")
|
print(f"- Validating against Darwin {major_kernel}.{minor_kernel}")
|
||||||
if not sys_patch_helpers.sys_patch_helpers(settings).generate_patchset_plist(patchset, f"OpenCore-Legacy-Patcher-{major_kernel}.{minor_kernel}.plist"):
|
if not sys_patch_helpers.sys_patch_helpers(settings).generate_patchset_plist(patchset, f"OpenCore-Legacy-Patcher-{major_kernel}.{minor_kernel}.plist", None):
|
||||||
raise Exception("Failed to generate patchset plist")
|
raise Exception("Failed to generate patchset plist")
|
||||||
|
|
||||||
# Remove the plist file after validation
|
# Remove the plist file after validation
|
||||||
|
|||||||
Reference in New Issue
Block a user