UE4.11 cook problem

hi Epic guys, i found a problem. i used the frontend to build/cook a windowsclient, and i added the commandline :
-archive -archivedirectory=PackagedBuild like what i did when using UE4.10

the frontent uses the C# projects to do the jobs. first cooking, and save the cooked content to the Saved/Cooked/ folder, as i cooked the WindowsClient, so everything is saved under …Saved/Cooked/WindowsClient/ folder, and then, the tool will copy this folder to the …Saved/StagedBuilds/ folder, the problem is here, in UE4.11, all the files under the …Saved/Cooked/WindowsClient/ will be copied to …Saved/StagedBuilds/WindowsNoEditor/, but the folder WindowsNoEditor is not used for the WindowsClient. in UE4.10, these files will be copied to …Saved/StagedBuilds/WindowsClient/

and after this step, the files with the folder WindowsNoEditor is copied to archivedirectory, this is not what UE4.10 did.

UE4.10 uses the “WindowsClient” as the folder name.
there is no problem for cooking Windows, WindowsServer

as i use Teamcity to do the auto build/cook, so this make the auto pipeline broken.

waiting for your reply.

92362-cooked.png

92363-stagedbuilds.png

Hey Qloach,

Here are the packaged builds from UFE using your command lines. They are saving in the correct location. If you set your UFE up in a unique way, feel free to submit screenshots of how your UFE is set up and I’ll attempt to recreate the same.

Thanks! :slight_smile:

this is my command line to cook the WindowsClient (no edtior, no server, just client)

BuildCookRun -noP4 -project=Projects\DUST_FP\DUST_FP.uproject -cook -stage -archive -archivedirectory=PackagedBuild -package -clientconfig=Shipping -ue4exe=UE4Editor-Cmd.exe -pak -prereqs -client -targetplatform=Win64 -build -utf8output -compile -noxge -unversionedcookedcontent

but the cooked content and exe are copied to the StageBuilds/WindowsNoEditor/ but in UE4.10, these files are copied to the StageBuilds/WindowsClient/

this is my problem, the target folder is changed

i directly call the RunUAT.bat by the Teamcity. the pic is the screenshot

the result is the same, if i use the Frontent to cook the WindowsClient

i have try to debug the automatic tools

i found that, in the construct function:
public DeploymentContext(
FileReference RawProjectPathOrName,
string InLocalRoot,
string BaseStageDirectory,
string BaseArchiveDirectory,
string CookFlavor,
Platform InSourcePlatform,
Platform InTargetPlatform,
List InTargetConfigurations,
IEnumerable InStageTargets,
List InStageExecutables,
bool InServer,
bool InCooked,
bool InStageCrashReporter,
bool InStage,
bool InCookOnTheFly,
bool InArchive,
bool InProgram,
bool bHasDedicatedServerAndClient,
bool bInUseWebsocketNetDriver = false
)

and this line:
if (StageTargetPlatform != null && InCooked)
{
FinalCookPlatform = StageTargetPlatform.GetCookPlatform(DedicatedServer, bHasDedicatedServerAndClient, CookFlavor);
}

the FinalCookPlatform will be the folder name of this cook, have a look at the function : GetCookPlatform

public virtual string GetCookPlatform(bool bDedicatedServer, bool bIsClientOnly, string CookFlavor)

this second parameter say if the cook target is client only or not, as i cook the WindowsClient, so this paramerter should be true when call this function, but the source code pass the bHasDelicatedServerAndClient, when cook the delecated server and client at the some time, this will be true, otherwise, it’s false, so the output folder is WindowsNoEditor

so i change the code, use Param.Client as the parameter.
and seems it works well.

but i need you to confim it.
thanks.

So, the issue that is currently seen is that you’re referencing a public constructor file that has a function declaring a parameter on whether or not there is a client. However, you have not told us what the constructor file is. Whether or not the constructor file is from TeamCity or Unreal Engine 4.

If you are having trouble with a TeamCity file, you’ll need to speak with them further about the issue.

If you’re having trouble with a Unreal Engine 4 file, then we will be able to modify it and test once you’ve given us additional information.

Looking forward to hearing back from you, thanks!

hi , the code file is DeploymentContext.cs
the code in the functioin : public DeploymentContext
the code line is 286:
FinalCookPlatform = StageTargetPlatform.GetCookPlatform(DedicatedServer, bHasDedicatedServerAndClient, CookFlavor);

thanks.

I have tried to package with that coding modified. The package never successfully finishes. Could you please show me screenshots of your code change as well as your UFE settings?

Thanks!

Hey Qloach,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you!