From 1e650637eb491f37832ee7eff8496c7161f0752a Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Mon, 27 May 2024 15:48:43 -0600 Subject: [PATCH] sys_patch: Remove legacy shim code --- .../sys_patch/sys_patch_auto.py | 31 ------------------- 1 file changed, 31 deletions(-) diff --git a/opencore_legacy_patcher/sys_patch/sys_patch_auto.py b/opencore_legacy_patcher/sys_patch/sys_patch_auto.py index d1a0afde9..989ce5ec2 100644 --- a/opencore_legacy_patcher/sys_patch/sys_patch_auto.py +++ b/opencore_legacy_patcher/sys_patch/sys_patch_auto.py @@ -375,37 +375,6 @@ Please check the Github page for more information about this release.""" subprocess_wrapper.run_as_root_and_verify(["/bin/chmod", "644", services[service]], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) subprocess_wrapper.run_as_root_and_verify(["/usr/sbin/chown", "root:wheel", services[service]], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - if self.constants.launcher_binary.startswith("/Library/Application Support/Dortania/"): - logging.info("- Skipping Patcher Install, already installed") - return - - # Verify our binary isn't located in '/Library/Application Support/Dortania/' - # As we'd simply be duplicating ourselves - logging.info("- Installing Auto Patcher Launch Agent") - - if not Path("Library/Application Support/Dortania").exists(): - logging.info("- Creating /Library/Application Support/Dortania/") - subprocess_wrapper.run_as_root_and_verify(["/bin/mkdir", "-p", "/Library/Application Support/Dortania"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - - logging.info("- Copying OpenCore Patcher to /Library/Application Support/Dortania/") - if Path("/Library/Application Support/Dortania/OpenCore-Patcher.app").exists(): - logging.info("- Deleting existing OpenCore-Patcher") - subprocess_wrapper.run_as_root_and_verify(["/bin/rm", "-R", "/Library/Application Support/Dortania/OpenCore-Patcher.app"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - - # Strip everything after OpenCore-Patcher.app - path = str(self.constants.launcher_binary).split("/Contents/MacOS/OpenCore-Patcher")[0] - logging.info(f"- Copying {path} to /Library/Application Support/Dortania/") - subprocess_wrapper.run_as_root_and_verify(["/usr/bin/ditto", path, "/Library/Application Support/Dortania/OpenCore-Patcher.app"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - - if not Path("/Library/Application Support/Dortania/OpenCore-Patcher.app").exists(): - # Sometimes the binary the user launches may have a suffix (ie. OpenCore-Patcher 3.app) - # We'll want to rename it to OpenCore-Patcher.app - path = path.split("/")[-1] - logging.info(f"- Renaming {path} to OpenCore-Patcher.app") - subprocess_wrapper.run_as_root_and_verify(["/bin/mv", f"/Library/Application Support/Dortania/{path}", "/Library/Application Support/Dortania/OpenCore-Patcher.app"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - - subprocess.run(["/usr/bin/xattr", "-cr", "/Library/Application Support/Dortania/OpenCore-Patcher.app"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) - def _create_rsr_monitor_daemon(self) -> bool: # Get kext list in /Library/Extensions that have the 'GPUCompanionBundles' property