Build on Windows꞉ Standalone Plugin - HoneyHazard/PixelMatchSwitcher GitHub Wiki

Configure your system and obtain a build of OBS with atomic effects

Additional system environment variable(s) needed

  • Qt5Core_DIR: mine is C:\Qt\5.10.1\msvc2017_64\lib\cmake\Qt5Core

Obtain source and begin configuring

  • git clone [email protected]:HoneyHazard/PixelMatchSwitcher.git
  • Use CMake or CMake-enabled IDE to generate a build structure
  • For reference, my build directory will be C:\Users\admin\Documents\builds\PixelMatchSwitcher

CMake variables need to be set

  • BUILD_OUT_OF_TREE set to true
  • LibObs_DIR: mine is C:/Users/admin/Documents/builds/obs-studio-atomic-effects/libobs/
  • LIBOBS_LIB: mine is C:/Users/admin/Documents/builds/obs-studio-atomic-effects/libobs/Debug/obs.lib
  • LIBOBS_INCLUDE_DIR: mine is at C:/Users/admin/Documents/obs-studio-atomic-effects/libobs
  • LIBOBS_FRONTEND_API_LIB: mine is C:/Users/admin/Documents/builds/obs-studio-atomic-effects/UI/obs-frontend-api/Debug/obs-frontend-api.lib
  • LIBOBS_FRONTEND_INCLUDE_DIR: mine is C:/Users/admin/Documents/obs-studio-atomic-effects/UI/obs-frontend-api
  • LIBOBS_UI_DIR: mine is C:/Users/admin/Documents/obs-studio-atomic-effects/UI
  • W32_PTHREADS_LIB: mine is C:/Users/admin/Documents/builds/obs-studio-atomic-effects/deps/w32-pthreads/Debug/w32-pthreads.lib

Finish configure, generate, build it!

  • Make sure you specify "Visual Studio 16 2019" as the generator for the project

Configure OBS build directory for debugging Pixel Match Switcher

This is for configuring things so you can debug your latest and actively developed versions of the OBS fork and Pixel Match Switcher. The alternative is to use installation scripts but that way you have to reinstall whenever anything in OBS or the plugin changes

Make a symbolic link to Pixel Match Switcher dll. I started Command Line Prompt with administrator rights and did:

cd C:\Users\admin\Documents\builds\obs-studio-atomic-effects\rundir\Debug\obs-plugins\64bit
mklink pixel-match-switcher.dll C:\Users\admin\Documents\builds\PixelMatchSwitcher\Debug\pixel-match-switcher.dll

Make a symbolic link to Pixel Match Switcher data directory (contains our effect files). With Command Line Prompt and admin priviledges, I did:

cd C:\Users\admin\Documents\builds\obs-studio-atomic-effects\rundir\Debug\data\obs-plugins
mklink /D pixel-match-switcher C:\Users\admin\Documents\PixelMatchSwitcher\data

Now you can run and debug the OBS fork and the plugin as you are working on them!