Difference between revisions of "Windows: installation from sources"

From Wiki for iCub and Friends
Jump to: navigation, search
(Replaced content with "This page has been migrated to https://icub-tech-iit.github.io/documentation/sw_installation/windows_from_sources_superbuild/ .")
 
Line 1: Line 1:
[[Image:win-logo.jpg|right|50px]] Instructions on this page allow you to build YARP and iCub on Windows from sources. This allows getting the most recent version of the code from the repositories or a specific snapshot. The following sections will guide you step by step in the installation process.
+
This page has been migrated to https://icub-tech-iit.github.io/documentation/sw_installation/windows_from_sources_superbuild/ .
 
 
= Getting Dependencies =
 
 
 
* Download and execute the Robotology installer available from [[Downloads]]. Pick up the binaries containing only the dependencies. When prompted with the dialog below, '''do not change the destination directory''' as the archive still contains a few packages that are not fully relocatable.
 
 
[[image:robotology-installer-1.png]]
 
 
* Keep the following checkbox ticked if you want the installer to update the environment variables.
 
 
[[image:robotology-installer-2.png]]
 
 
'''Alternatively''', you can compile all dependencies yourself following the procedure outlined at '''https://github.com/robotology/robotology-superbuild''' (notice however that this can be tedious, time-consuming and error-prone).
 
 
 
= Getting MS Visual Studio =
 
 
 
* You can download it from https://visualstudio.microsoft.com/downloads. Make sure to use the '''64-bits version'''.
 
 
 
= Getting CMake =
 
 
 
