diff options
| author | Tsukasa Sugiura <t.sugiura0204@gmail.com> | 2018-01-24 01:45:23 +0900 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2018-01-23 08:45:23 -0800 |
| commit | 64203615a6d593fafbea36ce4cd01583deb0ad01 (patch) | |
| tree | fd018a34d39b5059017498db4cbdff7db2f6c682 | |
| parent | dcea519efba72c9db88cacaeb3e2bbfb3667c531 (diff) | |
| download | vcpkg-64203615a6d593fafbea36ce4cd01583deb0ad01.tar.gz vcpkg-64203615a6d593fafbea36ce4cd01583deb0ad01.zip | |
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.
| -rw-r--r-- | ports/openni2/CONTROL | 2 | ||||
| -rw-r--r-- | ports/openni2/openni2deploy.ps1 | 18 | ||||
| -rw-r--r-- | ports/openni2/portfile.cmake | 16 | ||||
| -rw-r--r-- | scripts/buildsystems/msbuild/applocal.ps1 | 6 |
4 files changed, 41 insertions, 1 deletions
diff --git a/ports/openni2/CONTROL b/ports/openni2/CONTROL index b1d60d860..26fcebaba 100644 --- a/ports/openni2/CONTROL +++ b/ports/openni2/CONTROL @@ -1,4 +1,4 @@ Source: openni2 -Version: 2.2.0.33-4 +Version: 2.2.0.33-7 Build-Depends: kinectsdk1 Description: OpenNI is open source library for access to Natural Interaction (NI) devices such as RGB-D camera. diff --git a/ports/openni2/openni2deploy.ps1 b/ports/openni2/openni2deploy.ps1 new file mode 100644 index 000000000..f420014cf --- /dev/null +++ b/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 + } + } + } +} + diff --git a/ports/openni2/portfile.cmake b/ports/openni2/portfile.cmake index cc428ddb7..fb7eeade6 100644 --- a/ports/openni2/portfile.cmake +++ b/ports/openni2/portfile.cmake @@ -150,6 +150,12 @@ file( file( INSTALL "${SOURCE_CONFIG_PATH}/OpenNI.ini" + DESTINATION + ${CURRENT_PACKAGES_DIR}/bin/OpenNI2 +) + +file( + INSTALL "${SOURCE_BIN_PATH_RELEASE}/OpenNI2.dll" DESTINATION ${CURRENT_PACKAGES_DIR}/bin @@ -170,6 +176,12 @@ file( file( INSTALL "${SOURCE_CONFIG_PATH}/OpenNI.ini" + DESTINATION + ${CURRENT_PACKAGES_DIR}/debug/bin/OpenNI2 +) + +file( + INSTALL "${SOURCE_BIN_PATH_DEBUG}/OpenNI2.dll" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin @@ -205,6 +217,10 @@ file( ${CURRENT_PACKAGES_DIR}/tools/openni2 ) +# Deploy Script +file(COPY ${CMAKE_CURRENT_LIST_DIR}/openni2deploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/bin/OpenNI2) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/openni2deploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/OpenNI2) + # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openni2) file(RENAME ${CURRENT_PACKAGES_DIR}/share/openni2/LICENSE ${CURRENT_PACKAGES_DIR}/share/openni2/copyright)
\ No newline at end of file diff --git a/scripts/buildsystems/msbuild/applocal.ps1 b/scripts/buildsystems/msbuild/applocal.ps1 index 08a6d9a8f..0b56356a0 100644 --- a/scripts/buildsystems/msbuild/applocal.ps1 +++ b/scripts/buildsystems/msbuild/applocal.ps1 @@ -49,6 +49,7 @@ function resolve([string]$targetBinary) { if (Test-Path "$installedDir\$_") { deployBinary $targetBinaryDir $installedDir "$_" if (Test-Path function:\deployPluginsIfQt) { deployPluginsIfQt $targetBinaryDir "$g_install_root\plugins" "$_" } + if (Test-Path function:\deployOpenNI2) { deployOpenNI2 $targetBinaryDir "$g_install_root" "$_" } resolve "$targetBinaryDir\$_" } elseif (Test-Path "$targetBinaryDir\$_") { Write-Verbose " ${_}: $_ not found in vcpkg; locally deployed" @@ -66,5 +67,10 @@ if (Test-Path "$g_install_root\plugins\qtdeploy.ps1") { . "$g_install_root\plugins\qtdeploy.ps1" } +# Note: This is a hack to make OpenNI2 work. +if (Test-Path "$g_install_root\bin\OpenNI2\openni2deploy.ps1") { + . "$g_install_root\bin\OpenNI2\openni2deploy.ps1" +} + resolve($targetBinary) Write-Verbose $($g_searched | out-string)
\ No newline at end of file |
