VaRest icon indicating copy to clipboard operation
VaRest copied to clipboard

UE4.26 issues on MacOS

Open drwidgit opened this issue 3 years ago • 3 comments

We have used VaRest in 4.24 successfully on both Windows and MacOS. We reference the plugin in the MarketPlace install folder from our own C++ plugin to provide analytics to our server. In UE4.26 on windows, this works without any issues. On MacOS however, using the Development Editor build configuration in XCode I get the error that "VaRestJsonObject.generated.h file not found". I found I could get around this by adding a PublicIncludePath to the build.cs to "/Users/Shared/Epic Games/UE_4.26/Engine/Plugins/Marketplace/VaRestPlugin/Intermediate/Build/Mac/UE4Editor/Inc/VaRest". I don't know if this is just a 4.26 change, but in the past, usually just listing the module in the PublicDependencyModuleNames was enough.

Changing to a shipping build configuration, I get an error "Missing precompiled maifest for 'VaRest'. This module was most likely not flagged for being included in a precompiled build - set 'PrecompiliedForTargets = PrecompileTargetsType.Any;' in VaRest.build.cs to override.', however I can see that that flag is already set. Based on the above issue, I'm guessing this is another path issue rather than a missing file, but I'm at a loss for what is missing on MacOS when it works fine on Windows. Thanks!

drwidgit avatar Oct 01 '21 14:10 drwidgit

Unfortunately it's an Marketplace issue that I desperate to solve :(

For Mac please add plugin to the project and rebuild it manually.

ufna avatar Oct 01 '21 14:10 ufna

We used a bunch of internal plugins that were originally part of our project, but not everyone was setup to build them so I moved them to a separate project. It's certainly possible to include the plugin in our main project, but not preferable. However, I did make a discovery that may offer a hint of what is going on. I copied your code into a new plugin project that I built on Windows without issue. I then packaged the project using the command line tools:

"%UE426%Engine/Build/BatchFiles/RunUAT.bat" BuildPlugin -Rocket -Plugin=K:/UE4/Plugins426/Plugins/VaRestPlugin/VaRest.uplugin -TargetPlatforms=Win64 -Package=K:/UE4/Plugins426/Package/VaRest -CreateSubFolder -VS2019

I copied the packaged plugin into they Marketplace folder in the engine and opened my main project. Everything ran in-editor, but when I went to package my project (in Windows), I got the error about the missing manifest. Since the packaging works correctly for Windows using the direct install from the marketplace, I went through and compared the installed version versus my own compile of the project and the main difference is the lack of an intermediate folder. Copying the intermediate folder from the marketplace folder into my compiled version allows the packaging in Windows to work as expected. One other oddity about this is that all my other packaged plugins do contain an intermediate folder, but that seems to just be my issue.

However, this leads to possible source(s) of the problem. Comparing the intermediate folders of Win64 versus Mac in the original Marketplace version, the Win64 path /Intermediate/Build/Win64/UE4Editor contains two sub folders, Development and Inc where development holds what appears to be two static libraries. The same folder under the Mac path only contains an Inc folder. My own packaged version also has the same structure, with one exception, the folder path for Mac is /Intermediate/Build/Mac/x86_64/UE4Editor (extra x86_64 folder). However, over on my Mac machine, compiling the same plugin project for Mac and looking in the actual plugin directory containing the code, the intermediate folder there does have a Development subfolder for UE4Editor. So perhaps one or both of these issues is the root of the problem for MacOS.

For other reasons I haven't been able to attempt to package my full project on MacOS yet so I don't know if this is a fix, but wanted to pass this along in case this is of any help.

drwidgit avatar Oct 05 '21 01:10 drwidgit

@danskidb , big thanks for the research, I'm sure it'll help us with Epics to solve this issue for everyone!

ufna avatar Oct 11 '21 12:10 ufna