Install Chocolatey to handle dependencies. Then:
choco install cmake --installargs 'ADD_CMAKE_TO_PATH=User'
choco install git
choco install ninja # This is required by opencv installed via vcpkg
choco install rapidee
Install Visual Studio. You can find the installer in the intranet in the repository\common\drivers_and_software\microsoft\Visual Studio
.
At the current moment (Feb 2018):
- vcpkg needs either the
2015 Update 3
or2017
- cyberith provides the sdk for
2015
Considering these two VS version are ABI compatible, installing the 2017
version is recommended.
Install VS enabling all the C++ packages.
Install vcpkg:
cd C:\Users\icub\Documents
mkdir code
mkdir git
cd git
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
.\bootstrap-vcpkg.bat
.\vcpkg.exe integrate install # From an admin cmd
./vcpkg install --triplet x64-windows ace gsl eigen3 sqlite3 opencv freeglut ode sdl2 qt5-declarative qt5-multimedia
Due to the institute firewall rules, for some reason the download of some of the archives fails (vcpkg#932
). A workaround is downloading them from a browser that allows resuming a download such as chrome (with firefox it didn't work). Get the link of the file from the powershell and paste it in the browser. The download will stop before finishing, at this point restart it and move the downloaded archive to the vcpkg/downloads
folder.
Here below you can find a list of archives which download fails updated to Apr 10th 2018:
Before installing the superbuild, read carefully the Windows installation notes. For this setup we have chosen to handle dependencies with vcpkg
, and their access from the superbuild should be configured manually. Open the Rapid Environment Editor program we installed in the first step with chocolatey, and add the following User VARIABLES:
VCPKG_ROOT=C:\Users\icub\Documents\code\git\vcpkg
CMAKE_PROGRAM_PATH=%VCPKG_ROOT%/installed/x64-windows/tools
CMAKE_PREFIX_PATH=%VCPKG_ROOT%/installed/x64-windows;%VCPKG_ROOT%/installed/x64-windows/debug
And append to Path
the following variables:
%VCPKG_ROOT%/installed/x64-windows/debug/bin
%VCPKG_ROOT%/installed/x64-windows/bin
Tip: Use Get-ChildItem Env:
to print all environment variables from the powershell.
Now let's install the robotology-superbuild
:
cd C:\Users\icub\Documents\code\git\
git clone https://github.com/robotology/robotology-superbuild.git
cd robotology-superbuild
cmake -DNON_INTERACTIVE_BUILD:BOOL=ON ..
cmake --build . --config Release
Read the docs to understand how to let CMake find packages when importing them from Visual Studio or Open Source projects.
Note: vcpkg
ships a toolchain script for setting up the environment. From CMake GUI projects can be configured to source C:\Users\icub\Documents\code\git\vcpkg\scripts\buildsystems\vcpkg.cmake
. However, the projects handled by the superbuild still cannot access the variables set by the toolchain. Setting the environment variables as we already did is a possible workaround.
- Visit https://oculus.com/setup
- Download and execute the setup file
- Go to https://developer.cyberith.com and log in (ask Daniele for the credentials)
- From the SDK tab, download the C++ SDK for Windows
- From the Tools, download the Virtualizer Control Panel
- From the Instructions tab, follow the Virtualizer + Oculus CV1 Setup document
- Optional: download the demos
Then:
- Extract
CybSDK_tools_controlpanel_main
inC:\Users\icub\git\cyb\ControlPanel
- Extract
CybSDK_sdk_windows_cpp_core
inC:\Users\icub\git\cyb\SDK
- Optional: extract the demo in
C:\Users\icub\git\cyb\Demos\<folder>
@diegoferigo note that
'ADD_CMAKE_TO_PATH=User'
can create problems depending on the rest of thePATH
configuration, because several Qt5 dlls are installed with the CMake executable.