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

@@ -218,8 +218,6 @@ class MainFrame(wx.Frame):
self.on_build_and_install()
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():
# Notify user that the update has been installed
self.constants.has_checked_updates = True
@@ -251,34 +249,6 @@ class MainFrame(wx.Frame):
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):
if self.constants.has_checked_updates is True:
return