Skip to content

Install Windows SDK >= 18362 to fix compilation of UE-4.27 #193

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

Closed
wants to merge 1 commit into from

Conversation

slonopotamus
Copy link
Collaborator

@slonopotamus slonopotamus commented Aug 31, 2021

resolves #192


Not tested yet, this will take a while.

@slonopotamus
Copy link
Collaborator Author

Veeeery interesting... ue4-docker build 4.27.0 --no-engine --exclude debug --exclude ddc --exclude templates failed with changes from this PR this way:

****** [4/10] Compile UE4Game Win64

Reading local file list from C:\UnrealEngine\Engine\Saved\BuildGraph\Compile UnrealHeaderTool Win64\Tag-Compile UnrealHeaderTool Win64.xml
Reading local file list from C:\UnrealEngine\Engine\Saved\BuildGraph\Update Version Files\Tag-Update Version Files.xml
Reading shared manifest from C:\UnrealEngine\Engine\Saved\BuildGraph\Compile UnrealHeaderTool Win64\Manifest.xml
Running: C:\UnrealEngine\Engine\Binaries\DotNET\UnrealBuildTool.exe UE4Game Win64 DebugGame -Manifest=C:\UnrealEngine\Engine\Intermediate\Build\Manifest.xml -nobuilduht -NoHotReload -xgeexport  -NoUBTMakefiles -nobuilduht -precompile -allmodules -nolink -2017 -nodebuginfo -log="C:\UnrealEngine\Engine\Programs\AutomationTool\Saved\Logs\UBT-UE4Game-Win64-DebugGame.txt"
  ERROR: Visual Studio 2017 must be installed in order to build this target.
Took 53.4054611s to run UnrealBuildTool.exe, ExitCode=6
UnrealBuildTool failed. See log for more details. (C:\UnrealEngine\Engine\Programs\AutomationTool\Saved\Logs\UBT-UE4Game-Win64-DebugGame.txt)
AutomationTool exiting with ExitCode=6 (6)
BUILD FAILED

And yep, it has successfully compiled the whole editor before failing.

@slonopotamus
Copy link
Collaborator Author

slonopotamus commented Aug 31, 2021

So, I'm dropping attempts to install Windows SDK via VS Build Tools installer and instead trying to use Chocolatey for that.

There are two reasons for that move:

  1. Error above. Looks like UE doesn't properly select 2017 Build Tools when we also have non-functional 2019 nearby.
  2. Licensing issues. If user only has VS2017 license, it isn't clear whether they are allowed to use VS2019 installer to install Windows SDK.

@slonopotamus
Copy link
Collaborator Author

For the reference: after this change, we are installing exactly 18362 as of today.

@rem We're installing Windows SDK here instead of through VS installer for several reasons:
@rem 1. pdbcopy.exe is needed for creating an Installed Build of the Engine and it isn't installed through VS
@rem 2. UE-4.27 failts to compile against Windows SDK older than 18362 and 18362 isn't available through VS2017 installer
choco install -y choco-cleaner curl vcredist-all windows-sdk-10.1 || goto :error
Copy link
Collaborator

@TBBle TBBle Sep 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a floating version target. Would it be better to explicitly use windows-sdk-10-version-1903-all, which is currently the same version but passes /Features + to the installer, perhaps it installs more stuff?). That version won't change if the windows-sdk-10.1 maintainer decides to update to a new version again.

That said, if the version floats forward, that shouldn't be a problem for us, new SDKs can generally target older versions, and I doubt UE4 is using any runtime support that's even Windows 10-specific on the Windows target. And windows-sdk-10.1 currently points at the 2019 SDK release, so perhaps it won't float forward (or is abandoned), as it hasn't picked up the 2004 or 2104 SDKs.

(Oh no, the Windows Server 2022-paired SDK release is "2104". I can't even...)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the Windows Server 2022-paired SDK release is "2104"

WAT


@rem We're installing Windows SDK here instead of through VS installer for several reasons:
@rem 1. pdbcopy.exe is needed for creating an Installed Build of the Engine and it isn't installed through VS
@rem 2. UE-4.27 failts to compile against Windows SDK older than 18362 and 18362 isn't available through VS2017 installer
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo failts.

@slonopotamus
Copy link
Collaborator Author

This change doesn't work as-is. UE-4.23 needs patching. See #192 (comment)

@slonopotamus
Copy link
Collaborator Author

Closing, we're going #195 route instead.

@slonopotamus slonopotamus deleted the ue-4.27-fix branch September 2, 2021 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants