from the UE4/Engine/Build/BatchFiles folder execute :
Runuat.bat UpdateLocalVersion -cl=0 -Licensee -Compile
This modifies the Version.h file and Removes the definition of BUILT_FROM_CHANGELIST.
#define BUILT_FROM_CHANGELIST 0
subsequent integer comparisons fail becuase BUILT_FROM_CHANGELIST is Defined as being nothing.
The bug is in UE4Build.cs, line 501, inside of
public static List<FileReference> StaticUpdateVersionFiles(int ChangelistNumber, int CompatibleChangelistNumber, string Branch, string Build, bool bIsLicenseeVersion, bool bIsPromotedBuild, bool bDoUpdateVersionFiles, bool bSkipHeader)
string ChangelistString = (ChangelistNumber != 0 && bDoUpdateVersionFiles)? ChangelistNumber.ToString() : String.Empty;
We can see that when 0 is passed in for the CL # that String.Empty is used in its place.
And we know its a bug because the Code does not compile. We dont set it to a number because this causes a ton of issues with “Such and such DLL not found or built with the wrong version.”
Neither situation is desirable.
In addition this does not use generic source control… It explicity uses P4, and if your not using P4 the BuildCommand does NOTHING.