Skip to content
Snippets Groups Projects
Commit 26fa0314 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

build on Windows: update to Qt6; warn that last full test was for release 1.19

parent fb0bd11b
No related branches found
No related tags found
1 merge request!1598doc-hotfix: build instructions for Windows
Pipeline #97478 failed
......@@ -5,7 +5,9 @@ weight = 10
## Build under Windows
The following instructions have been tested under Windows 10 Pro.
The following instructions have been tested under Windows 10 Pro.
Last full test from our side was for release 1.19.
### Prerequisites
......@@ -20,14 +22,15 @@ 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.2 (LTS) and open the sub tree.
Only 'MSVC 2019 64-bit' component is needed.
Select the latest Qt version with long-time support (LTS) and open the sub tree.
Only the '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.2 is installed in `C:\Qt\5.15.2`, then in Windows `cmd` (with administrative rights) execute:
Make a symbolic link to the directory corresponding to the current Qt version:
if Qt 6.y.z installed in `C:\Qt\6.y.z`, then in Windows `cmd` (with administrative rights) execute:
```
$ mklink /D "C:\Qt\current" "C:\Qt\5.15.2"
$ mklink /D "C:\Qt\msvc" "C:\Qt\5.15.2\msvc2019_64"
$ mklink /D "C:\Qt\current" "C:\Qt\6.y.z"
$ mklink /D "C:\Qt\msvc" "C:\Qt\6.y.z\msvc2019_64"
```
#### CMake
......@@ -89,7 +92,7 @@ and paste the corresponding content from the ZIP files in those two folders.
After those installations your `PATH` should contain
```
C:\Qt\5.15.2\msvc2019_64\bin
C:\Qt\6.y.z\msvc2019_64\bin
C:\Program Files\Python39\Scripts\
C:\Program Files\Python39\
C:\opt\x64\include
......@@ -100,7 +103,8 @@ C:\Program Files (x86)\NSIS
### Build
With all prerequisites completed, you should be able to build and test BornAgain in a PowerShell. In there, execute
With all prerequisites completed, you should be able to build and test BornAgain in a PowerShell.
In there, execute
```
$OPTLIBS = "C:/opt/x64"
......@@ -113,7 +117,7 @@ $BUILD_DIR = "build"
mkdir -Force "$BUILD_DIR"
cd "$BUILD_DIR"
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 -G "Visual Studio 17 2022" -A x64 -T host=x64 -DLIB_MAN=OFF -DQTDIR="$QTDIR" -DQt6_DIR="$QTCMake_DIR/Qt6" -DQt6Test_DIR="$QTCMake_DIR/Qt6Test" -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
......@@ -142,7 +146,7 @@ cd "%BUILD_DIR%"
cmake --version
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -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" -DLIB_MAN=OFF -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe" -B. ..
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DQTDIR="%QTDIR%" -DQt6_DIR="%QTCMake_DIR%/Qt6" -DQt6Test_DIR="%QTCMake_DIR%/Qt6Test" -DFFTW3_INCLUDE_DIR="%FFTW3_INCLUDE_DIR%" -DFFTW3_LIBRARY="%FFTW3_LIB%" -DCMAKE_INCLUDE_PATH="%OPTLIBS%/include" -DCMAKE_LIBRARY_PATH="%OPTLIBS%/lib" -DLIB_MAN=OFF -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe" -B. ..
echo "## BUILD START:" %time%
cmake --build . --config Release --parallel 8
......
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