Distributing Plugin Without Source Files

Hi,

I’m Sofiane a french intern, I’m working for candyvoice and they want me to integrate their static libs in an unreal engine plugin, the plugin is now created and we’d like to distribute it without its source files (the .lib) is such a thing possible ? The main reason is that we don’t want our static library to be shared

Could you please give me tips because I’ve tried a lot of things but they cant seem to work ?
Some way work but only in the editor and not when we package build the most common error being :

image

Hello, yes it is possible but you need to provide header files (definitions) anyway. If you use static library, cpps are not needed.

I usually implement such things as a plugin module, so you can have a plugin wrapper on top of your static library.

Let me know if you need any specific details, but generally check for tutorials on how to implement Steam SDK. It’s a library with exposed header, so your library should work the same.
(Just Steam also have dlls, so you can skip that part if you only use static library).

The plugin works fine and the static library is implemented the issue is that for the plugin to be built I need the .lib referenced in the .build.cs of my plugin so here :



public class ImitationLib : ModuleRules
{

	public ImitationLib(ReadOnlyTargetRules Target) : base(Target)
	{
		

		PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "Lib", "imitation.lib"));
		PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "Lib", "ippcore.lib"));
		PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "Lib", "ippch.lib"));
		PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "Lib", "ipps.lib"));
    PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "Lib", "juce_dll.lib"));
    PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, "Include"));
	}
}

As you see I include the imitation.lib
The issue is that I don’t want the developers or any users of this plugin to have this static library so I was wondering if I can give them the plugin without its source folder (so this include not giving them the .build.cs)

Ok I see, I don’t think this is possible, as how would that code from library be executed if you don’t provide the library. Maybe there are some tricks that could hide your library in something else, but unfortunately I don’t know anything like that.

Normal approach for the plugin is to provide lib/dll or both and source containing only header files. Otherwise how compiler can know what methods are in your plugin?

1 Like

Yes it’s fine I found another way of protection around I’ll make my imitation.lib a dll and add a layer of encryption on top of it

By the way, if I knew you before engaging in the hell hole the creation of unreal engine third party plugin is
I would have definitely contacted you there was no documentation concerning this subject haha

1 Like

Great that you found a way! If you have some good resources regarding this topic, please share here so we all can learn :slight_smile:
Hehe yes that’s quite a hard topic, as I was going through all of these recently as well. If you need anything feel free to dm me.

1 Like