Skip to content

Commit aa4261b

Browse files
authored
bug(fix): add slicer executable's path
1 parent 8776a23 commit aa4261b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

IDCBrowser/IDCHandlerModule.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ def registerCustomProtocol(self):
226226
print(f"Failed to register IDC Browser URL protocol on Windows: {e}")
227227

228228
elif platform.system() == "Darwin":
229-
grandparent_dir = os.path.dirname(os.path.dirname(slicer_dir))
229+
slicer_exec_dir = os.path.dirname(sys.executable)
230+
grandparent_dir = os.path.dirname(os.path.dirname(slicer_exec_dir))
230231

231232
# Now, you can construct the path to PythonSlicer
232233
python_path = os.path.join(grandparent_dir, "bin", "PythonSlicer")

0 commit comments

Comments
 (0)