osxbundle: fix bundling when homebrew is not installed

Fixes #13603
This commit is contained in:
der richter 2024-02-29 15:07:34 +01:00
parent be6c22f93b
commit 9b301a0537
1 changed files with 8 additions and 1 deletions

View File

@ -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)