Closed TBBle closed 4 years ago
Having a look at Build.bat
and the Linux/Mac versions of Build.sh
, it looks like only the Linux version of Build.sh
builds UnrealBuildTool if it isn't present. Looking through the available scripts, it appears that generating project files is the only way to build UBT under Windows and Mac (even UAT doesn't build it automatically outside of creating an Installed Build), which rules out the possibility of adding that logic to the ue4 build
command.
I'm going to continue recommending that anyone using a source build of the Unreal Engine follows Epic's official instructions, which means running the top-level setup and project file generation scripts after checking out the source tree.
I feel like this is something that should be addressed in the UE codebase, personally. If they're doing it on one platform, they ought to do it on all of them. Requiring GenerateProjectFiles
is just a weird detour, given that they don't use those in the build at all.
Switching UE4 branches, I cleaned my source checkout hard, using
git clean -f -x d
.I then ran the
Setup.bat
which installed Git dependencies and pre-reqs without issue.However,
ue4 build
was not able to build my project in this state.I ran
ue4 gen -vscode
, and after thatue4 build
worked.This is because
ue4 gen
callsGenerateProjectFiles.bat
on Windows which explicitly compiles UBT.However, this was a surprising dependency to me, and there's nothing logged by the batch file that it's building UBT, so I had to check the code to make sure that this was why it worked as a fix.
I'm not sure if there's a nicer way to bootstrap UBT than used in
GenerateProjectFiles.bat
, and I'm not sure if this is Windows-specific, as I only tested Windows.This isn't a problem for installed builds, and now that I know the trick, I'm not blocked on this, nor is the workaround particularly onerous.
Logs