Skip to content

Commit 6c5fa06

Browse files
author
Aytackydln
committed
First version
1 parent 942b4ab commit 6c5fa06

20 files changed

Lines changed: 78 additions & 2096 deletions

.github/workflows/build-project.yaml

Lines changed: 0 additions & 178 deletions
Original file line numberDiff line numberDiff line change
@@ -71,184 +71,6 @@ jobs:
7171
echo "pluginName=${plugin_name}" >> $GITHUB_OUTPUT
7272
fi
7373
74-
macos-build:
75-
name: Build for macOS 🍏
76-
runs-on: macos-15
77-
needs: check-event
78-
defaults:
79-
run:
80-
shell: zsh --no-rcs --errexit --pipefail {0}
81-
steps:
82-
- uses: actions/checkout@v4
83-
with:
84-
submodules: recursive
85-
fetch-depth: 0
86-
87-
- name: Set Up Environment 🔧
88-
id: setup
89-
run: |
90-
: Set Up Environment 🔧
91-
if (( ${+RUNNER_DEBUG} )) setopt XTRACE
92-
93-
print '::group::Enable Xcode 16.1'
94-
sudo xcode-select --switch /Applications/Xcode_16.1.0.app/Contents/Developer
95-
print '::endgroup::'
96-
97-
print '::group::Clean Homebrew Environment'
98-
local -a unwanted_formulas=()
99-
local -a remove_formulas=()
100-
for formula (${unwanted_formulas}) {
101-
if [[ -d ${HOMEBREW_PREFIX}/Cellar/${formula} ]] remove_formulas+=(${formula})
102-
}
103-
104-
if (( #remove_formulas )) brew uninstall --ignore-dependencies ${remove_formulas}
105-
print '::endgroup::'
106-
107-
local product_name
108-
local product_version
109-
read -r product_name product_version <<< \
110-
"$(jq -r '. | {name, version} | join(" ")' buildspec.json)"
111-
112-
print "pluginName=${product_name}" >> $GITHUB_OUTPUT
113-
print "pluginVersion=${product_version}" >> $GITHUB_OUTPUT
114-
115-
- uses: actions/cache/restore@v4
116-
id: ccache-cache
117-
with:
118-
path: ${{ github.workspace }}/.ccache
119-
key: ${{ runner.os }}-ccache-${{ needs.check-event.outputs.config }}
120-
restore-keys: |
121-
${{ runner.os }}-ccache-
122-
123-
- name: Set Up Codesigning 🔑
124-
uses: ./.github/actions/setup-macos-codesigning
125-
if: fromJSON(needs.check-event.outputs.codesign)
126-
id: codesign
127-
with:
128-
codesignIdentity: ${{ secrets.MACOS_SIGNING_APPLICATION_IDENTITY }}
129-
installerIdentity: ${{ secrets.MACOS_SIGNING_INSTALLER_IDENTITY }}
130-
codesignCertificate: ${{ secrets.MACOS_SIGNING_CERT }}
131-
certificatePassword: ${{ secrets.MACOS_SIGNING_CERT_PASSWORD }}
132-
keychainPassword: ${{ secrets.MACOS_KEYCHAIN_PASSWORD }}
133-
provisioningProfile: ${{ secrets.MACOS_SIGNING_PROVISIONING_PROFILE }}
134-
notarizationUser: ${{ secrets.MACOS_NOTARIZATION_USERNAME }}
135-
notarizationPassword: ${{ secrets.MACOS_NOTARIZATION_PASSWORD }}
136-
137-
- name: Build Plugin 🧱
138-
uses: ./.github/actions/build-plugin
139-
with:
140-
target: macos-universal
141-
config: ${{ needs.check-event.outputs.config }}
142-
codesign: ${{ fromJSON(needs.check-event.outputs.codesign) }}
143-
codesignIdent: ${{ steps.codesign.outputs.codesignIdent }}
144-
145-
- name: Package Plugin 📀
146-
uses: ./.github/actions/package-plugin
147-
with:
148-
target: macos-universal
149-
config: ${{ needs.check-event.outputs.config }}
150-
package: ${{ fromJSON(needs.check-event.outputs.package) }}
151-
codesign: ${{ fromJSON(needs.check-event.outputs.codesign) && fromJSON(steps.codesign.outputs.haveCodesignIdent) }}
152-
codesignIdent: ${{ steps.codesign.outputs.codesignIdent }}
153-
installerIdent: ${{ steps.codesign.outputs.installerIdent }}
154-
codesignTeam: ${{ steps.codesign.outputs.codesignTeam }}
155-
notarize: ${{ fromJSON(needs.check-event.outputs.notarize) && fromJSON(steps.codesign.outputs.haveNotarizationUser) }}
156-
codesignUser: ${{ secrets.MACOS_NOTARIZATION_USERNAME }}
157-
codesignPass: ${{ secrets.MACOS_NOTARIZATION_PASSWORD }}
158-
159-
- name: Upload Artifacts 📡
160-
uses: actions/upload-artifact@v4
161-
with:
162-
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-macos-universal-${{ needs.check-event.outputs.commitHash }}
163-
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-macos-universal.*
164-
165-
- name: Upload Debug Symbol Artifacts 🪲
166-
uses: actions/upload-artifact@v4
167-
if: ${{ needs.check-event.outputs.config == 'Release' }}
168-
with:
169-
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-macos-universal-${{ needs.check-event.outputs.commitHash }}-dSYMs
170-
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-macos-universal-dSYMs.*
171-
172-
- uses: actions/cache/save@v4
173-
if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
174-
with:
175-
path: ${{ github.workspace }}/.ccache
176-
key: ${{ runner.os }}-ccache-${{ needs.check-event.outputs.config }}
177-
178-
ubuntu-build:
179-
name: Build for Ubuntu 🐧
180-
strategy:
181-
matrix:
182-
os: [ubuntu-24.04]
183-
runs-on: ${{ matrix.os }}
184-
needs: check-event
185-
defaults:
186-
run:
187-
shell: bash
188-
steps:
189-
- uses: actions/checkout@v4
190-
with:
191-
submodules: recursive
192-
fetch-depth: 0
193-
194-
- name: Set Up Environment 🔧
195-
id: setup
196-
run: |
197-
: Set Up Environment 🔧
198-
if [[ "${RUNNER_DEBUG}" ]]; then set -x; fi
199-
200-
read -r product_name product_version <<< \
201-
"$(jq -r '. | {name, version} | join(" ")' buildspec.json)"
202-
203-
echo "pluginName=${product_name}" >> $GITHUB_OUTPUT
204-
echo "pluginVersion=${product_version}" >> $GITHUB_OUTPUT
205-
206-
- uses: actions/cache/restore@v4
207-
id: ccache-cache
208-
with:
209-
path: ${{ github.workspace }}/.ccache
210-
key: ${{ runner.os }}-${{ matrix.os }}-ccache-x86_64-${{ needs.check-event.outputs.config }}
211-
restore-keys: |
212-
${{ runner.os }}-${{ matrix.os }}-ccache-x86_64-
213-
214-
- name: Build Plugin 🧱
215-
uses: ./.github/actions/build-plugin
216-
with:
217-
target: x86_64
218-
config: ${{ needs.check-event.outputs.config }}
219-
220-
- name: Package Plugin 📀
221-
uses: ./.github/actions/package-plugin
222-
with:
223-
target: x86_64
224-
config: ${{ needs.check-event.outputs.config }}
225-
package: ${{ fromJSON(needs.check-event.outputs.package) }}
226-
227-
- name: Upload Source Tarball 🗜️
228-
uses: actions/upload-artifact@v4
229-
with:
230-
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-${{ matrix.os }}-sources-${{ needs.check-event.outputs.commitHash }}
231-
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-source.*
232-
233-
- name: Upload Artifacts 📡
234-
uses: actions/upload-artifact@v4
235-
with:
236-
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-${{ matrix.os }}-x86_64-${{ needs.check-event.outputs.commitHash }}
237-
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-x86_64*.*
238-
239-
- name: Upload debug symbol artifacts 🪲
240-
uses: actions/upload-artifact@v4
241-
if: ${{ fromJSON(needs.check-event.outputs.package) }}
242-
with:
243-
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-${{ matrix.os }}-x86_64-${{ needs.check-event.outputs.commitHash }}-dbgsym
244-
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-x86_64*-dbgsym.ddeb
245-
246-
- uses: actions/cache/save@v4
247-
if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
248-
with:
249-
path: ${{ github.workspace }}/.ccache
250-
key: ${{ runner.os }}-${{ matrix.os }}-ccache-x86_64-${{ needs.check-event.outputs.config }}
251-
25274
windows-build:
25375
name: Build for Windows 🪟
25476
runs-on: windows-2022

AuroraScreenshot.png

162 KB
Loading

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ if(ENABLE_FRONTEND_API)
2121
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE OBS::obs-frontend-api)
2222
endif()
2323

24+
# Add include directories
25+
target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE ${CURL_INCLUDE_DIRS})
26+
find_package(CURL REQUIRED)
27+
target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE ${CURL_INCLUDE_DIRS})
28+
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE ${CURL_LIBRARIES})
29+
30+
# Optionally include Qt (disabled by default)
2431
if(ENABLE_QT)
2532
find_package(Qt6 COMPONENTS Widgets Core)
2633
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE Qt6::Core Qt6::Widgets)

