mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-24 12:00:15 +10:00
Support crash logging in CLI code
This commit is contained in:
@@ -48,7 +48,7 @@ class CreateBinary:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
os.chdir(Path(__file__).resolve().parent)
|
os.chdir(Path(__file__).resolve().parent)
|
||||||
print(f"Current Working Directory: \n\t{os.getcwd()}")
|
print(f"Current Working Directory:\n- {os.getcwd()}")
|
||||||
|
|
||||||
|
|
||||||
def _parse_arguments(self):
|
def _parse_arguments(self):
|
||||||
|
|||||||
@@ -213,6 +213,7 @@ class InitializeLoggingSupport:
|
|||||||
self._display_debug_properties()
|
self._display_debug_properties()
|
||||||
|
|
||||||
if self.constants.cli_mode is True:
|
if self.constants.cli_mode is True:
|
||||||
|
threading.Thread(target=analytics_handler.Analytics(self.constants).send_crash_report, args=(self.log_filepath,)).start()
|
||||||
return
|
return
|
||||||
|
|
||||||
error_msg = f"OpenCore Legacy Patcher encountered the following internal error:\n\n"
|
error_msg = f"OpenCore Legacy Patcher encountered the following internal error:\n\n"
|
||||||
|
|||||||
@@ -52,6 +52,10 @@ class EntryPoint:
|
|||||||
patches = sys_patch_detect.DetectRootPatch(self.constants.computer.real_model, self.constants).detect_patch_set()
|
patches = sys_patch_detect.DetectRootPatch(self.constants.computer.real_model, self.constants).detect_patch_set()
|
||||||
|
|
||||||
logging.info(f"Entry point set: {entry.__name__}")
|
logging.info(f"Entry point set: {entry.__name__}")
|
||||||
|
|
||||||
|
# Normally set by main.py, but transitions from CLI mode may not have this set
|
||||||
|
self.constants.gui_mode = True
|
||||||
|
|
||||||
self.frame: wx.Frame = entry(
|
self.frame: wx.Frame = entry(
|
||||||
None,
|
None,
|
||||||
title=f"{self.constants.patcher_name} ({self.constants.patcher_version})",
|
title=f"{self.constants.patcher_name} ({self.constants.patcher_version})",
|
||||||
|
|||||||
@@ -52,6 +52,9 @@ class UpdateFrame(wx.Frame):
|
|||||||
version_label = dict[key]["Version"]
|
version_label = dict[key]["Version"]
|
||||||
url = dict[key]["Link"]
|
url = dict[key]["Link"]
|
||||||
break
|
break
|
||||||
|
else:
|
||||||
|
wx.MessageBox("Failed to get update info", "Critical Error")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
self.version_label = version_label
|
self.version_label = version_label
|
||||||
self.url = url
|
self.url = url
|
||||||
|
|||||||
Reference in New Issue
Block a user