summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorder richter <der.richter@gmx.de>2024-02-29 15:07:34 +0100
committerder richter <der.richter@gmx.de>2024-02-29 16:37:21 +0100
commit9b301a0537ff9afba27688cec69ac5dc027f3494 (patch)
treecc51514fb37978e18ce009926e8cd0c5e2ccfd5e
parentbe6c22f93b41e1962b294f9366642444084199e4 (diff)
downloadmpv-9b301a0537ff9afba27688cec69ac5dc027f3494.tar.bz2
mpv-9b301a0537ff9afba27688cec69ac5dc027f3494.tar.xz
osxbundle: fix bundling when homebrew is not installed
Fixes #13603
-rwxr-xr-xTOOLS/dylib_unhell.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/TOOLS/dylib_unhell.py b/TOOLS/dylib_unhell.py
index 9cba3adb2f..c885969284 100755
--- a/TOOLS/dylib_unhell.py
+++ b/TOOLS/dylib_unhell.py
@@ -96,7 +96,14 @@ def check_vulkan_max_version(version):
return False
def get_homebrew_prefix():
- return subprocess.check_output("brew --prefix", universal_newlines=True, shell=True).strip()
+ # set default to standard ARM path, intel path is already in the vulkan loader search array
+ result = "/opt/homebrew"
+ try:
+ result = subprocess.check_output("brew --prefix", universal_newlines=True, shell=True, stderr=subprocess.DEVNULL).strip()
+ except:
+ pass
+
+ return result
def install_name_tool_change(old, new, objfile):
subprocess.call(["install_name_tool", "-change", old, new, objfile], stderr=subprocess.DEVNULL)