Skip to content

Commit 5239b3d

Browse files
committed
feat: windows使用msvc2022编译
1 parent 28affa9 commit 5239b3d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/windows.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ on:
1616
jobs:
1717
build:
1818
name: Build
19-
# windows-latest目前是windows server 2019
19+
# windows-latest目前是windows server 2022
2020
# windows server 2019安装的是vs2019,windows server 2016安装的是vs2017
2121
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
22-
runs-on: windows-2019
22+
runs-on: windows-latest
2323

2424
# 矩阵配置 https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix
2525
strategy:
@@ -39,8 +39,8 @@ jobs:
3939
# 使用表达式语法${{}}访问上下文 https://help.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions
4040
env:
4141
target-name: QtScrcpy
42-
vcvarsall-path: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat'
43-
vcinstall-path: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC'
42+
vcvarsall-path: 'C:\Program Files (x86)\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat'
43+
vcinstall-path: 'C:\Program Files (x86)\Microsoft Visual Studio\2022\Enterprise\VC'
4444
qt-install-path: ${{ github.workspace }}/${{ matrix.qt-ver }}
4545
plantform-des: win
4646
# 步骤

ci/win/build_for_win.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ if exist %temp_path% (
8686
md %temp_path%
8787
cd %temp_path%
8888

89-
set cmake_params=-DCMAKE_PREFIX_PATH=%qt_cmake_path% -DCMAKE_BUILD_TYPE=%build_mode% -G "Visual Studio 16 2019" -A %cmake_vs_build_mode%
89+
set cmake_params=-DCMAKE_PREFIX_PATH=%qt_cmake_path% -DCMAKE_BUILD_TYPE=%build_mode% -G "Visual Studio 17 2022" -A %cmake_vs_build_mode%
9090
echo cmake params: %cmake_params%
9191

9292
cmake %cmake_params% ../..

0 commit comments

Comments
 (0)