Getting Started with Plugin Development

mhlabriola

New Member
I followed the instructions here to download and build OBS: https://obsproject.com/wiki/build-instructions-for-windows This worked fine.

I would like to use the plugin template https://github.com/obsproject/obs-plugintemplate to get started. I downloaded the code and pushed it to my own repo on GitHub. I created a tag and a release.

I'd like to know what to do next to build the plugin template. The instructions say "Simply create and push a tag and GitHub Actions will run the pipeline in Release Mode." That sounds like issuing some git command will trigger the code to be built. Can someone tell me exactly what I have to type in to get the sample template built?

Thank you.
 

mhlabriola

New Member
The scripts to run are in .github\scripts\Build-Windows.ps1 and .github\scripts\Package-Windows

It would be nice if the instructions said that instead of suggesting that these script would somehow run automatically without desribing how that would actually work.
 

Ashmanix

New Member
Hi @mhlabriola when you create a tag and push it to GitHub this will start a GitHub action to build and package the template files. On your GitHub repo page if you look at the `Actions` tab you should see some actions that have run and either failed or passed.

If the action passes then it should autogenerate a release with the package files attached at:

It took me a while to try and get this to work without error. You need to make sure that in the main.yml, where it says PLUGIN_NAME that this matches the plugin name you set in CMakeLists.txt, on line 5 where you specify the project.
There are multiple stages to the script. It will first run a formatting check and then it will build the plugin for Windows, MacOS and Linux in parallel. It will then try and package these up and attach them to a release on your repo if there the workflow was actioned by the creation of a new tag. See below for a screenshot of the processes, as shown under actions in GitHub:

Screenshot 2022-12-08 at 16.13.31.png


Hope this info helps!
 
Top