Skip to content

Commit

Permalink
Fix getInstallDir and getSliceDir for macOS bin dist
Browse files Browse the repository at this point in the history
  • Loading branch information
pepone committed Oct 31, 2024
1 parent 0e1f210 commit ad61f33
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/Util.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,10 @@ def getSliceDir(self, mapping, current):
if installDir.endswith(mapping.name):
installDir = installDir[0 : len(installDir) - len(mapping.name) - 1]
if platform.getInstallDir() and installDir == platform.getInstallDir():
return os.path.join(installDir, "share", "ice", "slice")
if sys.platform == "darwin":
return os.path.join(installDir, "opt", "ice", "share", "ice", "slice")
else:
return os.path.join(installDir, "share", "ice", "slice")
else:
return os.path.join(installDir, "slice")

Expand Down Expand Up @@ -378,7 +381,7 @@ def getLdPathEnvName(self):
return "DYLD_LIBRARY_PATH"

def getInstallDir(self):
return "/usr/local"
return "/opt/homebrew" if platform_machine() == "arm64" else "/usr/local"


class Linux(Platform):
Expand Down

0 comments on commit ad61f33

Please sign in to comment.