diff --git a/gui/gui_main.py b/gui/gui_main.py index bdad30395..f0a6c7e75 100644 --- a/gui/gui_main.py +++ b/gui/gui_main.py @@ -180,7 +180,7 @@ class wx_python_gui: threading.Thread(target=self.check_for_updates).start() def check_for_updates(self, event=None): - ignore_updates = subprocess.run(["defaults", "read", "com.dortania.opencore-legacy-patcher", "IgnoreAppUpdates"], capture_output=True).stdout.decode("utf-8").strip() + ignore_updates = subprocess.run(["defaults", "read", "~/Library/Preferences/com.dortania.opencore-legacy-patcher", "IgnoreAppUpdates"], capture_output=True).stdout.decode("utf-8").strip() if ignore_updates not in ["1", "True", "TRUE"]: self.constants.ignore_updates = False dict = updates.check_binary_updates(self.constants).check_binary_updates() @@ -202,7 +202,7 @@ class wx_python_gui: elif responce == wx.ID_NO: print("- Setting IgnoreAppUpdates to True") self.constants.ignore_updates = True - subprocess.run(["defaults", "write", "com.dortania.opencore-legacy-patcher", "IgnoreAppUpdates", "-bool", "TRUE"]) + subprocess.run(["defaults", "write", "~/Library/Preferences/com.dortania.opencore-legacy-patcher", "IgnoreAppUpdates", "-bool", "TRUE"]) else: self.constants.ignore_updates = True print("- Ignoring App Updates due to defaults") @@ -2403,9 +2403,9 @@ class wx_python_gui: def set_ignore_app_updates_click(self, event): self.constants.ignore_updates = self.set_ignore_app_updates_checkbox.GetValue() if self.constants.ignore_updates is True: - subprocess.run(["defaults", "write", "com.dortania.opencore-legacy-patcher", "IgnoreAppUpdates", "-bool", "TRUE"]) + subprocess.run(["defaults", "write", "~/Library/Preferences/com.dortania.opencore-legacy-patcher", "IgnoreAppUpdates", "-bool", "TRUE"]) else: - subprocess.run(["defaults", "write", "com.dortania.opencore-legacy-patcher", "IgnoreAppUpdates", "-bool", "FALSE"]) + subprocess.run(["defaults", "write", "~/Library/Preferences/com.dortania.opencore-legacy-patcher", "IgnoreAppUpdates", "-bool", "FALSE"]) def firewire_click(self, event=None): if self.firewire_boot_checkbox.GetValue(): @@ -2466,21 +2466,21 @@ class wx_python_gui: def ts2_accel_click(self, event=None): if self.set_terascale_accel_checkbox.GetValue(): print("TS2 Acceleration Enabled") - subprocess.run(["defaults", "write", "com.dortania.opencore-legacy-patcher", "MacBookPro_TeraScale_2_Accel", "-bool", "TRUE"]) + subprocess.run(["defaults", "write", "~/Library/Preferences/com.dortania.opencore-legacy-patcher", "MacBookPro_TeraScale_2_Accel", "-bool", "TRUE"]) self.constants.allow_ts2_accel = True else: print("TS2 Acceleration Disabled") - subprocess.run(["defaults", "write", "com.dortania.opencore-legacy-patcher", "MacBookPro_TeraScale_2_Accel", "-bool", "FALSE"]) + subprocess.run(["defaults", "write", "~/Library/Preferences/com.dortania.opencore-legacy-patcher", "MacBookPro_TeraScale_2_Accel", "-bool", "FALSE"]) self.constants.allow_ts2_accel = False def force_web_drivers_click(self, event=None): if self.force_web_drivers_checkbox.GetValue(): print("Force Web Drivers Enabled") - subprocess.run(["defaults", "write", "com.dortania.opencore-legacy-patcher", "Force_Web_Drivers", "-bool", "TRUE"]) + subprocess.run(["defaults", "write", "~/Library/Preferences/com.dortania.opencore-legacy-patcher", "Force_Web_Drivers", "-bool", "TRUE"]) self.constants.force_nv_web = True else: print("Force Web Drivers Disabled") - subprocess.run(["defaults", "write", "com.dortania.opencore-legacy-patcher", "Force_Web_Drivers", "-bool", "FALSE"]) + subprocess.run(["defaults", "write", "~/Library/Preferences/com.dortania.opencore-legacy-patcher", "Force_Web_Drivers", "-bool", "FALSE"]) self.constants.force_nv_web = False def windows_gmux_click(self, event=None): diff --git a/resources/cli_menu.py b/resources/cli_menu.py index 88056c181..1de0c784c 100644 --- a/resources/cli_menu.py +++ b/resources/cli_menu.py @@ -589,10 +589,10 @@ handle acceleration tasks. change_menu = input("Allow TeraScale 2 Acceleration?(y/n/q): ") if change_menu in {"y", "Y", "yes", "Yes"}: - subprocess.run(["defaults", "write", "com.dortania.opencore-legacy-patcher", "MacBookPro_TeraScale_2_Accel", "-bool", "TRUE"]) + subprocess.run(["defaults", "write", "~/Library/Preferences/com.dortania.opencore-legacy-patcher", "MacBookPro_TeraScale_2_Accel", "-bool", "TRUE"]) self.constants.allow_ts2_accel = True elif change_menu in {"n", "N", "no", "No"}: - subprocess.run(["defaults", "write", "com.dortania.opencore-legacy-patcher", "MacBookPro_TeraScale_2_Accel", "-bool", "FALSE"]) + subprocess.run(["defaults", "write", "~/Library/Preferences/com.dortania.opencore-legacy-patcher", "MacBookPro_TeraScale_2_Accel", "-bool", "FALSE"]) self.constants.allow_ts2_accel = False elif change_menu in {"q", "Q", "Quit", "quit"}: print("Returning to previous menu") diff --git a/resources/defaults.py b/resources/defaults.py index 070babc33..9b766f86a 100644 --- a/resources/defaults.py +++ b/resources/defaults.py @@ -122,11 +122,11 @@ class generate_defaults: if model in ["MacBookPro8,2", "MacBookPro8,3"]: # Users disabling TS2 most likely have a faulty dGPU # users can override this in settings - ts2_status = subprocess.run(["defaults", "read", "com.dortania.opencore-legacy-patcher", "MacBookPro_TeraScale_2_Accel"], stdout=subprocess.PIPE).stdout.decode("utf-8").strip() + ts2_status = subprocess.run(["defaults", "read", "~/Library/Preferences/com.dortania.opencore-legacy-patcher", "MacBookPro_TeraScale_2_Accel"], stdout=subprocess.PIPE).stdout.decode("utf-8").strip() if ts2_status in ["1", "true"]: settings.allow_ts2_accel = True else: - subprocess.run(["defaults", "write", "com.dortania.opencore-legacy-patcher", "MacBookPro_TeraScale_2_Accel", "-bool", "FALSE"]) + subprocess.run(["defaults", "write", "~/Library/Preferences/com.dortania.opencore-legacy-patcher", "MacBookPro_TeraScale_2_Accel", "-bool", "FALSE"]) settings.allow_ts2_accel = False try: @@ -174,9 +174,9 @@ class generate_defaults: pass - nv_web_status = subprocess.run(["defaults", "read", "com.dortania.opencore-legacy-patcher", "Force_Web_Drivers"], stdout=subprocess.PIPE).stdout.decode("utf-8").strip() + nv_web_status = subprocess.run(["defaults", "read", "~/Library/Preferences/com.dortania.opencore-legacy-patcher", "Force_Web_Drivers"], stdout=subprocess.PIPE).stdout.decode("utf-8").strip() if nv_web_status in ["1", "true"]: settings.force_nv_web = True else: - subprocess.run(["defaults", "write", "com.dortania.opencore-legacy-patcher", "Force_Web_Drivers", "-bool", "FALSE"]) + subprocess.run(["defaults", "write", "~/Library/Preferences/com.dortania.opencore-legacy-patcher", "Force_Web_Drivers", "-bool", "FALSE"]) settings.force_nv_web = False \ No newline at end of file diff --git a/resources/sys_patch_auto.py b/resources/sys_patch_auto.py index f7252452c..26d3cead4 100644 --- a/resources/sys_patch_auto.py +++ b/resources/sys_patch_auto.py @@ -112,7 +112,7 @@ class AutomaticSysPatch: print("- Determining if macOS drive matches boot drive") - should_notify = subprocess.run(["defaults", "read", "com.dortania.opencore-legacy-patcher", "AutoPatch_Notify_Mismatched_Disks"], stdout=subprocess.PIPE).stdout.decode("utf-8").strip() + should_notify = subprocess.run(["defaults", "read", "~/Library/Preferences/com.dortania.opencore-legacy-patcher", "AutoPatch_Notify_Mismatched_Disks"], stdout=subprocess.PIPE).stdout.decode("utf-8").strip() if should_notify in ["0", "false"]: print("- Skipping due to user preference") else: