diff --git a/scripts/copy-ipm-libs.ps1 b/scripts/copy-ipm-libs.ps1 new file mode 100644 index 0000000..fe3bf80 --- /dev/null +++ b/scripts/copy-ipm-libs.ps1 @@ -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." diff --git a/scripts/copy-ipm-libs.sh b/scripts/copy-ipm-libs.sh new file mode 100644 index 0000000..4086211 --- /dev/null +++ b/scripts/copy-ipm-libs.sh @@ -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."