Skip to content

Latest commit

 

History

History
68 lines (56 loc) · 3.51 KB

BUILD_AND_DEPLOY.md

File metadata and controls

68 lines (56 loc) · 3.51 KB

Build instructions

You'll need:

  • This repo cloned somewhere and cd'd into
  • OpenNI SDK 2.2, PLEASE DON'T INSTALL DRIVERS!
  • NiTE SDK 2.2 (Used for skeleton recog & tracking)
  • (For testing purpose) Working installation of Amethyst and SteamVR

Follow these steps:

  • Install tools for the Windows App development.
    You'll have to install Visual Studio 2022 or its Build Tools.

  • Install CMake and git if you still somehow don't have them.
    Note: If you have chocolatey installed, you can just choco install cmake git

  • Set up GLog & GFlags (For this step you must have cmake installed and visible in PATH)

    # Download the vswhere tool to find msbuild without additional interactions
    > Invoke-WebRequest -Uri 'https://github.com/microsoft/vswhere/releases/latest/download/vswhere.exe' -OutFile './vswhere.exe'
    # Use the downloaded vswhere tool to find msbuild. Skip this step if you are using Developer Powershell
    > $msbuild = "$("$(.\vswhere.exe -legacy -prerelease -products * -format json | Select-String -Pattern "2022" | `
          Select-String -Pattern "Studio" | Select-Object -First 1 | Select-String -Pattern "installationPath")" `
          -replace('"installationPath": "','') -replace('",',''))".Trim() + "\\MSBuild\\Current\\Bin\\MSBuild.exe"
    
    # Set up external dependencies
    > git submodule update --init
    
    # Build GLog
    > cd ./external/glog
    > mkdir builds; cd ./builds
    > cmake .. -DBUILD_SHARED_LIBS=ON
    > &"$msbuild" glog.vcxproj "/p:Configuration=Release;Platform=x64"
    # Go back
    > cd ../../..
    
    # Build GFlags
    > cd ./external/gflags
    > mkdir builds; cd ./builds
    > cmake .. -DBUILD_SHARED_LIBS=ON
    > &"$msbuild" gflags.vcxproj "/p:Configuration=Release;Platform=x64"
    # Go back
    > cd ../../..
  • Build:

    # Download the vswhere tool to find msbuild without additional interactions
    > Invoke-WebRequest -Uri 'https://github.com/microsoft/vswhere/releases/latest/download/vswhere.exe' -OutFile './vswhere.exe'
    # Use the downloaded vswhere tool to find msbuild. Skip this step if you use the Dev Powershell
    > $msbuild = "$("$(.\vswhere.exe -legacy -prerelease -products * -format json | Select-String -Pattern "2022" | `
          Select-String -Pattern "Studio" | Select-Object -First 1 | Select-String -Pattern "installationPath")" `
          -replace('"installationPath": "','') -replace('",',''))".Trim() + "\\MSBuild\\Current\\Bin\\MSBuild.exe"
    
    # Restore NuGet packages and build everything
    > &"$msbuild" device_KinectNiTE.sln "/p:Configuration=Release;Platform=x64"

Deployment

The whole output can be found in x64/Release directory
(or x64/Debug if you're building for Debug, naturally) and:

  • Devices (plugins) are inside devices/ folder

Note: Debug builds will only work with a debug host,
the same schema applies to OpenVR Driver, the API and Amethyst.

What's inside device_resources/OpenNI?

That folder contains OpenNI and NiTE vendor files to make the plugin work.
The Drivers folder contins custom-built drivers from this repository.