Skip to content

Commit ff591e7

Browse files
committed
Add windows build instructions
1 parent ca3a557 commit ff591e7

10 files changed

+102
-173
lines changed

content/getting-started/Overview.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ When ResInsight is compiled with ABAQUS-odb support, _`*.odb`_ files can be impo
106106

107107
The geomechanical cases are sorted into its own folder in the project tree named **Geomechanical Models** {{< image-in-text src="images/getting-started/GeoMechCases24x24.png" >}} as opposed to the **Grid Models** folder where the Eclipse cases and **Grid Case Groups** resides.
108108

109-
See [Build Instructions]({{< ref "buildinstructions.md" >}}) on how to compile ResInsight with odb-support.
109+
See [Build Instructions]({{< ref "cmake-configuration.md" >}}) on how to compile ResInsight with odb-support.
110110

111111
#### Grid Case Groups
112112

content/getting-started/download-and-install/_index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ See the following for common install procedures and options:
1212

1313
- [ Windows Installation ]({{< ref "windows-installation.md" >}})
1414

15-
See [ Build Instructions ]({{< ref "buildinstructions.md" >}}) for the complete list of configuration options including support for
15+
See [ Build Instructions ]({{< ref "cmake-configuration.md" >}}) for the complete list of configuration options including support for
1616
Octave plugins, ABAQUS ODB API, and HDF5.
1717

1818

content/getting-started/download-and-install/build-instructions-ubuntu-qt6.md

-87
This file was deleted.

content/getting-started/download-and-install/build-instructions-ubuntu.md

+28-36
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,20 @@ weight = 30
77

88
## Dependencies and Prerequisites
99

10-
This page is mainly build instructions for Ubuntu, but some comments are also added for RHEL8 and Windows.
10+
This page is mainly build instructions for Ubuntu, but some comments are also added for **RHEL8**.
11+
12+
Basic instructions without Python binding and GRPC.
1113

1214

1315
### Configuration and build
1416

1517
| Tool | Minimum version |
1618
|-------------------------|------------------|
17-
| git | 2.7.4 |
18-
| gcc | 10 |
19-
| python | 3 |
19+
| gcc | 11 |
20+
| python | 3.8 |
21+
| Qt | 6.4 |
2022

23+
It is possible to use Qt 6.4 for building ResInsight, but some install features introduced in Qt 6.5 are not supported.
2124

2225
Update apt installer
2326

@@ -27,7 +30,6 @@ Install GCC and related tools
2730

2831
sudo apt install build-essential curl zip unzip tar flex bison
2932

