Fix: let cmake handle all deps, update to OBS 31.1.1 + deps 2025-07-11
Some checks are pending
Build Windows DLL / Build for Windows (push) Waiting to run

This commit is contained in:
Vulcast 2026-06-29 23:57:05 +01:00
parent 7d178e45bd
commit 1496c4a75d
2 changed files with 28 additions and 80 deletions

View file

@ -1,20 +1,18 @@
#Requires -Version 7.2
<#
.SYNOPSIS
Downloads and builds the Vulcast Vertical OBS plugin DLL.
Skips downloads if already cached. Re-run to rebuild only.
Builds the Vulcast Vertical OBS plugin DLL.
CMake handles all dependency downloads and OBS builds automatically.
Re-run to rebuild only (deps are cached by cmake).
#>
$ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue'
$OBS_VERSION = '32.1.2'
$DEPS_DATE = '2026-06-25'
$WORK = "$env:TEMP\vulcast-build"
$SRC = "$WORK\vulcast-vertical"
Write-Host "=== Vulcast Vertical Build Script ===" -ForegroundColor Cyan
Write-Host "OBS $OBS_VERSION | Deps $DEPS_DATE`n"
Write-Host ""
# ---------- Build Tools ----------
function Find-MSVC {
@ -49,7 +47,7 @@ if (-not $vsPath) {
'--includeRecommended'
) -Wait -PassThru
if ($proc.ExitCode -ne 0 -and $proc.ExitCode -ne 3010) {
Write-Error "Install failed (exit $($proc.ExitCode)). Install manually from https://visualstudio.microsoft.com/downloads/"
Write-Error "Install failed. Get it from https://visualstudio.microsoft.com/downloads/"
exit 1
}
$vsPath = Find-MSVC
@ -74,75 +72,25 @@ cmd /c "`"$vcvars`" x64 >nul 2>&1 && set" | ForEach-Object {
}
if (Get-Command cl.exe -ErrorAction SilentlyContinue) { Write-Host "[OK] cl.exe ready`n" -ForegroundColor Green }
# ---------- Create work dir (no cleanup) ----------
# ---------- Download source (skip if exists) ----------
New-Item -ItemType Directory -Path $WORK -Force | Out-Null
# ---------- Download helper ----------
function Get-IfMissing($Url, $Path, $Label) {
if (Test-Path $Path) { Write-Host " $Label (cached)" -ForegroundColor DarkGray; return }
Write-Host " $Label downloading..." -ForegroundColor Yellow
Invoke-WebRequest -Uri $Url -OutFile $Path
}
# ---------- Step 1: Source ----------
Write-Host "[1/5] Source code" -ForegroundColor Cyan
Get-IfMissing 'https://vulcast.xyz/dl/vulcast-vertical-source.zip' "$WORK\source.zip" "vulcast-vertical"
if (-not (Test-Path "$SRC\CMakeLists.txt")) {
Write-Host "Downloading source..." -ForegroundColor Yellow
Invoke-WebRequest -Uri 'https://vulcast.xyz/dl/vulcast-vertical-source.zip' -OutFile "$WORK\source.zip"
Expand-Archive -Path "$WORK\source.zip" -DestinationPath $WORK -Force
Write-Host ""
}
# ---------- Step 2: OBS source ----------
Write-Host "[2/5] OBS Studio source" -ForegroundColor Cyan
Get-IfMissing "https://github.com/obsproject/obs-studio/archive/refs/tags/$OBS_VERSION.zip" "$WORK\obs.zip" "OBS $OBS_VERSION"
if (-not (Test-Path "$WORK\obs-studio\CMakeLists.txt")) {
Expand-Archive -Path "$WORK\obs.zip" -DestinationPath $WORK -Force
if (Test-Path "$WORK\obs-studio-$OBS_VERSION") {
Rename-Item "$WORK\obs-studio-$OBS_VERSION" "$WORK\obs-studio"
}
}
# ---------- Step 3: Dependencies ----------
Write-Host "[3/5] OBS dependencies" -ForegroundColor Cyan
New-Item -ItemType Directory -Path "$WORK\deps" -Force | Out-Null
Get-IfMissing "https://github.com/obsproject/obs-deps/releases/download/$DEPS_DATE/windows-deps-$DEPS_DATE-x64.zip" "$WORK\deps\deps.zip" "Deps (~60MB)"
if (-not (Test-Path "$WORK\deps\include\obs")) {
Expand-Archive -Path "$WORK\deps\deps.zip" -DestinationPath "$WORK\deps" -Force
}
Get-IfMissing "https://github.com/obsproject/obs-deps/releases/download/$DEPS_DATE/windows-deps-qt6-$DEPS_DATE-x64-RelWithDebInfo.zip" "$WORK\deps\qt6.zip" "Qt6 (~200MB)"
if (-not (Test-Path "$WORK\deps\lib\cmake\Qt6")) {
Expand-Archive -Path "$WORK\deps\qt6.zip" -DestinationPath "$WORK\deps" -Force
}
# ---------- Step 4: Build OBS ----------
Write-Host "[4/5] OBS libraries" -ForegroundColor Cyan
$obsBuild = "$WORK\obs-studio\build_x64"
if (-not (Test-Path "$obsBuild\libobs\Release\obs.lib")) {
Push-Location "$WORK\obs-studio"
cmake -S . -B build_x64 `
-G "Visual Studio 17 2022" -A x64 `
-DENABLE_PLUGINS=OFF -DENABLE_UI=OFF -DENABLE_SCRIPTING=OFF `
-DCMAKE_BUILD_TYPE=Release -DQT_VERSION=6 `
-DCMAKE_PREFIX_PATH="$WORK\deps" 2>&1 | Out-Null
cmake --build build_x64 --config Release --target libobs -- /m /noLogo 2>&1 | Write-Host
cmake --build build_x64 --config Release --target obs-frontend-api -- /m /noLogo 2>&1 | Write-Host
Pop-Location
} else {
Write-Host " OBS libs (cached)" -ForegroundColor DarkGray
}
# ---------- Step 5: Build plugin ----------
Write-Host "[5/5] Vulcast Vertical plugin" -ForegroundColor Cyan
# ---------- Build (cmake handles all deps automatically) ----------
Write-Host "Configuring plugin (cmake downloads OBS + deps on first run)..." -ForegroundColor Yellow
Push-Location $SRC
if (-not (Test-Path "build\CMakeCache.txt")) {
cmake -S . -B build `
cmake -S . -B build `
-G "Visual Studio 17 2022" -A x64 `
-DBUILD_OUT_OF_TREE=On `
-Dlibobs_DIR="$obsBuild\libobs" `
-Dobs-frontend-api_DIR="$obsBuild\UI\obs-frontend-api" `
-DCMAKE_PREFIX_PATH="$WORK\deps" `
-DQT_VERSION=6 -DCMAKE_BUILD_TYPE=Release 2>&1 | Write-Host
}
-DCMAKE_BUILD_TYPE=Release 2>&1 | Write-Host
Write-Host "`nBuilding..." -ForegroundColor Yellow
cmake --build build --config Release -- /m /noLogo 2>&1 | Write-Host
Pop-Location

View file

@ -1,33 +1,33 @@
{
"dependencies": {
"obs-studio": {
"version": "31.1.0",
"version": "31.1.1",
"baseUrl": "https://github.com/obsproject/obs-studio/archive/refs/tags",
"label": "OBS sources",
"hashes": {
"macos": "ba903f3848cfabd9ea1205aea14b69e83a2eb43ad6f3f7cc80a6a900bce0e56e",
"windows-x64": "ca4b7513bb0b34c708f1cc89016f6ed879b710c912a93387e9f83445c1fc68bb"
"macos": "39751f067bacc13d44b116c5138491b5f1391f91516d3d590d874edd21292291",
"windows-x64": "2c8427c10b55ac6d68008df2e9a3e82f4647aaad18f105e30d4713c2de678ccf"
}
},
"prebuilt": {
"version": "2025-05-23",
"version": "2025-07-11",
"baseUrl": "https://github.com/obsproject/obs-deps/releases/download",
"label": "Pre-Built obs-deps",
"hashes": {
"macos": "7b1448581b92c6f8d4e2f9b1b10eb318ebfc4df7255638e05bacb49b620e190d",
"windows-x64": "88dc7bab50542b4b58194cdd5d7e6f4b73cde7c0d1ee7a040a6d9c9df05187b1"
"macos": "495687e63383d1a287684b6e2e9bfe246bb8f156fe265926afb1a325af1edd2a",
"windows-x64": "c8c642c1070dc31ce9a0f1e4cef5bb992f4bff4882255788b5da12129e85caa7"
}
},
"qt6": {
"version": "2025-05-23",
"version": "2025-07-11",
"baseUrl": "https://github.com/obsproject/obs-deps/releases/download",
"label": "Pre-Built Qt6",
"hashes": {
"macos": "d4945fe719d31d353dc76298f58823d7891126e33af5029f763427ea9f80bfaa",
"windows-x64": "bd80383dc799c0bba2f7fae793613b3fbd2cc3a3712b3d3b63b490721d187d9e"
"macos": "d3f5f04b6ea486e032530bdf0187cbda9a54e0a49621a4c8ba984c5023998867",
"windows-x64": "0e76bf0555dd5382838850b748d3dcfab44a1e1058441309ab54e1a65b156d0a"
},
"debugSymbols": {
"windows-x64": "9c9a15c5dbe59eb6a1c31c06b7208f3c4403671fbdfaef341cac3beb7af24ea1"
"windows-x64": "11b7be92cf66a273299b8f3515c07a5cfb61614b59a4e67f7fc5ecba5e2bdf21"
}
}
},