flathub / com.obsproject.Studio

This repository is no longer used to build OBS. Issues should be reported at https://github.com/obsproject/obs-studio
https://github.com/obsproject/obs-studio
29 stars 21 forks source link

Flathub Plugins #135

Closed GeorgesStavracas closed 2 years ago

GeorgesStavracas commented 3 years ago

It is perfectly possible to add plugins to OBS Studio using Flatpak, and in fact there are a couple of plugins already available! However, there is currently no documentation; a custom patch on Flathub to manage these extensions; and overall a lack of visibility around it.

Publishing OBS Studio on Flathub has the potential to being the showcase of all these features, so it's a good idea to have a well-documented, simple process for plugin authors to publish their work here.

ACs:

GeorgesStavracas commented 3 years ago

After further inspection, I believe the current approach is good to be proposed upstream. It is currently composed of:

  1. Listing /app/plugin as one of the search paths in OBS Studio code (the downstream patch)
  2. An extension point that merges the lib and share directories at /app/plugin
  3. Plugins prefix their install paths to /app/plugins/<plugin name>

Flatpak then does the rest, and the .so files end up at /app/plugin/lib/obs-plugins, which is what's listed in OBS Studio source code.

develroo commented 2 years ago

Just out of curiosity, what is the manual way to add plugins to the OBS flatpak? It seems OBS usefulness is limited without a nice way to add useful functionality to it via plugins.

GeorgesStavracas commented 2 years ago

It's possible to manually add plugins by copying their shared libraries into ~/.var/app/com.obsproject.Studio/config/obs-studio/plugins. This is now documented at https://github.com/flathub/com.obsproject.Studio/wiki/Plugins.

develroo commented 2 years ago

Can I request some further examples to the documentation because it is not clear what to do for UI plugins that require to be built against the OBS project tree? For example, I am looking at trying to make a manifest for the downstream-keyer plugin, But the build instructions are quite explicit.

Build

Build OBS Studio: https://obsproject.com/wiki/Install-Instructions Check out this repository to UI/frontend-plugins/downstream-keyer Add add_subdirectory(downstream-keyer) to UI/frontend-plugins/CMakeLists.txt Rebuild OBS Studio

So how do we leverage the obs runtime to build against it like that?

Thanks.