Contrary to the numerous references in plugin documentation .build.cs files are now required for distributing plugins without source. This is also referenced in the forum but has not been fixed in the documentation.
Can the documentation be fixed?
Additionally, there is no mention of the proper way to distribute the libs to the user. The libs are created with a ProjectName-PluginModuleName.lib naming convention. But the user’s ProjectName will differ from my ProjectName.
Am I supposed to tell the user to rename the libs that I provide for each of their projects?
What is the Epic recommended way to handle this situation and can the proper handling of this situation also be added to the documentation?
Can anyone at Epic respond?
The documentation is currently correct, the problem is that this build.cs problem is actually a bug. We are currently working on fixing that at the moment. As for your second question, the library names have project-agnostic names if you return true from ShouldUseSharedBuildEnvironment() in your .target.cs file (that function defaults to returning true in binary releases, which is how we allow distributing precompiled plugin binaries). Thank you for letting us know that this isn’t mentioned in the documentation, I’ll look into adding this information to the documentation personally.
As for distributing your plugin without the source, we would recommend that you include the source so that people who are using a source version of the engine can build the plugin with their version of the engine, otherwise only binary users will be able to use it.
Have a nice day,
While opening up your source is a brilliant move for a mega-corporation, it can be difficult as a nobody developer to balance securing your ideas with getting them any attention. Being able to distribute your plugins without the source would really help foster the growth of independent developers. It also means the true cream will rise to the top. Please consider providing us with this capability. Cheers!
I might be too late in this conversation, but was wondering if, the issue of distributing the plugin without source code is resolved. I mean if it is possible to distribute one’s plugin without source code, or there is any workaround for this issue.
The bug report is currently sitting in the “To Do” status but hasn’t been touched in some time. You can find the bug report and track it here: UE-8041
Thanks for the reply on this topic. But in my case i really don’t want to distribute the source code with the plugin. I am not planning to put on to Marketplace either.
All I want to know id that if I want to distribute the plugin, my source code is not with it. If there is way to do that, can you please refer to me, as I am stuck on this problem, and supplying the source code is not an option for me.
That’s what the bug report is for. As it mentions, the bug report was entered due to us not supporting distributing your plugin without including the source files.
Thanks Metthew, appreciate for the discussion and very quick response. (quicker than any other forum)
I’m trying to do the same thing with 4.20.3, but I can’t find a way to make it work, because it gives me this error when I build the project where I included the pre-built plugin.
Failed to produce item: S:\HR2\Projects\HR2\Plugins\MyPlugin\Intermediate\Build\Win64\UE4Editor\Development\MyPlugin\UE4Editor-MyPlugin.suppressed.exp
I left the .build.cs and deleted the source.
Can you help me?
Thanks in advance
<>c.b__4_0: UnrealBuildTool: ERROR: UBT ERROR: Failed to produce item: S:\HR2\Projects\HR2\Plugins\MyPlugin\Intermediate\Build\Win64\UE4Editor\Development\MyPlugin\UE4Editor-MyPlugin.suppressed.exp
<>c.b__4_0: (see …/Programs/UnrealBuildTool/Log.txt for full exception trace)
<>c.b__4_1: BuildException: UBT ERROR: Failed to produce item: S:\HR2\Projects\HR2\Plugins\MyPlugin\Intermediate\Build\Win64\UE4Editor\Development\MyPlugin\UE4Editor-MyPlugin.suppressed.exp
<>c.b__4_1: at UnrealBuildTool.ActionGraph.ExecuteActions(BuildConfiguration BuildConfiguration, List`1 ActionsToExecute, Boolean bIsRemoteCompile, String& ExecutorName, String TargetInfoForTelemetry, EHotReload HotReload) in D:\Build++UE4\Sync\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\System\ActionGraph.cs:line 570
<>c.b__4_1: at UnrealBuildTool.UnrealBuildTool.RunUBT(BuildConfiguration BuildConfiguration, String Arguments, FileReference ProjectFile, Boolean bCatchExceptions) in D:\Build++UE4\Sync\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:line 1673