mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-21 06:30:52 +10:00
Fix debug logic
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
- Add `OpenLegacyBoot.efi` for Macs with CSM
|
- Add `OpenLegacyBoot.efi` for Macs with CSM
|
||||||
- Allows for booting CSM-based OSes (ex. Windows 7)
|
- Allows for booting CSM-based OSes (ex. Windows 7)
|
||||||
- Applicable for Ivy Bridge and older Macs (excluding MacPro6,1)
|
- 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:
|
- Implement basic support for macOS Sonoma:
|
||||||
- Supports same range of hardware as Ventura, in addition to:
|
- Supports same range of hardware as Ventura, in addition to:
|
||||||
- iMac18,x
|
- iMac18,x
|
||||||
|
|||||||
@@ -2360,8 +2360,8 @@
|
|||||||
<true/>
|
<true/>
|
||||||
<key>HideAuxiliary</key>
|
<key>HideAuxiliary</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>InstanceIdentifier</key>
|
<!-- <key>InstanceIdentifier</key>
|
||||||
<string></string>
|
<string></string> -->
|
||||||
<key>LauncherPath</key>
|
<key>LauncherPath</key>
|
||||||
<string>Default</string>
|
<string>Default</string>
|
||||||
<key>LauncherOption</key>
|
<key>LauncherOption</key>
|
||||||
@@ -3066,8 +3066,8 @@
|
|||||||
<integer>-1</integer>
|
<integer>-1</integer>
|
||||||
<key>ResizeUsePciRbIo</key>
|
<key>ResizeUsePciRbIo</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>ShimRetainProtocol</key>
|
<!-- <key>ShimRetainProtocol</key>
|
||||||
<false/>
|
<false/> -->
|
||||||
<key>TscSyncTimeout</key>
|
<key>TscSyncTimeout</key>
|
||||||
<integer>0</integer>
|
<integer>0</integer>
|
||||||
<key>UnblockFsConnect</key>
|
<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:
|
if self.args.debug_oc:
|
||||||
logging.info("- Set OpenCore DEBUG configuration")
|
logging.info("- Set OpenCore DEBUG configuration")
|
||||||
self.constants.opencore_debug = True
|
self.constants.opencore_debug = True
|
||||||
self.constants.opencore_build = "DEBUG"
|
|
||||||
|
|
||||||
if self.args.debug_kext:
|
if self.args.debug_kext:
|
||||||
logging.info("- Set kext DEBUG configuration")
|
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)
|
shutil.rmtree(self.constants.opencore_release_folder, onerror=rmtree_handler, ignore_errors=True)
|
||||||
|
|
||||||
logging.info("")
|
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)
|
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)
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ class BuildOpenCore:
|
|||||||
self.config["#Revision"]["Hardware-Probe"] = pickle.dumps(computer_copy)
|
self.config["#Revision"]["Hardware-Probe"] = pickle.dumps(computer_copy)
|
||||||
else:
|
else:
|
||||||
self.config["#Revision"]["Build-Type"] = "OpenCore Built for External Machine"
|
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["#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-Version"] = f"{self.constants.patcher_version}"
|
||||||
self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Model"] = self.model
|
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.showpicker: bool = True # Show or Hide OpenCore's Boot Picker
|
||||||
self.nvram_write: bool = True # Write to hardware NVRAM
|
self.nvram_write: bool = True # Write to hardware NVRAM
|
||||||
self.oc_timeout: int = 5 # Set OpenCore timeout
|
self.oc_timeout: int = 5 # Set OpenCore timeout
|
||||||
self.opencore_build: str = "RELEASE"
|
|
||||||
|
|
||||||
## Kext Settings
|
## Kext Settings
|
||||||
self.kext_debug: bool = False # Enables Lilu debug and DebugEnhancer
|
self.kext_debug: bool = False # Enables Lilu debug and DebugEnhancer
|
||||||
@@ -273,7 +272,7 @@ class Constants:
|
|||||||
# OpenCore
|
# OpenCore
|
||||||
@property
|
@property
|
||||||
def opencore_zip_source(self):
|
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
|
@property
|
||||||
def plist_template(self):
|
def plist_template(self):
|
||||||
@@ -615,7 +614,7 @@ class Constants:
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def opencore_zip_copied(self):
|
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
|
@property
|
||||||
def oc_folder(self):
|
def oc_folder(self):
|
||||||
|
|||||||
@@ -205,7 +205,6 @@ class PatcherValidation:
|
|||||||
# Second run, flip all settings
|
# Second run, flip all settings
|
||||||
self.constants.verbose_debug = True
|
self.constants.verbose_debug = True
|
||||||
self.constants.opencore_debug = True
|
self.constants.opencore_debug = True
|
||||||
self.constants.opencore_build = "DEBUG"
|
|
||||||
self.constants.kext_debug = True
|
self.constants.kext_debug = True
|
||||||
self.constants.kext_variant = "DEBUG"
|
self.constants.kext_variant = "DEBUG"
|
||||||
self.constants.kext_debug = True
|
self.constants.kext_debug = True
|
||||||
|
|||||||
Reference in New Issue
Block a user