release: package archives as direct drop-ins to OBS plugin dirs
Release / macOS (macos-latest) (push) Successful in 43s
Release / Linux (ubuntu-24.04) (push) Successful in 51s
Build / Windows (windows-latest) (push) Successful in 10m43s
Build / Linux (ubuntu-24.04) (push) Successful in 52s
Build / macOS (macos-latest) (push) Successful in 28s
Release / Windows (windows-latest) (push) Failing after 16m46s
Release / Create Gitea Release (draft) (push) Skipped

Previously each release zip mirrored build/package/ verbatim (bin/ +
data/ at the archive root), which needed a manual mkdir + cp -r into
the right OBS plugin subdirectory per the install instructions. Wrap
Linux and Windows archives in a top-level streamer-tools-camera/
directory instead -- matching AddExtraModulePaths()'s expected
<config>/obs-studio/plugins/<name>/bin/64bit + data layout -- so
`unzip -d ~/.config/obs-studio/plugins/` (or Expand-Archive to
%APPDATA%\obs-studio\plugins\ on Windows) is the entire install step.

macOS already produced the right shape (the .plugin bundle itself at
the archive's top level, since OBS wants the whole bundle directly
under plugins/, not nested under a named subdirectory) -- no packaging
change needed there, just an install-instructions rewrite plus making
that text properly conditional on MACOS_BUNDLE_FOUND like MACOS_NOTE
already was, since the old hard-coded "not yet that bundle shape" text
was stale once the macOS bundle packaging fix landed.

