How to connect to Perforce from a command line or maybe a setting?

Hi!

For example, there is a feature in ResavePackages (link) that would check out all modified assets.
Obviously, the connection with perforce is needed for that kind of things.
I know it can be done through editor itself, but I wish to do it on a build machine without ever need to run a full version of the editor and using only UE4Editor-Cmd.exe.

This can be done by adding a file \Saved\Config\Windows\SourceControlSettings.ini with content like this:

[SourceControl.SourceControlSettings]
Provider=Perforce
    
[PerforceSourceControl.PerforceSourceControlSettings]
Port=<server_address:port>
UserName=<usename>
Workspace=<workspace>
1 Like