diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml index 2a5e87675..04b94ac11 100644 --- a/.github/workflows/desktop-build.yml +++ b/.github/workflows/desktop-build.yml @@ -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 diff --git a/cmake/FindVCredistRuntime.cmake b/cmake/FindVCredistRuntime.cmake index db9c5a17f..4233c588a 100644 --- a/cmake/FindVCredistRuntime.cmake +++ b/cmake/FindVCredistRuntime.cmake @@ -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() diff --git a/cmake/NSIS.template.in b/cmake/NSIS.template.in index 8f4aa1559..dc4412ff3 100644 --- a/cmake/NSIS.template.in +++ b/cmake/NSIS.template.in @@ -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}