Skip to content

Commit

Permalink
osxbundle: fix bundling when homebrew is not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
Akemi authored and xrun1 committed Mar 12, 2024
1 parent 56365d1 commit e7032f5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion TOOLS/dylib_unhell.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e7032f5

Please sign in to comment.