forked from greenya/irrlichtlime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathget-irrlicht.ps1
32 lines (24 loc) · 899 Bytes
/
get-irrlicht.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Copy all Irrlicht include, .dll, .lib, and .pdb files.
# Execute the given command using iex and echo what is executed
function Echo-Iex {
param(
[String] $command
)
write-host $command -ForegroundColor Green
iex $command
}
$in = Resolve-Path -path "$PsScriptRoot\..\irrlicht"
$out = Resolve-Path -path "$PsScriptRoot\irrlicht"
$filter = [regex] "^*\.(dll|lib|pdb)"
$dirs = @{}
$dirs["$in\bin\x64\Release"]="$out\bin\x64\Release"
$dirs["$in\bin\x64\Debug"]="$out\bin\x64\Debug"
$dirs["$in\bin\Win32\Release"]="$out\bin\x86\Release"
$dirs["$in\bin\Win32\Debug"]="$out\bin\x86\Debug"
foreach ($e in $dirs.GetEnumerator()) {
$bin = Get-ChildItem -Path $($e.Name) | Where-Object {$_.Name -match $filter}
foreach ($item in $bin) {
Echo-Iex "Copy-Item -Path $item -Destination $($e.Value)"
}
}
Echo-Iex "Copy-Item $in\include -Destination $out -Recurse -Force"