diff --git a/gui/gui_main.py b/gui/gui_main.py index 8feeff773..570663de7 100644 --- a/gui/gui_main.py +++ b/gui/gui_main.py @@ -1248,30 +1248,33 @@ class wx_python_gui: if self.constants.root_patcher_succeeded is True: print("- Root Patcher finished successfully") if self.constants.needs_to_open_preferences is True: - # Create dialog box to open System Preferences -> Security and Privacy - self.popup = wx.MessageDialog( - self.frame_modal, - "We just finished installing the patches to your Root Volume!\n\nHowever, Apple requires users to manually approve the kernel extensions installed before they can be used next reboot.\n\nWould you like to open System Preferences?", - "Open System Preferences?", - wx.YES_NO | wx.ICON_INFORMATION - ) - self.popup.SetYesNoLabels("Open System Preferences", "Ignore") - answer = self.popup.ShowModal() - if answer == wx.ID_YES: - output =subprocess.run( - [ - "osascript", "-e", - 'tell app "System Preferences" to activate', - "-e", 'tell app "System Preferences" to reveal anchor "General" of pane id "com.apple.preference.security"', - ], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE + if self.constants.detected_os >= os_data.os_data.ventura: + self.reboot_system(message="Root Patcher finished successfully!\nIf you were prompted to open System Preferences to authorize new kexts, this can be ignored. Your system is ready once restarted.\n\nWould you like to reboot now?") + else: + # Create dialog box to open System Preferences -> Security and Privacy + self.popup = wx.MessageDialog( + self.frame_modal, + "We just finished installing the patches to your Root Volume!\n\nHowever, Apple requires users to manually approve the kernel extensions installed before they can be used next reboot.\n\nWould you like to open System Preferences?", + "Open System Preferences?", + wx.YES_NO | wx.ICON_INFORMATION ) - if output.returncode != 0: - # Some form of fallback if unaccelerated state errors out - subprocess.run(["open", "-a", "System Preferences"]) - time.sleep(5) - self.OnCloseFrame(None) + self.popup.SetYesNoLabels("Open System Preferences", "Ignore") + answer = self.popup.ShowModal() + if answer == wx.ID_YES: + output =subprocess.run( + [ + "osascript", "-e", + 'tell app "System Preferences" to activate', + "-e", 'tell app "System Preferences" to reveal anchor "General" of pane id "com.apple.preference.security"', + ], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE + ) + if output.returncode != 0: + # Some form of fallback if unaccelerated state errors out + subprocess.run(["open", "-a", "System Preferences"]) + time.sleep(5) + self.OnCloseFrame(None) else: self.reboot_system(message="Root Patcher finished successfully\nWould you like to reboot now?") self.return_to_main_menu.Enable()