Skip to content

Installation

Alexander Vieth edited this page Dec 15, 2023 · 68 revisions

Locally Build ManiVault

You can download ManiVault's source code from the repository on GitHub in any way you like, but the simplest is:

git clone --recurse-submodule git@github.com:ManiVaultStudio/core.git

Dependencies

Be sure to install all dependencies before building ManiVault:

Windows-specific

To fully set up Qt:

  • Add a QT_DIR environment variable to your Qt install path (e.g. C:\Qt\6.3.2\msvc2019_64\) so that CMake can link ManiVault to Qt for a successful build.
  • Add the location of the installed Qt libraries (e.g. C:\Qt\6.3.2\msvc2019_64\bin) to the user or system path variable so that the installed .exe might find these runtime libraries when you start it.

Linux-specific

Tried on Ubuntu 23.04 using gcc 12.2.0 and CMake 3.26.4. Install build dependencies (building infrastructure, Qt packages, zlib):

sudo apt install build-essential cmake libgl1-mesa-dev qt6-base-dev qt6-base-private-dev qt6-webengine-dev qt6-5compat-dev zlib1g libxkbcommon-dev libtbb-dev

There are additional dependencies for running:

sudo apt install qt6-wayland qt6-svg-dev 

Project configuration

Install location

Building the plugin system library requires setting an installation path where you would like the executable and library to be installed to. ManiVault uses CMake as it's build system. You'll need to set the variable MV_INSTALL_DIR to your install directory when configurating the CMake project, e.g. D:/Documents/ManiVault/install/ or /home/USERNAME/ManiVault/install/.

CMake GUI

  1. Launch the CMake GUI
  2. In the source code field browse to the local folder to which you cloned the ManiVault core repo, e.g. D:/Documents/ManiVault/core
  3. In the build field copy the source code field but append /Build at the end. This will generate a new folder for all files necessary for building the project.
  4. Set the MV_INSTALL_DIR variable to your install directory and define a ZLIB_ROOT variable pointing to the Zlib installation (the latter might be automatically found during configuration, e.g. on Linux).
  5. Press Configure and select the generator for your IDE of choice with the platform of x64. Press Finish to configure the project.
  6. A lot of red paths should now appear. Check that the ones pointing to Qt directories seem correct and then press Generate to generate the solution for your given IDE.
  7. Press Open Project to launch the IDE and the project.

Compilation

This depends on your IDE and compiler of choice. Here we give some exemplary setup instructions.

Windows: Visual Studio

You selected Visual Studio as the generator in the CMake GUI. After opening the project:

  1. At the top of Visual Studio set the build mode (where it says Debug) to Release.
  2. Right click the solution and press Build Solution, if this does not produce errors, continue to the next step.
  3. Right click the project MV_Application in the Solution Explorer and select "Set as Startup Project".
  4. Run the project with Ctrl+F5 to launch ManiVault.

Linux

Tried on Ubuntu 23.04 using gcc 12.2.0 and CMake 3.26.4. In the cloned ManiVault core folder:

mkdir build
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DMV_INSTALL_DIR=/home/USERNAME/ManiVault/install -G "Unix Makefiles"
cmake --build build --config Release

Depending on your memory constraints, you can always append -j N with e.g. N=4 as the number of parallel build jobs to the last command or use another generator like e.g. -G "Ninja".

Notes

  • Note: Both code and setup instructions might still reference HDPS, the development name of ManiVault.
  • After first time compiling on macOS it might be necessary to manually moc the MainWindow.ui file:
uic MainWindow.ui -o ui_MainWindow.h
mv ui_MainWindow.h ../Build/
  • ManiVaultStudio might not run properly on integrated/old graphics hardware (in some cases the application crashes). The solution is to run on high-performance (recent) graphics hardware. The link below demontrates how to do this: https://pureinfotech.com/set-gpu-app-windows-10/

Clone this wiki locally