Fix debug logic

This commit is contained in:
Mykola Grymalyuk
2023-09-28 09:43:29 -06:00
parent 8db6085ed1
commit 2fc21e6f07
6 changed files with 9 additions and 11 deletions
-1
View File
@@ -119,7 +119,6 @@ If you plan to create the USB for another machine, please select the "Change Mod
if self.args.debug_oc:
logging.info("- Set OpenCore DEBUG configuration")
self.constants.opencore_debug = True
self.constants.opencore_build = "DEBUG"
if self.args.debug_kext:
logging.info("- Set kext DEBUG configuration")
+2 -2
View File
@@ -92,7 +92,7 @@ class BuildOpenCore:
shutil.rmtree(self.constants.opencore_release_folder, onerror=rmtree_handler, ignore_errors=True)
logging.info("")
logging.info(f"- Adding OpenCore v{self.constants.opencore_version} {self.constants.opencore_build}")
logging.info(f"- Adding OpenCore v{self.constants.opencore_version} {'DEBUG' if self.constants.opencore_debug is True else 'RELEASE'}")
shutil.copy(self.constants.opencore_zip_source, self.constants.build_path)
zipfile.ZipFile(self.constants.opencore_zip_copied).extractall(self.constants.build_path)
@@ -115,7 +115,7 @@ class BuildOpenCore:
self.config["#Revision"]["Hardware-Probe"] = pickle.dumps(computer_copy)
else:
self.config["#Revision"]["Build-Type"] = "OpenCore Built for External Machine"
self.config["#Revision"]["OpenCore-Version"] = f"{self.constants.opencore_version} - {self.constants.opencore_build}"
self.config["#Revision"]["OpenCore-Version"] = f"{self.constants.opencore_version} - {'DEBUG' if self.constants.opencore_debug is True else 'RELEASE'}"
self.config["#Revision"]["Original-Model"] = self.model
self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Version"] = f"{self.constants.patcher_version}"
self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Model"] = self.model
+2 -3
View File
@@ -162,7 +162,6 @@ class Constants:
self.showpicker: bool = True # Show or Hide OpenCore's Boot Picker
self.nvram_write: bool = True # Write to hardware NVRAM
self.oc_timeout: int = 5 # Set OpenCore timeout
self.opencore_build: str = "RELEASE"
## Kext Settings
self.kext_debug: bool = False # Enables Lilu debug and DebugEnhancer
@@ -273,7 +272,7 @@ class Constants:
# OpenCore
@property
def opencore_zip_source(self):
return self.payload_path / Path(f"OpenCore/OpenCore-{self.opencore_build}.zip")
return self.payload_path / Path(f"OpenCore/OpenCore-{'DEBUG' if self.opencore_debug is True else 'RELEASE'}.zip")
@property
def plist_template(self):
@@ -615,7 +614,7 @@ class Constants:
@property
def opencore_zip_copied(self):
return self.build_path / Path(f"OpenCore-{self.opencore_build}.zip")
return self.build_path / Path(f"OpenCore-{'DEBUG' if self.opencore_debug is True else 'RELEASE'}.zip")
@property
def oc_folder(self):
-1
View File
@@ -205,7 +205,6 @@ class PatcherValidation:
# Second run, flip all settings
self.constants.verbose_debug = True
self.constants.opencore_debug = True
self.constants.opencore_build = "DEBUG"
self.constants.kext_debug = True
self.constants.kext_variant = "DEBUG"
self.constants.kext_debug = True