How to add a file to copy in the Packaging Process

Wondering if there is a way to add a specific file (such as a .dll in a plugin) to the packaging process and have it copied when a user packages their project.

The Razer Hydra Plugin requires the sixense dll to be available, right now a user has to manually add the dependent dll file from the plugin after packaging. Is there a way to streamline this so that the file gets copied automatically to the right sub-directory?

still need an answer on this, anyone who can help?

Bump!

I need this too.

I know that it is possible to modify the function GetFilesToDeployOrStage in [YOUR UE4 DIR]\Engine\Source\Programs\AutomationTool\Win\WinPlatform.Automation.cs

but its not acceptable to change engine files…

Theres is a PR on github (https://github.com/EpicGames/UnrealEngine/pull/335) that could allow this sort of custom tasks.

Hi all,

Unfortunately that PR was declined due to changes to UBT. It does appear to be something staff is tracking, however, so be on the look out for it in the future.

Thanks!

are UBT changes complex or can the PR be modified to work with the new system fairly easily?

That would be something to ask in the Github thread itself, the devs who answered will be able to tell you if there is more work that can be done to adapt the pull to the new changes, or if they themselves are working on a similar functionality. Thanks!

We’re still working out the kinks in it (and adding support for more platforms), but I recently added the ability to pass a list of files to stage from the module build rules through to UAT. You can look in PhysX.build.cs to see how it stages the PhysX DLLs, for example.

Did any further solution come up?