Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# SolarXR-Protocol

A hardware-agnostic serialization protocol for full body tracking (FBT) in VR. Used by SlimeVR,
but intends to be flexible enough to support *any* type of FBT hardware, including Vive trackers.

## Contributing

Most of the code in this repo is autogenerated. Please edit the flatbuffer schemas in the `schema`
Most of the code in this repo is autogenerated. Please edit the FlatBuffer schemas in the `schema`
folder, then run the `generate-flatbuffers` script.

## License
Expand All @@ -23,12 +24,10 @@ Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.

## Flatc

# Flatc

All the code generated in this repository is using flatc
[v22.10.26](https://github.com/google/flatbuffers/releases/tag/v22.10.26). To generate
the flatbuffers, download the appropriate `flatc` binary for your platform, extract it,
and place it in this folder. Then run `./generate-flatbuffer.sh` if you are on mac/linux
or `./generate-flatbuffer.ps1` if you are on windows.

All the code generated in this repository is using flatc
[v25.12.19](https://github.com/google/flatbuffers/releases/tag/v25.12.19). To generate
the FlatBuffers, download the appropriate `flatc` binary for your platform, extract it,
and place it in this folder. Then run `./generate-flatbuffer.sh` if you are on Mac/Linux
or `./generate-flatbuffer.ps1` if you are on Windows.
17 changes: 11 additions & 6 deletions generate-flatbuffer.ps1
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
$ErrorActionPreference = "Stop"
$version = "25.12.19"

# TODO: check flatc version before doing anything
$versionOutput = (./flatc.exe --version) -replace "flatc version "
if ($versionOutput -notmatch $version) {
Write-Error "Error: Incorrect flatc version detected. Expected $version, found $versionOutput."
exit 1
}

Remove-Item -ErrorAction Ignore -Recurse protocol/java/src
Remove-Item -ErrorAction Ignore -Recurse protocol/cpp/include/solarxr_protocol/generated
Remove-Item -ErrorAction Ignore -Recurse protocol/typescript/src
Remove-Item -ErrorAction Ignore -Recurse protocol/rust/src/generated
Remove-Item -ErrorAction Ignore -Recurse protocol/kotlin/src
Remove-Item -ErrorAction Ignore -Recurse protocol/java/src
Remove-Item -ErrorAction Ignore -Recurse protocol/cpp/include/solarxr_protocol/generated
Remove-Item -ErrorAction Ignore -Recurse protocol/typescript/src
Remove-Item -ErrorAction Ignore -Recurse protocol/rust/src/generated
Remove-Item -ErrorAction Ignore -Recurse protocol/kotlin/src


./flatc.exe --java --gen-object-api --gen-all -o protocol/java/src -I ./schema/ ./schema/all.fbs
Expand Down
7 changes: 4 additions & 3 deletions generate-flatbuffer.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#!/usr/bin/env bash
set -e
VERSION="22.10.26"
VERSION="25.12.19"

if [[ -f "./flatc" ]]; then
PATH="./:$PATH"
fi

if [[ "$(flatc --version)" != "flatc version $VERSION" ]]; then
echo "Flatc must be $VERSION"
VERSION_OUTPUT="$(flatc --version | cut -d' ' -f3)"
if [[ $VERSION_OUTPUT != $VERSION ]]; then
echo "Error: Incorrect flatc version detected. Expected $VERSION, found $VERSION_OUTPUT." >&2
exit 1
fi

Expand Down
2 changes: 1 addition & 1 deletion lib/flatbuffers
Submodule flatbuffers updated 1227 files
Loading