feat: windows使用msvc2022编译
Some checks failed
MacOS / Build (push) Has been cancelled
Ubuntu / Build (push) Has been cancelled
Windows / Build (push) Has been cancelled

This commit is contained in:
rankun 2025-07-21 20:32:32 +08:00
commit 7b17d74a16
2 changed files with 5 additions and 5 deletions

View file

@ -16,10 +16,10 @@ on:
jobs:
build:
name: Build
# windows-latest目前是windows server 2019
# windows-latest目前是windows server 2022
# windows server 2019安装的是vs2019windows server 2016安装的是vs2017
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
runs-on: windows-2019
runs-on: windows-latest
# 矩阵配置 https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix
strategy:
@ -39,8 +39,8 @@ jobs:
# 使用表达式语法${{}}访问上下文 https://help.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions
env:
target-name: QtScrcpy
vcvarsall-path: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat'
vcinstall-path: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC'
vcvarsall-path: 'C:\Program Files (x86)\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat'
vcinstall-path: 'C:\Program Files (x86)\Microsoft Visual Studio\2022\Enterprise\VC'
qt-install-path: ${{ github.workspace }}/${{ matrix.qt-ver }}
plantform-des: win
# 步骤

View file

@ -86,7 +86,7 @@ if exist %temp_path% (
md %temp_path%
cd %temp_path%
set cmake_params=-DCMAKE_PREFIX_PATH=%qt_cmake_path% -DCMAKE_BUILD_TYPE=%build_mode% -G "Visual Studio 16 2019" -A %cmake_vs_build_mode%
set cmake_params=-DCMAKE_PREFIX_PATH=%qt_cmake_path% -DCMAKE_BUILD_TYPE=%build_mode% -G "Visual Studio 17 2022" -A %cmake_vs_build_mode%
echo cmake params: %cmake_params%
cmake %cmake_params% ../..