Skip to content

macOS Optional Dependencies

Olivier Michel edited this page Nov 15, 2022 · 23 revisions

Java

To use the JAVA API you will need to install the Java SE Development Kit 17 for Mac OS X from: https://www.oracle.com/java/technologies/downloads/#jdk17-mac

Requirements to create the Webots .dmg package

appdmg is required to create the Webots .dmg package:

brew install node
npm install -g appdmg

Create a test Webots.app bundle

In order to launch Webots directly from Finder you could create a Webots.app directory with symbolic links to the Webots local repository content as following:

cd ~
mkdir Webots.app
cd Webots.app/
ln -s ${WEBOTS_HOME}/Contents Contents
ln -s ${WEBOTS_HOME}/resources resources
ln -s ${WEBOTS_HOME}/lib lib
ln -s ${WEBOTS_HOME}/bin bin
ln -s ${WEBOTS_HOME}/change_logs change_logs
ln -s ${WEBOTS_HOME}/doc doc
ln -s ${WEBOTS_HOME}/include include
ln -s ${WEBOTS_HOME}/projects projects
ln -s ${WEBOTS_HOME}/util util

Web interface with wren.js

To be able to compile the streaming-viewer, you need python 3, pyclibrary and Emscripten

pyclibrary

Enter the following command in a terminal: pip install pyclibrary

Emscripten

Run the following commands in a terminal:

# Get the emsdk repo
git clone https://github.com/emscripten-core/emsdk.git

# Enter that directory
cd emsdk

# Download and install the latest SDK tools.
./emsdk install latest

# Make the "latest" SDK "active" for the current user. (writes .emscripten file)
./emsdk activate latest

Then uncomment the line source $HOME/emsdk/emsdk_env.sh >/dev/null 2>&1 in bash_profile.mac that is in webots/script/install.

Run the following commands from Webots home folder:

cat scripts/install/bash_profile.mac >> ~/.bash_profile
cat scripts/install/bash_profile.mac >> ~/.zprofile
source ~/.bash_profile
Clone this wiki locally