Skip to content

Commit b6cc70e

Browse files
committed
Add functions to build.ps1 to copy VSG DLLs
1 parent 7e84ea5 commit b6cc70e

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

build.ps1

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,32 @@ if ($useIrrlicht) {
269269
}
270270
}
271271

272+
if ($useVSG) {
273+
# Get VSG DLLs from vsgFramework bin directory
274+
# First try to find vsg_DIR from chrono config
275+
if ($chronoContent -match 'vsg_DIR\s+"([^"]+)"') {
276+
$vsgDir = $Matches[1]
277+
# vsg_DIR typically points to lib/cmake/vsg, so go up to find bin
278+
$vsgRoot = Split-Path (Split-Path (Split-Path $vsgDir))
279+
$vsgBinDir = Join-Path $vsgRoot "bin"
280+
281+
if (Test-Path $vsgBinDir) {
282+
$vsgDlls = Get-ChildItem -Path $vsgBinDir -Filter "*.dll" -ErrorAction SilentlyContinue
283+
$copiedCount = 0
284+
foreach ($dll in $vsgDlls) {
285+
$destDll = Join-Path $binPath $dll.Name
286+
if (-not (Test-Path $destDll)) {
287+
Copy-Item $dll.FullName $destDll -Force
288+
$copiedCount++
289+
}
290+
}
291+
if ($copiedCount -gt 0) {
292+
Write-OK "Copied $copiedCount VSG DLLs"
293+
}
294+
}
295+
}
296+
}
297+
272298
# =============================================================================
273299
# Verify
274300
# =============================================================================

0 commit comments

Comments
 (0)