Skip to content

Commit

Permalink
Merge pull request #6391 from jamiesnape/drake-visualizer-mac
Browse files Browse the repository at this point in the history
Let drake_visualizer work outside sandbox on Mac
  • Loading branch information
soonho-tri authored Jun 21, 2017
2 parents 38b4bc6 + c7a4902 commit a5f1132
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tools/drake_visualizer_apple.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
#!/bin/bash

set -e

# If we are outside the sandbox, then change to the same relative directory as
# we would be inside the sandbox.
if ! [ -d "external/director" ]; then
guess_runfiles=$(dirname "$0")/drake_visualizer.runfiles/drake
if [ -d "$guess_runfiles/external/director" ]; then
cd "$guess_runfiles"
else
echo "$(basename $0) error: could not find director" 1>&2
exit 1
fi
fi

export DYLD_LIBRARY_PATH="external/director/lib${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH}"
# TODO(jamiesnape): Do not hard code absolute path to [email protected].
export PYTHONPATH="external/director/lib/python2.7/dist-packages:/usr/local/opt/[email protected]/lib/python2.7/site-packages${PYTHONPATH:+:$PYTHONPATH}"
Expand Down

0 comments on commit a5f1132

Please sign in to comment.