Remove alias creation

Now handled by PKG
This commit is contained in:
Mykola Grymalyuk
2024-05-27 11:04:14 -06:00
parent e3eb90b7fb
commit acbeef070f
2 changed files with 0 additions and 37 deletions

View File

@@ -406,13 +406,6 @@ Please check the Github page for more information about this release."""
subprocess.run(["/usr/bin/xattr", "-cr", "/Library/Application Support/Dortania/OpenCore-Patcher.app"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) subprocess.run(["/usr/bin/xattr", "-cr", "/Library/Application Support/Dortania/OpenCore-Patcher.app"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
# Making app alias
# Simply an easy way for users to notice the app
# If there's already an alias or exiting app, skip
if not Path("/Applications/OpenCore-Patcher.app").exists():
logging.info("- Making app alias")
subprocess_wrapper.run_as_root_and_verify(["/bin/ln", "-s", "/Library/Application Support/Dortania/OpenCore-Patcher.app", "/Applications/OpenCore-Patcher.app"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
def _create_rsr_monitor_daemon(self) -> bool: def _create_rsr_monitor_daemon(self) -> bool:
# Get kext list in /Library/Extensions that have the 'GPUCompanionBundles' property # Get kext list in /Library/Extensions that have the 'GPUCompanionBundles' property

View File

@@ -218,8 +218,6 @@ class MainFrame(wx.Frame):
self.on_build_and_install() self.on_build_and_install()
return return
self._fix_local_install()
if "--update_installed" in sys.argv and self.constants.has_checked_updates is False and gui_support.CheckProperties(self.constants).host_can_build(): if "--update_installed" in sys.argv and self.constants.has_checked_updates is False and gui_support.CheckProperties(self.constants).host_can_build():
# Notify user that the update has been installed # Notify user that the update has been installed
self.constants.has_checked_updates = True self.constants.has_checked_updates = True
@@ -251,34 +249,6 @@ class MainFrame(wx.Frame):
threading.Thread(target=self._check_for_updates).start() threading.Thread(target=self._check_for_updates).start()
def _fix_local_install(self) -> None:
"""
Work-around users manually copying the app to /Applications
We'll delete the app, and create a proper symlink
Note: This *shouldn't* be needed with installs after 0.6.7, but it's a good catch-all
"""
if "--update_installed" not in sys.argv:
return
if self.constants.has_checked_updates is True:
return
# Check if app exists in /Applications, and is not a symlink
if Path("/Applications/OpenCore-Patcher.app").exists() and Path("/Applications/OpenCore-Patcher.app").is_symlink() is False:
logging.info("Found user-installed app in /Applications, replacing with symlink")
# Delete app
result = subprocess.run(["/bin/rm", "-rf", "/Applications/OpenCore-Patcher.app"], capture_output=True)
if result.returncode != 0:
logging.info("Failed to delete app from /Applications")
return
# Create symlink
result = subprocess.run(["/bin/ln", "-s", "/Library/Application Support/Dortania/OpenCore-Patcher.app", "/Applications/OpenCore-Patcher.app"], capture_output=True)
if result.returncode != 0:
logging.info("Failed to create symlink to /Applications")
return
def _check_for_updates(self): def _check_for_updates(self):
if self.constants.has_checked_updates is True: if self.constants.has_checked_updates is True:
return return