Giter Site home page Giter Site logo

amethyst-installer's Introduction

KinectToVR

KinectToVR is an application for emulating Vive trackers in SteamVR for full-body tracking using a Kinect for Xbox 360, Kinect for Xbox One or PlayStation Move controllers and cameras.

This version of the app (0.9) will be the last based on this repo. Development on 1.0 and onward is happening elsewhere, more on that later.

Authors

AutoCalibration scripts are written by コレヂャン
KinectToVR base is Sharky's
Triping organizes the whole project
The installer's property of Himbeer
Rest is probably written by 公彦赤屋先

License

This project is licensed under the GNU GPL v3 License

Build

You'll need:

  • Visual Studio 2019 (with: C++, v142 tools, ATL)
    or just build tools for same (see GitHub Actions script)
  • Kinect SDK 1.8 & 2.0 installed and visible in PATH
  • Working installation of SteamVR for testing

Follow GitHub Actions script, or:

  • Install vcpkg and its Visual Studio integration
    (cd into somewhere you want it to be)
    git clone https://github.com/Microsoft/vcpkg.git
    cd vcpkg
    ./bootstrap-vcpkg.sh
    ./vcpkg integrate install

  • Install needed libraries (You should choose one linking method for all packages)
    vcpkg install opencv3[world]:x64-windows boost:x64-windows glm:x64-windows curlpp:x64-windows cereal:x64-windows sfml:x64-windows glew:x64-windows
    (Now you may rest a bit, also consider using a drive other than C:, it'll be about 6-7GB without cleaned buildtrees)

  • Clone the latest OpenVR, GLM and Eigen3 into external/:
    git clone https://github.com/ValveSoftware/openvr external/openvr
    git clone https://gitlab.com/libeigen/eigen external/eigen git clone https://github.com/g-truc/glm external/glm

  • Fix min/max error in GLM (unresolved with NOMINMAX for now) sed -i '/#include <limits>/c\#include <limits>\n\n#undef min\n#undef max' external/glm/glm/gtx/component_wise.inl

  • Clone the latest K2APP and setup shortcuts to external deps:
    git clone https://github.com/KinectToVR/k2vr-application external/KTVR
    New-Item -ItemType Junction -Path external/KTVR/external/openvr -Target external/openvr
    New-Item -ItemType Junction -Path external/KTVR/external/eigen -Target external/eigen
    New-Item -ItemType Junction -Path external/KTVR/external/glm -Target external/glm

  • Setup GLog
    git clone https://github.com/google/glog.git external/glog
    git reset --hard f8c8e99fdfb998c2ba96cfb470decccf418f0b30
    cd external/glog
    mkdir vcbuild; cd vcbuild
    cmake -DBUILD_SHARED_LIBS=ON ..
    msbuild glog.vcxproj "/p:Configuration=Release;Platform=x64
    WindowsTargetPlatformVersion=10.0"

  • Setup GFlags
    git clone https://github.com/gflags/gflags.git external/gflags
    git reset --hard 827c769e5fc98e0f2a34c47cef953cc6328abced
    cd external/gflags
    mkdir vcbuild; cd vcbuild
    cmake -DBUILD_SHARED_LIBS=ON ..
    msbuild gflags.vcxproj "/p:Configuration=Release;Platform=x64;WindowsTargetPlatformVersion=10.0"

  • Setup SFGUI
    git clone https://github.com/KimihikoAkayasaki/SFGUI external/SFGUI
    cd external/SFGUI
    mkdir build; cd build
    cmake "-DBUILD_SHARED_LIBS=ON [YOUR VCPKG TOOLCHAIN COMMAND HERE]" ..
    msbuild SFGUI.vcxproj "/p:Configuration=Release;Platform=x64;WindowsTargetPlatformVersion=10.0"

  • Build the K2API & K2APP's OpenVR driver:
    msbuild "/t:KinectToVR_API" "/p:Configuration=Release;Platform=x64;WindowsTargetPlatformVersion=10.0"
    msbuild "/t:Driver_KinectToVR" "/p:Configuration=Release;Platform=x64;WindowsTargetPlatformVersion=10.0"

  • Build the K2EX:
    msbuild "/p:Configuration=Release;Platform=x64;WindowsTargetPlatformVersion=10.0"

Deploy

All needed dlls are automatically copied to the output folder.
Please note that everything from vcpkg is being linked dynamically,
so to avoid errors with the driver, if you've added any additional libraries,
build it alone and copy to the desired folder, including all present dlls inside the output folder.
For now, the folder structure is generated and dlls are copied automatically.
You will find the built driver in external/KTVR/x64/$(Configuration)/driver/
and the built K2EX in x64/$(Configuration). (Release configuration should be used, though)

amethyst-installer's People

Contributors

auroranemoia avatar himbeersaftlp avatar hyblocker avatar kimihikoakayasaki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

amethyst-installer's Issues

Cannot start the installer

Hi,

I can't start the installer (v1.0.7) on my PC. It says an unknown error is occured.

Please see the log below from:
%APPDATA%\Amethyst\logs\installer

Some personal info are masked by XXXX.

My system language is Chinese and the Chinese at the end of the log are:

可扩展主机控制器 - 1.10 (Microsoft); Location: PCI 总线 1、设备 0、功能 2; Description: 符合 USB xHCI 的主机控制器: Extensible Host Controller - 1.10 (Microsoft); Location: PCI Bus 1, Device 0, Function 2; Description: USB xHCI Compliant Host Controller (by (Google translate)

长度不能小于 0: Length cannot be less than 0

参数名: Parameter name

: At

Created logging directory at "C:\Users\XXXXX\AppData\Roaming\Amethyst\logs\installer"
Log file created at: 2022/11/26 21:34:37
Running on machine: XXXXX
Running duration (h:mm:ss): 0:00:00
Log line format: [IWEF]yyyyMMdd HH:mm:ss.ffffff threadid file::member:line] msg
I20221126 21:34:37.130507  1600 App.xaml.cs::Init:139] Amethyst Installer v1.0.7
I20221126 21:34:37.131504  1600 App.xaml.cs::Init:140] Running as httpe...
I20221126 21:34:37.132477  1600 Constants.cs::AmethystTempDirectory:73] Created temp directory at "C:\Users\XXXXX\AppData\Local\Temp\amethyst-installer-zo3fgb4igt0"...
I20221126 21:34:37.144472  1600 OpenVRUtil.Core.cs::LoadOpenVRAPI:55] Successfully loaded openvr_api.dll!
I20221126 21:34:37.349915  1600 OpenVRUtil.HmdDetection.cs::DetectHeadset:69] Steam VR Last HMD Model: oculus quest2
I20221126 21:34:37.350913  1600 OpenVRUtil.HmdDetection.cs::DetectHeadset:70] Steam VR Last HMD Manufacturer: oculus
I20221126 21:34:37.366844  1600 OpenVRUtil.HmdDetection.cs::DetectQuestConnectionMethod:203] Detected a Virtual Desktop Streamer install at "C:\Program Files\Virtual Desktop Streamer\"!
I20221126 21:34:37.377815  1600 K2Archive.PublicAPI.cs::Init:24] Successfully loaded libzstd.dll!
I20221126 21:34:37.379835  1600 InstallerStateManager.Core.cs::FetchInstallerJson:113] Fetching latest packages...
I20221126 21:34:37.571299  1600 InstallerStateManager.Core.cs::FetchInstallerJson:130] Fetched packages successfully!
I20221126 21:34:37.571299  1600 InstallerStateManager.Core.cs::FetchLocaleCodes:151] Fetching supported documentation locales...
I20221126 21:34:37.683000  1600 InstallerStateManager.Core.cs::FetchLocaleCodes:156] Fetched locale codes successfully!
I20221126 21:34:37.697960  1600 InstallerStateManager.Requirements.cs::CheckSteamVR:65] Detected SteamVR Install at "C:\Program Files (x86)\Steam\steamapps\common\SteamVR"
I20221126 21:34:37.698957  1600 InstallerStateManager.Requirements.cs::CheckSteamVR:66] Detected VR headset type Quest2, connected using VirtualDesktop; tracking type: Quest
I20221126 21:34:37.698957  1600 InstallerStateManager.Requirements.cs::CheckSteamVR:67] Playspace bounds: { 3.04375600814819, 3.44796466827393 }
I20221126 21:34:37.699954  1600 InstallerStateManager.Requirements.cs::CheckOS:93] OS too old: False ; OS Version: 10.0.19044.2251 ; Version String: 21H2
I20221126 21:34:37.728877  1600 InstallerStateManager.Requirements.cs::DetectUsbControllers:105] Found USB Controller: Name: NVIDIA USB 3.10 可扩展主机控制器 - 1.10 (Microsoft); Location: PCI 总线 1、设备 0、功能 2; Description: 符合 USB xHCI 的主机控制器
F20221126 21:34:37.767773  1600 App.xaml.cs::Application_DispatcherUnhandledException:116] Unhandled Exception: ArgumentOutOfRangeException in mscorlib: 长度不能小于 0。
参数名: length
   在 System.String.Substring(Int32 startIndex, Int32 length)
   在 amethyst_installer_gui.Installer.UsbControllerData..ctor(DeviceNode device)
   在 amethyst_installer_gui.Installer.InstallerStateManager.DetectUsbControllers()
   在 amethyst_installer_gui.Installer.InstallerStateManager.ComputeRequirements()
   在 amethyst_installer_gui.Installer.InstallerStateManager.Initialize()
   在 amethyst_installer_gui.App.Init()
   在 amethyst_installer_gui.App.Application_Startup(Object sender, StartupEventArgs e)
   在 System.Windows.Application.OnStartup(StartupEventArgs e)
   在 System.Windows.Application.<.ctor>b__1_0(Object unused)
   在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Improve theme handling

Currently the installer polls theme settings through the registry, which works but isn't ideal.

We should use uxtheme.dll to poll the true theme settings set for this application, which will be more accurate than what we currently have.

Reference: AvaloniaUI/Avalonia#3950

Admin shouldn't be necessary

The installer shouldn't require admin, as it's not required in all scenarios. It should still attempt to automatically elevate itself as admin and refuse to run if required, but this only applies to a few operations such as a fresh install.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.