Skip to content

Commit 11d374d

Browse files
committed
Install Windows SDK >= 18362 to fix compilation of UE-4.27
resolves adamrehn#192
1 parent b52b9cb commit 11d374d

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

ue4docker/dockerfiles/ue4-build-prerequisites/windows/buildtools-exitcode.py

-7
This file was deleted.

ue4docker/dockerfiles/ue4-build-prerequisites/windows/install-prerequisites.bat

+15-5
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,21 @@ set VISUAL_STUDIO_BUILD_NUMBER=%~1
3535

3636
@rem Install the Visual Studio Build Tools workloads and components we need
3737
@rem NOTE: We use the Visual Studio 2019 installer even for Visual Studio 2017 here because the old installer now breaks
38-
@rem NOTE: VS2019 Build Tools doesn't have 4.6.2 .NET SDK and what actually gets installed is 4.8
39-
@rem NOTE: Microsoft.NetCore.Component.SDK only exists for VS2019. And it is actually *needed* only for UE5
4038
curl --progress-bar -L "https://aka.ms/vs/16/release/vs_buildtools.exe" --output %TEMP%\vs_buildtools.exe || goto :error
39+
40+
@rem The latest Windows SDK that is available through VS2017 channel is 17763.
41+
@rem We want to use a newer one because:
42+
@rem * it allows games to use newer API
43+
@rem * UE-4.27 doesn't build with SDK older than 18362. See https://github.com/adamrehn/ue4-docker/issues/192
44+
@rem So, we always use VS2019 channel to install Windows SDK.
45+
%TEMP%\vs_buildtools.exe --quiet --wait --norestart --nocache ^
46+
--installPath C:\BuildTools ^
47+
--locale en-US ^
48+
--add Microsoft.VisualStudio.Component.Windows10SDK.20348 ^
49+
|| goto :error
50+
51+
@rem VS2019 Build Tools doesn't have 4.6.2 .NET SDK and what actually gets installed is 4.8.
52+
@rem Microsoft.NetCore.Component.SDK only exists for VS2019. It is needed only for UE5 that can only be built with VS2019.
4153
%TEMP%\vs_buildtools.exe --quiet --wait --norestart --nocache ^
4254
--installPath C:\BuildTools ^
4355
--channelUri "https://aka.ms/vs/%VISUAL_STUDIO_BUILD_NUMBER%/release/channel" ^
@@ -49,12 +61,10 @@ curl --progress-bar -L "https://aka.ms/vs/16/release/vs_buildtools.exe" --output
4961
--add Microsoft.VisualStudio.Workload.MSBuildTools ^
5062
--add Microsoft.VisualStudio.Component.NuGet ^
5163
--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 ^
52-
--add Microsoft.VisualStudio.Component.Windows10SDK.17763 ^
5364
--add Microsoft.Net.Component.4.5.TargetingPack ^
5465
--add Microsoft.Net.ComponentGroup.4.6.2.DeveloperTools ^
5566
--add Microsoft.NetCore.Component.SDK
56-
57-
python C:\buildtools-exitcode.py %ERRORLEVEL% || goto :error
67+
|| goto :error
5868

5969
@rem Clean up any temp files generated during prerequisite installation
6070
rmdir /S /Q \\?\%TEMP%

0 commit comments

Comments
 (0)