getnamo / TensorFlow-Unreal

TensorFlow plugin for the Unreal Engine.
Other
1.15k stars 211 forks source link

Packaging and and running packaged project with prebuilt binaries #34

Closed JernejHabjan closed 5 years ago

JernejHabjan commented 5 years ago

Hi everyone

Can somebody tell me the procedure that I should follow when packaging project with one of binary releases (I am using tensorflow-ue4.19-v0.8.0-cpu.7z release, with upgraded tensorflow to 1.9).

I added this release to my Plugins folder and it works fine in editor, but project packaging is failing. Do I package project using prebuilt binaries, or do I have to have source of this repo to package?

And after successful package, where do i include these prebuilt binaries in packaged game folder?

I have seen issue #16, but can anyone tell me workaround, for maybe adding binary releases to packaged bin folder?

I haven't seen anywhere this tutorial on how to package this plugin and it would be great if it is written somewhere.

Thanks!

JernejHabjan commented 5 years ago

In UnrealEnginePython issue https://github.com/20tab/UnrealEnginePython/issues/297, it is stated, that we cannot package with binary release, so my question is, how do I package my game with one of binary releases provided in this repo?

I am also recieving these following errors when packaging with tensorflow-ue4.20-v0.9.0-cpu.7z

ProcessResult.StdOut:     C:\TrumpDefense2020\TD2020\Plugins\UnrealEnginePython\Source\UnrealEnginePython\Private\UnrealEnginePython.cpp(149): error C2653: 'IPluginManager': is not a class or namespace name
ProcessResult.StdOut:     C:\TrumpDefense2020\TD2020\Plugins\UnrealEnginePython\Source\UnrealEnginePython\Private\UnrealEnginePython.cpp(149): error C2039: 'FindPlugin': is not a member of 'FUnrealEnginePythonModule'
ProcessResult.StdOut:     C:\TrumpDefense2020\TD2020\Plugins\UnrealEnginePython\Source\UnrealEnginePython\Public\UnrealEnginePython.h(94): note: see declaration of 'FUnrealEnginePythonModule'
ProcessResult.StdOut:     C:\TrumpDefense2020\TD2020\Plugins\UnrealEnginePython\Source\UnrealEnginePython\Private\UnrealEnginePython.cpp(645): error C2653: 'IPluginManager': is not a class or namespace name
ProcessResult.StdOut:     C:\TrumpDefense2020\TD2020\Plugins\UnrealEnginePython\Source\UnrealEnginePython\Private\UnrealEnginePython.cpp(645): error C2039: 'FindPlugin': is not a member of 'FUnrealEnginePythonModule'
ProcessResult.StdOut:     C:\TrumpDefense2020\TD2020\Plugins\UnrealEnginePython\Source\UnrealEnginePython\Public\UnrealEnginePython.h(94): note: see declaration of 'FUnrealEnginePythonModule'
...

