Building from Source
CosmoScout VR supports 64 bits only and can be build in debug and release mode on Linux and Windows. You will need a copy of CMake (version 3.22 or greater), Boost (version 1.69 or greater) and a recent C++ compiler (gcc 7, clang 5 or msvc 19). For the compilation of the externals Python is also required.
-
Downloading External Dependencies
Before you start, it may be necessary to install some additional system packages.
Getting a precompiled version of boost suitable for CosmoScout VR which will be found by CMake can be difficult: Older CMake versions fail to find boost versions which are too new; but on the other hand you need a rather new version if you use a very recent version of MSVC (e.g. 14.2, the one shipped with Visual Studio 2019). The βoldestβ precompiled boost which you can get on SourceForge for MSVC 14.2 is version 1.70.0.
So using version 1.70.0 may work in most cases. You can get it from from https://sourceforge.net/projects/boost/files/boost-binaries/1.70.0
MSVC Visual Studio File Link 14.2 2019 boost_1_70_0-unsupported-msvc-14.2-64.exe
download 14.1 2017 boost_1_70_0-msvc-14.1-64.exe
download 14.0 2015 boost_1_70_0-msvc-14.0-64.exe
download As there are many distributions with varying default libs and available packages, giving an exhaustive list is difficult. Here is an exemplary list for Ubuntu 20.04 which you have to adapt to your specific distribution:
Terminal window sudo apt-get install git cmake build-essential xorg-dev libboost-all-dev libglu1-mesa-dev libssl-dev libxkbcommon0 -
Cloning the Repository
Once these dependencies are installed, you can clone the repository. Open a terminal in a directory where you want to store the source code and execute the following commands:
Terminal window git clone https://github.com/cosmoscout/cosmoscout-vr.gitcd cosmoscout-vrgit submodule update --init --recursive -
Building Bundled Dependencies
This step only has to be done once. It will compile all dependencies which are bundled as git submodules in the
build
directory and install them to theinstall
directory.Per default, all dependencies are built in release mode using precompiled headers and unity builds where possible. This behavior can be adjusted using some environment variables:
Variable Default Description COSMOSCOUT_DEBUG_BUILD
false
Set to true
to build everything in debug mode.COSMOSCOUT_USE_UNITY_BUILD
true
Set to false
to disable unity builds.COSMOSCOUT_USE_PCH
true
Set to false
to not use precompiled headers.You should set these as required before executing the scripts below.
If you are using Visual Studio 2017, you have to replace
-G "Visual Studio 16 2019" -A x64
with-G "Visual Studio 15 Win64"
. All parameters given tomake_externals.bat
will be forwarded to CMake. For example, you can change the CMake generator this way.Terminal window make_externals.bat -G "Visual Studio 16 2019" -A x64All parameters given to
make_externals.sh
will be forwarded to CMake. For example, you can change the CMake generator this way.Terminal window ./make_externals.sh -G "Unix Makefiles" -
Building CosmoScout VR
One can either use CMake Presets or build the software manually using CMake. Using CMake Presets is easy and definitely the recommended way.
Terminal window set BOOST_ROOT=C:\local\boost_1_70_0# You can get a list of available configuration# presets using the following command:cmake --list-presets# After you decided for a preset you can# configure with the following command:cmake --preset <preset-name># If you want to use clache:# cmake --preset <preset-name> -DCMAKE_VS_GLOBALS=CLToolExe"=clcache.exe;TrackFileAccess=false"# The next step is to build CosmoScout VR.# You can also list build presets:cmake --build --list-presets# After you decided for a preset you can build with the following command:cmake --build --preset <preset-name>Terminal window # You can get a list of available configuration# presets using the following command:cmake --list-presets# After you decided for a preset you can# configure with the following command:cmake --preset <preset-name># If you want to use ccache:# cmake --preset <preset-name> -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache# The next step is to build CosmoScout VR.# You can also list build presets:cmake --build --list-presets# After you decided for a preset you can build with the following command:cmake --build --preset <preset-name> -
Running CosmoScout VR
Terminal window install\windows-Release\bin\start.batTerminal window install/linux-Release/bin/start.shThe application can be started with the command above. When started for the very first time, some example datasets will be downloaded from the internet. This will take some time! The progress of this operation is shown on the loading screen.
-
Optional: Running Tests
If you specified
-DCOSMOSCOUT_UNIT_TESTS=On
at build time, you can now execute the unit tests with:Terminal window install\linux-Release\bin\run_tests.batTerminal window install/linux-Release/bin/run_tests.shinstall/linux-Release/bin/run_graphical_tests.sh
Build with Astro using the Starlight theme.
Hosted on GitHub Pages.