-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Windows Optional Dependencies
Some extra msys64 packages may be useful:
-
swig
is needed to compile the Java API wrappers. -
mingw-w64-x86_64-boost
is needed to compile the ROS controller. -
mingw-w64-x86_64-opencv
is needed to compile the OpenCV howto demo.
These packages may be installed individually with the pacman -S <package_name>
command line.
Alternatively, you can install all of them from the following script:
./scripts/install/msys64_installer.sh --all
Some extra msys64 packages are useful to contribute to the development:
-
mingw-w64-x86_64-clang
andmingw-w64-x86_64-cppcheck
are needed to check the coding style. -
mingw-w64-x86_64-gdb
is needed for debugging.
To install all these packages in addition to the previous ones, launch the script with the '--dev' argument instead:
./scripts/install/msys64_installer.sh --dev
This is needed only if you want to run Python robot controllers such as the SUMO interface, or Python-based scripts such as the Webots web service or the OSM importer. You must install a recent version of Python (64 bit) from https://www.python.org. We recommend to install Python for all users in C:\Program Files\Python3xx
. Then, you should update your ~/.bash_profile
file by uncommenting the appropriate line(s) to set the PYTHON_HOME
. Don't forget to reload your .bash_profile
:
source ~/.bash_profile
Pip is installed in C:\Program Files\Python3xx\Scripts
and should be used to install Python modules. Updating it is recommended from a MSYS2 console running in Administrator mode:
python -m pip install --upgrade pip
Alternatively, if you don't intend to build a Webots distribution package, you may use Python from MSYS2. This will save you from installing Python manually. To proceed, simply define the MINGWPYTHON
environment variable in your ~/.bash_profile
, so that this version of Python will be used to compile the python wrappers and libraries for your robot controllers. See #4909 for details.
This is needed only to run Webots as a web service (simulation_server.py in the cloud).
Install Python and the following modules:
python -m pip install websocket-client
python -m pip install tornado
python -m pip install nvidia-ml-py3
python -m pip install psutil
python -m pip install wmi
python -m pip install pypiwin32
python -m pip install requests
Install subversion
(needed by simulation_server.py to checkout GitHub repositories):
pacman -Syuu subversion
This is needed only if you want to use the automobile tools (including the OpenStreetMap importer)
Install Python and follow the instructions here: https://www.cyberbotics.com/doc/automobile/openstreetmap-importer#windows
This is needed only if you want to create a Webots binary setup package for distribution on Windows.
Install InnoSetup version 6.2.1 or later from http://www.jrsoftware.org/isdl.php or from this script:
./scripts/install/inno_setup_installer.sh
This is needed only if you don't already have a good source code editor installed on your computer.
This is needed only if you want to compile robot controllers with Visual C++.
Install Chocolatey in PowerShell and then Microsoft Visual C++ Build Tools 2017 by typing choco install -y visualcpp-build-tools
(note the -y
option).
This is needed in order to generate Microsoft Visual C++ .lib files and compile Webots robot controllers with Microsoft Visual C++.
You should also update your ~/.bash_profile
file to set the VISUAL_STUDIO_PATH
appropriately.
This is needed only if you want to compile and run Webots Java controllers.
Install version 18.0.2 (or later) of the 64-bit version of the OpenJDK from an administrator PowerShell with choco install -y openjdk --version=18.0.2
. Then, you should update your ~/.bash_profile
file to set the JAVA_HOME
appropriately.
This is needed only if you want to program robots using MATLAB.
Install the latest version of MATLAB and update your ~/.bash_profile
file to set the MATLAB_HOME
appropriately.
This operation should be performed regularly to be up-to-date with the latest version of the MSYS64 packages.
Note: it may sometimes break Webots if an updated package is broken or incompatible with the previous one.
pacman -Syuu
cd $WEBOTS_HOME/scripts/install/
./msys64_installer.sh
To be able to compile the streaming-viewer, you need python 3.8, pyclibrary and Emscripten
Once you have configured python 3.8 for msys2, enter the following command in a msys2 terminal:
python -m pip install pyclibrary
Run the following commands in a msys2 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.windows
that is in webots/script/install
.
Run the following commands from Webots home folder:
cat scripts/install/bash_profile.windows >> ~/.bash_profile
If you encounter an error like [WinError 2] The system cannot find the file specified: '\\\\?\\C:/'
, replace the first line of fix_potentially_long_windows_pathname
from emsdk.py
by:
def fix_potentially_long_windows_pathname(pathname):
if MSYS or not WINDOWS: