diff --git a/.github/workflows/windows_build_qt.yml b/.github/workflows/windows_build_qt.yml index 4d392afb81..2cf4932f15 100644 --- a/.github/workflows/windows_build_qt.yml +++ b/.github/workflows/windows_build_qt.yml @@ -107,6 +107,13 @@ jobs: if: inputs.configuration != 'CMake' uses: microsoft/setup-msbuild@v3 + - name: Locate vcvars + if: inputs.configuration == 'CMake' + shell: cmd + run: | + for /f "usebackq tokens=*" %%i in (`call vswhere -latest -property installationPath`) do set "VSINSTPATH=%%i" + echo VCVARSPATH=%VSINSTPATH%\VC\Auxiliary\Build\vcvars64.bat>>%GITHUB_ENV% + - name: Download patches shell: cmd run: | @@ -132,14 +139,14 @@ jobs: id: cmake shell: cmd run: | - call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" + call "%VCVARSPATH%" || exit /b cmake . -B build ${{ inputs.cmakeFlags }} "-DCMAKE_PREFIX_PATH=%cd%\deps" -DQT_BUILD=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DDISABLE_ADVANCE_SIMD=ON -G Ninja - name: Build PCSX2 shell: cmd run: | if "${{ inputs.configuration }}"=="CMake" ( - call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" + call "%VCVARSPATH%" || exit /b cmake --build build --config Release || exit /b cmake --install build --config Release || exit /b ) else ( @@ -152,7 +159,7 @@ jobs: if: inputs.configuration == 'CMake' shell: cmd run: | - call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" + call "%VCVARSPATH%" || exit /b set PATH=%PATH%;%GITHUB_WORKSPACE%\bin cmake --build build --config Release --target unittests