CMakePresets.json

Lines changed: 1 addition & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -10,41 +10,10 @@
1010
"name": "template",
1111
"hidden": true,
1212
"cacheVariables": {
13-
"ENABLE_FRONTEND_API": false,
13+
"ENABLE_FRONTEND_API": true,
1414
"ENABLE_QT": false
1515
}
1616
},
17-
{
18-
"name": "macos",
19-
"displayName": "macOS Universal",
20-
"description": "Build for macOS 12.0+ (Universal binary)",
21-
"inherits": ["template"],
22-
"binaryDir": "${sourceDir}/build_macos",
23-
"condition": {
24-
"type": "equals",
25-
"lhs": "${hostSystemName}",
26-
"rhs": "Darwin"
27-
},
28-
"generator": "Xcode",
29-
"warnings": {"dev": true, "deprecated": true},
30-
"cacheVariables": {
31-
"CMAKE_OSX_DEPLOYMENT_TARGET": "12.0",
32-
"CMAKE_OSX_ARCHITECTURES": "arm64;x86_64",
33-
"CODESIGN_IDENTITY": "$penv{CODESIGN_IDENT}",
34-
"CODESIGN_TEAM": "$penv{CODESIGN_TEAM}"
35-
}
36-
},
37-
{
38-
"name": "macos-ci",
39-
"inherits": ["macos"],
40-
"displayName": "macOS Universal CI build",
41-
"description": "Build for macOS 12.0+ (Universal binary) for CI",
42-
"generator": "Xcode",
43-
"cacheVariables": {
44-
"CMAKE_COMPILE_WARNING_AS_ERROR": true,
45-
"ENABLE_CCACHE": true
46-
}
47-
},
4817
{
4918
"name": "windows-x64",
5019
"displayName": "Windows x64",
@@ -68,52 +37,9 @@
6837
"cacheVariables": {
6938
"CMAKE_COMPILE_WARNING_AS_ERROR": true
7039
}
71-
},
72-
{
73-
"name": "ubuntu-x86_64",
74-
"displayName": "Ubuntu x86_64",
75-
"description": "Build for Ubuntu x86_64",
76-
"inherits": ["template"],
77-
"binaryDir": "${sourceDir}/build_x86_64",
78-
"condition": {
79-
"type": "equals",
80-
"lhs": "${hostSystemName}",
81-
"rhs": "Linux"
82-
},
83-
"generator": "Ninja",
84-
"warnings": {"dev": true, "deprecated": true},
85-
"cacheVariables": {
86-
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
87-
"CMAKE_INSTALL_LIBDIR": "lib/CMAKE_SYSTEM_PROCESSOR-linux-gnu"
88-
}
89-
},
90-
{
91-
"name": "ubuntu-ci-x86_64",
92-
"inherits": ["ubuntu-x86_64"],
93-
"displayName": "Ubuntu x86_64 CI build",
94-
"description": "Build for Ubuntu x86_64 on CI",
95-
"cacheVariables": {
96-
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
97-
"CMAKE_COMPILE_WARNING_AS_ERROR": true,
98-
"ENABLE_CCACHE": true
99-
}
10040
}
10141
],
10242
"buildPresets": [
103-
{
104-
"name": "macos",
105-
"configurePreset": "macos",
106-
"displayName": "macOS Universal",
107-
"description": "macOS build for Universal architectures",
108-
"configuration": "RelWithDebInfo"
109-
},
110-
{
111-
"name": "macos-ci",
112-
"configurePreset": "macos-ci",
113-
"displayName": "macOS Universal CI",
114-
"description": "macOS CI build for Universal architectures",
115-
"configuration": "RelWithDebInfo"
116-
},
11743
{
11844
"name": "windows-x64",
11945
"configurePreset": "windows-x64",
@@ -127,20 +53,6 @@
12753
"displayName": "Windows x64 CI",
12854
"description": "Windows CI build for x64 (RelWithDebInfo configuration)",
12955
"configuration": "RelWithDebInfo"
130-
},
131-
{
132-
"name": "ubuntu-x86_64",
133-
"configurePreset": "ubuntu-x86_64",
134-
"displayName": "Ubuntu x86_64",
135-
"description": "Ubuntu build for x86_64",
136-
"configuration": "RelWithDebInfo"
137-
},
138-
{
139-
"name": "ubuntu-ci-x86_64",
140-
"configurePreset": "ubuntu-ci-x86_64",
141-
"displayName": "Ubuntu x86_64 CI",
142-
"description": "Ubuntu CI build for x86_64",
143-
"configuration": "RelWithDebInfo"
14456
}
14557
]
14658
}

