Add OBS plugin install script

This commit is contained in:
Meta Vens 2026-05-27 21:29:23 +01:00
commit 431b5d723d
3 changed files with 67 additions and 0 deletions

View file

@ -82,3 +82,20 @@ That DLL currently registers both source types:
Mimir Program Texture
Mimir Audio Stem
```
## Install
For a standard Windows OBS install:
```powershell
.\scripts\install-obs-mimir-plugin.ps1
```
For a portable OBS tree:
```powershell
.\scripts\install-obs-mimir-plugin.ps1 -ObsRoot D:\Tools\obs-studio
```
The script copies the built DLL into `obs-plugins\64bit`. It does not create
scene items or alter OBS profiles.

View file

@ -0,0 +1,49 @@
param(
[string]$ObsRoot = "",
[string]$Configuration = "Release",
[switch]$SkipBuild,
[switch]$WhatIf
)
$ErrorActionPreference = "Stop"
$repoRoot = Split-Path -Parent $PSScriptRoot
if ([string]::IsNullOrWhiteSpace($ObsRoot)) {
if ($env:OBS_STUDIO_ROOT) {
$ObsRoot = $env:OBS_STUDIO_ROOT
} elseif (Test-Path "C:\Program Files\obs-studio") {
$ObsRoot = "C:\Program Files\obs-studio"
} else {
throw "OBS root was not found. Pass -ObsRoot or set OBS_STUDIO_ROOT."
}
}
$pluginDll = Join-Path $repoRoot "native\obs_stem_source\build\$Configuration\mimir_obs_stem_source.dll"
$targetDir = Join-Path $ObsRoot "obs-plugins\64bit"
$targetDll = Join-Path $targetDir "mimir_obs_stem_source.dll"
if (-not $SkipBuild) {
& (Join-Path $repoRoot "scripts\build-obs-stem-plugin.ps1") -Configuration $Configuration
}
if (-not (Test-Path $pluginDll)) {
throw "Built plugin DLL was not found at '$pluginDll'."
}
if (-not (Test-Path $targetDir)) {
if ($WhatIf) {
Write-Host "Would create $targetDir"
} else {
New-Item -ItemType Directory -Force $targetDir | Out-Null
}
}
if ($WhatIf) {
Write-Host "Would copy $pluginDll -> $targetDll"
return
}
Copy-Item -LiteralPath $pluginDll -Destination $targetDll -Force
Write-Host "Installed Mimir OBS plugin: $targetDll"
Write-Host "OBS source types: Mimir Program Texture, Mimir Audio Stem"

View file

@ -192,3 +192,4 @@
{"ts": "2026-05-27T20:55:23+01:00", "type": "verification", "status": "blocked", "note": "OBS stem plugin path is now chosen and scaffolded. Mimir publishes validated stem snapshots into a fixed Windows shared-memory ABI (Local\\\\MimirObsStemBus), and native/obs_stem_source defines the first libobs audio source plugin that reads one named stem and calls obs_source_output_audio. dotnet build and --obs-stem-shared-memory-smoke passed. Local native plugin build is blocked until an OBS/libobs SDK with libobsConfig.cmake is installed or supplied via libobs_DIR."}
{"ts": "2026-05-27T21:03:27+01:00", "type": "verification", "status": "ok", "note": "The OBS/libobs SDK is now staged locally through obsproject/obs-plugintemplate under artifacts/obs-sdk. Its CMake bootstrap downloaded obs-deps, Qt deps, and OBS 31.1.1 sources, built Debug/Release libobs development components, and installed libobsConfig.cmake under .deps/cmake. native/obs_stem_source configured with libobs_DIR plus CMAKE_PREFIX_PATH and built Release/mimir_obs_stem_source.dll successfully. Added scripts/build-obs-stem-plugin.ps1 to repeat the SDK staging/build."}
{"ts": "2026-05-27T21:26:51+01:00", "type": "verification", "status": "ok", "note": "native/obs_stem_source now registers both OBS sources: Mimir Audio Stem for Local\\\\MimirObsStemBus stem blocks and Mimir Program Texture for Fensalir's named shared D3D12 program output. The video source opens Global\\\\MimirFensalirProgramTexture, copies it GPU-to-GPU into an OBS-readable shared D3D11 texture during render, and draws it without CPU readback or Spout2. Mimir build and scripts/build-obs-stem-plugin.ps1 passed; Fensalir build passed after publishing the program texture back to COMMON for external readers."}
{"ts": "2026-05-27T21:29:19+01:00", "type": "verification", "status": "ok", "note": "Added scripts/install-obs-mimir-plugin.ps1 as the installation boundary for the native OBS plugin. It can build/copy mimir_obs_stem_source.dll into an OBS root's obs-plugins\\\\64bit directory, supports OBS_STUDIO_ROOT or -ObsRoot for portable installs, and -WhatIf verified the local standard OBS path without writing into Program Files."}