Fix DLL name, use LOCALAPPDATA for persistent caching
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
63b49749c9
commit
ca13025483
1 changed files with 25 additions and 23 deletions
|
|
@ -1,15 +1,10 @@
|
||||||
#Requires -Version 7.2
|
#Requires -Version 7.2
|
||||||
<#
|
|
||||||
.SYNOPSIS
|
|
||||||
Builds the Vulcast Vertical OBS plugin DLL.
|
|
||||||
Builds OBS manually, then the plugin links against it.
|
|
||||||
#>
|
|
||||||
$ErrorActionPreference = 'Stop'
|
$ErrorActionPreference = 'Stop'
|
||||||
$ProgressPreference = 'SilentlyContinue'
|
$ProgressPreference = 'SilentlyContinue'
|
||||||
|
|
||||||
$OBS_VERSION = '31.1.1'
|
$OBS_VERSION = '31.1.1'
|
||||||
$DEPS_DATE = '2025-07-11'
|
$DEPS_DATE = '2025-07-11'
|
||||||
$WORK = "$env:TEMP\vulcast-build"
|
$WORK = "$env:LOCALAPPDATA\vulcast-build"
|
||||||
$SRC = "$WORK\vulcast-vertical"
|
$SRC = "$WORK\vulcast-vertical"
|
||||||
|
|
||||||
Write-Host "=== Vulcast Vertical Build Script ===" -ForegroundColor Cyan
|
Write-Host "=== Vulcast Vertical Build Script ===" -ForegroundColor Cyan
|
||||||
|
|
@ -79,6 +74,8 @@ if (-not (Test-Path "$SRC\CMakeLists.txt")) {
|
||||||
Write-Host " Downloading..." -ForegroundColor Yellow
|
Write-Host " Downloading..." -ForegroundColor Yellow
|
||||||
Invoke-WebRequest -Uri 'https://vulcast.xyz/dl/vulcast-vertical-source.zip' -OutFile "$WORK\source.zip"
|
Invoke-WebRequest -Uri 'https://vulcast.xyz/dl/vulcast-vertical-source.zip' -OutFile "$WORK\source.zip"
|
||||||
Expand-Archive -Path "$WORK\source.zip" -DestinationPath $WORK -Force
|
Expand-Archive -Path "$WORK\source.zip" -DestinationPath $WORK -Force
|
||||||
|
} else {
|
||||||
|
Write-Host " Source (cached)" -ForegroundColor DarkGray
|
||||||
}
|
}
|
||||||
|
|
||||||
# ---------- Step 2: OBS source ----------
|
# ---------- Step 2: OBS source ----------
|
||||||
|
|
@ -88,22 +85,26 @@ if (-not (Test-Path "$OBS\CMakeLists.txt")) {
|
||||||
Invoke-WebRequest -Uri "https://github.com/obsproject/obs-studio/archive/refs/tags/$OBS_VERSION.zip" -OutFile "$WORK\obs.zip"
|
Invoke-WebRequest -Uri "https://github.com/obsproject/obs-studio/archive/refs/tags/$OBS_VERSION.zip" -OutFile "$WORK\obs.zip"
|
||||||
Expand-Archive -Path "$WORK\obs.zip" -DestinationPath $WORK -Force
|
Expand-Archive -Path "$WORK\obs.zip" -DestinationPath $WORK -Force
|
||||||
if (Test-Path "$WORK\obs-studio-$OBS_VERSION") { Rename-Item "$WORK\obs-studio-$OBS_VERSION" $OBS }
|
if (Test-Path "$WORK\obs-studio-$OBS_VERSION") { Rename-Item "$WORK\obs-studio-$OBS_VERSION" $OBS }
|
||||||
|
} else {
|
||||||
|
Write-Host " OBS source (cached)" -ForegroundColor DarkGray
|
||||||
}
|
}
|
||||||
|
|
||||||
# ---------- Step 3: Dependencies ----------
|
# ---------- Step 3: Dependencies ----------
|
||||||
Write-Host "[3/5] OBS pre-built dependencies" -ForegroundColor Cyan
|
Write-Host "[3/5] OBS pre-built dependencies" -ForegroundColor Cyan
|
||||||
New-Item -ItemType Directory -Path $DEPS -Force | Out-Null
|
New-Item -ItemType Directory -Path $DEPS -Force | Out-Null
|
||||||
if (-not (Test-Path "$DEPS\include\obs")) {
|
if (-not (Test-Path "$DEPS\include\obs\obs.h")) {
|
||||||
$depsUrl = "https://github.com/obsproject/obs-deps/releases/download/$DEPS_DATE/windows-deps-$DEPS_DATE-x64.zip"
|
|
||||||
Write-Host " Downloading deps (~60MB)..." -ForegroundColor Yellow
|
Write-Host " Downloading deps (~60MB)..." -ForegroundColor Yellow
|
||||||
Invoke-WebRequest -Uri $depsUrl -OutFile "$DEPS\deps.zip"
|
Invoke-WebRequest -Uri "https://github.com/obsproject/obs-deps/releases/download/$DEPS_DATE/windows-deps-$DEPS_DATE-x64.zip" -OutFile "$DEPS\deps.zip"
|
||||||
Expand-Archive -Path "$DEPS\deps.zip" -DestinationPath $DEPS -Force
|
Expand-Archive -Path "$DEPS\deps.zip" -DestinationPath $DEPS -Force
|
||||||
|
} else {
|
||||||
|
Write-Host " Deps (cached)" -ForegroundColor DarkGray
|
||||||
}
|
}
|
||||||
if (-not (Test-Path "$DEPS\lib\cmake\Qt6")) {
|
if (-not (Test-Path "$DEPS\lib\cmake\Qt6\Qt6Config.cmake")) {
|
||||||
$qt6Url = "https://github.com/obsproject/obs-deps/releases/download/$DEPS_DATE/windows-deps-qt6-$DEPS_DATE-x64.zip"
|
|
||||||
Write-Host " Downloading Qt6 (~250MB)..." -ForegroundColor Yellow
|
Write-Host " Downloading Qt6 (~250MB)..." -ForegroundColor Yellow
|
||||||
Invoke-WebRequest -Uri $qt6Url -OutFile "$DEPS\qt6.zip"
|
Invoke-WebRequest -Uri "https://github.com/obsproject/obs-deps/releases/download/$DEPS_DATE/windows-deps-qt6-$DEPS_DATE-x64.zip" -OutFile "$DEPS\qt6.zip"
|
||||||
Expand-Archive -Path "$DEPS\qt6.zip" -DestinationPath $DEPS -Force
|
Expand-Archive -Path "$DEPS\qt6.zip" -DestinationPath $DEPS -Force
|
||||||
|
} else {
|
||||||
|
Write-Host " Qt6 (cached)" -ForegroundColor DarkGray
|
||||||
}
|
}
|
||||||
|
|
||||||
# ---------- Step 4: Build OBS ----------
|
# ---------- Step 4: Build OBS ----------
|
||||||
|
|
@ -119,8 +120,6 @@ if (-not (Test-Path "$obsBuild\libobs\Release\obs.lib")) {
|
||||||
|
|
||||||
cmake --build $obsBuild --config Debug --target obs-frontend-api -- /m /noLogo 2>&1 | Write-Host
|
cmake --build $obsBuild --config Debug --target obs-frontend-api -- /m /noLogo 2>&1 | Write-Host
|
||||||
cmake --build $obsBuild --config Release --target obs-frontend-api -- /m /noLogo 2>&1 | Write-Host
|
cmake --build $obsBuild --config Release --target obs-frontend-api -- /m /noLogo 2>&1 | Write-Host
|
||||||
|
|
||||||
# Install to deps dir so plugin can find it
|
|
||||||
cmake --install $obsBuild --component Development --config Debug --prefix "$DEPS" 2>&1 | Write-Host
|
cmake --install $obsBuild --component Development --config Debug --prefix "$DEPS" 2>&1 | Write-Host
|
||||||
cmake --install $obsBuild --component Development --config Release --prefix "$DEPS" 2>&1 | Write-Host
|
cmake --install $obsBuild --component Development --config Release --prefix "$DEPS" 2>&1 | Write-Host
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -131,19 +130,22 @@ if (-not (Test-Path "$obsBuild\libobs\Release\obs.lib")) {
|
||||||
Write-Host "[5/5] Building Vulcast Vertical" -ForegroundColor Cyan
|
Write-Host "[5/5] Building Vulcast Vertical" -ForegroundColor Cyan
|
||||||
Push-Location $SRC
|
Push-Location $SRC
|
||||||
|
|
||||||
cmake -S . -B build `
|
if (-not (Test-Path "build\CMakeCache.txt")) {
|
||||||
-G "Visual Studio 17 2022" -A x64 `
|
cmake -S . -B build `
|
||||||
-DBUILD_OUT_OF_TREE=On `
|
-G "Visual Studio 17 2022" -A x64 `
|
||||||
-DCMAKE_PREFIX_PATH="$DEPS" `
|
-DBUILD_OUT_OF_TREE=On `
|
||||||
-DQT_VERSION=6 `
|
-DCMAKE_PREFIX_PATH="$DEPS" `
|
||||||
-DCMAKE_BUILD_TYPE=Release `
|
-DQT_VERSION=6 `
|
||||||
-DFETCHCONTENT_FULLY_DISCONNECTED=ON 2>&1 | Write-Host
|
-DCMAKE_BUILD_TYPE=Release `
|
||||||
|
-DFETCHCONTENT_FULLY_DISCONNECTED=ON 2>&1 | Write-Host
|
||||||
|
}
|
||||||
cmake --build build --config Release -- /m /noLogo 2>&1 | Write-Host
|
cmake --build build --config Release -- /m /noLogo 2>&1 | Write-Host
|
||||||
Pop-Location
|
Pop-Location
|
||||||
|
|
||||||
# ---------- Done ----------
|
# ---------- Done ----------
|
||||||
$dll = Get-ChildItem -Path "$SRC\build" -Recurse -Filter "vulcast-vertical.dll" -ErrorAction SilentlyContinue | Select-Object -First 1
|
# The plugin builds as vertical-canvas.dll (from CMakeLists project name)
|
||||||
|
$dll = Get-ChildItem -Path "$SRC\build" -Recurse -Filter "*.dll" -ErrorAction SilentlyContinue |
|
||||||
|
Where-Object { $_.Name -notmatch 'Qt6|obs-' } | Select-Object -First 1
|
||||||
if ($dll) {
|
if ($dll) {
|
||||||
$dest = "$env:USERPROFILE\Desktop\vulcast-vertical.dll"
|
$dest = "$env:USERPROFILE\Desktop\vulcast-vertical.dll"
|
||||||
Copy-Item $dll.FullName $dest -Force
|
Copy-Item $dll.FullName $dest -Force
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue