Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packaging Support #16

Open
JuliusBlueTek opened this issue Nov 18, 2017 · 13 comments
Open

Packaging Support #16

JuliusBlueTek opened this issue Nov 18, 2017 · 13 comments

Comments

@JuliusBlueTek
Copy link

I did a quick build of the MNIST demo in the ue4-examples (win x64), but I get an error on launch:

AsyncLoading.cpp [Line: 3013]
Missing Dependency, request for SockedIOClientComponent but it hasn't been created yet.

@getnamo
Copy link
Owner

getnamo commented Nov 19, 2017

By building do you mean packaging? what version of plugin and ue4?

@JuliusBlueTek
Copy link
Author

JuliusBlueTek commented Nov 20, 2017

Yep I'm packaging.
TensorFlowExamples-ue4.17-v0.2.1-noplugins.7z
tensorflow-ue4.17-v0.4.1-cpu.7z
UE 4.17.2

Steps:
Extract TensorFlowExamples-ue4.17-v0.2.1
Extract the and move the plugins folder from TensorFlowExamples-ue4.17-v0.2.1 into the extracted project.
Run the mnist map and wait a few minutes for dependencies to download.
Relaunch project.
Set mnist as the Game Default Map.

Package for win x64.

I get an error from UEPython
LogPython: Error: No module named 'ue_site'
So I create a empty python file ue_site.py in /Content/Scripts following the recommendation in the post bellow.
20tab/UnrealEnginePython#20

Package for win x64.
Run the exe

Then I get the error

Fatal error: [File:D:\Build++UE4+Release-4.17+Compile\Sync\Engine\Source\Runtime\CoreUObject\Private\Serialization\AsyncLoading.cpp] [Line: 3013]
Missing Dependency, request for SocketIOClientComponent but it hasn't been created yet.

@getnamo getnamo self-assigned this Nov 20, 2017
@getnamo getnamo added the bug label Nov 20, 2017
@getnamo
Copy link
Owner

getnamo commented Nov 20, 2017

I haven't tested packaging properly yet, it looks like the load order in a packaged game is different than in editor mode. Adding this bug to the list to look over for 4.18. You may be able to fix it by changing LoadingPhase in https://github.com/getnamo/socketio-client-ue4/blob/282fe8d2dbbe37a2939e64d238aa278544641b58/SocketIOClient.uplugin

@JuliusBlueTek
Copy link
Author

Thanks! I'll take a look!

@getnamo getnamo changed the title SocketIOClinetComponent Missing Dependency on build Packaging Support (SocketIOClinetComponent Missing Dependency on build) Jan 14, 2018
@getnamo
Copy link
Owner

getnamo commented Sep 10, 2018

Copied answer from #34

The most thorough coverage of packaging can be found at this issue: 20tab/UnrealEnginePython#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
Copy link
Owner

getnamo commented Oct 17, 2018

Ok got something to package after fixing minor compilation bugs for development mode. Currently requires to manually copy contents of {Project Root}/Plugins/UnrealEnginePython/Binaries/Win64, {Project Root}/Plugins/UnrealEnginePython/Content/Scripts, {Project Root}/Plugins/tensorflow-ue4/Content/Scripts. and {Project Root}/Content/Scripts to their respective folders in the packaged folder. Will look into automating this step and then write a guide.

Packaged build is still subject to 240 char limit, so project has to be placed somewhere with a short path (SN: another ping to getting #36 implemented).

@getnamo
Copy link
Owner

getnamo commented Oct 20, 2018

Support added in https://github.com/getnamo/tensorflow-ue4/releases/tag/0.9.3, see https://github.com/getnamo/tensorflow-ue4#packaging for instructions.

Let me know if any errors not mentioned crop up.

@getnamo getnamo changed the title Packaging Support (SocketIOClinetComponent Missing Dependency on build) Packaging Support Oct 20, 2018
@getnamo
Copy link
Owner

getnamo commented Oct 22, 2018

Updated release https://github.com/getnamo/tensorflow-ue4/releases/tag/0.10.0 it now won't generate the pathname too long error during build as it won't copy site-packages during packaging. You'll need to run the packaged build once or copy them manually (see https://github.com/getnamo/tensorflow-ue4#packaging).

This is as clean as I could get the packaging setup to be due to staging paths being too long during the packing process.

@JernejHabjan
Copy link

Hey!

Thanks for this update, i really appreciate it 👍.
Packaging now works out of the box for 4_20. Great job.
It kinda bothers me, that there is black screen while py downloads requirements, but i can package required packages with game and that is fixed.

Awesome job

@getnamo
Copy link
Owner

getnamo commented Oct 28, 2018

Thanks for the feedback! Agree on the black screen on startup problem, I opened a new issue #38 for a suggested enhancement to fix this. May take some time before I can address it though.

@bernhardrieder
Copy link

bernhardrieder commented Feb 17, 2019

Hey @getnamo!

I just tried to package the project with UE4.21 and needed to adjust some stuff in order to get it working.

First of all, the Python plugin wouldn't package properly due to an error in: "..\UnrealEnginePython\Source\UnrealEnginePython\Private\Wrappers\UEPyFFoliageInstance.cpp"
The quick fix for this is to wrap all FFoliageMeshInfo appearances in it with the define "WITH_EDITORONLY_DATA" which can be found in "Runtime/Core/Public/Misc/CoreMiscDefines.h"

Secondly, I tried to package it with the source code of all plugins without embedded python - didn't worked. First problem was that it couldn't find and copy the "Tensorflow.dll" from the TF plugin thirdparty folder -> the quick fix was to copy it from your binary release -> worked out. However, the MNIST sample project still wasn't functional. Afterwards, I tried it with including/to copy the embedded Python and thirdparty folder/files of the Python plugin from your TF plugin binaries and it worked!

@bernhardrieder
Copy link

Update for UE4.22
In order to be able to at least package the game you need to wrap world->SetCurrentLevel(level) in PyObject *py_ue_set_current_level(ue_PyUObject *self, PyObject * args) in UEPyWorld.cpp like, e.g.:

#if WITH_EDITORONLY_DATA
	if (world->SetCurrentLevel(level))
		Py_RETURN_TRUE;
#endif

@getnamo
Copy link
Owner

getnamo commented Apr 13, 2019

Great spot, care to make a pull request with that addition?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants