Auto-install DLL to OBS plugins directory
Some checks are pending
Build Windows DLL / Build for Windows (push) Waiting to run
Some checks are pending
Build Windows DLL / Build for Windows (push) Waiting to run
This commit is contained in:
parent
ca13025483
commit
570728905c
1 changed files with 21 additions and 9 deletions
|
|
@ -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."
|
||||
|
|
|
|||
Loading…
Reference in a new issue