mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-19 13:46:05 +10:00
Add user-configurable OpenCore DEBUG builds
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
# OpenCore Legacy Patcher changelog
|
# OpenCore Legacy Patcher changelog
|
||||||
|
|
||||||
## 0.0.15
|
## 0.0.15
|
||||||
|
- Add user-configurable OpenCore DEBUG builds
|
||||||
|
|
||||||
## 0.0.14
|
## 0.0.14
|
||||||
- Enable ThirdPartyDrives to aid with hibernation on 3rd party SATA drives
|
- Enable ThirdPartyDrives to aid with hibernation on 3rd party SATA drives
|
||||||
|
|||||||
@@ -72,8 +72,10 @@ Current target:\t{self.constants.os_support}
|
|||||||
change_oc_menu = input("Enable OpenCore DEBUG mode(y/n): ")
|
change_oc_menu = input("Enable OpenCore DEBUG mode(y/n): ")
|
||||||
if change_oc_menu in {"y", "Y", "yes", "Yes"}:
|
if change_oc_menu in {"y", "Y", "yes", "Yes"}:
|
||||||
self.constants.opencore_debug = True
|
self.constants.opencore_debug = True
|
||||||
|
self.constants.opencore_build = "DEBUG"
|
||||||
elif change_oc_menu in {"n", "N", "no", "No"}:
|
elif change_oc_menu in {"n", "N", "no", "No"}:
|
||||||
self.constants.opencore_debug = False
|
self.constants.opencore_debug = False
|
||||||
|
self.constants.opencore_build = "RELEASE"
|
||||||
else:
|
else:
|
||||||
print("Invalid option")
|
print("Invalid option")
|
||||||
def change_kext(self):
|
def change_kext(self):
|
||||||
@@ -98,8 +100,7 @@ Current target:\t{self.constants.os_support}
|
|||||||
# TODO: Enable setting OS target when more OSes become supported by the patcher
|
# TODO: Enable setting OS target when more OSes become supported by the patcher
|
||||||
#[f"Change OS version:\t\tCurrently macOS {self.constants.os_support}", self.change_os],
|
#[f"Change OS version:\t\tCurrently macOS {self.constants.os_support}", self.change_os],
|
||||||
[f"Enable Verbose Mode:\tCurrently {self.constants.verbose_debug}", self.change_verbose],
|
[f"Enable Verbose Mode:\tCurrently {self.constants.verbose_debug}", self.change_verbose],
|
||||||
# TODO: Enable setting OC DEBUG when path handling for DEBUg files is resolved
|
[f"Enable OpenCore DEBUG:\tCurrently {self.constants.opencore_debug}", self.change_oc],
|
||||||
#[f"Enable OpenCore DEBUG:\tCurrently {self.constants.opencore_debug}", self.change_oc],
|
|
||||||
[f"Enable Kext DEBUG:\t\tCurrently {self.constants.kext_debug}", self.change_kext]
|
[f"Enable Kext DEBUG:\t\tCurrently {self.constants.kext_debug}", self.change_kext]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ class Constants:
|
|||||||
|
|
||||||
# Patcher Settings
|
# Patcher Settings
|
||||||
self.opencore_debug = False
|
self.opencore_debug = False
|
||||||
|
self.opencore_build = "RELEASE"
|
||||||
self.kext_debug = False
|
self.kext_debug = False
|
||||||
self.verbose_debug = True
|
self.verbose_debug = True
|
||||||
self.os_support = 11.0
|
self.os_support = 11.0
|
||||||
@@ -49,7 +50,7 @@ class Constants:
|
|||||||
# Payload Location
|
# Payload Location
|
||||||
# OpenCore
|
# OpenCore
|
||||||
@property
|
@property
|
||||||
def opencore_zip_source(self): return self.payload_path / Path(f"OpenCore/OpenCore-v{self.opencore_version}.zip")
|
def opencore_zip_source(self): return self.payload_path / Path(f"OpenCore/OpenCore-{self.opencore_build}-v{self.opencore_version}.zip")
|
||||||
@property
|
@property
|
||||||
def plist_template(self): return self.payload_path / Path(f"Config/v{self.opencore_version}/config.plist")
|
def plist_template(self): return self.payload_path / Path(f"Config/v{self.opencore_version}/config.plist")
|
||||||
|
|
||||||
@@ -103,9 +104,9 @@ class Constants:
|
|||||||
@property
|
@property
|
||||||
def build_path(self): return self.current_path / Path("Build-Folder/")
|
def build_path(self): return self.current_path / Path("Build-Folder/")
|
||||||
@property
|
@property
|
||||||
def opencore_release_folder(self): return self.build_path / Path(f"OpenCore-v{self.opencore_version}")
|
def opencore_release_folder(self): return self.build_path / Path(f"OpenCore-{self.opencore_build}-v{self.opencore_version}")
|
||||||
@property
|
@property
|
||||||
def opencore_zip_copied(self): return self.build_path / Path(f"OpenCore-v{self.opencore_version}.zip")
|
def opencore_zip_copied(self): return self.build_path / Path(f"OpenCore-{self.opencore_build}-v{self.opencore_version}.zip")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def oc_folder(self): return self.opencore_release_folder / Path("EFI/OC/")
|
def oc_folder(self): return self.opencore_release_folder / Path("EFI/OC/")
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ class BuildOpenCore:
|
|||||||
shutil.rmtree(self.constants.opencore_release_folder, onerror=rmtree_handler)
|
shutil.rmtree(self.constants.opencore_release_folder, onerror=rmtree_handler)
|
||||||
|
|
||||||
print()
|
print()
|
||||||
print("- Adding OpenCore v" + self.constants.opencore_version)
|
print(f"- Adding OpenCore v{self.constants.opencore_version} {self.constants.opencore_build}")
|
||||||
shutil.copy(self.constants.opencore_zip_source, self.constants.build_path)
|
shutil.copy(self.constants.opencore_zip_source, self.constants.build_path)
|
||||||
zipfile.ZipFile(self.constants.opencore_zip_copied).extractall(self.constants.build_path)
|
zipfile.ZipFile(self.constants.opencore_zip_copied).extractall(self.constants.build_path)
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ class BuildOpenCore:
|
|||||||
|
|
||||||
# Set revision in config
|
# Set revision in config
|
||||||
self.config["#Revision"]["Build-Version"] = f"{self.constants.patcher_version} - {date.today()}"
|
self.config["#Revision"]["Build-Version"] = f"{self.constants.patcher_version} - {date.today()}"
|
||||||
self.config["#Revision"]["OpenCore-Version"] = f"{self.constants.opencore_version} - {self.constants.opencore_commit}"
|
self.config["#Revision"]["OpenCore-Version"] = f"{self.constants.opencore_version} - {self.constants.opencore_build} - {self.constants.opencore_commit}"
|
||||||
self.config["#Revision"]["Original-Model"] = self.model
|
self.config["#Revision"]["Original-Model"] = self.model
|
||||||
|
|
||||||
for name, version, path, check in [
|
for name, version, path, check in [
|
||||||
|
|||||||
BIN
payloads/OpenCore/OpenCore-DEBUG-v0.6.8.zip
Normal file
BIN
payloads/OpenCore/OpenCore-DEBUG-v0.6.8.zip
Normal file
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user