How to modify the Changelist number stored in Version.h?

I simply want to modify the define BUILT_FROM_CHANGELIST to the current perforce Changelist being built by the build grid. I noticed in UE4Build.cs there is an UpdateVersionFiles() method that will do this for me. In addition I also found UpdateLocalVersion.Automation.cs which seems to take in an argument of “cl” to allow me to change this number.

I tried:

Build.bat MyGameProject Win64 DebugGame -waitmutex -cl=1111 -verbose

but that did not seem to work.

What exactly do I need to do in order to modify the Changelist number?

I also noticed some attributes for the class UpdateLocalVersion.

[Help("CL", "Overrides the automatically disovered changelist number with the specified one")]
[RequireP4]
public class UpdateLocalVersion : BuildCommand
{ }

How do I go about informing the Unreal build tool, that the machine does indeed have Perforce and that is indeed a Build machine?

Thanks!

Hello,

Take a look at this post, and see if any of the information is helpful to you. Let me know if it is useful or not https://answers.unrealengine.com/questions/164423/where-to-inject-custom-engine-versioning.html

Hello,

I am marking this topic as resolved for tracking purposes, as we have not heard from you in a few days. If this issue persists, feel free to respond to this thread. For any new issues, please create a new Answerhub topic.

Have a great day

Hi,
Mr Scyssion how did you do this correctly? Do you still have this parameter full somewhere?