mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-23 19:40:15 +10:00
Remove stop gap “supports_privileged_helper()” code
Intended to handle transition better, now that it’s complete the code is no longer required
This commit is contained in:
@@ -1325,21 +1325,15 @@ Hardware Information:
|
||||
raise Exception("Test Exception")
|
||||
|
||||
def on_mount_root_vol(self, event: wx.Event) -> None:
|
||||
if os.geteuid() != 0 and subprocess_wrapper.supports_privileged_helper() is False:
|
||||
wx.MessageDialog(self.parent, "Please relaunch as Root to mount the Root Volume", "Error", wx.OK | wx.ICON_ERROR).ShowModal()
|
||||
#Don't need to pass model as we're bypassing all logic
|
||||
if sys_patch.PatchSysVolume("",self.constants)._mount_root_vol() == True:
|
||||
wx.MessageDialog(self.parent, "Root Volume Mounted, remember to fix permissions before saving the Root Volume", "Success", wx.OK | wx.ICON_INFORMATION).ShowModal()
|
||||
else:
|
||||
#Don't need to pass model as we're bypassing all logic
|
||||
if sys_patch.PatchSysVolume("",self.constants)._mount_root_vol() == True:
|
||||
wx.MessageDialog(self.parent, "Root Volume Mounted, remember to fix permissions before saving the Root Volume", "Success", wx.OK | wx.ICON_INFORMATION).ShowModal()
|
||||
else:
|
||||
wx.MessageDialog(self.parent, "Root Volume Mount Failed, check terminal output", "Error", wx.OK | wx.ICON_ERROR).ShowModal()
|
||||
wx.MessageDialog(self.parent, "Root Volume Mount Failed, check terminal output", "Error", wx.OK | wx.ICON_ERROR).ShowModal()
|
||||
|
||||
def on_bless_root_vol(self, event: wx.Event) -> None:
|
||||
if os.geteuid() != 0 and subprocess_wrapper.supports_privileged_helper() is False:
|
||||
wx.MessageDialog(self.parent, "Please relaunch as Root to save changes", "Error", wx.OK | wx.ICON_ERROR).ShowModal()
|
||||
#Don't need to pass model as we're bypassing all logic
|
||||
if sys_patch.PatchSysVolume("",self.constants)._rebuild_root_volume() == True:
|
||||
wx.MessageDialog(self.parent, "Root Volume saved, please reboot to apply changes", "Success", wx.OK | wx.ICON_INFORMATION).ShowModal()
|
||||
else:
|
||||
#Don't need to pass model as we're bypassing all logic
|
||||
if sys_patch.PatchSysVolume("",self.constants)._rebuild_root_volume() == True:
|
||||
wx.MessageDialog(self.parent, "Root Volume saved, please reboot to apply changes", "Success", wx.OK | wx.ICON_INFORMATION).ShowModal()
|
||||
else:
|
||||
wx.MessageDialog(self.parent, "Root Volume update Failed, check terminal output", "Error", wx.OK | wx.ICON_ERROR).ShowModal()
|
||||
wx.MessageDialog(self.parent, "Root Volume update Failed, check terminal output", "Error", wx.OK | wx.ICON_ERROR).ShowModal()
|
||||
@@ -66,8 +66,6 @@ class GenerateMenubar:
|
||||
|
||||
aboutItem = fileMenu.Append(wx.ID_ABOUT, "&About OpenCore Legacy Patcher")
|
||||
fileMenu.AppendSeparator()
|
||||
relaunchItem = fileMenu.Append(wx.ID_ANY, "&Relaunch as Root")
|
||||
fileMenu.AppendSeparator()
|
||||
revealLogItem = fileMenu.Append(wx.ID_ANY, "&Reveal Log File")
|
||||
|
||||
menubar.Append(fileMenu, "&File")
|
||||
@@ -76,9 +74,6 @@ class GenerateMenubar:
|
||||
self.frame.Bind(wx.EVT_MENU, lambda event: gui_about.AboutFrame(self.constants), aboutItem)
|
||||
self.frame.Bind(wx.EVT_MENU, lambda event: subprocess.run(["/usr/bin/open", "--reveal", self.constants.log_filepath]), revealLogItem)
|
||||
|
||||
if os.geteuid() == 0 or subprocess_wrapper.supports_privileged_helper() is True:
|
||||
relaunchItem.Enable(False)
|
||||
|
||||
|
||||
class GaugePulseCallback:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user