Ship Muninn OBS plugin locale bundle

This commit is contained in:
Meta Vens 2026-06-19 22:35:58 +01:00
commit e2461ee4ac
6 changed files with 81 additions and 14 deletions

View file

@ -11,9 +11,11 @@ $ErrorActionPreference = "Stop"
$repoRoot = Split-Path -Parent $PSScriptRoot
$pluginDll = Join-Path $repoRoot "native\obs_stem_source\build\$Configuration\mimir_obs_stem_source.dll"
$localeSourceDir = Join-Path $repoRoot "native\obs_stem_source\data\locale"
if (-not [string]::IsNullOrWhiteSpace($ObsRoot)) {
$targetDir = Join-Path $ObsRoot "obs-plugins\64bit"
$targetLocaleDir = Join-Path $ObsRoot "data\obs-plugins\mimir_obs_stem_source\locale"
} else {
if ([string]::IsNullOrWhiteSpace($PluginRoot)) {
if ($env:OBS_PLUGIN_ROOT) {
@ -24,6 +26,7 @@ if (-not [string]::IsNullOrWhiteSpace($ObsRoot)) {
}
$targetDir = Join-Path $PluginRoot "mimir_obs_stem_source\bin\64bit"
$targetLocaleDir = Join-Path $PluginRoot "mimir_obs_stem_source\data\locale"
}
$targetDll = Join-Path $targetDir "mimir_obs_stem_source.dll"
@ -35,6 +38,9 @@ if (-not $SkipBuild) {
if (-not (Test-Path $pluginDll)) {
throw "Built plugin DLL was not found at '$pluginDll'."
}
if (-not (Test-Path $localeSourceDir)) {
throw "Plugin locale directory was not found at '$localeSourceDir'."
}
if (-not (Test-Path $targetDir)) {
if ($WhatIf) {
@ -43,12 +49,23 @@ if (-not (Test-Path $targetDir)) {
New-Item -ItemType Directory -Force $targetDir | Out-Null
}
}
if (-not (Test-Path $targetLocaleDir)) {
if ($WhatIf) {
Write-Host "Would create $targetLocaleDir"
} else {
New-Item -ItemType Directory -Force $targetLocaleDir | Out-Null
}
}
if ($WhatIf) {
Write-Host "Would copy $pluginDll -> $targetDll"
Get-ChildItem -LiteralPath $localeSourceDir -File | ForEach-Object {
Write-Host "Would copy $($_.FullName) -> $(Join-Path $targetLocaleDir $_.Name)"
}
return
}
Copy-Item -LiteralPath $pluginDll -Destination $targetDll -Force
Copy-Item -Path (Join-Path $localeSourceDir "*") -Destination $targetLocaleDir -Force
Write-Host "Installed Mimir OBS plugin: $targetDll"
Write-Host "OBS source types: Mimir Program Texture, Mimir Audio Stem, Muninn Stream"

View file

@ -9,12 +9,31 @@ param(
$ErrorActionPreference = "Stop"
function Stop-Obs {
$processes = Get-Process obs64 -ErrorAction SilentlyContinue
$processes = Get-Process obs64,obs-browser-page,obs-ffmpeg-mux -ErrorAction SilentlyContinue
if (-not $processes) {
return
}
& "$env:SystemRoot\System32\taskkill.exe" /IM obs64.exe /T /F | Write-Host
& "$env:SystemRoot\System32\taskkill.exe" /IM obs64.exe /IM obs-browser-page.exe /IM obs-ffmpeg-mux.exe /T /F | Write-Host
$deadline = (Get-Date).AddSeconds(15)
do {
Start-Sleep -Milliseconds 500
$remaining = Get-Process obs64,obs-browser-page,obs-ffmpeg-mux -ErrorAction SilentlyContinue
if (-not $remaining) {
return
}
} while ((Get-Date) -lt $deadline)
$remaining | ForEach-Object {
try {
Stop-Process -Id $_.Id -Force -ErrorAction Stop
} catch {
Write-Host "Failed to stop lingering $($_.ProcessName) PID $($_.Id): $($_.Exception.Message)"
}
}
Start-Sleep -Seconds 1
}
function Remove-ObsCrashSentinel {