1 # Note: This function signature and behavior is depended upon by applocal.ps1
3 function deployOpenNI2([string]$targetBinaryDir, [string]$installedDir, [string]$targetBinaryName) {
4 if ($targetBinaryName -like "OpenNI2.dll") {
5 if(Test-Path "$installedDir\bin\OpenNI2\OpenNI.ini") {
6 Write-Verbose " Deploying OpenNI2 Initialization"
7 deployBinary "$targetBinaryDir" "$installedDir\bin\OpenNI2" "OpenNI.ini"
9 if(Test-Path "$installedDir\bin\OpenNI2\Drivers") {
10 Write-Verbose " Deploying OpenNI2 Drivers"
11 New-Item "$targetBinaryDir\OpenNI2\Drivers" -ItemType Directory -ErrorAction SilentlyContinue | Out-Null
12 Get-ChildItem "$installedDir\bin\OpenNI2\Drivers\*.*" -include "*.dll","*.ini" | % {
13 deployBinary "$targetBinaryDir\OpenNI2\Drivers" "$installedDir\bin\OpenNI2\Drivers" $_.Name