elan-ev / opencast-obs-plugin

GNU General Public License v2.0
8 stars 6 forks source link

Include complete instruction for linux either in README.md or in building.md #12

Open zenny opened 4 years ago

zenny commented 4 years ago

Hi,

I propose to include the following instructions (derived from my own experience described in #11) either in README.md or particulary in https://github.com/elan-ev/opencast-obs-plugin/blob/master/docs/building.md#building-on-linux section to prevent others from whining around like I had to:

  1. Install all necessary building and development libraries viz. cmake, cpp, libcurl, libconfig, qt5, tinyxml2 for your distro. Please note that the developemnet libraries could be suffixed with either -dev (in debian-based distros) or -devel in others like (arch or voidlinux). If you come across a missing package or libraries while compiling and building as in 3 and 7 below, you ought to install those, too.

  2. Create a directory to keep the sources: mkdir opencast-obs-plugin-build-from-source

  3. Change to the newly-created directory: cd opencast-obs-plugin-build-from-source

  4. Pull the lib-opencast-ingest source and compile with the following command (one line at a time):

    git clone https://github.com/elan-ev/lib-opencast-ingest.git
    cd lib-opencast-ingest/
    mkdir build && cd build
    cmake -DCMAKE_BUILD_TYPE=Release ..
    cmake --build .
  5. Change to the default build directory as in 1 above: cd ../../

  6. Pull the opencast-obs-plugin from source repo: git clone https://github.com/elan-ev/opencast-obs-plugin.git

  7. Make some symlinks to lib-opencast-ingest headers:

    cd opencast-obs-plugin/libs/libOpencastIngest/include/
    ln -s ../../../../lib-opencast-ingest/src/libOpencastIngest.h  
    ln -s ../../../../lib-opencast-ingest/src/libOpencastIngest.hpp 
    cd ../lib
    ln -s ../../../..//lib-opencast-ingest/build/libOpencastIngest_static.a  libOpencastIngest.a
  8. Compile and build this plugin:

    cd ../../..
    mkdir build
    cd build/
    cmake -DCMAKE_BUILD_TYPE=Release ..
    cmake --build .

You will get the following if compiled and built successfully:

...
[100%] Linking CXX shared library libobsOpencastIngestPlugin.so
[100%] Built target obsOpencastIngestPlugin

You may encounter some warnings, but it does not seem to impact, so can be IGNORED(?)!

  1. Copy the generated binary libobsOpencastIngestPlugin.so to obs-plugin directory of obs installation (NOT into $HOME/.config/obs-studio/plugins):

    sudo cp libobsOpencastIngestPlugin.so /usr/lib/obs-plugins/
  2. Start obs and you would see the plugin under Tools menu item.

opencast-obs-plugin

Enjoy!