Skip to content

macOS installation

Fabien Rohrer edited this page Dec 4, 2018 · 24 revisions

Prerequisites Packages

Install Homebrew

Follow the installation instructions from there: https://brew.sh Note: When installing Brew, the XCode Command Line Tools are also installed.

And then install the following packages:

brew install cmake swig wget

Clone the Github Repository

From a Terminal app, create the development directory in your home directory and clone the repository.

Note: instead of cloning https://github.com/omichel/webots.git, we recommend to create your own fork and clone it, so that you can commit your changes directly on it.

cd
mkdir develop
cd develop
git clone https://github.com/omichel/webots.git
cd webots
git submodule init
git submodule update

Environment variables

It is convenient to add the following environment variables into your ~/.bash_profile file:

export WEBOTS_HOME=$HOME/develop/webots/webots      # Defines the path to Webots home.
export WEBOTS_ALLOW_MODIFY_INSTALLATION=1           # If defined, you are allowed to modify files in the Webots home using Webots.
export WEBOTS_DISABLE_SAVE_PERSPECTIVE_ON_CLOSE=1   # If defined, Webots will not save perspective changes when closed.
export WEBOTS_DISABLE_WORLD_LOADING_DIALOG=1        # If defined, the lodaing world progress dialog will never be displayed.

To make the changes available close and reopen your Terminal.

Install Optional Dependencies [ optional ]

If needed, follow these instructions to install optional dependencies.

Build Webots

Compile Webots and automatically download the required resources in the depencencies folder:

make -jX

Note: X represents the number of threads for a speedy multi-threaded compilation. For example, type make -j12 on a CPU with four cores and hyper-threading.

make help displays additional targets for debugging, profiling, cleaning, etc.

Once compiled, type ./webots to launch it.

Clone this wiki locally