README.md

Lines changed: 7 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,10 @@
1-
# OBS Plugin Template
1+
# OBS Aurora-RGB Plugin
2+
Just a simple plugin to send **recording** and **streaming** status to Aurora's Global Variable endpoint
23

3-
## Introduction
4+
## Usage in Aurora-RGB
5+
The plugin sends the data to [http://localhost:9088/variables](http://localhost:9088/variables) endpoint.
6+
In overrides editor, you can use "Global Variables" functions and the variable names "obsRecording" and "obsStreaming"
47

5-
The plugin template is meant to be used as a starting point for OBS Studio plugin development. It includes:
8+
Screenshot:
9+
![Aurora RGB Overrides Editor](AuroraScreenshot.png)
610

7-
* Boilerplate plugin source code
8-
* A CMake project file
9-
* GitHub Actions workflows and repository actions
10-
11-
## Supported Build Environments
12-
13-
| Platform | Tool |
14-
|-----------|--------|
15-
| Windows | Visal Studio 17 2022 |
16-
| macOS | XCode 16.0 |
17-
| Windows, macOS | CMake 3.30.5 |
18-
| Ubuntu 24.04 | CMake 3.28.3 |
19-
| Ubuntu 24.04 | `ninja-build` |
20-
| Ubuntu 24.04 | `pkg-config`
21-
| Ubuntu 24.04 | `build-essential` |
22-
23-
## Quick Start
24-
25-
An absolute bare-bones [Quick Start Guide](https://github.com/obsproject/obs-plugintemplate/wiki/Quick-Start-Guide) is available in the wiki.
26-
27-
## Documentation
28-
29-
All documentation can be found in the [Plugin Template Wiki](https://github.com/obsproject/obs-plugintemplate/wiki).
30-
31-
Suggested reading to get up and running:
32-
33-
* [Getting started](https://github.com/obsproject/obs-plugintemplate/wiki/Getting-Started)
34-
* [Build system requirements](https://github.com/obsproject/obs-plugintemplate/wiki/Build-System-Requirements)
35-
* [Build system options](https://github.com/obsproject/obs-plugintemplate/wiki/CMake-Build-System-Options)
36-
37-
## GitHub Actions & CI
38-
39-
Default GitHub Actions workflows are available for the following repository actions:
40-
41-
* `push`: Run for commits or tags pushed to `master` or `main` branches.
42-
* `pr-pull`: Run when a Pull Request has been pushed or synchronized.
43-
* `dispatch`: Run when triggered by the workflow dispatch in GitHub's user interface.
44-
* `build-project`: Builds the actual project and is triggered by other workflows.
45-
* `check-format`: Checks CMake and plugin source code formatting and is triggered by other workflows.
46-
47-
The workflows make use of GitHub repository actions (contained in `.github/actions`) and build scripts (contained in `.github/scripts`) which are not needed for local development, but might need to be adjusted if additional/different steps are required to build the plugin.
48-
49-
### Retrieving build artifacts
50-
51-
Successful builds on GitHub Actions will produce build artifacts that can be downloaded for testing. These artifacts are commonly simple archives and will not contain package installers or installation programs.
52-
53-
### Building a Release
54-
55-
To create a release, an appropriately named tag needs to be pushed to the `main`/`master` branch using semantic versioning (e.g., `12.3.4`, `23.4.5-beta2`). A draft release will be created on the associated repository with generated installer packages or installation programs attached as release artifacts.
56-
57-
## Signing and Notarizing on macOS
58-
59-
Basic concepts of codesigning and notarization on macOS are explained in the correspodning [Wiki article](https://github.com/obsproject/obs-plugintemplate/wiki/Codesigning-On-macOS) which has a specific section for the [GitHub Actions setup](https://github.com/obsproject/obs-plugintemplate/wiki/Codesigning-On-macOS#setting-up-code-signing-for-github-actions).

0 commit comments

Comments
 (0)