mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-21 14:40:52 +10:00
auto_patcher: Adjust indentation logic
This commit is contained in:
@@ -179,10 +179,16 @@ class AutomaticSysPatch:
|
|||||||
# Installs the following:
|
# Installs the following:
|
||||||
# - OpenCore-Patcher.app in /Library/Application Support/Dortania/
|
# - OpenCore-Patcher.app in /Library/Application Support/Dortania/
|
||||||
# - com.dortania.opencore-legacy-patcher.auto-patch.plist in /Library/LaunchAgents/
|
# - com.dortania.opencore-legacy-patcher.auto-patch.plist in /Library/LaunchAgents/
|
||||||
if self.constants.launcher_script is None:
|
if self.constants.launcher_script is not None:
|
||||||
|
print("- Skipping Auto Patcher Launch Agent, not supported when running from source")
|
||||||
|
return
|
||||||
|
|
||||||
|
if self.constants.launcher_binary.startswith("/Library/Application Support/Dortania/"):
|
||||||
|
print("- Skipping Auto Patcher Launch Agent, already installed")
|
||||||
|
return
|
||||||
|
|
||||||
# Verify our binary isn't located in '/Library/Application Support/Dortania/'
|
# Verify our binary isn't located in '/Library/Application Support/Dortania/'
|
||||||
# As we'd simply be duplicating ourselves
|
# As we'd simply be duplicating ourselves
|
||||||
if not self.constants.launcher_binary.startswith("/Library/Application Support/Dortania/"):
|
|
||||||
print("- Installing Auto Patcher Launch Agent")
|
print("- Installing Auto Patcher Launch Agent")
|
||||||
|
|
||||||
if not Path("Library/Application Support/Dortania").exists():
|
if not Path("Library/Application Support/Dortania").exists():
|
||||||
@@ -229,5 +235,3 @@ class AutomaticSysPatch:
|
|||||||
if not Path("/Applications/OpenCore-Patcher.app").exists():
|
if not Path("/Applications/OpenCore-Patcher.app").exists():
|
||||||
print("- Making app alias")
|
print("- Making app alias")
|
||||||
utilities.process_status(utilities.elevated(["ln", "-s", "/Library/Application Support/Dortania/OpenCore-Patcher.app", "/Applications/OpenCore-Patcher.app"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
utilities.process_status(utilities.elevated(["ln", "-s", "/Library/Application Support/Dortania/OpenCore-Patcher.app", "/Applications/OpenCore-Patcher.app"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||||
else:
|
|
||||||
print("- Skipping Auto Patcher Launch Agent, not supported when running from source")
|
|
||||||
Reference in New Issue
Block a user