mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-14 04:38:20 +10:00
Fix debug logic
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user