Skip to content

Add support for Visual Studio 2022 #253

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,23 @@ jobs:
test:
strategy:
matrix:
# Test oldest and newest supported environments
os: [ ubuntu-18.04, ubuntu-latest, windows-2019, windows-latest ]
python: ["3.6", "3.10"]
include:
- { os: ubuntu-18.04, python: "3.6" }
- { os: ubuntu-18.04, python: "3.10" }
- { os: ubuntu-latest, python: "3.6" }
- { os: ubuntu-latest, python: "3.10" }
- { os: windows-2019, python: "3.6", visual-studio: 2017 }
- { os: windows-2019, python: "3.10", visual-studio: 2017 }
- { os: windows-2019, python: "3.6", visual-studio: 2019 }
- { os: windows-2019, python: "3.10", visual-studio: 2019 }
- { os: windows-2019, python: "3.6", visual-studio: 2022 }
- { os: windows-2019, python: "3.10", visual-studio: 2022 }
- { os: windows-latest, python: "3.6", visual-studio: 2017 }
- { os: windows-latest, python: "3.10", visual-studio: 2017 }
- { os: windows-latest, python: "3.6", visual-studio: 2019 }
- { os: windows-latest, python: "3.10", visual-studio: 2019 }
- { os: windows-latest, python: "3.6", visual-studio: 2022 }
- { os: windows-latest, python: "3.10", visual-studio: 2022 }
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
Expand All @@ -42,4 +56,4 @@ jobs:
- name: Install
run: pip install . --user
- name: Test
run: ue4-docker build --target=build-prerequisites
run: ue4-docker build --target=build-prerequisites --visual-studio ${{ matrix.visual-studio || '2017' }}
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,9 @@ if "%VISUAL_STUDIO_BUILD_NUMBER%" == "15" (
)

@rem Install the Visual Studio Build Tools workloads and components we need
@rem NOTE: We use the Visual Studio 2019 installer even for Visual Studio 2017 here because the old installer now breaks
@rem NOTE: VS2019 Build Tools doesn't have 4.6.2 .NET SDK and what actually gets installed is 4.8
@rem NOTE: We use the Visual Studio 2022 installer even for Visual Studio 2019 and 2017 here because the old (2017) installer now breaks
@rem NOTE: Microsoft.NetCore.Component.SDK only exists for VS2019. And it is actually *needed* only for UE5
curl --progress-bar -L "https://aka.ms/vs/16/release/vs_buildtools.exe" --output %TEMP%\vs_buildtools.exe || goto :error
curl --progress-bar -L "https://aka.ms/vs/17/release/vs_buildtools.exe" --output %TEMP%\vs_buildtools.exe || goto :error
%TEMP%\vs_buildtools.exe --quiet --wait --norestart --nocache ^
--installPath C:\BuildTools ^
--channelUri "https://aka.ms/vs/%VISUAL_STUDIO_BUILD_NUMBER%/release/channel" ^
Expand All @@ -73,7 +72,8 @@ curl --progress-bar -L "https://aka.ms/vs/16/release/vs_buildtools.exe" --output
--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 ^
--add Microsoft.VisualStudio.Component.Windows10SDK.%WINDOWS_SDK_VERSION% ^
--add Microsoft.Net.Component.4.5.TargetingPack ^
--add Microsoft.Net.ComponentGroup.4.6.2.DeveloperTools ^
--add Microsoft.Net.Component.4.6.2.TargetingPack ^
--add Microsoft.Net.ComponentGroup.DevelopmentPrerequisites ^
--add Microsoft.NetCore.Component.SDK

python C:\buildtools-exitcode.py %ERRORLEVEL% || goto :error
Expand Down
6 changes: 5 additions & 1 deletion ue4docker/infrastructure/BuildConfiguration.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@
class VisualStudio(object):
VS2017 = "2017"
VS2019 = "2019"
VS2022 = "2022"

BuildNumbers = {
VS2017: "15",
VS2019: "16",
VS2022: "17",
}

MinSupportedUnreal = {
Expand All @@ -55,7 +57,9 @@ class VisualStudio(object):
#
# Unreal Engine 4.25 is the first that works with .NET SDK 4.7+
# See https://github.com/EpicGames/UnrealEngine/commit/5256eedbdef30212ab69fdf4c09e898098959683
VS2019: semver.VersionInfo(4, 25)
VS2019: semver.VersionInfo(4, 25),

VS2022: semver.VersionInfo(4, 27),
}


Expand Down