ProcessResult.StdOut:   ERROR: UBT ERROR: Failed to produce item: C:\TrumpDefense2020\TD2020\Binaries\Win64\TD2020.exe
ProcessResult.StdOut:          (see C:\Users\Jernej\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.20\UBT-TD2020-Win64-Development_2.txt for full exception trace)
ProcessResult.StdOut:   Total build time: 253,64 seconds (Parallel executor: 0,00 seconds)
CommandUtils.Run: Took 253,8877429s to run UnrealBuildTool.exe, ExitCode=5
<>c.<PrintExceptionInfo>b__4_1: ==============================================================================
<>c.<PrintExceptionInfo>b__4_0: ERROR: UnrealBuildTool failed. See log for more details. (C:\Users\Jernej\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.20\UBT-TD2020-Win64-Development_2.txt)
<>c.<PrintExceptionInfo>b__4_0:        (see C:\Users\Jernej\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.20\Log.txt for full exception trace)
<>c.<PrintExceptionInfo>b__4_1: 
<>c.<PrintExceptionInfo>b__4_1: AutomationException: UnrealBuildTool failed. See log for more details. (C:\Users\Jernej\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.20\UBT-TD2020-Win64-Development_2.txt)
<>c.<PrintExceptionInfo>b__4_1:    at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, String CommandLine, Dictionary`2 EnvVars) in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\UBTUtils.cs:line 77
<>c.<PrintExceptionInfo>b__4_1:    at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, FileReference Project, String Target, String Platform, String Config, String AdditionalArgs, Dictionary`2 EnvVars) in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\UBTUtils.cs:line 114
<>c.<PrintExceptionInfo>b__4_1:    at AutomationTool.UE4Build.BuildWithUBT(String TargetName, UnrealTargetPlatform TargetPlatform, String Config, FileReference UprojectPath, Boolean ForceMonolithic, Boolean ForceNonUnity, Boolean ForceDebugInfo, Boolean ForceFlushMac, Boolean DisableXGE, String InAddArgs, Boolean ForceUnity, Dictionary`2 EnvVars) in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\UE4Build.cs:line 352
<>c.<PrintExceptionInfo>b__4_1:    at AutomationTool.UE4Build.Build(BuildAgenda Agenda, Nullable`1 InDeleteBuildProducts, Boolean InUpdateVersionFiles, Boolean InForceNoXGE, Boolean InUseParallelExecutor, Boolean InForceNonUnity, Boolean InForceUnity, Boolean InShowProgress, Dictionary`2 PlatformEnvVars, Nullable`1 InChangelistNumberOverride, Dictionary`2 InTargetToManifest) in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\UE4Build.cs:line 1454
<>c.<PrintExceptionInfo>b__4_1:    at Project.Build(BuildCommand Command, ProjectParams Params, Int32 WorkingCL, ProjectBuildTargets TargetMask) in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\AutomationTool\Scripts\BuildProjectCommand.Automation.cs:line 200
<>c.<PrintExceptionInfo>b__4_1:    at BuildCookRun.DoBuildCookRun(ProjectParams Params) in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:line 208
<>c.<PrintExceptionInfo>b__4_1:    at BuildCookRun.ExecuteBuild() in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:line 41
<>c.<PrintExceptionInfo>b__4_1:    at AutomationTool.BuildCommand.Execute() in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\BuildCommand.cs:line 112
<>c.<PrintExceptionInfo>b__4_1:    at AutomationTool.Automation.Execute(List`1 CommandsToExecute, Dictionary`2 Commands) in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 562
<>c.<PrintExceptionInfo>b__4_1:    at AutomationTool.Automation.Process(String[] Arguments, StartupTraceListener StartupListener) in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 532
<>c.<PrintExceptionInfo>b__4_1:    at AutomationTool.Program.MainProc(String[] Arguments, StartupTraceListener StartupListener) in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\AutomationTool\Program.cs:line 174
<>c.<PrintExceptionInfo>b__4_1:    at AutomationTool.Program.<>c__DisplayClass1_0.<Main>b__0() in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\AutomationTool\Program.cs:line 100
<>c.<PrintExceptionInfo>b__4_1:    at AutomationTool.InternalUtils.RunSingleInstance(Func`1 Main) in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\Utils.cs:line 725
<>c.<PrintExceptionInfo>b__4_1:    at AutomationTool.Program.Main() in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\AutomationTool\Program.cs:line 100
<>c.<PrintExceptionInfo>b__4_1: ==============================================================================
getnamo commented 5 years ago

The most thorough coverage of packaging can be found at this issue: https://github.com/20tab/UnrealEnginePython/issues/163

If you can get the UnrealEnginePython plugin to package, the rest should package correctly. Consider first trying a smaller UnrealEnginePython project and getting it to package with it seeing your python dll correctly, then move on to including all the tensorflow things and see where it breaks.

Packaging is currently out of scope for my work atm so I'm depending on contributors to help fix the packaging situation. If you get something working, share here so we can get this working out of the box for future builds!

getnamo commented 5 years ago

duplicate of https://github.com/getnamo/tensorflow-ue4/issues/16, continue issue there.