mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-24 20:10:14 +10:00
Further modularize sys_patch
This commit is contained in:
@@ -12,7 +12,7 @@ from Cocoa import NSApp, NSApplication
|
||||
|
||||
from .. import constants
|
||||
|
||||
from ..sys_patch import sys_patch_detect
|
||||
from ..sys_patch.detections import DetectRootPatch
|
||||
|
||||
from ..wx_gui import (
|
||||
gui_cache_os_update,
|
||||
@@ -64,7 +64,7 @@ class EntryPoint:
|
||||
|
||||
if "--gui_patch" in sys.argv or "--gui_unpatch" in sys.argv or start_patching is True :
|
||||
entry = gui_sys_patch_start.SysPatchStartFrame
|
||||
patches = sys_patch_detect.DetectRootPatch(self.constants.computer.real_model, self.constants).detect_patch_set()
|
||||
patches = DetectRootPatch(self.constants.computer.real_model, self.constants).detect_patch_set()
|
||||
|
||||
logging.info(f"Entry point set: {entry.__name__}")
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ from pathlib import Path
|
||||
|
||||
from .. import constants
|
||||
|
||||
from ..sys_patch import sys_patch_detect
|
||||
from ..sys_patch.detections import DetectRootPatch
|
||||
|
||||
from ..wx_gui import (
|
||||
gui_main_menu,
|
||||
@@ -86,7 +86,7 @@ class SysPatchDisplayFrame(wx.Frame):
|
||||
patches: dict = {}
|
||||
def _fetch_patches(self) -> None:
|
||||
nonlocal patches
|
||||
patches = sys_patch_detect.DetectRootPatch(self.constants.computer.real_model, self.constants).detect_patch_set()
|
||||
patches = DetectRootPatch(self.constants.computer.real_model, self.constants).detect_patch_set()
|
||||
|
||||
thread = threading.Thread(target=_fetch_patches, args=(self,))
|
||||
thread.start()
|
||||
|
||||
@@ -20,7 +20,6 @@ from ..support import kdk_handler
|
||||
|
||||
from ..sys_patch import (
|
||||
sys_patch,
|
||||
sys_patch_detect
|
||||
)
|
||||
from ..wx_gui import (
|
||||
gui_main_menu,
|
||||
@@ -28,6 +27,8 @@ from ..wx_gui import (
|
||||
gui_download,
|
||||
)
|
||||
|
||||
from ..sys_patch.detections import DetectRootPatch
|
||||
|
||||
|
||||
|
||||
class SysPatchStartFrame(wx.Frame):
|
||||
@@ -50,7 +51,7 @@ class SysPatchStartFrame(wx.Frame):
|
||||
self.Centre()
|
||||
|
||||
if self.patches == {}:
|
||||
self.patches = sys_patch_detect.DetectRootPatch(self.constants.computer.real_model, self.constants).detect_patch_set()
|
||||
self.patches = DetectRootPatch(self.constants.computer.real_model, self.constants).detect_patch_set()
|
||||
|
||||
|
||||
def _kdk_download(self, frame: wx.Frame = None) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user