From 570728905c59f02d7374494dd1761ab0e3d127d2 Mon Sep 17 00:00:00 2001 From: Vulcast Date: Tue, 30 Jun 2026 18:52:29 +0100 Subject: [PATCH] Auto-install DLL to OBS plugins directory --- build-vulcast-vertical.ps1 | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/build-vulcast-vertical.ps1 b/build-vulcast-vertical.ps1 index defaf66..37a1dc6 100644 --- a/build-vulcast-vertical.ps1 +++ b/build-vulcast-vertical.ps1 @@ -6,6 +6,7 @@ $OBS_VERSION = '31.1.1' $DEPS_DATE = '2025-07-11' $WORK = "$env:LOCALAPPDATA\vulcast-build" $SRC = "$WORK\vulcast-vertical" +$OBS_PLUGIN_DIR = "${env:ProgramFiles}\obs-studio\obs-plugins\64bit" Write-Host "=== Vulcast Vertical Build Script ===" -ForegroundColor Cyan Write-Host "" @@ -142,16 +143,27 @@ if (-not (Test-Path "build\CMakeCache.txt")) { cmake --build build --config Release -- /m /noLogo 2>&1 | Write-Host Pop-Location -# ---------- Done ---------- -# The plugin builds as vertical-canvas.dll (from CMakeLists project name) +# ---------- Install to OBS ---------- $dll = Get-ChildItem -Path "$SRC\build" -Recurse -Filter "*.dll" -ErrorAction SilentlyContinue | Where-Object { $_.Name -notmatch 'Qt6|obs-' } | Select-Object -First 1 -if ($dll) { - $dest = "$env:USERPROFILE\Desktop\vulcast-vertical.dll" - Copy-Item $dll.FullName $dest -Force - Write-Host "`n=== BUILD SUCCESSFUL ===" -ForegroundColor Green - Write-Host "DLL: $dest" -ForegroundColor Green - Write-Host "`nInstall: copy to `"C:\Program Files\obs-studio\obs-plugins\64bit\`" and restart OBS." -} else { + +if (-not $dll) { Write-Error "DLL not found. Check output above." + exit 1 } + +if (-not (Test-Path $OBS_PLUGIN_DIR)) { + Write-Warning "OBS not found at default path. Searching..." + $OBS_PLUGIN_DIR = Get-ChildItem -Path "C:\Program Files","C:\Program Files (x86)" -Recurse -Filter "obs-plugins" -Directory -ErrorAction SilentlyContinue | + Where-Object { $_.Parent.Name -eq 'obs-studio' } | Select-Object -First 1 -ExpandProperty FullName + if (-not $OBS_PLUGIN_DIR) { + Write-Error "Can't find OBS plugins folder. Copy manually:" + Write-Error " $($dll.FullName)" + exit 1 + } +} + +Copy-Item $dll.FullName "$OBS_PLUGIN_DIR\vulcast-vertical.dll" -Force +Write-Host "`n=== BUILD SUCCESSFUL ===" -ForegroundColor Green +Write-Host "Installed: $OBS_PLUGIN_DIR\vulcast-vertical.dll" -ForegroundColor Green +Write-Host "`nRestart OBS Studio to load the plugin."