Skip to content
Snippets Groups Projects
Commit e246b663 authored by Ammar Nejati's avatar Ammar Nejati
Browse files

Docs:Install or build>Build>Windows: Update for Visual Studio 2022

Other parts of the documentation is also updated.
parent 6542612f
No related branches found
No related tags found
1 merge request!920Migration from "Visual Studio 16 2019" to "Visual Studio 17 2022"
Pipeline #65706 passed
......@@ -12,7 +12,7 @@ The following instructions have been tested under Windows 10 Pro.
#### Visual Studio
Download **Visual Studio Community Edition** from from the official website [visualstudio.microsoft.com](https://visualstudio.microsoft.com)
The current build instructions are tested with Visual Studio 2019.
The current build instructions are tested with Visual Studio 2022.
#### Qt
......@@ -20,13 +20,14 @@ Download Qt from from the official website [qt.io](https://qt.io)
> Make sure to choose the open source version of Qt and download the online installer.
Select Qt 5.15.0 (LTS) and open the sub tree.
Select Qt 5.15.2 (LTS) and open the sub tree.
Only 'MSVC 2019 64-bit' component is needed.
Make a symbolic link to the directory corresponding to the current Qt version; e.g., if Qt 5.15.0 is installed in `C:\Qt\5.15.0`, then in Windows `cmd` (with administrative rights) execute:
Make a symbolic link to the directory corresponding to the current Qt version; e.g., if Qt 5.15.2 is installed in `C:\Qt\5.15.2`, then in Windows `cmd` (with administrative rights) execute:
```
$ mklink /D "C:\Qt\current" "C:\Qt\5.15.0"
$ mklink /D "C:\Qt\current" "C:\Qt\5.15.2"
$ mklink /D "C:\Qt\msvc" "C:\Qt\5.15.2\msvc2019_64"
```
#### CMake
......@@ -40,24 +41,30 @@ Next up, download Python 3.9. For that, go to [python.org/downloads/](https://ww
Once Python is set up correctly, install `numpy`. Therefore open a PowerShell and type the command:
```
pip install numpy
py -m pip install numpy
```
Analogously install `matplotlib` with
Analogously install `matplotlib`, `setuptools`, `build` and `wheel` with
```
pip install matplotlib
py -m pip install matplotlib setuptools build wheel
```
#### NSIS (for packaging only)
Download and install NSIS 3.03 from the [official website](https://nsis.sourceforge.io/Download).
Add NSIS to the system `PATH`; see below.
#### SWIG
Install SWIG from the official website
If you want to re-build the Python-API with SWIG, download and install SWIG
from the official website
[swig.org/download.html](http://www.swig.org/download.html)
Information can be found on
[http://www.swig.org/Doc1.3/windows.html#Windows_installation]
Unpack the ZIP file and add its folder to PATH (so f.e. `C:\swigwin-4.0.2`)
Unpack the ZIP file and add its folder to PATH (so e.g. `C:\swigwin-4.0.2`)
#### Libraries
......@@ -84,13 +91,13 @@ and paste the corresponding content from the ZIP files in those two folders.
After those installations your `PATH` should contain
```
C:\Qt\5.15.0\msvc2019_64\bin
C:\Qt\5.15.2\msvc2019_64\bin
C:\Program Files\Python39\Scripts\
C:\Program Files\Python39\
C:\opt\x64\include
C:\opt\x64\lib
C:\msys64\usr\bin
C:\Program Files\CMake\bin
C:\Program Files (x86)\NSIS
```
### Build
......@@ -108,7 +115,7 @@ $BUILD_DIR = "build"
mkdir -Force "$BUILD_DIR"
cd "$BUILD_DIR"
cmake -G "Visual Studio 16 2019" -A x64 -T host=x64 -DLIB_MAN=OFF -DQTDIR="$QTDIR" -DQt5_DIR="$QTCMake_DIR/Qt5" -DQt5Test_DIR="$QTCMake_DIR/Qt5Test" -DFFTW3_INCLUDE_DIR="$FFTW3_INCLUDE_DIR" -DFFTW3_LIBRARY="$FFTW3_LIB" -DCMAKE_INCLUDE_PATH="$OPTLIBS/include" -DCMAKE_LIBRARY_PATH="$OPTLIBS/lib" -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe" -B. ..
cmake -G "Visual Studio 17 2022" -A x64 -T host=x64 -DLIB_MAN=OFF -DQTDIR="$QTDIR" -DQt5_DIR="$QTCMake_DIR/Qt5" -DQt5Test_DIR="$QTCMake_DIR/Qt5Test" -DFFTW3_INCLUDE_DIR="$FFTW3_INCLUDE_DIR" -DFFTW3_LIBRARY="$FFTW3_LIB" -DCMAKE_INCLUDE_PATH="$OPTLIBS/include" -DCMAKE_LIBRARY_PATH="$OPTLIBS/lib" -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe" -B. ..
cmake --build . --config Release
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment