FiniteSingularity / obs-composite-blur

A comprehensive blur plugin for OBS that provides several different blur algorithms, and proper compositing.
GNU General Public License v2.0
325 stars 27 forks source link

Add install instructions for Arch users #37

Closed dnaka91 closed 10 months ago

dnaka91 commented 10 months ago

I created a package for Arch Linux users for an easier installation. This PR adds a simple note, so users can find it from the README.

While creating the packaging script, I noticed a few odd behaviors in the CMakeLists.txt. It creates several files where they shouldn't be, so I had to manually relocate them. Hopefully the config can be adjusted in the future, so they end up in the right place.

This is the way it currently looks like after building and installing the project:

usr
├── data
│  └── obs-plugins
│     └── obs-composite-blur
│        ├── locale
│        │  └── en-US.ini
│        └── shaders
│           ├── box_1d.effect
│           ├── box_radial.effect
│           ├── box_tiltshift.effect
│           ├── composite.effect
│           ├── dual_kawase_down_sample.effect
│           ├── dual_kawase_up_sample.effect
│           ├── effect_mask_circle.effect
│           ├── effect_mask_crop.effect
│           ├── effect_mask_source.effect
│           ├── gaussian_1d.effect
│           ├── gaussian_1d_texture.effect
│           ├── gaussian_motion.effect
│           ├── gaussian_motion_texture.effect
│           ├── gaussian_radial.effect
│           ├── gaussian_radial_texture.effect
│           ├── mix.effect
│           ├── pixelate_circle.effect
│           ├── pixelate_hexagonal.effect
│           ├── pixelate_square.effect
│           └── pixelate_triangle.effect
├── lib
│  └── obs-plugins
│     └── obs-composite-blur.so
├── obs-plugins
│  └── 64bit
│     └── obs-composite-blur.so
└── share
   └── obs
      └── obs-plugins
         └── obs-composite-blur
            └── locale
               └── en-US.ini

And this is the way it should look like:

usr
├── lib
│  └── obs-plugins
│     └── obs-composite-blur.so
└── share
   └── obs
      └── obs-plugins
         └── obs-composite-blur
            ├── locale
            │  └── en-US.ini
            └── shaders
               ├── box_1d.effect
               ├── box_radial.effect
               ├── box_tiltshift.effect
               ├── composite.effect
               ├── dual_kawase_down_sample.effect
               ├── dual_kawase_up_sample.effect
               ├── effect_mask_circle.effect
               ├── effect_mask_crop.effect
               ├── effect_mask_source.effect
               ├── gaussian_1d.effect
               ├── gaussian_1d_texture.effect
               ├── gaussian_motion.effect
               ├── gaussian_motion_texture.effect
               ├── gaussian_radial.effect
               ├── gaussian_radial_texture.effect
               ├── mix.effect
               ├── pixelate_circle.effect
               ├── pixelate_hexagonal.effect
               ├── pixelate_square.effect
               └── pixelate_triangle.effect

The correct locations are:

The odd files are:

I can confirm that the plugin works correct after relocating the mentioned files, but I DID NOT try using the plugin before applying the relocation steps.

It's interesting that the shaders are put in /usr/data, despite not being mentioned in the CMakeLists.txt. Probably it's auto-selected by the OBS CMake helper scripts? Not an expert on that topic. Maybe there are some extra settings to push it in the right direction.

FiniteSingularity commented 10 months ago

Thank you for creating an Arch Linux package @dnaka91. I am happy to merge this PR with the link/instructions to your package, as long as you're planning on keeping it up to date as new versions are released.

Regarding the packaging, I'll defer this one to @exeldro, as the build scripts are from his prior plugins, and he has been helping me with getting the build system running. It would be fantastic to make sure the build is as standard as possible, so that it is easier to add other Linux distribution packages. It has been a while since I've worked with Linux, but I agree, the directory structure that is currently being generated does not look right. Any thoughts on this Exeldro?

dnaka91 commented 10 months ago

I check all the AUR packages that I manage regularly, about every few days. Also, other people can notify me through the AUR page that a package is outdated, should I not update it in a timely manner.

So yeah, I plan on keeping it up to date :+1:

exeldro commented 10 months ago

The out of tree linux build for my plugins was not made by me, but by this pull request: https://github.com/exeldro/obs-move-transition/pull/105 in CMakeLists.txt it adds 2 times an install but that looks to me to be the correct locations, not odd ones

dnaka91 commented 10 months ago

I saw those instructions in the CMakeLists.txt, especially the LIB_OUT_DIR and DATA_OUT_DIR which point to the right location. But then CMake puts them in a different place regardless :thinking:.

Also, all other plugins (well, directly coming from obs itself) seem to put it properly in /usr/share/obs.

I took a look at some other AUR packages for OBS plugins, and it's mixed. Some do no special setup, and some manually copy files over, as they seem to be put in similar places as here.

Maybe it's a problem with the OBS helper scripts :thinking:

dnaka91 commented 10 months ago

Aha! I found the problem.

First of all, it seems the obs-studio CMake files have evolved a lot in the meantime, and that's a lot of files now. Didn't really want to touch that, as trying to update to that new setup would probably break way too many things.

So I digged through the current OBS helper file and found the LINUX_PORTABLE flag in some places, which seems to affect the location of output files.

When configuring the build with CMake, passing -DLINUX_PORTABLE=OFF is the key to get all files in the right location :tada:.

Maybe there was a portable version of OBS in the past of some sort, I don't know. Could be worth it, disabling the portable mode for other Linux builds that are attached as release assets.

FiniteSingularity commented 10 months ago

Good stuff @dnaka91.

First, thank you for repackaging things for Arch Linux users! That is fantastic, and I'll merge this into the documentation this morning.

Second, great work digging into the cmake files. I've opened up an issue to track this. If you'd like to submit a separate PR, please feel free, otherwise I'll take a stab at it sometime later today.

FiniteSingularity commented 10 months ago

@all-contributors please add @dnaka91 for doc and platform.

allcontributors[bot] commented 10 months ago

@FiniteSingularity

I've put up a pull request to add @dnaka91! :tada: