chore(scripts): add helpers to copy native IPM libs for Windows and Linux

This commit is contained in:
Repo Bot 2025-10-19 12:26:39 +02:00
parent c45679d1f7
commit ee8a10d875
2 changed files with 35 additions and 0 deletions

21
scripts/copy-ipm-libs.ps1 Normal file
View File

@ -0,0 +1,21 @@
param(
[string]$SourceDir = "C:\ipm_binaries",
[switch]$Force
)
# Copies Windows DLLs from SourceDir to app/ipm/lib/windows.
$dest = Resolve-Path -Path "..\app\ipm\lib\windows"
if (-not (Test-Path $dest)) { New-Item -ItemType Directory -Path $dest -Force | Out-Null }
Write-Host "Copying DLLs from $SourceDir to $dest"
Get-ChildItem -Path $SourceDir -Filter *.dll -File -ErrorAction SilentlyContinue | ForEach-Object {
$dst = Join-Path $dest $_.Name
if (Test-Path $dst -and -not $Force) {
Write-Host "Skipping existing: $($_.Name)"
} else {
Copy-Item $_.FullName -Destination $dst -Force
Write-Host "Copied: $($_.Name)"
}
}
Write-Host "Done."

14
scripts/copy-ipm-libs.sh Normal file
View File

@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -euo pipefail
SOURCE_DIR=${1:-/opt/ipm_binaries}
DEST_DIR="$(dirname "$0")/../app/ipm/lib/linux"
mkdir -p "$DEST_DIR"
echo "Copying .so files from $SOURCE_DIR to $DEST_DIR"
shopt -s nullglob
for f in "$SOURCE_DIR"/*.so; do
echo "Copying $(basename "$f")"
cp -f "$f" "$DEST_DIR/"
done
echo "Done."