@@ -55,14 +55,30 @@ Expand-Archive -Path "$env:TEMP\vulkan-runtime-components.zip" -DestinationPath
5555Copy-Item - Path " *\x64\vulkan-1.dll" - Destination C:\Windows\System32\
5656
5757$visual_studio_build = $args [0 ]
58+ $unreal_engine_version = $args [1 ]
5859
5960if ($visual_studio_build -eq " 15" )
6061{
6162 $windows_sdk_version = 18362
63+ $windows_os_version = " Windows10SDK"
6264}
6365else
6466{
6567 $windows_sdk_version = 20348
68+ $windows_os_version = " Windows10SDK"
69+
70+ # NOTE: See suggested components https://github.com/EpicGames/UnrealEngine/blob/release/Engine/Config/Windows/Windows_SDK.json
71+ if ($unreal_engine_version.StartsWith (" 5.4" ))
72+ {
73+ $windows_sdk_version = 22621
74+ $vs_tools_version = " 14.38.17.8"
75+ }
76+ elseif ($unreal_engine_version.StartsWith (" 5.5" ))
77+ {
78+ $windows_sdk_version = 22621
79+ $windows_os_version = " Windows11SDK"
80+ $vs_tools_version = " 14.38.17.8"
81+ }
6682}
6783
6884# NOTE: We use the Visual Studio 2022 installer even for Visual Studio 2019 and 2017 here because the old (2017) installer now breaks
@@ -85,15 +101,26 @@ $vs_args = @(
85101 " --add" , " Microsoft.VisualStudio.Workload.VCTools" ,
86102 " --add" , " Microsoft.VisualStudio.Workload.MSBuildTools" ,
87103 " --add" , " Microsoft.VisualStudio.Component.NuGet" ,
88- " --add" , " Microsoft.VisualStudio.Component.VC.Tools.x86.x64" ,
89- " --add" , " Microsoft.VisualStudio.Component.Windows10SDK.$windows_sdk_version " ,
104+ " --add" , " Microsoft.VisualStudio.Component.$windows_os_version .$windows_sdk_version " ,
90105 " --add" , " Microsoft.Net.Component.4.5.TargetingPack" ,
91106 " --add" , " Microsoft.Net.Component.4.6.2.TargetingPack" ,
92107 " --add" , " Microsoft.Net.ComponentGroup.DevelopmentPrerequisites" ,
93108 " --add" , " Microsoft.NetCore.Component.SDK" ,
94109 " --add" , " Microsoft.NetCore.Component.Runtime.3.1"
95110)
96111
112+ if (-not ([string ]::IsNullOrEmpty($vs_tools_version ))) {
113+ $vs_args = $vs_args ,
114+ " --add" , " Microsoft.VisualStudio.Component.VC.$vs_tools_version .x86.x64" ,
115+ " --remove" , " Microsoft.VisualStudio.Component.VC.Tools.x86.x64" ,
116+ " --remove" , " Microsoft.VisualStudio.Component.Windows10SDK.20348"
117+ }
118+ else
119+ {
120+ $vs_args = $vs_args ,
121+ " --add" , " Microsoft.VisualStudio.Component.VC.Tools.x86.x64"
122+ }
123+
97124# Install the Visual Studio Build Tools workloads and components we need
98125RunProcessChecked " $env: TEMP \vs_buildtools.exe" $vs_args
99126
0 commit comments