22 lines
694 B
PowerShell
22 lines
694 B
PowerShell
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."
|