diff --git a/README.md b/README.md index 82d08c18..909515e1 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,37 @@ An automated scene switcher for OBS Studio More information can be found on https://obsproject.com/forum/resources/automatic-scene-switching.395/ -To build it yourself follow these steps (changes / suggestions welcome): -1. Download the OBS Studio sources. -2. Move the sources of this plugin to the the frontend-plugins folder in the OBS sources ("obs-studio/UI/frontend-plugins/SceneSwitcher" for example). -3. Edit the CMakeLists.txt in the frontend-plugins folder to include the SceneSwitcher sources directory by appending the line "add_subdirectory(SceneSwitcher)". -4. Build OBS Studio and the plugin library will be located in the respective subdirectory of the rundir inside your build folder. (for example ~/obs-studio/build/rundir/RelWithDebInfo/obs-plugins/64bit/advanced-scene-switcher.so) +## Compiling +### Prerequisites +You'll need CMake and a working development environment for OBS Studio installed on your computer. + +### Windows +In cmake-gui, you'll have to set these CMake variables : +- **QTDIR** (path) : location of the Qt environment suited for your compiler and architecture +- **LIBOBS_INCLUDE_DIR** (path) : location of the libobs subfolder in the source code of OBS Studio +- **LIBOBS_LIB** (filepath) : location of the obs.lib file +- **OBS_FRONTEND_LIB** (filepath) : location of the obs-frontend-api.lib file + +### Linux +On Debian/Ubuntu : +``` +git clone https://github.com/WarmUpTill/SceneSwitcher.git +cd SceneSwitcher +mkdir build && cd build +cmake -DLIBOBS_INCLUDE_DIR="" -DCMAKE_INSTALL_PREFIX=/usr .. +make -j4 +sudo make install +``` +NOTE: The Linux version of this plugin is dependent on libXScrnSaver. + +### OS X +``` +git clone https://github.com/WarmUpTill/SceneSwitcher.git +cd SceneSwitcher +mkdir build && cd build +cmake -DLIBOBS_INCLUDE_DIR= -DLIBOBS_LIB= -DOBS_FRONTEND_LIB= -DQt5Core_DIR=/usr/local/opt/qt5/lib/cmake/Qt5Core -DQt5Widgets_DIR=/usr/local/opt/qt5/lib/cmake/Qt5Widgets ../ +make -j4 +# Copy advanced-scene-switcher.so to the obs-plugins folder +``` -NOTE: The linux version of this plugin is dependent on libXScrnSaver.