If you'd like to make changes to OpenGloves, follow the instructions below to set up a local copy of the repository.
If you're looking to use OpenGloves to use your hardware in SteamVR applications, it is heavily recommended to install the driver on Steam.
Pre-built binaries are be provided in the Releases in this Repository, but if you would prefer to build the driver yourself instructions are documented below. Be sure to uninstall the driver from Steam if you do this.
- Clone the repo (including submodules)
git clone https://github.com/LucidVR/opengloves-driver.git
- Ensure that you have cmake installed (along with the path variable set)
- Ensure that you have
C++ CMake tools for Windows
installed- Modify Visual Studio in Visual Studio installer
- Navigate into the project folder
cd opengloves-driver
- Ensure
vcpkg
is installed- If you need to, get vcpkg installed in the base of this repository
git clone https://github.com/Microsoft/vcpkg.git
.\vcpkg\bootstrap-vcpkg.bat -disableMetrics
- Make a build directory and enter it
mkdir build
cd build
- Run CMake
cmake .. -DCMAKE_TOOLCHAIN_FILE="..\vcpkg\scripts\buildsystems\vcpkg.cmake"
This should generate Visual Studio project files in the build/
folder, which you can then compile.
- run a cmake build in the
build/
foldercmake --build . --config Release
- The artifacts of the build will be outputted to
build/Debug/
, orbuild/Release/
depending on build configuration
- Open the Visual Studio project (.sln file) in the
build/
folder - You should already have the ability to build the driver by pressing
Ctrl + Shift + B
- The artifacts of the build will be outputted to
build/Debug/
, orbuild/Release/
depending on build configuration
- The artifacts of the build will be outputted to
Note: For a more streamlined debugging environment, refer to Debugging with Visual Studio.
This step is for people who may not necessarily want to setup a debugging environment, or are testing release builds.
- Copy the
openglove
folder into the steamvr drivers folder- Usually located
C:\Program Files (x86)\Steam\steamapps\common\SteamVR\drivers
- Usually located
- Run SteamVR
If you want to make changes to the code and would like to use a debugger/not have to copy builds by hand, you are able to do so with the following steps:
- Navigate to
C:\Users\<user>\AppData\Local\openvr
- Open
openvrpaths.vrpath
.
- Open
- Append the
build/<build_type>/openglove
path of the project repository toexternal_drivers
. For example:
{
"config" :
[
"C:\\Program Files (x86)\\Steam\\config"
],
"external_drivers" :
[
"E:\\opengloves-driver\\build\\driver\\opengloves" <============== (or equivalent driver path & name)
],
"jsonid" : "vrpathreg",
"log" :
[
"C:\\Program Files (x86)\\Steam\\logs"
],
"runtime" :
[
"C:\\Program Files (x86)\\Steam\\steamapps\\common\\SteamVR"
],
"version" : 1
}
SteamVR launches vrserver.exe under a child process of vrstartup.exe, which means that you must have the ability to be able to debug child processes in order to debug your driver. Microsoft provides the Child Process Debugging Power Tool for this.
-
Install the Microsoft Process Debugging Tool
-
Navigate to
Debug>Other Debug Targets>Child Process Debug Settings
in the top bar of Visual Studio
- Tick
Enable child process debugging
- On the first row (with the process name
<All other processes>
, make sure that theAction
is set toDo not debug
. - Add a new row (double click on the empty
Process name
underneath<All other processes>
- Add
vrserver.exe
as the process name - Ensure that
Action
is set toAttach Debugger
It's usually quite useful to build then automatically launch SteamVR/ for debugging purposes.
To launch SteamVR for debugging:
- Click on the arrow next to
Local Windows Debugger
- Select
ALL_BUILD Debug Properties
- Navigate to the
Debugger
Property (under Configuration Properties) - Set
Command
to the location ofvrstartup.exe
(to start just SteamVR) or the Overlay exe (to start the Ovlerlay and SteamVR).- SteamVR's entry point (
vrstartup.exe
) is usually located
C:\Program Files (x86)\Steam\steamapps\common\SteamVR\bin\win64\vrstartup.exe
- SteamVR's entry point (