ufna / VaRest

REST API plugin for Unreal Engine 4 - we love restfull backend and JSON communications!
https://www.unrealengine.com/marketplace/en-US/product/varest-plugin
MIT License
1.08k stars 297 forks source link

[UE 4.20 / 4.21] Unable to package from Windows to Linux, binaries missing #189

Closed ShamanTramp closed 5 years ago

ShamanTramp commented 5 years ago

Hello, I'm trying to package my game from Windows to Linux and the packaging is running fine without VaRest but I need it in order to communicate some data. When VaRest is attached to the project I run into an error about binaries missing. Here a bit of console log while packaging :

UATHelper: Packaging (Linux): ERROR: System.IO.DirectoryNotFoundException: Impossible de trouver une partie du chemin d'accès 'P:\Programmes\Epic Games\UE_4.21\Engine\Plugins\Marketplace\VaRestPlugin\Intermediate\Build\Linux\B4D820EA\UE4\Shipping\VaRestPlugin\VaRestPlugin.precompiled'. UATHelper: Packaging (Linux): à System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) UATHelper: Packaging (Linux): à System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) UATHelper: Packaging (Linux): à System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) UATHelper: Packaging (Linux): à System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost) UATHelper: Packaging (Linux): à System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost) UATHelper: Packaging (Linux): à Tools.DotNETCommon.JsonObject.Read(FileReference File) dans D:\Build++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\DotNETCommon\DotNETUtilities\JsonObject.cs:ligne 50 UATHelper: Packaging (Linux): à UnrealBuildTool.PrecompiledManifest.Read(FileReference Location) dans D:\Build++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\System\PrecompiledManifest.cs:ligne 37 UATHelper: Packaging (Linux): à UnrealBuildTool.UEBuildModuleCPP.Compile(ReadOnlyTargetRules Target, UEToolChain ToolChain, CppCompileEnvironment BinaryCompileEnvironment, List 1 SharedPCHs, ISourceFileWorkingSet WorkingSet, ActionGraph ActionGraph) dans D:\Build++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Configuration \UEBuildModuleCPP.cs:ligne 338 UATHelper: Packaging (Linux): à UnrealBuildTool.UEBuildBinary.SetupBinaryLinkEnvironment(ReadOnlyTargetRules Target, UEToolChain ToolChain, LinkEnvironment LinkEnvironment, CppCompileEnvironment CompileEnvironment, List 1 SharedPCHs, ISourceFileWorkingSet WorkingSet, DirectoryReference ExeDir, ActionGraph ActionGraph) dans D:\Build++UE4\Sync\Eng ine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildBinary.cs:ligne 722 UATHelper: Packaging (Linux): à UnrealBuildTool.UEBuildBinary.Build(ReadOnlyTargetRules Target, UEToolChain ToolChain, CppCompileEnvironment CompileEnvironment, LinkEnvironment LinkEnvironment, List 1 SharedPCHs, ISourceFileWorkingSet WorkingSet, DirectoryReference ExeDir, ActionGraph ActionGraph) dans D:\Build++UE4\Sync\Engine\Saved\CsTools\Eng ine\Source\Programs\UnrealBuildTool\Configuration\UEBuildBinary.cs:ligne 193 UATHelper: Packaging (Linux): à UnrealBuildTool.UEBuildTarget.Build(BuildConfiguration BuildConfiguration, CPPHeaders Headers, List 1 OutputItems, List 1 UObjectModules, ISourceFileWorkingSet WorkingSet, ActionGraph ActionGraph, EHotReload HotReload, Boolean bIsAssemblingBuild) dans D:\Build++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\ UnrealBuildTool\Configuration\UEBuildTarget.cs:ligne 2193 UATHelper: Packaging (Linux): à UnrealBuildTool.UnrealBuildTool.RunUBT(BuildConfiguration BuildConfiguration, String[] Arguments, FileReference ProjectFile, Boolean bCatchExceptions) dans D:\Build++UE4\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:ligne 1503 UATHelper: Packaging (Linux): (see C:\Users\Théo\AppData\Roaming\Unreal Engine\AutomationTool\Logs\P+Programmes+Epic+Games+UE_4.21\UBT-TheOne-Linux-Shipping_2.txt for full exception trace) PackagingResults: Error: System.IO.DirectoryNotFoundException: Impossible de trouver une partie du chemin d'accès 'P:\Programmes\Epic Games\UE_4.21\Engine\Plugins\Marketplace\VaRestPlugin\Intermediate\Build\Linux\B4D820EA\UE4\Shipping\VaRestPlugin\VaRestPlugin.precompiled'. >

Where can I find Linux binaries ? I've been looking everywhere I could but found nothing, even the wiki mention binaries download but there's no link.

ufna commented 5 years ago

Hi @ShamanTramp ,

You should manually add plugin to your project. Just use the Github version, not Marketplace one.

ShamanTramp commented 5 years ago

Hello @ufna, thanks for your answer. I've been trying to use github version with my project directly but it only builds windows binaries since I am on windows platform. Plus I've been running into errors, the plugin wasn't loaded in my project after rebuild. I tryed in both 4.20 and 4.21 versions but was unable to get the plugin to work directly from project. Here is the roadmap I used in order to get it to work, maybe I've been doing something wrong, could you tell me ?

So, is there something I'm doing wrong? Thanks for your time!

ShamanTramp commented 5 years ago

Hi again @ufna, don't know if you've read my last comment but I'm still unable to get those Linux binaries by compiling the plug-in by myself. Is there any other way to get these libraries? I would be glad if someone knew a way to fix it! Thanks anyway

ufna commented 5 years ago

@ShamanTramp

replace engine version of the plugin by the locally builded one

Remove plugin from the engine completely before adding its Github version, then try again. I'm also not sure that launching project in order to rebuild binaries will help with it (I'm using RunUAT to do that).

ShamanTramp commented 5 years ago

@ufna OK thanks for your answer, I did remove plugin from the engine completely before adding github version, but I think I'm a bit lost. In your tutorial in part "Compiling the Plugin" when you say "5. Load unreal" do you mean load project or load engine ? I tried launching engine but since the plugin is located in my new empty c++ project the engine doesn't ask me anything at all. Only when I launch the engine by opening my .uproject file that I get the possibility of rebuild it.

I'm also not sure that launching project in order to rebuild binaries will help with it

Then what should I launch in order to do this ? The tutorial says "6. You will be prompted to rebuild a plugin from source and it will list the VaREST plugin, press yes", isn't that what I did ?

Sorry I feel a bit goofy but I think there's something I'm missing here. Thanks for your time anyway !

vypszo commented 5 years ago

I also tried to build a project on 4.19.2 for linux but, sadly the linux binaries are the only one missing which result in an instant build failure. I had the plugin project side (when it wasn't updated on marketplace) and it was a success in packaging it, only that any part of the game that used varest just didn't work. (I'm also not sure how to build the linux binaries from a windows machine)

An archive with all the binaries would be appreciated.