Did not find what you were looking for?

Build Instructions Windows

Dependencies and Prerequisites

Configuration and build

ToolMinimum versionRecommended
Visual Studio20192022
python3.83.10
Qt6.56.6

It is possible to use Qt 6.4 for to build ResInsight, but some install features introduced in Qt 6.5 are not available.

Clone and update sub modules

git clone https://github.com/OPM/ResInsight
cd ResInsight
git submodule update --init

Build and install required dependencies using vcpkg

Open a command prompt using “Run as Administrator” for Visual Studio x64.

Detailed Developer notes

ThirdParty/vcpkg/bootstrap-vcpkg.bat

Qt

Official install tools

Qt can be installed using the MaintenanceTool.exe, and select the following modules:

aqtinstall

aqtinstall is a Python tool used to install Qt directly from Qt distribution sites, and does not require a user account for Qt sites. Other ways to install Qt is described official Qt documentation

Create a root folder for Qt installations. In this folder, create a virtual environment for aqtinstall:

python3 -m venv myvenv
myvenv/Scripts/activate
pip3 install aqtinstall
aqt install-qt linux desktop 6.6.3 -m qtcharts qt5compat qtnetworkauth

Build ResInsight

The configuration flags for a basic build is given in CMakePresets.json in the root of the repository. Configuration flags specific for the system to build on can be specified in CMakeUserPresets.json. This file is ignored by git.

  • Create a copy of CMakeUserPresets-example.json and rename to CMakeUserPresets.json
  • Update the path to your local installation of Qt6 for the key CMAKE_PREFIX_PATH in CMakeUserPresets.json

Start Visual Studio, and open the ResInsight source folder. When you open the ResInsight folder for the first time, vcpkg may spend a few minutes building the required dependencies specified in vcpkg.json.

CMake Configuration

Configure and build with CMake Presets in Visual Studio