CI: Use windows-2022 image with Visual Studio 17 2022 (#4999)

Co-authored-by: ZeldaZach <zahalpern+github@gmail.com>
This commit is contained in:
tooomm
2024-05-13 23:41:50 +02:00
committed by GitHub
parent 2303880b87
commit 872c92a244
3 changed files with 11 additions and 9 deletions

View File

@@ -317,14 +317,16 @@ jobs:
name: Windows ${{matrix.target}}
needs: configure
runs-on: windows-2019
runs-on: windows-2022
env:
CMAKE_GENERATOR: 'Visual Studio 16 2019'
CMAKE_GENERATOR: 'Visual Studio 17 2022'
steps:
- name: Add msbuild to PATH
id: add-msbuild
uses: microsoft/setup-msbuild@v2
with:
msbuild-architecture: x64
- name: Checkout
uses: actions/checkout@v4

View File

@@ -24,7 +24,7 @@ if(WIN32)
get_filename_component(_path ${_path}/../../ ABSOLUTE)
foreach(redist_file ${REDIST_FILE_NAMES})
if(EXISTS "${_path}/${REDIST_FILE}")
if(EXISTS "${_path}/${redist_file}")
set(VCREDISTRUNTIME_FOUND "YES")
set(VCREDISTRUNTIME_FILE ${_path}/${redist_file})
break()

View File

@@ -248,20 +248,20 @@ ${If} $PortableMode = 0
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "VersionMajor" "@CPACK_PACKAGE_VERSION_MAJOR@"
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "VersionMinor" "@CPACK_PACKAGE_VERSION_MINOR@"
IfFileExists "$INSTDIR\vcredist_x86.exe" VcRedist86Exists PastVcRedist86Check
IfFileExists "$INSTDIR\vc_redist.x86.exe" VcRedist86Exists PastVcRedist86Check
VcRedist86Exists:
ExecWait '"$INSTDIR\vcredist_x86.exe" /passive /norestart'
ExecWait '"$INSTDIR\vc_redist.x86.exe" /passive /norestart'
DetailPrint "Wait to ensure unlock of vc_redist file after installation..."
Sleep 3000
Delete "$INSTDIR\vcredist_x86.exe"
Delete "$INSTDIR\vc_redist.x86.exe"
PastVcRedist86Check:
IfFileExists "$INSTDIR\vcredist_x64.exe" VcRedist64Exists PastVcRedist64Check
IfFileExists "$INSTDIR\vc_redist.x64.exe" VcRedist64Exists PastVcRedist64Check
VcRedist64Exists:
ExecWait '"$INSTDIR\vcredist_x64.exe" /passive /norestart'
ExecWait '"$INSTDIR\vc_redist.x64.exe" /passive /norestart'
DetailPrint "Sleep to ensure unlock of vc_redist file after installation..."
Sleep 3000
Delete "$INSTDIR\vcredist_x64.exe"
Delete "$INSTDIR\vc_redist.x64.exe"
PastVcRedist64Check:
${Else}