mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-17 21:24:40 +10:00
wx_gui: Destroy frame on root patching
This commit is contained in:
@@ -920,13 +920,16 @@ class PatchSysVolume:
|
||||
return
|
||||
|
||||
logging.info("- Verifying whether Root Patching possible")
|
||||
if sys_patch_detect.DetectRootPatch(self.computer.real_model, self.constants).verify_patch_allowed(print_errors=not self.constants.wxpython_variant) is True:
|
||||
logging.info("- Patcher is capable of patching")
|
||||
if self._check_files():
|
||||
if self._mount_root_vol() is True:
|
||||
self._patch_root_vol()
|
||||
else:
|
||||
logging.info("- Recommend rebooting the machine and trying to patch again")
|
||||
if sys_patch_detect.DetectRootPatch(self.computer.real_model, self.constants).verify_patch_allowed(print_errors=not self.constants.wxpython_variant) is False:
|
||||
logging.error("- Cannot continue with patching!!!")
|
||||
return
|
||||
|
||||
logging.info("- Patcher is capable of patching")
|
||||
if self._check_files():
|
||||
if self._mount_root_vol() is True:
|
||||
self._patch_root_vol()
|
||||
else:
|
||||
logging.info("- Recommend rebooting the machine and trying to patch again")
|
||||
|
||||
|
||||
def start_unpatch(self) -> None:
|
||||
@@ -935,8 +938,11 @@ class PatchSysVolume:
|
||||
"""
|
||||
|
||||
logging.info("- Starting Unpatch Process")
|
||||
if sys_patch_detect.DetectRootPatch(self.computer.real_model, self.constants).verify_patch_allowed(print_errors=True) is True:
|
||||
if self._mount_root_vol() is True:
|
||||
self._unpatch_root_vol()
|
||||
else:
|
||||
logging.info("- Recommend rebooting the machine and trying to patch again")
|
||||
if sys_patch_detect.DetectRootPatch(self.computer.real_model, self.constants).verify_patch_allowed(print_errors=True) is False:
|
||||
logging.error("- Cannot continue with unpatching!!!")
|
||||
return
|
||||
|
||||
if self._mount_root_vol() is True:
|
||||
self._unpatch_root_vol()
|
||||
else:
|
||||
logging.info("- Recommend rebooting the machine and trying to patch again")
|
||||
|
||||
@@ -33,6 +33,9 @@ class SysPatchMount:
|
||||
If none, failed to mount.
|
||||
"""
|
||||
result = self._mount_root_volume()
|
||||
if result is None:
|
||||
logging.error("Failed to mount root volume")
|
||||
return None
|
||||
if not Path(result).exists():
|
||||
logging.error(f"Attempted to mount root volume, but failed: {result}")
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user