If you follow YARP's installation instructions ('''Install from sources''') you should have installed CMake.
 
 
 
= Getting revision control system client =
 
 
 
To download sources from our repositories you need to set up a revision control system client (git).
 
If you follow YARP's installation instructions ('''Install from sources''') you should have installed a git client.
 
 
 
= Compile YCM =
 
 
 
Clone the tag associated with the distro at hand as specified in [[Software Versioning Table]].
 
 
 
  cd /home/user
 
  git clone https://github.com/robotology/ycm.git -b vxx.yy.zz
 
  cd ycm && mkdir -p build && cd build
 
 
 
== Configure YCM ==
 
 
 
* Run CMake.
 
* Point the entry "Where is the source code" of the GUI to the location where you cloned the repository.
 
* Choose a directory that will store the project files, e.g. "build" inside the source directory.
 
* You can optionally change the CMAKE_INSTALL_PREFIX entry, this is the directory where you would like to install all modules/libraries.
 
* Hit "Generate" and quit.
 
* Open the YCM Visual Studio solution file in the build directory.
 
* Select '''Release''' configuration and build the target INSTALL.
 
 
 
== Configure your environment ==
 
 
 
* Set the environment variable YCM_DIR so that it points to the location where you built or installed.
 
 
 
= Compile YARP =
 
 
 
Follow instructions here: http://wiki.icub.org/yarp/specs/dox/user/html/install_yarp_windows.html, select '''Install from sources'''
 
 
 
Importantly, for use with the iCub robot when compiling YARP make sure that:
 
 
 
* you check out the correct tag of YARP according to the [[Software Versioning Table]].
 
* you select the following CMake options:
 
 
 
  CREATE_OPTIONAL_CARRIERS, set to ON
 
  ENABLE_yarpcar_bayer, set to ON
 
 
 
= Getting the iCub sources =
 
 
 
Clone the icub-main repository from one of these addresses:
 
* (git read-only)    git://github.com/robotology/icub-main.git
 
* (ssh read+write)    git@github.com:robotology/icub-main.git
 
* (https read+write)  https://github.com/robotology/icub-main.git
 
 
 
for example:
 
  cd /home/user
 
  git clone https://github.com/robotology/icub-main.git
 
 
 
Be careful and make sure to check out the correct tag matching the version of YARP installed on your system as per [[Software Versioning Table]]:
 
 
 
  cd /home/user/icub-main
 
  git checkout <tag> 
 
 
 
= Compile iCub =
 
 
 
In the following, we will call ICUB_REPOSITORY the top directory of the repository (i.e. the icub-main directory which contains the files AUTHORS, README and ChangeLog).
 
 
 
== Generate project files ==
 
 
 
* Run CMake.
 
* Point the entry "Where is the source code" of the GUI to the directory called "icub-main".
 
* Choose a directory that will store the binaries and the project files, e.g. "build" inside the source directory (ICUB_REPOSITORY/build). This is iCub's '''build directory'''.
 
 
 
* Enable the following variables:
 
 
 
  ENABLE_icubmod_cartesiancontrollerclient ON
 
  ENABLE_icubmod_cartesiancontrollerserver ON
 
  ENABLE_icubmod_gazecontrollerclient      ON
 
 
 
* Click on the button "Configure". Select the compiler you would like to use. CMake will normally select the correct compiler (WIN64 is not supported yet). Make sure the compiler matches the one you used to compile YARP.
 
* Leave all options to default.
 
* Hit "Configure" until the button "Generate" becomes available. Then hit "Generate" and quit. Note: CMake uses red bars to highlight new options, these are not necessarily errors and can be ignored.
 
 
 
Note 1: You can optionally change CMAKE_INSTALL_PREFIX, this is the directory where you would like to install iCub (default is C:\Program Files\iCub). If you do so, you will then need to set up the environment accordingly (see ''Configure your environment'' below).
 
 
 
Note 2: Do not select other options unless you know what you are doing.
 
 
 
== Compile ==
 
 
 
Now we are ready to compile. Open the iCub visual studio project file in the build directory.  In '''this order''':
 
 
 
* Select '''Debug''' configuration and build the target INSTALL
 
* Select '''Release''' configuration and build the target INSTALL.
 
 
 
== Configure your environment ==
 
 
 
* Set the environment variable ICUB_DIR so that it points to CMAKE_INSTALL_PREFIX (e.g. C:\Program Files\iCub).
 
* Append %ICUB_DIR%/bin to your PATH, e.g. C:\Program Files\iCub\bin
 
* You need to set the YARP_DATA_DIRS environment variable to %YARP_DIR%/share/yarp;%ICUB_DIR%/share/iCub
 
 
 
= Setup ICUBcontrib (optional) =
 
 
 
If you wish to develop new software for iCub and share it in the ''contrib'' repository, you need to set up the ICUBcontrib meta-package, which allows to properly configure your modules/libraries so that they share the same installation prefix.
 
 
 
Checkout the contrib repository.
 
 
 
Clone the icub-contrib-common repository from one of these addresses:
 
 
 
    (git read-only) git://github.com/robotology/icub-contrib-common.git
 
    (ssh read+write) git@github.com:robotology/icub-contrib-common.git
 
    (https read+write) https://github.com/robotology/icub-contrib-common.git
 
 
 
for example:
 
 
 
cd /home/user
 
git clone https://github.com/robotology/icub-contrib-common.git
 
 
 
Make sure to check out the correct tag as per [[Software Versioning Table]]:
 
 
 
cd /home/user/icub-contrib-common
 
git checkout <tag>
 
 
 
== Configure ICUBcontrib ==
 
 
 
* Run CMake.
 
* Point the entry "Where is the source code" of the GUI to C:/iCub/icub-contrib-common.
 
* Choose a directory that will store the project files, e.g. "build" inside the source directory.
 
* You can optionally change the CMAKE_INSTALL_PREFIX entry, this is the directory where you would like to install all modules/libraries.
 
* Hit "Generate" and quit.
 
* Open the ICUBcontrib Visual Studio solution file in the build directory.
 
* Select '''Release''' configuration and build the target INSTALL.
 
 
 
== Configure your environment ==
 
 
 
* Set the environment variable ICUBcontrib_DIR so that it points to CMAKE_INSTALL_PREFIX (e.g. C:\Program Files\ICUBcontrib).
 
* Append %ICUBcontrib_DIR%/bin to your PATH.
 
* It is suggested to set the CMAKE_PREFIX_PATH environment variable to point to the installation directory (e.g. C:\Program Files\ICUBcontrib).
 
* If you installed ICUBcontrib to a different install prefix than YARP's, you need to extend the YARP_DATA_DIRS environment variable so that it matches:
 
 
 
  %YARP_DIR%/share/yarp;%ICUB_DIR%/share/iCub;%ICUBcontrib_DIR%/share/ICUBcontrib
 
 
 
Once you have installed the ICUBcontrib package you can compile the other modules individually.
 
 
 
= Check your installation =
 
Now you are ready to [[check your installation]].
 

Latest revision as of 19:09, 18 January 2021

This page has been migrated to https://icub-tech-iit.github.io/documentation/sw_installation/windows_from_sources_superbuild/ .