-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Windows installation
It takes less than one hour on a fairly recent computer with a decent Internet connection to install all the dependencies and recompile Webots from the sources.
MSYS2 is the primary development environment for Webots on Windows:
- Install MSYS2 from https://msys2.github.io (select the 64 bit version and follow the instructions).
- When using MSYS2, always use the MINGW64 environment by running the installed "MSYS2 MINGW64" app instead of the default "MSYS2 MSYS" app which will use the UCRT64 environment. This will ensure that your PATH environment variable is set up properly.
- Don't forget to update the package database with
pacman -Syu
. - Install Git with
pacman -S git
.
From the MSYS2 shell create these sub-directories in your home directory and clone the repository.
Note: instead of cloning https://github.com/cyberbotics/webots.git, we recommend to create your own fork and clone it, so that you can commit your changes directly on it.
git config --global credential.helper store
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
git config --global push.default simple
git clone --recurse-submodules -j8 https://github.com/cyberbotics/webots.git
cd webots
Follow the instructions at https://github.com/settings/keys to create a SSH key. This will allow you to push commits back to the GitHub upstream, using your SSH token as a password.
If you cloned Webots with the --recurse-submodules
option, you can skip this step.
Otherwise, you need to initialize the submodules used by Webots:
git submodule init
git submodule update
Append scripts/install/bash_profile.windows
at the end of your ~/.bash_profile
and check and edit the result:
cat scripts/install/bash_profile.windows >> ~/.bash_profile
Restart MSYS2.
scripts/install/msys64_installer.sh
If needed, follow these instructions to install optional dependencies.
Compile Webots and automatically download the required resources in the dependencies
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.
Regularly, you may need to update the MSYS2 packages as new versions of these packages become available.
In order to proceed, type pacman -Syuu
and if some Qt5 packages get upgraded, re-run the qt_windows_installer.sh
script to ensure Webots will use them. This can be done by navigating to /scripts/install
and typing ./qt_windows_installer.sh
.
Environment variables specified on the Running Extern Robot Controllers page differ from the environment variables you should use in the development environment:
Environment Variable | Typical Value |
---|---|
WEBOTS_HOME | C:\msys64\home\username\webots |
Path (all controllers) | add %WEBOTS_HOME%\lib\controller and %WEBOTS_HOME%\msys64\mingw64\bin
|
MSYS2_HOME (for Python controllers) | C:\msys64 |