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

View File

@@ -11,6 +11,7 @@
- Add `OpenLegacyBoot.efi` for Macs with CSM
- Allows for booting CSM-based OSes (ex. Windows 7)
- Applicable for Ivy Bridge and older Macs (excluding MacPro6,1)
- Resolve incorrect RELEASE usage of OpenCore binaries when DEBUG enabled
- Implement basic support for macOS Sonoma:
- Supports same range of hardware as Ventura, in addition to:
- iMac18,x

View File

@@ -2360,8 +2360,8 @@
<true/>
<key>HideAuxiliary</key>
<true/>
<key>InstanceIdentifier</key>
<string></string>
<!-- <key>InstanceIdentifier</key>
<string></string> -->
<key>LauncherPath</key>
<string>Default</string>
<key>LauncherOption</key>
@@ -3066,8 +3066,8 @@
<integer>-1</integer>
<key>ResizeUsePciRbIo</key>
<false/>
<key>ShimRetainProtocol</key>
<false/>
<!-- <key>ShimRetainProtocol</key>
<false/> -->
<key>TscSyncTimeout</key>
<integer>0</integer>
<key>UnblockFsConnect</key>

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")

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

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):

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