Skip to content

Commit

Permalink
tooling: Updte build scripts for latest macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
eigendude committed Mar 19, 2024
1 parent 3f025bc commit f463bb5
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 28 deletions.
26 changes: 13 additions & 13 deletions oasis_tooling/scripts/build_ros2_desktop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,20 @@ CMAKE_PREFIX_PATH=
if [[ "${OSTYPE}" == "darwin"* ]]; then
COLCON_FLAGS+=" --packages-skip-by-dep python_qt_binding"
CMAKE_PREFIX_PATH="$(brew --prefix qt@5)/lib/cmake/Qt5"
fi

# Add ccache support
COLCON_FLAGS+=" \
--cmake-args \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
"
else
# Add ccache support and fix locating Python
COLCON_FLAGS+=" \
--cmake-args \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
"

# Skip Qt dependencies, Shiboken is too old on Ubuntu 18.04
COLCON_FLAGS+=" \
--packages-ignore \
qt_gui_cpp \
rqt_gui_cpp \
"
# Skip Qt dependencies, Shiboken is too old on Ubuntu 18.04
COLCON_FLAGS+=" \
--packages-ignore \
qt_gui_cpp \
rqt_gui_cpp \
"
fi

# Uncomment these to force building in serial
#MAKE_FLAGS+=" -j1 -l1"
Expand Down
39 changes: 24 additions & 15 deletions oasis_tooling/scripts/depinstall_ros2_desktop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,23 +125,28 @@ fi
if [[ "${OSTYPE}" == "darwin"* ]]; then
brew update

# Install build utilities
brew install \
ccache \
wget \

# Install ROS dependencies
# Note: qt@6 causes problems with rviz_rendering, make sure qt@6 isn't installed
brew install \
asio \
assimp \
bison \
bullet \
ccache \
cmake \
console_bridge \
cppcheck \
cunit \
eigen \
freetype \
graphviz \
log4cxx \
opencv \
openssl \
orocos-kdl \
pcre \
poco \
pyqt5 \
Expand All @@ -151,12 +156,13 @@ if [[ "${OSTYPE}" == "darwin"* ]]; then
spdlog \
tinyxml \
tinyxml2 \
wget \

# Update Python utilities
python3 -m pip install --upgrade \
pip \
setuptools \

# Install ROS Python dependencies
python3 -m pip install --upgrade \
argcomplete \
catkin_pkg \
Expand All @@ -165,38 +171,39 @@ if [[ "${OSTYPE}" == "darwin"* ]]; then
cryptography \
empy \
flake8 \
flake8-blind-except \
flake8-blind-except==0.1.1 \
flake8-builtins \
flake8-class-newline \
flake8-comprehensions \
flake8-deprecated \
flake8-docstrings \
flake8-import-order \
flake8-quotes \
ifcfg \
importlib-metadata \
lark-parser \
jsonschema \
lark==1.1.1 \
lxml \
matplotlib \
mock \
mypy==0.761 \
mypy==0.931 \
netifaces \
nose \
pep8 \
psutil \
pydocstyle \
pydot \
pyparsing \
pyparsing==2.4.7 \
pytest-mock \
rosdep \
rosdistro \
setuptools==59.6.0 \
vcstool \

GRAPHVIZ_VERSION=$(brew list --version | grep graphviz | cut -d " " -f 2)
python3 -m pip install --upgrade \
--global-option=build_ext \
--global-option="-I/usr/local/Cellar/graphviz/${GRAPHVIZ_VERSION}/include" \
--global-option="-L/usr/local/Cellar/graphviz/${GRAPHVIZ_VERSION}/lib" \
--global-option="-I$(brew --prefix)/Cellar/graphviz/${GRAPHVIZ_VERSION}/include" \
--global-option="-L$(brew --prefix)/Cellar/graphviz/${GRAPHVIZ_VERSION}/lib" \
pygraphviz
fi

Expand All @@ -208,11 +215,13 @@ fi
mkdir -p "${ROS2_SOURCE_DIRECTORY}"
mkdir -p "${ROS2_INSTALL_DIRECTORY}"

# After updating to Ubuntu 22.04, ament packages couldn't be found because
# they were installed to a different directory
if [ ! -L "${AMENT_INSTALL_DIRECTORY}" ]; then
rm -rf "${AMENT_INSTALL_DIRECTORY}"
ln -s "${ROS2_INSTALL_DIRECTORY}" "${AMENT_INSTALL_DIRECTORY}"
if [[ "${OSTYPE}" != "darwin"* ]]; then
# After updating to Ubuntu 22.04, ament packages couldn't be found because
# they were installed to a different directory
if [ ! -L "${AMENT_INSTALL_DIRECTORY}" ]; then
rm -rf "${AMENT_INSTALL_DIRECTORY}"
ln -s "${ROS2_INSTALL_DIRECTORY}" "${AMENT_INSTALL_DIRECTORY}"
fi
fi

#
Expand Down

0 comments on commit f463bb5

Please sign in to comment.