build: Update Windows to Qt5.15 (#798)

* Update compile howto

- to qt5.15
- minimal install overhead
- sync with vscode and cmake

* Update docs with more input

gh actions windows: Qt5.15 and msvc2019

* fix: Azure build
This commit is contained in:
brindosch 2020-05-18 21:09:33 +02:00 committed by GitHub
parent b0fcad4bb3
commit a38502b8fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 28 additions and 22 deletions

View File

@ -85,8 +85,8 @@ jobs:
- script: |
cd $(Build.SourcesDirectory)
python -m pip install aqtinstall
python -m aqt install -O c:\Qt 5.14.0 windows desktop win64_msvc2017_64
displayName: 'Install Qt 5.14.0'
python -m aqt install -O c:\Qt 5.15.0 windows desktop win64_msvc2019_64
displayName: 'Install Qt 5.15.0'
# build process
- bash: ./.ci/ci_build.sh
env:

View File

@ -18,4 +18,8 @@ indent_size = 4
# js and webui
[*.{ts,js,html}]
indent_style = space
indent_size = 2
indent_size = 2
# version file
[version]
insert_final_newline = false

View File

@ -137,9 +137,9 @@ jobs:
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: '5.14.1'
version: '5.15.0'
target: 'desktop'
arch: 'win64_msvc2017_64'
arch: 'win64_msvc2019_64'
- name: Install Python
uses: actions/setup-python@v1

View File

@ -101,9 +101,9 @@ jobs:
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: '5.14.1'
version: '5.15.0'
target: 'desktop'
arch: 'win64_msvc2017_64'
arch: 'win64_msvc2019_64'
- name: Install Python
uses: actions/setup-python@v1

View File

@ -17,7 +17,7 @@
"name": "Win32",
"includePath": [
"${workspaceFolder}/**",
"G:/Programme/Qt/5.14.1/msvc2017_64/include/**"
"C:/Qt/5.15.0/msvc2019_64/include/**"
],
"defines": [
"_DEBUG",

View File

@ -7,8 +7,6 @@
"settings": {
"editor.formatOnSave": false,
"cmake.environment": {
"Qt5_DIR":"G:/Programme/Qt/5.14.1/msvc2017_64/lib/cmake/Qt5",
"CMAKE_PREFIX_PATH": "G:/Programme/Qt/5.14.1/msvc2017_64"
},
},
"extensions": {

2
.vscode/launch.json vendored
View File

@ -27,7 +27,7 @@
"name": "(Windows) hyperiond",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/build/bin/hyperiond.exe",
"program": "${workspaceFolder}/build/bin/Debug/hyperiond.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",

View File

@ -95,7 +95,7 @@ MACRO(FIRSTSUBDIR result curdir)
FOREACH(child ${children})
IF(IS_DIRECTORY ${curdir}/${child})
LIST(APPEND dirlist "${curdir}/${child}")
#BREAK()
BREAK()
ENDIF()
ENDFOREACH()
SET(${result} ${dirlist})
@ -283,10 +283,10 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
# The Qt5_DIR should point to Qt5Config.cmake -> C:/Qt/5.xx/msvc2017_64/lib/cmake/Qt5
# The CMAKE_PREFIX_PATH should point to the install directory -> C:/Qt/5.xx/msvc2017_64
FIRSTSUBDIR(SUBDIRQT "C:/Qt")
SET(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} "${SUBDIRQT}/msvc2017_64")
SET(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} "${SUBDIRQT}/msvc2019_64")
if (NOT DEFINED ENV{Qt5_DIR})
message(STATUS "Set Qt5_DIR to default install path C:/Qt")
SET(Qt5_DIR "${SUBDIRQT}/msvc2017_64/lib/cmake/Qt5")
message(STATUS "Set Qt5 module path: ${SUBDIRQT}")
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${SUBDIRQT}/msvc2019_64/lib/cmake/Qt5")
endif()
endif()

View File

@ -78,18 +78,18 @@ brew install doxygen
We assume a 64bit Windows 7 or higher. Install the following
- [Git](https://git-scm.com/downloads) (Check: Add to PATH)
- [Python 3 (Windows x86-64 executable installer)](https://www.python.org/downloads/windows/) (Check: Add to PATH and Debug Symbols)
- Open a console window and execute `pip install aqtinstall`.
- Now we can download Qt to _C:\Qt_ `mkdir c:\Qt && aqt install -O c:\Qt 5.15.0 windows desktop win64_msvc2019_64`
- [CMake (Windows win64-x64 Installer)](https://cmake.org/download/) (Check: Add to PATH)
- [Qt5](https://www.qt.io/download-open-source) (Check: Component install: msvc 2017 64bit). No configuration for PATH is set, we assume the default install path.
- [Visual Studio 2019 Build Tools](https://go.microsoft.com/fwlink/?linkid=840931)
- The Visual Studio 2019 Community Editor is not required but will be installed as part of the compiler and Windows SDK
- Select C++ Desktop Development Tools
- Now just select `MSVC v142 VS 2019 C++ x64/x86-Buildtools`, `C++-CMake Tools for Windows` and `Windows 10 SDK`. Everything else is not needed.
- [Visual Studio 2019 Build Tools](https://go.microsoft.com/fwlink/?linkid=840931) ([direct link](https://aka.ms/vs/16/release/vs_buildtools.exe))
- Select C++ Buildtools
- On the right, just select `MSVC v142 VS 2019 C++ x64/x86-Buildtools` and latest `Windows 10 SDK`. Everything else is not needed.
# Compiling and installing Hyperion
### The general quick way (without big comments)
complete automated process:
complete automated process for Mac/Linux:
```bash
wget -qO- https://raw.githubusercontent.com/hyperion-project/hyperion.ng/master/bin/compile.sh | sh
```
@ -161,7 +161,10 @@ cmake -DPLATFORM=osx -DCMAKE_BUILD_TYPE=Release ..
To generate files on Windows (Release+Debug capable):
Platform should be auto detected and refer to windows, you can also force windows:
```
```sh
# You might need to setup MSVC env first
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
cmake -DPLATFORM=windows -G "Windows 16 2019" ..
```
@ -181,6 +184,7 @@ On Windows run
```bash
cmake --build . --config Release -- -maxcpucount
```
Maintainer: To build installer, install [NSIS](https://nsis.sourceforge.io/Main_Page) and set env `VCINSTALLDIR="C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC"`
### Install hyperion into your system