vcpkg/ports/openni2/openni2deploy.ps1
Tsukasa Sugiura 64203615a6 Fix OpenNI2 deploy (#2627)
* Fix OpenNI2 deploy

Fix to deploy initialization file and drivers.

* [openni2] Adjusting deployopenni2.ps1 paths

* Fix Create Directory of OpenNI2 Drivers

Fix create directory of OpenNI2 drivers.

* Fix Deploy Script Path

Fix deploy script path.
2018-01-23 08:45:23 -08:00

19 lines
921 B
PowerShell

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