Verified locally: staged a fake build/package/ tree, ran the new
packaging logic, and confirmed extracting the resulting zip into a
plugins directory produces <name>/bin/64bit/... and <name>/data/...
directly. Also dry-ran publish-release.sh's notes generation for both
MACOS_BUNDLE_FOUND values to confirm the conditional install text
renders correctly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RL8abRmgFXkVASHkkqiJbE
This commit is contained in:
2026-09-07 08:41:44 -07:00
co-authored by Claude Sonnet 5
parent 14fa00af3f
commit 43a501c06c
2 changed files with 83 additions and 29 deletions
+41 -20
View File
@@ -26,8 +26,27 @@ MACOS_BUNDLE_FOUND="${MACOS_BUNDLE_FOUND:-false}"
if [ "${MACOS_BUNDLE_FOUND}" = "true" ]; then if [ "${MACOS_BUNDLE_FOUND}" = "true" ]; then
MACOS_NOTE="This archive contains a \`.plugin\` bundle." MACOS_NOTE="This archive contains a \`.plugin\` bundle."
MACOS_INSTALL_HEADING="### macOS (installation path not yet verified in real OBS)"
MACOS_INSTALL_BODY="OBS on macOS loads plugins as \`<name>.plugin\` bundles under
\`~/Library/Application Support/obs-studio/plugins/\`. This archive already
has that shape at its top level -- extract it straight there:
\`\`\`
unzip streamer-tools-camera-${TAG}-macos.zip \\
-d ~/Library/Application\\ Support/obs-studio/plugins/
\`\`\`
No manual copying required. This has not been confirmed against a real OBS
install on macOS -- report back if you try it."
else else
MACOS_NOTE="This archive is packaged as a bare \`streamer-tools-camera.so\` (the layout \`build/package/\` currently produces on macOS), **not** an OBS.app-loadable \`.plugin\` bundle. It will not load in the OBS GUI as-is." MACOS_NOTE="This archive is packaged as a bare \`streamer-tools-camera.so\` (the layout \`build/package/\` currently produces on macOS), **not** an OBS.app-loadable \`.plugin\` bundle. It will not load in the OBS GUI as-is."
MACOS_INSTALL_HEADING="### macOS (installation path not yet verified in real OBS; packaging gap)"
MACOS_INSTALL_BODY="OBS on macOS loads plugins as \`<name>.plugin\` bundles under
\`~/Library/Application Support/obs-studio/plugins/\`. As of this release,
this project's \`build/package/\` output on macOS is **not yet that bundle
shape** -- see the \"macOS packaging gap\" section of \`README.md\`. Treat the
macOS archive here as a build-verification artifact, not a working
drop-in, until that gap is closed."
fi fi
NOTES_FILE="$(mktemp)" NOTES_FILE="$(mktemp)"
@@ -71,39 +90,41 @@ watching OBS.
## Installing ## Installing
Every archive is now shaped as a straight drop-in for its platform's OBS
plugins directory -- extract it directly there, no manual copying of
subfolders required.
### Linux ### Linux
\`\`\` \`\`\`
mkdir -p ~/.config/obs-studio/plugins/streamer-tools-camera mkdir -p ~/.config/obs-studio/plugins
unzip streamer-tools-camera-${TAG}-linux-x64.zip -d /tmp/stplugin-camera unzip streamer-tools-camera-${TAG}-linux-x64.zip -d ~/.config/obs-studio/plugins/
cp -r /tmp/stplugin-camera/bin /tmp/stplugin-camera/data \\
~/.config/obs-studio/plugins/streamer-tools-camera/
\`\`\` \`\`\`
Start OBS, then Sources -> \`+\` -> "streamer-tools Camera" -> fill in the Start OBS, then Sources -> \`+\` -> "streamer-tools Camera" -> fill in the
server URL, room slug and read key from the room's settings page -> server URL, room slug and read key from the room's settings page ->
"Refresh camera list" -> pick a camera. This is the same drop-in layout "Refresh camera list" -> pick a camera. Known-good on Linux -- see README's
README's "Testing this by hand" documents for a source build, adapted for a "Testing this by hand" for the equivalent flow from a source build.
downloaded zip -- known-good on Linux.
### Windows (installation path not yet verified in real OBS) ### Windows (installation path not yet verified in real OBS)
Per \`AddExtraModulePaths()\` in obs-studio's \`UI/window-basic-main.cpp\`, OBS Per \`AddExtraModulePaths()\` in obs-studio's \`UI/window-basic-main.cpp\`, OBS
on Windows searches a plugins directory for \`bin\\64bit\\<name>.dll\` plus a on Windows searches \`%APPDATA%\\obs-studio\\plugins\\<name>\\\` for
sibling \`data\\\`. Unzip the archive and copy its \`bin\\\` and \`data\\\` into \`bin\\64bit\\<name>.dll\` plus a sibling \`data\\\`. This archive already has
your OBS plugins directory (typically that \`<name>\\bin\\...\`/\`<name>\\data\\...\` shape at its top level --
\`%APPDATA%\\obs-studio\\plugins\\streamer-tools-camera\\\`), matching the extract it straight into the plugins folder:
Linux layout above. This has not been confirmed against a real OBS install on
Windows -- report back if you try it.
### macOS (installation path not yet verified in real OBS; packaging gap) \`\`\`
Expand-Archive streamer-tools-camera-${TAG}-windows-x64.zip \`
-DestinationPath \$env:APPDATA\\obs-studio\\plugins\\
\`\`\`
OBS on macOS loads plugins as \`<name>.plugin\` bundles under This has not been confirmed against a real OBS install on Windows -- report
\`~/Library/Application Support/obs-studio/plugins/\`. As of this release, back if you try it.
this project's \`build/package/\` output on macOS is **not yet that bundle
shape** -- see the "macOS packaging gap" section of \`README.md\`. Treat the ${MACOS_INSTALL_HEADING}
macOS archive here as a build-verification artifact, not a working
drop-in, until that gap is closed. ${MACOS_INSTALL_BODY}
## What this is ## What this is
+42 -9
View File
@@ -55,7 +55,19 @@ jobs:
command -v zip >/dev/null || sudo apt-get install -y -qq zip command -v zip >/dev/null || sudo apt-get install -y -qq zip
out="streamer-tools-camera-${GITEA_REF_NAME}-linux-x64.zip" out="streamer-tools-camera-${GITEA_REF_NAME}-linux-x64.zip"
root="$(pwd)" root="$(pwd)"
( cd build/package && zip -r "${root}/${out}" . )
# Wrap build/package/'s bin/+data/ inside a top-level
# streamer-tools-camera/ directory, matching the plugin directory
# name OBS itself expects under <config>/obs-studio/plugins/ (see
# obs-adapter/CMakeLists.txt's staging comment). This makes the
# archive a straight `unzip -d ~/.config/obs-studio/plugins/`
# drop-in -- no manual `cp -r bin data` step required.
stage="$(mktemp -d)"
mkdir -p "${stage}/streamer-tools-camera"
cp -r build/package/. "${stage}/streamer-tools-camera/"
( cd "${stage}" && zip -r "${root}/${out}" streamer-tools-camera )
rm -rf "${stage}"
mkdir -p dist mkdir -p dist
mv "${out}" "dist/${out}" mv "${out}" "dist/${out}"
ls -la dist ls -la dist
@@ -91,13 +103,18 @@ jobs:
root="$(pwd)" root="$(pwd)"
mkdir -p dist mkdir -p dist
# macOS packaging is being fixed separately (see the "macOS # Look for a *.plugin bundle rather than assuming its exact final
# packaging gap" in README.md). Once it lands, build/package/ (or # location, falling back to packaging build/package/ as-is (a
# wherever that work stages its output) should contain a # bare .so, not a loadable bundle) only if the bundle step didn't
# `<name>.plugin` bundle directory -- look for one rather than # run or produced nothing -- see the macOS packaging gap in
# assuming its exact final location, and fall back to packaging # README.md for when that fallback path is actually live. The
# build/package/ as-is (today's actual, non-bundle output) if none # bundle itself is zipped at the archive's top level (cd into its
# is found yet. # parent, zip just the bundle dir) so the archive is already a
# straight `unzip -d ~/Library/Application\ Support/obs-studio/
# plugins/` drop-in -- no wrapping needed here, unlike
# Linux/Windows above, because OBS wants the whole *.plugin
# bundle directly under plugins/, not nested under a named
# subdirectory.
bundle="$(find build -maxdepth 4 -type d -name '*.plugin' 2>/dev/null | head -n1 || true)" bundle="$(find build -maxdepth 4 -type d -name '*.plugin' 2>/dev/null | head -n1 || true)"
if [ -n "${bundle}" ]; then if [ -n "${bundle}" ]; then
echo "Found macOS .plugin bundle: ${bundle}" echo "Found macOS .plugin bundle: ${bundle}"
@@ -143,7 +160,23 @@ jobs:
$ErrorActionPreference = "Stop" $ErrorActionPreference = "Stop"
$out = "streamer-tools-camera-$env:GITEA_REF_NAME-windows-x64.zip" $out = "streamer-tools-camera-$env:GITEA_REF_NAME-windows-x64.zip"
New-Item -ItemType Directory -Force -Path dist | Out-Null New-Item -ItemType Directory -Force -Path dist | Out-Null
Compress-Archive -Path build\package\* -DestinationPath "dist\$out" -Force
# Wrap build\package\'s bin\+data\ inside a top-level
# streamer-tools-camera\ directory, matching the plugin directory
# name OBS itself expects under %APPDATA%\obs-studio\plugins\ (see
# obs-adapter/CMakeLists.txt's staging comment). This makes the
# archive a straight `Expand-Archive -DestinationPath
# $env:APPDATA\obs-studio\plugins\` drop-in -- no manual copy step
# required. Compress-Archive includes the source folder's own name
# as the archive root when given a single directory path, so
# staging under a streamer-tools-camera\ dir is enough on its own.
$stage = Join-Path $env:TEMP "stplugin-stage-$([guid]::NewGuid())"
$pluginDir = Join-Path $stage "streamer-tools-camera"
New-Item -ItemType Directory -Force -Path $pluginDir | Out-Null
Copy-Item -Path build\package\* -Destination $pluginDir -Recurse
Compress-Archive -Path $pluginDir -DestinationPath "dist\$out" -Force
Remove-Item -Recurse -Force $stage
Get-ChildItem dist Get-ChildItem dist
env: env:
GITEA_REF_NAME: ${{ github.ref_name }} GITEA_REF_NAME: ${{ github.ref_name }}