aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/openni2/openni2deploy.ps1
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/openni2/openni2deploy.ps1')
-rw-r--r--vcpkg/ports/openni2/openni2deploy.ps118
1 files changed, 18 insertions, 0 deletions
diff --git a/vcpkg/ports/openni2/openni2deploy.ps1 b/vcpkg/ports/openni2/openni2deploy.ps1
new file mode 100644
index 0000000..f420014
--- /dev/null
+++ b/vcpkg/ports/openni2/openni2deploy.ps1
@@ -0,0 +1,18 @@
+# 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
+ }
+ }
+ }
+}
+