robcog-iai / UROSBridge

Unreal ROS Bridge topic / service communication via websocket
http://robcog.org/
BSD 3-Clause "New" or "Revised" License
52 stars 37 forks source link

Can't package project that uses this plugin #15

Closed aaronsnoswell closed 6 years ago

aaronsnoswell commented 6 years ago

Steps to reproduce: Create a new project that uses this plugin. Try to package the project under any configuration (DebugGame / Development / Shipping) Observed behaviour: The package fails. the #include "Socket.h" at HTML5NetworkingPrivate.h:6 fails for some reason. See the below console output when packaging on my project.

UATHelper: Packaging (Windows (64-bit)): Running AutomationTool...
UATHelper: Packaging (Windows (64-bit)): Parsing command line: -ScriptsForProject=C:/Users/uqasnosw/Documents/Development/PointClouds/PointClouds.uproject BuildCookRun -nocompile -nocompileeditor -installed -nop4 -project=C:/Users/uqasnosw/Documents/Development/PointClouds/PointClouds.uproject -cook -stage -archive -archivedirectory="C:/Users/uqasnosw/Docume
nts/Development/PointClouds/Packaged Builds" -package -clientconfig=Development -ue4exe=UE4Editor-Cmd.exe -pak -prereqs -nodebuginfo -targetplatform=Win64 -build -utf8output
UATHelper: Packaging (Windows (64-bit)): Setting up ProjectParams for C:\Users\uqasnosw\Documents\Development\PointClouds\PointClouds.uproject
UATHelper: Packaging (Windows (64-bit)): ********** BUILD COMMAND STARTED **********
UATHelper: Packaging (Windows (64-bit)): Running: C:\Program Files\Epic Games\UE_4.18\Engine\Binaries\DotNET\UnrealBuildTool.exe PointClouds Win64 Development -Project=C:\Users\uqasnosw\Documents\Development\PointClouds\PointClouds.uproject  C:\Users\uqasnosw\Documents\Development\PointClouds\PointClouds.uproject -NoUBTMakefiles  -remoteini="C:\Users\uqasnos
w\Documents\Development\PointClouds" -skipdeploy -noxge -generatemanifest -NoHotReload
UATHelper: Packaging (Windows (64-bit)):   Using 'git status' to determine working set for adaptive non-unity build.
UATHelper: Packaging (Windows (64-bit)): Took 0.81559s to run UnrealBuildTool.exe, ExitCode=0
UATHelper: Packaging (Windows (64-bit)): Running: C:\Program Files\Epic Games\UE_4.18\Engine\Binaries\DotNET\UnrealBuildTool.exe PointClouds Win64 Development -Project=C:\Users\uqasnosw\Documents\Development\PointClouds\PointClouds.uproject  C:\Users\uqasnosw\Documents\Development\PointClouds\PointClouds.uproject -NoUBTMakefiles  -remoteini="C:\Users\uqasnos
w\Documents\Development\PointClouds" -skipdeploy -noxge -NoHotReload -ignorejunk
UATHelper: Packaging (Windows (64-bit)):   Using 'git status' to determine working set for adaptive non-unity build.
UATHelper: Packaging (Windows (64-bit)):   Performing 9 actions (9 in parallel)
UATHelper: Packaging (Windows (64-bit)):   PosePublishComponent.cpp
UATHelper: Packaging (Windows (64-bit)):   PosePublishComponent.gen.cpp
UATHelper: Packaging (Windows (64-bit)):   MotionControllerPublishComponent.gen.cpp
UATHelper: Packaging (Windows (64-bit)):   PointCloudRenderActor.cpp
UATHelper: Packaging (Windows (64-bit)):   VRTeleopGameInstance.cpp
UATHelper: Packaging (Windows (64-bit)):   PointCloudRenderActor.gen.cpp
UATHelper: Packaging (Windows (64-bit)):   MotionControllerPublishComponent.cpp
UATHelper: Packaging (Windows (64-bit)):   VRTeleopGameInstance.gen.cpp
UATHelper: Packaging (Windows (64-bit)):   c:\users\uqasnosw\documents\development\pointclouds\plugins\urosbridge\source\urosbridge\public\HTML5NetworkingPrivate.h(6): fatal error C1083: Cannot open include file: 'Sockets.h': No such file or directory
UATHelper: Packaging (Windows (64-bit)):   c:\users\uqasnosw\documents\development\pointclouds\plugins\urosbridge\source\urosbridge\public\HTML5NetworkingPrivate.h(6): fatal error C1083: Cannot open include file: 'Sockets.h': No such file or directory
UATHelper: Packaging (Windows (64-bit)):   c:\users\uqasnosw\documents\development\pointclouds\plugins\urosbridge\source\urosbridge\public\HTML5NetworkingPrivate.h(6): fatal error C1083: Cannot open include file: 'Sockets.h': No such file or directory
UATHelper: Packaging (Windows (64-bit)):   c:\users\uqasnosw\documents\development\pointclouds\plugins\urosbridge\source\urosbridge\public\HTML5NetworkingPrivate.h(6): fatal error C1083: Cannot open include file: 'Sockets.h': No such file or directory
UATHelper: Packaging (Windows (64-bit)):   c:\users\uqasnosw\documents\development\pointclouds\plugins\urosbridge\source\urosbridge\public\HTML5NetworkingPrivate.h(6): fatal error C1083: Cannot open include file: 'Sockets.h': No such file or directory
UATHelper: Packaging (Windows (64-bit)):   c:\users\uqasnosw\documents\development\pointclouds\plugins\urosbridge\source\urosbridge\public\HTML5NetworkingPrivate.h(6): fatal error C1083: Cannot open include file: 'Sockets.h': No such file or directory
UATHelper: Packaging (Windows (64-bit)):   c:\users\uqasnosw\documents\development\pointclouds\plugins\urosbridge\source\urosbridge\public\HTML5NetworkingPrivate.h(6): fatal error C1083: Cannot open include file: 'Sockets.h': No such file or directory
UATHelper: Packaging (Windows (64-bit)):   c:\users\uqasnosw\documents\development\pointclouds\plugins\urosbridge\source\urosbridge\public\HTML5NetworkingPrivate.h(6): fatal error C1083: Cannot open include file: 'Sockets.h': No such file or directory
UATHelper: Packaging (Windows (64-bit)):   ERROR: UBT ERROR: Failed to produce item: C:\Users\uqasnosw\Documents\Development\PointClouds\Binaries\Win64\PointClouds.exe
UATHelper: Packaging (Windows (64-bit)):   Total build time: 4.06 seconds (Local executor: 0.00 seconds)
UATHelper: Packaging (Windows (64-bit)): Took 4.219558s to run UnrealBuildTool.exe, ExitCode=5
UATHelper: Packaging (Windows (64-bit)): ERROR: Command failed (Result:5): C:\Program Files\Epic Games\UE_4.18\Engine\Binaries\DotNET\UnrealBuildTool.exe PointClouds Win64 Development -Project=C:\Users\uqasnosw\Documents\Development\PointClouds\PointClouds.uproject  C:\Users\uqasnosw\Documents\Development\PointClouds\PointClouds.uproject -NoUBTMakefiles  -re
moteini="C:\Users\uqasnosw\Documents\Development\PointClouds" -skipdeploy -noxge -NoHotReload -ignorejunk. See logfile for details: 'UnrealBuildTool-2018.02.09-15.04.26.txt' 
UATHelper: Packaging (Windows (64-bit)):        (see C:\Users\uqasnosw\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.18\UAT_Log.txt for full exception trace)
UATHelper: Packaging (Windows (64-bit)): AutomationTool exiting with ExitCode=5 (5)
UATHelper: Packaging (Windows (64-bit)): BUILD FAILED
PackagingResults: Error: Unknown Error

Expected behaviour: I should be able to package my project and run it stand-alone, outside the editor.

Have you successfully packaged projects that use this plugin? It seems to me somehow the "Sockets" dependency is working when I test in the editor, but not working when I try to package. Any ideas?

andreihaidu commented 6 years ago

using this might work:

UEBuildConfiguration.bForceEnableExceptions = true;

or

bEnableExceptions = true;

Info: https://docs.unrealengine.com/en-us/Programming/UnrealBuildSystem/Configuration

andreihaidu commented 6 years ago

https://github.com/robcog-iai/UROSBridge/pull/35/commits/cbc12b1ddd765c5b93e10492e0824d67413c09d4 should fix it