inital commit

This commit is contained in:
yhlhoh committed 2026-11-12 21:00:55 +08:00
commit a60b1b13b2
78 files changed
+13166

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
param(
[string]$ObsPath = "C:\Program Files\obs-studio",
[string]$OutDir = "D:\dsh-build\obs-libs",
[string]$VsPath = "D:\VS\BuildTools"
)
$ErrorActionPreference = "Stop"
$root = (Resolve-Path (Join-Path $PSScriptRoot "..")).Path
$vcvars = Join-Path $VsPath "VC\Auxiliary\Build\vcvars64.bat"
$obsBin = Join-Path $ObsPath "bin\64bit"
if (-not (Test-Path $vcvars)) { throw "vcvars64.bat not found: $vcvars" }
if (-not (Test-Path (Join-Path $obsBin "obs.dll"))) { throw "obs.dll not found in $obsBin" }
New-Item -ItemType Directory -Force $OutDir | Out-Null
python (Join-Path $root "tools\gen_obs_def.py") (Join-Path $obsBin "obs.dll") (Join-Path $OutDir "obs.def")
python (Join-Path $root "tools\gen_obs_def.py") (Join-Path $obsBin "obs-frontend-api.dll") (Join-Path $OutDir "obs-frontend-api.def")
$cmd = 'call "{0}" >nul && cd /d "{1}" && lib /def:obs.def /machine:x64 /out:obs.lib && lib /def:obs-frontend-api.def /machine:x64 /out:obs-frontend-api.lib' -f `
$vcvars, $OutDir
cmd.exe /c $cmd
if ($LASTEXITCODE -ne 0) { throw "Import library generation failed" }
Write-Host "Generated: $OutDir\obs.lib, $OutDir\obs-frontend-api.lib"