30-
As gcc 10 is required, it can be useful to set the default compiler.
3133
[Set default compiler](https://linuxconfig.org/how-to-switch-between-multiple-gcc-and-g-compiler-versions-on-ubuntu-20-04-lts-focal-fossa)
3234

3335
Dependencies for RHEL8
@@ -45,46 +47,36 @@ vcpkg is located in the folder ThirdParty/vcpkg. The packages to be installed is
4547

4648
ThirdParty/vcpkg/bootstrap-vcpkg.sh
4749

48-
### (Windows) Build and install required dependencies using vcpkg
49-
Open a command prompt using "Run as Administrator" for Visual Studio x64.
50+
### Qt
5051

51-
[Detailed Developer notes](https://ceetronsolutions.github.io/resinsight-system-doc/editor/vcpkg)
52+
The version of Qt ResInsight depends on is probably not available as a package for the Linux distribution you are working with. Here is a short description on how to install a custom Qt version.
5253

53-
ThirdParty/vcpkg/bootstrap-vcpkg.bat
54+
[aqtinstall](https://github.com/miurahr/aqtinstall) is a Python tool used to install precompiled versions of Qt. Other ways to install Qt is described [official Qt documentation](https://www.qt.io/download-qt-installer-oss)
5455

55-
### Python dependencies
56-
Install Python version 3.8 or newer, and use dev-requirements.txt
5756

58-
python3 -m pip install -r GrpcInterface/Python/dev-requirements.txt
57+
Create a root folder for Qt installations. In this folder, create a virtual environment for **aqtinstall**:
5958

60-
### Qt
59+
python3 -m venv myvenv
60+
source myvenv/bin/activate
61+
pip3 install aqtinstall
62+
aqt install-qt linux desktop 6.6.3 -m qtcharts qt5compat qtnetworkauth
63+
6164

62-
System packages Ubuntu
65+
### Build ResInsight
6366

64-
sudo apt install -y qtbase5-dev libqt5svg5-dev qtbase5-private-dev libqt5networkauth5-dev
67+
Install Ninja build tool
68+
69+
sudo apt-get install ninja-build
6570

66-
System packages RHEL8
71+
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.
6772

68-
sudo yum install -y qt5-devel qt5-qtnetworkauth-devel qt5-qtcharts-devel qt5-qtbase-private-devel gcc-toolset-10 gcc-toolset-10-libatomic-devel
73+
- Create a copy of `CMakeUserPresets-example.json` and rename to `CMakeUserPresets.json`
74+
- Update the path to your local installation of Qt6 for the key `CMAKE_PREFIX_PATH` in `CMakeUserPresets.json`
6975

70-
Installation of custom Qt
76+
Set current working folder to the root folder of the ResInsight repository. Execute the following commands to build ResInsight:
7177

72-
Go to a folder to install custom Qt
73-
In this folder, execute
74-
75-
python3 -m pip install aqtinstall
76-
aqt install-qt linux desktop 5.15.2 -m qtcharts qtnetworkauth
77-
78+
cmake . --preset=linux-base
79+
cd build
80+
ninja
7881

79-
### Build ResInsight
80-
mkdir cmakebuild
81-
cd cmakebuild
82-
cmake \
83-
-DCMAKE_PREFIX_PATH=/your_qt_path/5.15.2/gcc_64/lib/cmake \
84-
-DRESINSIGHT_ENABLE_GRPC=true \
85-
-DRESINSIGHT_GRPC_PYTHON_EXECUTABLE=python \
86-
-DCMAKE_TOOLCHAIN_FILE=../ThirdParty/vcpkg/scripts/buildsystems/vcpkg.cmake \
87-
-DVCPKG_TARGET_TRIPLET=x64-linux-release \
88-
..
89-
90-
make -j8
82+
[CMake Configuration]({{< relref "cmake-configuration" >}})
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
+++
2+
title = "Build Instructions Windows"
3+
published = true
4+
hidden = false
5+
weight = 31
6+
+++
7+
8+
## Dependencies and Prerequisites
9+
10+
### Configuration and build
11+
12+
| Tool | Minimum version | Recommended |
13+
|-------------------------|------------------|-------------|
14+
| Visual Studio | 2019 | 2022 |
15+
| python | 3.8 | 3.10 |
16+
| Qt | 6.5 | 6.6 |
17+
18+
It is possible to use Qt 6.4 for to build ResInsight, but some install features introduced in Qt 6.5 are not available.
19+
20+
### Clone and update sub modules
21+
22+
git clone https://github.com/OPM/ResInsight
23+
cd ResInsight
24+
git submodule update --init
25+
26+
### Build and install required dependencies using vcpkg
27+
Open a command prompt using "Run as Administrator" for Visual Studio x64.
28+
29+
[Detailed Developer notes](https://ceetronsolutions.github.io/resinsight-system-doc/editor/vcpkg)
30+
31+
ThirdParty/vcpkg/bootstrap-vcpkg.bat
32+
33+
### Qt
34+
35+
**Official install tools**
36+
37+
Qt can be installed using the `MaintenanceTool.exe`, and select the following modules:
38+
39+
![]({{< relref "" >}}images/getting-started/qtmaintenancetool.png)
40+
41+
**aqtinstall**
42+
43+
[aqtinstall](https://github.com/miurahr/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](https://www.qt.io/download-qt-installer-oss)
44+
45+
Create a root folder for Qt installations. In this folder, create a virtual environment for **aqtinstall**:
46+
47+
python3 -m venv myvenv
48+
myvenv/Scripts/activate
49+
pip3 install aqtinstall
50+
aqt install-qt linux desktop 6.6.3 -m qtcharts qt5compat qtnetworkauth
51+
52+
53+
### Build ResInsight
54+
55+
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.
56+
57+
- Create a copy of `CMakeUserPresets-example.json` and rename to `CMakeUserPresets.json`
58+
- Update the path to your local installation of Qt6 for the key `CMAKE_PREFIX_PATH` in `CMakeUserPresets.json`
59+
60+
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`.
61+
62+
[CMake Configuration]({{< relref "cmake-configuration" >}})
63+
64+
[Configure and build with CMake Presets in Visual Studio](https://learn.microsoft.com/en-us/cpp/build/cmake-presets-vs?view=msvc-170)

content/getting-started/download-and-install/BuildInstructions.md content/getting-started/download-and-install/cmake-configuration.md

+5-45
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,13 @@
11
+++
2-
title = "Building ResInsight from Source"
2+
title = "CMake Configuration"
33
published = true
44
hidden = false
5-
weight = 30
5+
weight = 35
6+
aliases = [
7+
"/getting-started/buildinstructions/"
8+
]
69
+++
710

8-
## Source code
9-
The source code is hosted at [GitHub](https://github.com/opm/resinsight)
10-
11-
In a git enabled shell do: `git clone https://github.com/OPM/ResInsight.git`
12-
13-
## Dependencies and Prerequisites
14-
15-
### Windows Compiler
16-
17-
Visual Studio 2019 and later is supported.
18-
19-
### GCC Compiler
20-
21-
On RedHat Linux 7 or CentOS 7 you need to install devtoolset-10, and enable it with
22-
23-
source /opt/rh/devtoolset-10/enable
24-
25-
### Qt 5
26-
Qt 5.12 or later is supported, Qt 5.15 is recommended.
27-
28-
[Qt download](http://download.qt.io/archive/qt/)
29-
30-
On some configurations you will be asked to specify the location of Qt. Preferred method is to add Qt path to CMake variable **CMAKE_PREFIX_PATH**
31-
32-
Example for Windows : `CMAKE_PREFIX_PATH=F:/Qt/5.15.2/msvc2019_64`
3311

3412
### CMake
3513
[CMake](https://cmake.org/download/) version 3.15 or later is supported.
@@ -38,24 +16,6 @@ Example for Windows : `CMAKE_PREFIX_PATH=F:/Qt/5.15.2/msvc2019_64`
3816
The ResInsight build may be configured in different ways, with optional support for Octave plugins,
3917
ABAQUS ODB API, HDF5, Pyton, and OpenMP. This is configured using options in CMake.
4018

41-
If you check the button 'Grouped' in the CMake GUI, the CMake variables are grouped by prefix.
42-
This makes it easier to see all of the options for ResInsight.
43-
44-
- Open the CMake GUI
45-
- Set the path to the source code
46-
- Set the path to the build directory
47-
- Click **Configure** and select your preferred compiler
48-
- Set the build options and click "Configure" again (see ResInsight specific options below)
49-
- Click **Generate** to generate the makefiles or solution file and project files in the build directory
50-
- Run the compiler using the generated makefiles or solution file/project files to build ResInsight
51-
52-
### Windows
53-
ResInsight has been verified to build and run on Windows 10/11 using Microsoft Visual Studio 2019/2022. Typical usage on Windows is to follow the build instructions above, and then open the generated solution file in Visual Studio to build the application.
54-
55-
### Linux
56-
57-
For a reference build instruction for Ubuntu, see [Reference installation description for Ubuntu]({{< ref "build-instructions-ubuntu.md" >}})
58-
5919
### CMake Options for ResInsight
6020

6121
| CMake Name | Default | Description |

content/getting-started/download-and-install/linux-installation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ For further installation details, see the ResInsight distribution on [Opm Projec
3232

3333
{{% notice info %}}
3434
The binary distributions does not support ABAQUS odb files. For building ResInsight with ABAQUS support, see
35-
[Build Instructions]({{< ref "buildinstructions.md" >}}).
35+
[Build Instructions]({{< ref "cmake-configuration.md" >}}).
3636
{{% /notice %}}
3737

3838
## Custom Qt configuration

content/getting-started/download-and-install/windows-installation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ weight = 20
1313

1414
{{% notice info %}}
1515
The binary distribution does not support ABAQUS odb files. For building ResInsight with ABAQUS support, see
16-
[Build Instructions]({{< ref "buildinstructions.md" >}}).
16+
[Build Instructions]({{< ref "cmake-configuration.md" >}}).
1717
{{% /notice %}}
1818

1919

content/import/GeomechanicalData.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ weight = 20
66

77
ResInsight can be built with support for reading and displaying geomechanical analysis models produced by ABAQUS in the _`*.odb`_ format. This is only possible if you or your organization has a copy of the ODB-Api from Simulia, and a valid license to use it.
88

9-
If you have, and would like to a use these features, please see [ Build Instructions ]({{< relref "buildinstructions.md" >}}) for a description on how to build ResInsight and how to include the support for odb-files.
9+
If you have, and would like to a use these features, please see [ Build Instructions ]({{< relref "cmake-configuration.md" >}}) for a description on how to build ResInsight and how to include the support for odb-files.
1010

1111
### Geo Mechanical Data Support
1212
Geo-mechanical data can be imported using the **Import -> Geo Mechanical Cases menu**. Here three options are present: **Import Geo Mechanical Model**, **Import Geo Mechanical Model (Time Step Filtered)** (both for odb files) and **Import Element Property Table**.
Loading

0 commit comments

Comments
 (0)