Skip to content

Commit

Permalink
Switch to using Visual Studio 2022
Browse files Browse the repository at this point in the history
Backport of musescore#12086
  • Loading branch information
Jojo-Schmitz committed Jan 12, 2023
1 parent 35c96ad commit 95b7118
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:

jobs:
build_x64:
runs-on: windows-2019
runs-on: windows-2022
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
path: build.artifacts\

build_x32:
runs-on: windows-2019
runs-on: windows-2022
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
Expand Down Expand Up @@ -183,7 +183,7 @@ jobs:
name: MuseScore_x86_${{ github.run_id }}
path: build.artifacts\
build_portable:
runs-on: windows-2019
runs-on: windows-2022
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion CMakeSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"configurations": [
{
"name": "x64-RelWithDebInfo",
"generator": "Visual Studio 16 2019 Win64",
"generator": "Visual Studio 17 2022 Win64",
"configurationType": "RelWithDebInfo",
"inheritEnvironments": [ "msvc_x64_x64" ],
"buildRoot": "${projectDir}\\msvc.build_x64", // "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
Expand Down
2 changes: 1 addition & 1 deletion build/ci/windows/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ ECHO "BUILD_UI_MU4: %BUILD_UI_MU4%"
XCOPY "C:\musescore_dependencies" %CD% /E /I /Y
ECHO "Finished copy dependencies"

SET GENERATOR_NAME=Visual Studio 16 2019
SET GENERATOR_NAME=Visual Studio 17 2022
SET MSCORE_STABLE_BUILD="TRUE"

:: TODO We need define paths during image creation
Expand Down
9 changes: 6 additions & 3 deletions msvc_build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ IF "%GENERATOR_NAME%"=="" (
)

IF "%GENERATOR_NAME%"=="" (
ECHO "No supported version of Microsoft Visual Studio (2017 or 2019) found."
ECHO "No supported version of Microsoft Visual Studio (2017, 2019 or 2022) found."
GOTO :END
)

Expand Down Expand Up @@ -148,8 +148,11 @@ IF /I "%1"=="clean" (
SET VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
IF NOT EXIST %VSWHERE% EXIT /B !ERRORLEVEL!

REM Try Visual Studio 2019 first.
CALL :FIND_GENERATOR_VERSION %VSWHERE% 16 2019
REM Try Visual Studio 2022 first.
CALL :FIND_GENERATOR_VERSION %VSWHERE% 17 2022

REM Fall back to Visual Studio 2019.
IF "%GENERATOR_NAME%"=="" CALL :FIND_GENERATOR_VERSION %VSWHERE% 16 2019

REM Fall back to Visual Studio 2017.
IF "%GENERATOR_NAME%"=="" CALL :FIND_GENERATOR_VERSION %VSWHERE% 15 2017
Expand Down

0 comments on commit 95b7118

Please sign in to comment.