nowrep / obs-vkcapture

OBS Linux Vulkan/OpenGL game capture
GNU General Public License v2.0
532 stars 25 forks source link

Add Flatpak support #49

Closed SuNNjek closed 2 years ago

SuNNjek commented 2 years ago

Hello, since OBS also has a Flatpak (which is going to be officially supported by the next OBS release), I thought it would be cool for this plugin to work with it. So I decided to create a flatpak manifest which can be used to build the plugin for the flatpak version of OBS. This can be installed from the dist/flatpak directory with the following command:

flatpak-builder --user --install --force-clean build-dir com.obsproject.Studio.Plugin.VkCapture.yml

Now unfortunately the obs-vkcapture and obs-glcapture tools still need to be installed without flatpak. I moved the check for the OBS libs in the CMake files into the if (BUILD_PLUGIN) check so that these tools can be built without the need for OBS to be installed.

I tested this on a laptop with an Intel integrated GPU with a fresh Manjaro install and it works really well:

Screenshot_20211223_163819

If you want to publish this to flathub you can take a look at this guide: https://github.com/flathub/flathub/wiki/App-Submission. According to this, they prefer to have the original dev do this.

nowrep commented 2 years ago

If you want to publish this to flathub you can take a look at this guide: https://github.com/flathub/flathub/wiki/App-Submission. According to this, they prefer to have the original dev do this.

I don't really want to maintain it, but if you do - feel free to go ahead.

Thanks.

SuNNjek commented 2 years ago

Thanks for merging. I will try and publish it after the next release

nowrep commented 2 years ago

I don't really plan to make a new release anytime soon. But if you need a new release for this, I can make one now.

SuNNjek commented 2 years ago

That would be great. According to https://github.com/flathub/flathub/wiki/App-Requirements#stable-releases-reproducible-builds only stable releases are allowed on flathub

nowrep commented 2 years ago

Done

SuNNjek commented 2 years ago

FYI: The flatpaks have now been published as com.obsproject.Studio.Plugin.OBSVkCapture (for the OBS plugin itself) and org.freedesktop.Platform.VulkanLayer.OBSVkCapture (for the capture tools), in case you want to add that to the ReadMe

nowrep commented 2 years ago

Can you make a PR for the readme? Thanks