Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for specifying dependant plugins for plugin builds #62

Open
6 tasks
hach-que opened this issue Nov 29, 2024 · 1 comment
Open
6 tasks

Add support for specifying dependant plugins for plugin builds #62

hach-que opened this issue Nov 29, 2024 · 1 comment

Comments

@hach-que
Copy link
Member

I saw that someone on the Unreal Source Discord wanted to build a plugin that depends on other plugins. While it isn't valid to build a plugin like this for Fab (you can't have external/non-engine plugin dependencies for code plugins), it's perfectly fine if you want to distribute plugin binaries on e.g. GitHub.

It seems reasonable for UET to support this. I think a rough outline of the work probably looks like:

  • BuildGraph XML: Add -BuildDependantPlugins to compile steps when building a plugin with dependencies.
  • BuildGraph XML: The "Assemble Host Project" needs to perform the plugin copy steps not just from $(PluginDirectory), but the additional plugin directories as well, with each plugin getting it's own $(ShortPluginName). Maybe we can just give additional plugins a short name of P1, P2, ...? Depends on whether BuildGraph for loops will allow me to do that.
  • BuildGraph XML/Prepare Step: Figure out where we're going to clone the additional plugin repositories, since those paths will have be what $(PluginDirectory) is replaced with when copying out the additional plugins. Thankfully PluginDirectory is already a subdirectory of the main repository (usually __REPOSITORY_ROOT__/(plugin name)), so maybe we can just clone into __REPOSITORY_ROOT__/.uet/ExtraPlugins or something like that. If this is a consistent path, we might be able to just have an e.g. ExtraPluginsDirectory and set our host project tagging to do a filter of e.g. */Config/...; to just grab all the content from all the plugins without a foreach loop in the BuildGraph XML?
  • BuildGraph XML: Figure out what to do with Assemble Test Project. This isn't needed for "build only" paths, but it is necessary the moment you want to run any tests. Maybe we just don't support running tests for these kinds of plugin-depending-on-plugin situations for now?
  • Prepare Step: Actually add the "prepare download plugin" step. This is mostly copying the one that already exists for projects and adapting it for the new paths.
  • Can we add a parameter to uet build that lets you specify dependent plugins without having to use BuildConfig.json? It might be unwieldy though due to the interpolation support and number of parameters that plugin source specs actually need.
@hach-que
Copy link
Member Author

Oh this is actually a duplicate of #31. I'll keep this one open though because it has the list of tasks that need to be undertaken to complete the work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant