mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-20 22:20:53 +10:00
sys_patch_helpers: Add Commit URL to patch file
This commit is contained in:
@@ -482,6 +482,7 @@ class Computer:
|
|||||||
secure_boot_policy: Optional[int] = None
|
secure_boot_policy: Optional[int] = None
|
||||||
oclp_sys_version: Optional[str] = None
|
oclp_sys_version: Optional[str] = None
|
||||||
oclp_sys_date: Optional[str] = None
|
oclp_sys_date: Optional[str] = None
|
||||||
|
oclp_sys_url: Optional[str] = None
|
||||||
firmware_vendor: Optional[str] = None
|
firmware_vendor: Optional[str] = None
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@@ -756,8 +757,9 @@ class Computer:
|
|||||||
if path.exists():
|
if path.exists():
|
||||||
sys_plist = plistlib.load(path.open("rb"))
|
sys_plist = plistlib.load(path.open("rb"))
|
||||||
if sys_plist:
|
if sys_plist:
|
||||||
try:
|
if "OpenCore Legacy Patcher" in sys_plist:
|
||||||
self.oclp_sys_version = sys_plist["OpenCore Legacy Patcher"]
|
self.oclp_sys_version = sys_plist["OpenCore Legacy Patcher"]
|
||||||
|
if "Time Patched" in sys_plist:
|
||||||
self.oclp_sys_date = sys_plist["Time Patched"]
|
self.oclp_sys_date = sys_plist["Time Patched"]
|
||||||
except KeyError:
|
if "Commit URL" in sys_plist:
|
||||||
pass
|
self.oclp_sys_url = sys_plist["Commit URL"]
|
||||||
@@ -56,6 +56,7 @@ class sys_patch_helpers:
|
|||||||
"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]}"
|
||||||
}
|
}
|
||||||
data.update(patchset)
|
data.update(patchset)
|
||||||
if Path(source_path_file).exists():
|
if Path(source_path_file).exists():
|
||||||
|
|||||||
Reference in New Issue
Block a user