Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let drake_visualizer work outside sandbox on Mac #6391

Merged
merged 1 commit into from
Jun 21, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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