mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-22 10:01:19 -08:00
Compare commits
82
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa07e4f7be | ||
|
|
9835222762 | ||
|
|
69068bbf17 | ||
|
|
ba02688a82 | ||
|
|
65bdf2fffb | ||
|
|
13ee32c903 | ||
|
|
9748bd77c2 | ||
|
|
d7a286863f | ||
|
|
a1e0cd52d2 | ||
|
|
d1a39dba05 | ||
|
|
61687a27ca | ||
|
|
d86d3be421 | ||
|
|
6f9ddf13d9 | ||
|
|
4bc9e50c44 | ||
|
|
951ac73e29 | ||
|
|
72c9cee3cc | ||
|
|
290aec3c21 | ||
|
|
52fd7d9a81 | ||
|
|
bf2203ff2c | ||
|
|
695d7b7bf8 | ||
|
|
118252534f | ||
|
|
5cab8bd7a4 | ||
|
|
c0c5e14e90 | ||
|
|
c73d5100e8 | ||
|
|
ec66f296b3 | ||
|
|
13694f5f20 | ||
|
|
ab779670f1 | ||
|
|
11ed1c7c80 | ||
|
|
85c10dbf3c | ||
|
|
1434027aec | ||
|
|
3b34d5cf96 | ||
|
|
aa48b025c7 | ||
|
|
065e774309 | ||
|
|
dfedf99b33 | ||
|
|
91e555256d | ||
|
|
1b05b7da8a | ||
|
|
25ba150e51 | ||
|
|
789ba55af5 | ||
|
|
986f8fcbb2 | ||
|
|
3288069ae5 | ||
|
|
15ff70dda2 | ||
|
|
f6833ecb85 | ||
|
|
638bce86e6 | ||
|
|
be77ff73d7 | ||
|
|
d79d93cd0e | ||
|
|
c022a557ed | ||
|
|
1799483f26 | ||
|
|
52491f2c2b | ||
|
|
60077307d5 | ||
|
|
65d4520c10 | ||
|
|
0d3254bc27 | ||
|
|
96cddb52bb | ||
|
|
110e0ce840 | ||
|
|
cc364978a0 | ||
|
|
0ed7bf5838 | ||
|
|
fdbc52a1b6 | ||
|
|
112faacafd | ||
|
|
ae33eea790 | ||
|
|
b5a4cf7bac | ||
|
|
54fbaa7b0b | ||
|
|
3343894a80 | ||
|
|
7e0a06a7b8 | ||
|
|
706489d42c | ||
|
|
e9a36313cc | ||
|
|
e05d19b435 | ||
|
|
6b6abebca5 | ||
|
|
319f69cdcd | ||
|
|
c46c536a1a | ||
|
|
a98772d3aa | ||
|
|
6c7e6a4f42 | ||
|
|
f4646f1133 | ||
|
|
306510c1d9 | ||
|
|
1560c0a1ec | ||
|
|
04aa882222 | ||
|
|
e4b3b93e35 | ||
|
|
96b544f5e0 | ||
|
|
eca4eb770c | ||
|
|
036a893c28 | ||
|
|
428d16f19a | ||
|
|
c8538b5521 | ||
|
|
30f9cc9302 | ||
|
|
dfba37e698 |
No files matched your search
+4
-5
@@ -1,6 +1,3 @@
|
||||
# Global code owner
|
||||
* @Eirenliel
|
||||
|
||||
# Make everyone be able to approve SolarXR submodule changes
|
||||
/solarxr-protocol @ButterscotchV @Erimelowo @loucass003
|
||||
|
||||
@@ -16,11 +13,11 @@
|
||||
|
||||
/gui/src/components/settings/ @Erimelowo @loucass003
|
||||
|
||||
# Rust part of the GUI
|
||||
# Electron part of the GUI
|
||||
/gui/electron/ @loucass003
|
||||
|
||||
# Some server code~
|
||||
/server/ @ButterscotchV @Eirenliel @Erimelowo
|
||||
/server/ @ButterscotchV @loucass003 @Erimelowo
|
||||
|
||||
/server/src/main/java/dev/slimevr/autobone/ @ButterscotchV
|
||||
/server/src/main/java/dev/slimevr/poserecorder/ @ButterscotchV
|
||||
@@ -30,6 +27,8 @@
|
||||
/server/src/main/java/dev/slimevr/tracking/processor/ @Erimelowo
|
||||
/server/src/main/java/dev/slimevr/filtering/ @Erimelowo
|
||||
|
||||
/bindings-provider/ @ImSapphire
|
||||
|
||||
# Linux files
|
||||
*.nix @loucass003
|
||||
/flake.lock @loucass003
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
"Area: Continuous Integration":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ".github/**"
|
||||
"Area: Application Protocol":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ["solarxr-protocol"]
|
||||
"Area: AutoBone":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: "server/core/src/main/java/dev/slimevr/autobone/**"
|
||||
"Area: Documentation":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: "**/*.md"
|
||||
"Area: GUI":
|
||||
- all:
|
||||
- changed-files:
|
||||
- all-globs-to-any-file: ["gui/**/*", "!gui/public/i18n/**/*"]
|
||||
"Area: Hardware Protocol":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: "server/core/src/main/java/dev/slimevr/tracking/trackers/udp/**"
|
||||
"Area: Server":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ["server/**", "*gradle*", "gradle/**"]
|
||||
"Area: Skeletal Model":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: "server/core/src/main/java/dev/slimevr/tracking/processor/**"
|
||||
"Area: SteamVR Driver":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: "server/desktop/src/main/java/dev/slimevr/desktop/platform/**"
|
||||
"Area: Translation":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: "gui/public/i18n/**"
|
||||
"Area: VMC":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ["server/core/src/main/java/dev/slimevr/osc/Unity*", "server/core/src/main/java/dev/slimevr/osc/VMC*", "server/core/src/main/java/dev/slimevr/osc/VRM*"]
|
||||
"Area: VRCOSC":
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ["server/core/src/main/java/dev/slimevr/osc/VRC*"]
|
||||
+69
-20
@@ -13,6 +13,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
matrix-cpp: ${{ steps.set-matrix.outputs.matrix-cpp }}
|
||||
steps:
|
||||
- id: set-matrix
|
||||
shell: bash
|
||||
@@ -25,7 +26,44 @@ jobs:
|
||||
else
|
||||
RESULT=$(echo "$BASE" | jq -c '.')
|
||||
fi
|
||||
RESULT_CPP=$(echo "$RESULT" | jq -c '[ .[] | select ( (.platform != "macos") and ( (.platform != "windows") or (.os | endswith("-arm") | not) ) ) ]')
|
||||
|
||||
echo "matrix={\"include\":$RESULT}" >> "$GITHUB_OUTPUT"
|
||||
echo "matrix-cpp={\"include\":$RESULT_CPP}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
build-bindings-provider:
|
||||
name: Build bindings provider for ${{ matrix.os }}
|
||||
needs: [setup-matrix]
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix-cpp) }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: recursive
|
||||
- if: matrix.platform == 'linux'
|
||||
name: Install GCC
|
||||
uses: egor-tensin/setup-gcc@v2
|
||||
with:
|
||||
version: 16
|
||||
- name: Get CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
- name: Configure
|
||||
run: cmake -S bindings-provider/ -B bindings-provider/build -DCMAKE_BUILD_TYPE=Release
|
||||
- name: Build
|
||||
run: cmake --build bindings-provider/build --config Release -j6
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: bindings-provider-${{ matrix.platform }}-${{ matrix.os }}
|
||||
path: |
|
||||
bindings-provider/build/slimevr-bindings-provider
|
||||
bindings-provider/build/libopenvr_api.so
|
||||
bindings-provider/build/Release/SlimeVR-Bindings-Provider.exe
|
||||
bindings-provider/build/openvr_api.dll
|
||||
|
||||
gui-checks:
|
||||
name: Gui Checks
|
||||
runs-on: ubuntu-latest
|
||||
@@ -37,7 +75,7 @@ jobs:
|
||||
- name: Get tags
|
||||
run: git fetch --tags origin --recurse-submodules=no --force
|
||||
- name: Setup PNPM
|
||||
uses: pnpm/action-setup@v4
|
||||
uses: pnpm/action-setup@v6
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
@@ -60,7 +98,7 @@ jobs:
|
||||
java-version: '17'
|
||||
distribution: 'adopt'
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v5
|
||||
uses: gradle/actions/setup-gradle@v6
|
||||
- name: Java Spotless Check
|
||||
run: ./gradlew spotlessCheck --build-cache
|
||||
|
||||
@@ -81,13 +119,13 @@ jobs:
|
||||
java-version: '17'
|
||||
distribution: 'adopt'
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v5
|
||||
uses: gradle/actions/setup-gradle@v6
|
||||
- name: Build ShadowJar
|
||||
run: ./gradlew :server:desktop:shadowJar --build-cache
|
||||
- name: Test with Gradle
|
||||
run: ./gradlew :server:desktop:test
|
||||
- name: Upload Server Jar
|
||||
uses: actions/upload-artifact@v6
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: server-jar
|
||||
path: |
|
||||
@@ -105,7 +143,7 @@ jobs:
|
||||
- name: Get tags
|
||||
run: git fetch --tags origin --recurse-submodules=no --force
|
||||
- name: Setup PNPM
|
||||
uses: pnpm/action-setup@v4
|
||||
uses: pnpm/action-setup@v6
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
@@ -118,14 +156,14 @@ jobs:
|
||||
- name: Tar GUI Dist
|
||||
run: tar -czf slimevr-gui-dist.tar.gz -C gui/out .
|
||||
- name: Upload GUI Dist
|
||||
uses: actions/upload-artifact@v6
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: gui-dist
|
||||
path: slimevr-gui-dist.tar.gz
|
||||
|
||||
package-desktop:
|
||||
name: Package Desktop (${{ matrix.platform }} - ${{ matrix.os }})
|
||||
needs: [setup-matrix, build-server-jar, build-gui-frontend]
|
||||
needs: [setup-matrix, build-server-jar, build-gui-frontend, build-bindings-provider]
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }}
|
||||
@@ -138,19 +176,25 @@ jobs:
|
||||
- name: Get tags
|
||||
run: git fetch --tags origin --recurse-submodules=no --force
|
||||
- name: Setup PNPM
|
||||
uses: pnpm/action-setup@v4
|
||||
uses: pnpm/action-setup@v6
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version-file: '.node-version'
|
||||
cache: 'pnpm'
|
||||
- name: Download Server Jar
|
||||
uses: actions/download-artifact@v6
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: server-jar
|
||||
path: server
|
||||
- if: contains(fromJson(needs.setup-matrix.outputs.matrix-cpp).include.*.os, matrix.os)
|
||||
name: Download bindings provider artifact
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: bindings-provider-${{ matrix.platform }}-${{ matrix.os }}
|
||||
path: bindings-provider/build/${{ matrix.platform == 'windows' && 'win' || 'linux' }}-${{ endsWith(matrix.os, '-arm') && 'arm64' || 'x64' }}
|
||||
- name: Download GUI Dist
|
||||
uses: actions/download-artifact@v6
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: gui-dist
|
||||
- name: Extract GUI for Electron
|
||||
@@ -164,10 +208,15 @@ jobs:
|
||||
mkdir -p gui/dist/artifacts/linux/ \
|
||||
gui/dist/artifacts/win \
|
||||
gui/dist/artifacts/mac
|
||||
cd gui
|
||||
VERSION=$(git --no-pager tag --sort -taggerdate --points-at HEAD | head -1)
|
||||
[ -z "$VERSION" ] && VERSION="0.0.0"
|
||||
VERSION="${VERSION#v}"
|
||||
echo "Building version: $VERSION"
|
||||
pnpm i
|
||||
cd gui
|
||||
pnpm exec electron-builder --${{ matrix.platform }} \
|
||||
${{ matrix.platform == 'macos' && '--universal' || '' }} \
|
||||
--config.extraMetadata.version="$VERSION" \
|
||||
--publish never
|
||||
- name: Collect and Rename Artifacts
|
||||
shell: bash
|
||||
@@ -195,7 +244,7 @@ jobs:
|
||||
echo "Collected files:"
|
||||
ls -lh "$DEST_DIR"
|
||||
- name: Upload For Release
|
||||
uses: actions/upload-artifact@v6
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: release-${{ matrix.platform }}-${{ matrix.os }}
|
||||
path: release-out/*
|
||||
@@ -217,9 +266,9 @@ jobs:
|
||||
java-version: '17'
|
||||
distribution: 'adopt'
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v5
|
||||
uses: gradle/actions/setup-gradle@v6
|
||||
- name: Download GUI Dist
|
||||
uses: actions/download-artifact@v6
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: gui-dist
|
||||
- name: Extract GUI for Android
|
||||
@@ -236,7 +285,7 @@ jobs:
|
||||
- name: Prepare APK
|
||||
run: cp server/android/build/outputs/apk/release/*.apk ./SlimeVR-android.apk
|
||||
- name: Upload APK
|
||||
uses: actions/upload-artifact@v6
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: release-android
|
||||
path: SlimeVR-android.apk
|
||||
@@ -251,7 +300,7 @@ jobs:
|
||||
ANDROID_KEY_PASSWD: ${{ secrets.ANDROID_GPLAY_KEY_PASSWD }}
|
||||
|
||||
- name: Upload the Google Play artifact
|
||||
uses: actions/upload-artifact@v6
|
||||
uses: actions/upload-artifact@v7
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
# Artifact name
|
||||
@@ -266,22 +315,22 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download All Release Artifacts
|
||||
uses: actions/download-artifact@v6
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
pattern: release-*
|
||||
path: release-out
|
||||
merge-multiple: true
|
||||
- name: Download Server Jar
|
||||
uses: actions/download-artifact@v6
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: server-jar
|
||||
path: server
|
||||
- name: Download GUI Dist
|
||||
uses: actions/download-artifact@v6
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
name: gui-dist
|
||||
- name: Create GitHub Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
uses: softprops/action-gh-release@v3
|
||||
with:
|
||||
draft: true
|
||||
generate_release_notes: true
|
||||
|
||||
@@ -20,13 +20,13 @@ jobs:
|
||||
run: |
|
||||
npx @slimevr/update-manifest-generator@latest
|
||||
|
||||
- uses: actions/upload-artifact@v6
|
||||
- uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: "update-manifest.json"
|
||||
path: ./update-manifest.json
|
||||
|
||||
- name: Upload update-manifest.json to release
|
||||
uses: softprops/action-gh-release@v2
|
||||
uses: softprops/action-gh-release@v3
|
||||
with:
|
||||
tag_name: ${{ secrets.UPDATE_MANIFEST_RELEASE_TAG }}
|
||||
files: ./update-manifest.json
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
# This workflow will triage pull requests and apply a label based on the
|
||||
# paths that are modified in the pull request.
|
||||
#
|
||||
# To use this workflow, you will need to set up a .github/labeler.yml
|
||||
# file with configuration. For more information, see:
|
||||
# https://github.com/actions/labeler
|
||||
|
||||
name: Labeler
|
||||
on: [pull_request_target]
|
||||
|
||||
jobs:
|
||||
label:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- uses: actions/labeler@v6
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
@@ -1,3 +1,6 @@
|
||||
[submodule "solarxr-protocol"]
|
||||
path = solarxr-protocol
|
||||
url = https://github.com/SlimeVR/SolarXR-Protocol.git
|
||||
[submodule "svr-bindings-provider/openvr"]
|
||||
path = bindings-provider/openvr
|
||||
url = https://github.com/ValveSoftware/openvr.git
|
||||
@@ -0,0 +1,297 @@
|
||||
---
|
||||
Language: Cpp
|
||||
AccessModifierOffset: -4
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignArrayOfStructures: None
|
||||
AlignConsecutiveAssignments:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionDeclarations: false
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: true
|
||||
AlignConsecutiveBitFields:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionDeclarations: false
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: false
|
||||
AlignConsecutiveDeclarations:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionDeclarations: true
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: false
|
||||
AlignConsecutiveMacros:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionDeclarations: false
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: false
|
||||
AlignConsecutiveShortCaseStatements:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCaseArrows: false
|
||||
AlignCaseColons: false
|
||||
AlignConsecutiveTableGenBreakingDAGArgColons:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionDeclarations: false
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: false
|
||||
AlignConsecutiveTableGenCondOperatorColons:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionDeclarations: false
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: false
|
||||
AlignConsecutiveTableGenDefinitionColons:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionDeclarations: false
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: false
|
||||
AlignEscapedNewlines: Right
|
||||
AlignOperands: DontAlign
|
||||
AlignTrailingComments:
|
||||
Kind: Never
|
||||
OverEmptyLines: 0
|
||||
AllowAllArgumentsOnNextLine: true
|
||||
AllowAllParametersOfDeclarationOnNextLine: true
|
||||
AllowBreakBeforeNoexceptSpecifier: Never
|
||||
AllowShortBlocksOnASingleLine: Empty
|
||||
AllowShortCaseExpressionOnASingleLine: true
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortCompoundRequirementOnASingleLine: true
|
||||
AllowShortEnumsOnASingleLine: true
|
||||
AllowShortFunctionsOnASingleLine: All
|
||||
AllowShortIfStatementsOnASingleLine: Never
|
||||
AllowShortLambdasOnASingleLine: All
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AllowShortNamespacesOnASingleLine: false
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
AttributeMacros:
|
||||
- __capability
|
||||
BinPackArguments: true
|
||||
BinPackLongBracedList: true
|
||||
BinPackParameters: BinPack
|
||||
BitFieldColonSpacing: Both
|
||||
BracedInitializerIndentWidth: -1
|
||||
BraceWrapping:
|
||||
AfterCaseLabel: false
|
||||
AfterClass: false
|
||||
AfterControlStatement: Never
|
||||
AfterEnum: false
|
||||
AfterExternBlock: false
|
||||
AfterFunction: true
|
||||
AfterNamespace: false
|
||||
AfterObjCDeclaration: false
|
||||
AfterStruct: false
|
||||
AfterUnion: false
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
BeforeLambdaBody: false
|
||||
BeforeWhile: false
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: true
|
||||
SplitEmptyRecord: true
|
||||
SplitEmptyNamespace: true
|
||||
BreakAdjacentStringLiterals: true
|
||||
BreakAfterAttributes: Leave
|
||||
BreakAfterJavaFieldAnnotations: false
|
||||
BreakAfterReturnType: None
|
||||
BreakArrays: true
|
||||
BreakBeforeBinaryOperators: All
|
||||
BreakBeforeConceptDeclarations: Always
|
||||
BreakBeforeBraces: Attach
|
||||
BreakBeforeInlineASMColon: OnlyMultiline
|
||||
BreakBeforeTemplateCloser: false
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakBinaryOperations: Never
|
||||
BreakConstructorInitializers: BeforeComma
|
||||
BreakFunctionDefinitionParameters: false
|
||||
BreakInheritanceList: BeforeColon
|
||||
BreakStringLiterals: true
|
||||
BreakTemplateDeclarations: MultiLine
|
||||
ColumnLimit: 0
|
||||
CommentPragmas: '^ IWYU pragma:'
|
||||
CompactNamespaces: false
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
Cpp11BracedListStyle: false
|
||||
DerivePointerAlignment: false
|
||||
DisableFormat: false
|
||||
EmptyLineAfterAccessModifier: Never
|
||||
EmptyLineBeforeAccessModifier: LogicalBlock
|
||||
EnumTrailingComma: Leave
|
||||
ExperimentalAutoDetectBinPacking: false
|
||||
FixNamespaceComments: false
|
||||
ForEachMacros:
|
||||
- foreach
|
||||
- Q_FOREACH
|
||||
- BOOST_FOREACH
|
||||
IfMacros:
|
||||
- KJ_IF_MAYBE
|
||||
IncludeBlocks: Preserve
|
||||
IncludeCategories:
|
||||
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
|
||||
Priority: 2
|
||||
SortPriority: 0
|
||||
CaseSensitive: false
|
||||
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
|
||||
Priority: 3
|
||||
SortPriority: 0
|
||||
CaseSensitive: false
|
||||
- Regex: '.*'
|
||||
Priority: 1
|
||||
SortPriority: 0
|
||||
CaseSensitive: false
|
||||
IncludeIsMainRegex: '(Test)?$'
|
||||
IncludeIsMainSourceRegex: ''
|
||||
IndentAccessModifiers: false
|
||||
IndentCaseBlocks: false
|
||||
IndentCaseLabels: false
|
||||
IndentExportBlock: true
|
||||
IndentExternBlock: AfterExternBlock
|
||||
IndentGotoLabels: true
|
||||
IndentPPDirectives: None
|
||||
IndentRequiresClause: true
|
||||
IndentWidth: 4
|
||||
IndentWrappedFunctionNames: false
|
||||
InsertBraces: false
|
||||
InsertNewlineAtEOF: false
|
||||
InsertTrailingCommas: None
|
||||
IntegerLiteralSeparator:
|
||||
Binary: 0
|
||||
BinaryMinDigits: 0
|
||||
Decimal: 0
|
||||
DecimalMinDigits: 0
|
||||
Hex: 0
|
||||
HexMinDigits: 0
|
||||
JavaScriptQuotes: Leave
|
||||
JavaScriptWrapImports: true
|
||||
KeepEmptyLines:
|
||||
AtEndOfFile: false
|
||||
AtStartOfBlock: true
|
||||
AtStartOfFile: true
|
||||
KeepFormFeed: false
|
||||
LambdaBodyIndentation: Signature
|
||||
LineEnding: DeriveLF
|
||||
MacroBlockBegin: ''
|
||||
MacroBlockEnd: ''
|
||||
MainIncludeChar: Quote
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: Inner
|
||||
ObjCBinPackProtocolList: Auto
|
||||
ObjCBlockIndentWidth: 4
|
||||
ObjCBreakBeforeNestedBlockParam: true
|
||||
ObjCSpaceAfterProperty: true
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
OneLineFormatOffRegex: ''
|
||||
PackConstructorInitializers: BinPack
|
||||
PenaltyBreakAssignment: 2
|
||||
PenaltyBreakBeforeFirstCallParameter: 19
|
||||
PenaltyBreakBeforeMemberAccess: 150
|
||||
PenaltyBreakComment: 300
|
||||
PenaltyBreakFirstLessLess: 120
|
||||
PenaltyBreakOpenParenthesis: 0
|
||||
PenaltyBreakScopeResolution: 500
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyBreakTemplateDeclaration: 10
|
||||
PenaltyExcessCharacter: 1000000
|
||||
PenaltyIndentedWhitespace: 0
|
||||
PenaltyReturnTypeOnItsOwnLine: 60
|
||||
PointerAlignment: Right
|
||||
PPIndentWidth: -1
|
||||
QualifierAlignment: Leave
|
||||
ReferenceAlignment: Pointer
|
||||
ReflowComments: Always
|
||||
RemoveBracesLLVM: false
|
||||
RemoveEmptyLinesInUnwrappedLines: false
|
||||
RemoveParentheses: Leave
|
||||
RemoveSemicolon: false
|
||||
RequiresClausePosition: OwnLine
|
||||
RequiresExpressionIndentation: OuterScope
|
||||
SeparateDefinitionBlocks: Leave
|
||||
ShortNamespaceLines: 1
|
||||
SkipMacroDefinitionBody: false
|
||||
SortIncludes:
|
||||
Enabled: true
|
||||
IgnoreCase: false
|
||||
SortJavaStaticImport: Before
|
||||
SortUsingDeclarations: LexicographicNumeric
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceAfterLogicalNot: false
|
||||
SpaceAfterOperatorKeyword: false
|
||||
SpaceAfterTemplateKeyword: true
|
||||
SpaceAroundPointerQualifiers: Default
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeCaseColon: false
|
||||
SpaceBeforeCpp11BracedList: false
|
||||
SpaceBeforeCtorInitializerColon: true
|
||||
SpaceBeforeInheritanceColon: true
|
||||
SpaceBeforeJsonColon: false
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceBeforeParensOptions:
|
||||
AfterControlStatements: true
|
||||
AfterForeachMacros: true
|
||||
AfterFunctionDefinitionName: false
|
||||
AfterFunctionDeclarationName: false
|
||||
AfterIfMacros: true
|
||||
AfterNot: false
|
||||
AfterOverloadedOperator: false
|
||||
AfterPlacementOperator: true
|
||||
AfterRequiresInClause: false
|
||||
AfterRequiresInExpression: false
|
||||
BeforeNonEmptyParentheses: false
|
||||
SpaceBeforeRangeBasedForLoopColon: true
|
||||
SpaceBeforeSquareBrackets: false
|
||||
SpaceInEmptyBlock: true
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInAngles: Never
|
||||
SpacesInContainerLiterals: true
|
||||
SpacesInLineCommentPrefix:
|
||||
Minimum: 1
|
||||
Maximum: -1
|
||||
SpacesInParens: Never
|
||||
SpacesInParensOptions:
|
||||
ExceptDoubleParentheses: false
|
||||
InCStyleCasts: false
|
||||
InConditionalStatements: false
|
||||
InEmptyParentheses: false
|
||||
Other: false
|
||||
SpacesInSquareBrackets: false
|
||||
Standard: Latest
|
||||
StatementAttributeLikeMacros:
|
||||
- Q_EMIT
|
||||
StatementMacros:
|
||||
- Q_UNUSED
|
||||
- QT_REQUIRE_VERSION
|
||||
TableGenBreakInsideDAGArg: DontBreak
|
||||
TabWidth: 8
|
||||
UseTab: Never
|
||||
VerilogBreakBetweenInstancePorts: true
|
||||
WhitespaceSensitiveMacros:
|
||||
- BOOST_PP_STRINGIZE
|
||||
- CF_SWIFT_NAME
|
||||
- NS_SWIFT_NAME
|
||||
- PP_STRINGIZE
|
||||
- STRINGIZE
|
||||
WrapNamespaceBodyWithEmptyLines: Leave
|
||||
...
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# Garbage left behind on Windows
|
||||
|
||||
.vs/
|
||||
out/
|
||||
CMakeFiles/
|
||||
vcpkg_installed/
|
||||
src/resources/resources.hpp
|
||||
CMakeCache.txt
|
||||
build.ninja
|
||||
*.cmake
|
||||
*.dll
|
||||
*.log
|
||||
@@ -0,0 +1,78 @@
|
||||
cmake_minimum_required(VERSION 3.26)
|
||||
|
||||
project(SlimeVR-Bindings-Provider)
|
||||
|
||||
set(SOLARXR_PROTOCOL_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/../solarxr-protocol")
|
||||
set(FLATBUFFERS_GENERATED_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/../solarxr-protocol/protocol/cpp")
|
||||
|
||||
# These are used to determine the OpenVR library path
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(PROCESSOR_ARCH "64")
|
||||
else()
|
||||
set(PROCESSOR_ARCH "32")
|
||||
endif()
|
||||
if(WIN32)
|
||||
set(OPENVR_LIBRARY_NAME "openvr_api")
|
||||
set(OPENVR_LIBRARY_EXT "dll")
|
||||
set(PLATFORM_NAME "win")
|
||||
elseif(APPLE)
|
||||
set(OPENVR_LIBRARY_NAME "libopenvr_api")
|
||||
set(OPENVR_LIBRARY_EXT "dylib")
|
||||
set(PLATFORM_NAME "osx")
|
||||
elseif(LINUX)
|
||||
set(OPENVR_LIBRARY_NAME "libopenvr_api")
|
||||
set(OPENVR_LIBRARY_EXT "so")
|
||||
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
|
||||
set(PLATFORM_NAME "linuxarm")
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
|
||||
set(PLATFORM_NAME "linux")
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown/unsupported CPU architecture")
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown/unsupported platform")
|
||||
endif()
|
||||
|
||||
set(OPENVR_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/openvr")
|
||||
|
||||
message(STATUS "OpenVR library search path: ${OPENVR_ROOT}/lib/${PLATFORM_NAME}${PROCESSOR_ARCH}")
|
||||
find_library(OPENVR_LIBRARY NAMES openvr_api REQUIRED PATHS "${OPENVR_ROOT}/lib/${PLATFORM_NAME}${PROCESSOR_ARCH}/" NO_DEFAULT_PATH)
|
||||
message(STATUS "Found OpenVR library at: ${OPENVR_LIBRARY}")
|
||||
|
||||
add_executable("${PROJECT_NAME}"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/paths.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/logger.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/solarxr.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/vr_utils.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp"
|
||||
)
|
||||
set_target_properties("${PROJECT_NAME}" PROPERTIES CXX_STANDARD 23)
|
||||
target_include_directories("${PROJECT_NAME}" PRIVATE "${SOLARXR_PROTOCOL_ROOT}/lib/flatbuffers/include" "${SOLARXR_PROTOCOL_ROOT}/lib/flatbuffers/" "${FLATBUFFERS_GENERATED_ROOT}/include" "${CMAKE_CURRENT_SOURCE_DIR}/include" "${OPENVR_ROOT}/headers")
|
||||
target_link_libraries("${PROJECT_NAME}" PRIVATE "${OPENVR_LIBRARY}")
|
||||
|
||||
if(LINUX)
|
||||
set_target_properties("${PROJECT_NAME}" PROPERTIES OUTPUT_NAME slimevr-bindings-provider)
|
||||
endif()
|
||||
|
||||
set(OPENVR_RUNTIME_LIBRARY "${OPENVR_ROOT}/bin/${PLATFORM_NAME}${PROCESSOR_ARCH}/${OPENVR_LIBRARY_NAME}.${OPENVR_LIBRARY_EXT}")
|
||||
message(STATUS "Found OpenVR runtime library: ${OPENVR_RUNTIME_LIBRARY}")
|
||||
configure_file("${OPENVR_RUNTIME_LIBRARY}" "${CMAKE_CURRENT_BINARY_DIR}/." COPYONLY)
|
||||
|
||||
# Embed the resources into resources.hpp
|
||||
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS
|
||||
src/resources/manifest.vrmanifest
|
||||
src/resources/action_manifest.json
|
||||
src/resources/generic.json
|
||||
src/resources/knuckles.json
|
||||
src/resources/oculus_touch.json
|
||||
src/resources/vive_controller.json
|
||||
)
|
||||
file(STRINGS src/resources/manifest.vrmanifest SVR_VRAPP_MANIFEST NEWLINE_CONSUME)
|
||||
file(STRINGS src/resources/action_manifest.json SVR_VRAPP_ACTION_MANIFEST NEWLINE_CONSUME)
|
||||
file(STRINGS src/resources/generic.json SVR_VRAPP_GENERIC_BINDS NEWLINE_CONSUME)
|
||||
file(STRINGS src/resources/knuckles.json SVR_VRAPP_KNUCKLES_BINDS NEWLINE_CONSUME)
|
||||
file(STRINGS src/resources/oculus_touch.json SVR_VRAPP_OCULUS_BINDS NEWLINE_CONSUME)
|
||||
file(STRINGS src/resources/vive_controller.json SVR_VRAPP_VIVE_BINDS NEWLINE_CONSUME)
|
||||
|
||||
configure_file(src/resources/resources.hpp.in src/resources/resources.hpp @ONLY)
|
||||
target_include_directories("${PROJECT_NAME}" PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/src")
|
||||
Submodule
+1
Submodule bindings-provider/openvr added at 9182530513.
@@ -0,0 +1,21 @@
|
||||
#include "logger.hpp"
|
||||
#include "paths.hpp"
|
||||
|
||||
#ifdef _WIN32
|
||||
#define WIN32_MEAN_AND_LEAN
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
Logger::Logger()
|
||||
: log_stream(Paths::getLogPath() / "slimevr-bindings-provider.log",
|
||||
std::ios::out | std::ios::app)
|
||||
#ifdef _WIN32
|
||||
, should_log_to_std_streams(GetConsoleWindow() != nullptr)
|
||||
#endif
|
||||
{
|
||||
}
|
||||
|
||||
Logger &Logger::get() {
|
||||
static Logger logger;
|
||||
return logger;
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
#pragma once
|
||||
|
||||
#include <cassert>
|
||||
#include <chrono>
|
||||
#include <format>
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
|
||||
class Logger {
|
||||
private:
|
||||
std::ofstream log_stream;
|
||||
#ifdef _WIN32
|
||||
bool should_log_to_std_streams;
|
||||
#endif
|
||||
|
||||
template <bool important, typename... Args>
|
||||
void log(std::string_view suffix, std::format_string<Args...> fmt,
|
||||
Args &&...args) {
|
||||
auto now = std::chrono::system_clock::now();
|
||||
auto time_t = std::chrono::system_clock::to_time_t(now);
|
||||
|
||||
auto s = std::format(fmt, std::forward<Args>(args)...);
|
||||
#ifdef _WIN32
|
||||
if (should_log_to_std_streams) {
|
||||
#endif
|
||||
if constexpr (important)
|
||||
std::cerr << suffix << ' ' << s << '\n';
|
||||
else
|
||||
std::cout << suffix << ' ' << s << '\n';
|
||||
#ifdef _WIN32
|
||||
}
|
||||
#endif
|
||||
|
||||
log_stream << std::put_time(std::localtime(&time_t), "[%F %T]") //
|
||||
<< ' ' << suffix << ' ' << s << '\n';
|
||||
}
|
||||
|
||||
public:
|
||||
Logger();
|
||||
|
||||
template <typename... Args>
|
||||
void debug(std::format_string<Args...> fmt, Args &&...args) {
|
||||
#ifndef NDEBUG
|
||||
log<false>("[DEBUG]", fmt, std::forward<Args>(args)...);
|
||||
#endif
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
void info(std::format_string<Args...> fmt, Args &&...args) {
|
||||
log<false>("[INFO]", fmt, std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
void warning(std::format_string<Args...> fmt, Args &&...args) {
|
||||
log<true>("[WARN]", fmt, std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
void error(std::format_string<Args...> fmt, Args &&...args) {
|
||||
log<true>("[ERROR]", fmt, std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
void flush() {
|
||||
#ifdef _WIN32
|
||||
if (should_log_to_std_streams) {
|
||||
#endif
|
||||
std::cerr.flush();
|
||||
std::cout.flush();
|
||||
#ifdef _WIN32
|
||||
}
|
||||
#endif
|
||||
log_stream.flush();
|
||||
}
|
||||
|
||||
static Logger &get();
|
||||
};
|
||||
@@ -0,0 +1,288 @@
|
||||
#include <cassert>
|
||||
#include <csignal>
|
||||
#include <map>
|
||||
#include <optional>
|
||||
#include <thread>
|
||||
#include <tuple>
|
||||
|
||||
// These must be included before Windows.h because of some macro collisions.
|
||||
#include "flatbuffers/flatbuffers.h"
|
||||
#include "solarxr_protocol/generated/all_generated.h"
|
||||
|
||||
#include "logger.hpp"
|
||||
#include "solarxr.hpp"
|
||||
#include "vr_utils.hpp"
|
||||
|
||||
#include "openvr.h"
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
using namespace solarxr_protocol;
|
||||
|
||||
static void shutdown_vr(vr::IVRSystem *_sys) { vr::VR_Shutdown(); }
|
||||
|
||||
static void onYawReset(SolarXRConnection &conn) {
|
||||
flatbuffers::FlatBufferBuilder fbb;
|
||||
|
||||
auto resetReq = rpc::CreateResetRequest(fbb, rpc::ResetType::Yaw, 0, 0.f);
|
||||
auto msgHeader = rpc::CreateRpcMessageHeader(
|
||||
fbb, nullptr, rpc::RpcMessage::ResetRequest, resetReq.Union());
|
||||
|
||||
auto rpcMsgs = fbb.CreateVector({ msgHeader });
|
||||
auto bundle = CreateMessageBundle(fbb, 0, rpcMsgs, 0);
|
||||
fbb.Finish(bundle);
|
||||
conn.sendMsg(fbb);
|
||||
}
|
||||
static void onFullReset(SolarXRConnection &conn) {
|
||||
flatbuffers::FlatBufferBuilder fbb;
|
||||
|
||||
auto resetReq = rpc::CreateResetRequest(fbb, rpc::ResetType::Full, 0, 0.f);
|
||||
auto msgHeader = rpc::CreateRpcMessageHeader(
|
||||
fbb, nullptr, rpc::RpcMessage::ResetRequest, resetReq.Union());
|
||||
|
||||
auto rpcMsgs = fbb.CreateVector({ msgHeader });
|
||||
auto bundle = CreateMessageBundle(fbb, 0, rpcMsgs, 0);
|
||||
fbb.Finish(bundle);
|
||||
conn.sendMsg(fbb);
|
||||
}
|
||||
static void onMountingCalibration(SolarXRConnection &conn) {
|
||||
flatbuffers::FlatBufferBuilder fbb;
|
||||
|
||||
auto resetReq = rpc::CreateResetRequest(fbb, rpc::ResetType::Mounting, 0, 0.f);
|
||||
auto msgHeader = rpc::CreateRpcMessageHeader(
|
||||
fbb, nullptr, rpc::RpcMessage::ResetRequest, resetReq.Union());
|
||||
|
||||
auto rpcMsgs = fbb.CreateVector({ msgHeader });
|
||||
auto bundle = CreateMessageBundle(fbb, 0, rpcMsgs, 0);
|
||||
fbb.Finish(bundle);
|
||||
conn.sendMsg(fbb);
|
||||
}
|
||||
static void onFeetMountingCalibration(SolarXRConnection &conn) {
|
||||
flatbuffers::FlatBufferBuilder fbb;
|
||||
|
||||
auto bodyParts = fbb.CreateVector(
|
||||
{ datatypes::BodyPart::LEFT_FOOT, datatypes::BodyPart::RIGHT_FOOT });
|
||||
auto resetReq = rpc::CreateResetRequest(fbb, rpc::ResetType::Mounting, bodyParts, 0.f);
|
||||
auto msgHeader = rpc::CreateRpcMessageHeader(
|
||||
fbb, nullptr, rpc::RpcMessage::ResetRequest, resetReq.Union());
|
||||
|
||||
auto rpcMsgs = fbb.CreateVector({ msgHeader });
|
||||
auto bundle = CreateMessageBundle(fbb, 0, rpcMsgs, 0);
|
||||
fbb.Finish(bundle);
|
||||
conn.sendMsg(fbb);
|
||||
}
|
||||
static void onToggleTracking(SolarXRConnection &conn) {
|
||||
static bool shouldPause = false;
|
||||
flatbuffers::FlatBufferBuilder fbb;
|
||||
|
||||
shouldPause = !shouldPause;
|
||||
auto toggleReq = rpc::CreateSetPauseTrackingRequest(fbb, shouldPause);
|
||||
auto msgHeader = rpc::CreateRpcMessageHeader(
|
||||
fbb, nullptr, rpc::RpcMessage::SetPauseTrackingRequest,
|
||||
toggleReq.Union());
|
||||
|
||||
auto rpcMsgs = fbb.CreateVector({ msgHeader });
|
||||
auto bundle = CreateMessageBundle(fbb, 0, rpcMsgs, 0);
|
||||
fbb.Finish(bundle);
|
||||
conn.sendMsg(fbb);
|
||||
}
|
||||
|
||||
sig_atomic_t should_exit = 0;
|
||||
|
||||
static void signal_handler(int signal) {
|
||||
Logger::get().info("Received signal {}", signal);
|
||||
should_exit = 1;
|
||||
}
|
||||
|
||||
int main() {
|
||||
auto &logger = Logger::get();
|
||||
|
||||
try {
|
||||
SolarXRConnection conn;
|
||||
std::unique_ptr<vr::IVRSystem, decltype(&shutdown_vr)> sys{ nullptr,
|
||||
shutdown_vr };
|
||||
|
||||
// On vrlink, VR_Init returns
|
||||
// VRInitError_Driver_WirelessHmdNotConnected while the connection
|
||||
// is initialising, so keep calling VR_Init until it ends up
|
||||
// succeeding
|
||||
|
||||
vr::EVRInitError err{ vr::VRInitError_Driver_WirelessHmdNotConnected };
|
||||
while (err == vr::VRInitError_Driver_WirelessHmdNotConnected) {
|
||||
sys.reset(vr::VR_Init(&err, vr::VRApplication_Background));
|
||||
if (err == vr::VRInitError_Driver_WirelessHmdNotConnected)
|
||||
std::this_thread::sleep_for(500ms);
|
||||
}
|
||||
|
||||
if (sys == nullptr or err != vr::VRInitError_None) {
|
||||
logger.error("Failed to init OpenVR: {} ({})",
|
||||
vr::VR_GetVRInitErrorAsSymbol(err),
|
||||
vr::VR_GetVRInitErrorAsEnglishDescription(err));
|
||||
return 1;
|
||||
}
|
||||
|
||||
logger.info("Initialised OpenVR, HMD model '{}'",
|
||||
VRUtils::getStringProp(vr::k_unTrackedDeviceIndex_Hmd,
|
||||
vr::Prop_ModelNumber_String)
|
||||
.value_or("<unknown>"));
|
||||
|
||||
vr::IVRApplications *app = vr::VRApplications();
|
||||
vr::IVRInput *input = vr::VRInput();
|
||||
|
||||
auto [appManifestPath, actionManifestPath] = VRUtils::initialiseManifest();
|
||||
|
||||
if (auto err = app->AddApplicationManifest(appManifestPath.string().data(), true);
|
||||
err != vr::VRApplicationError_None) {
|
||||
logger.error("Failed to add application manifest: {}",
|
||||
app->GetApplicationsErrorNameFromEnum(err));
|
||||
return 1;
|
||||
}
|
||||
|
||||
// SetActionManifestPath may return IPCError if vrserver is busy and takes
|
||||
// too long to reply, so keep invoking until it succeeds
|
||||
{
|
||||
vr::EVRInputError err{};
|
||||
constexpr int max_tries = 5;
|
||||
int tries = 0;
|
||||
while ((err = input->SetActionManifestPath(
|
||||
actionManifestPath.string().data()))
|
||||
== vr::VRInputError_IPCError
|
||||
&& tries++ < max_tries) {
|
||||
logger.debug("IPC error loading action manifest, retrying ({}/{})",
|
||||
tries, max_tries);
|
||||
std::this_thread::sleep_for(20ms);
|
||||
}
|
||||
|
||||
if (err != vr::VRInputError_None) {
|
||||
logger.error("Failed to set action manifest path: {}",
|
||||
std::to_underlying(err));
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
vr::VRActionSetHandle_t action_set;
|
||||
if (auto err = input->GetActionSetHandle("/actions/main", &action_set);
|
||||
err != vr::VRInputError_None) {
|
||||
logger.error("Failed to get main action set handle: {}",
|
||||
std::to_underlying(err));
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::map<std::string, std::tuple<vr::VRActionHandle_t, std::function<void(SolarXRConnection &)>>>
|
||||
actions{
|
||||
{ "/actions/main/in/YawReset",
|
||||
std::make_tuple(vr::k_ulInvalidActionHandle, onYawReset) },
|
||||
{ "/actions/main/in/FullReset",
|
||||
std::make_tuple(vr::k_ulInvalidActionHandle, onFullReset) },
|
||||
{ "/actions/main/in/MountingCalibration",
|
||||
std::make_tuple(vr::k_ulInvalidActionHandle,
|
||||
onMountingCalibration) },
|
||||
{ "/actions/main/in/FeetMountingCalibration",
|
||||
std::make_tuple(vr::k_ulInvalidActionHandle,
|
||||
onFeetMountingCalibration) },
|
||||
{ "/actions/main/in/ToggleTracking",
|
||||
std::make_tuple(vr::k_ulInvalidActionHandle, onToggleTracking) },
|
||||
};
|
||||
|
||||
for (auto &[name, tuple] : actions) {
|
||||
auto &[handle, _] = tuple;
|
||||
if (auto err = input->GetActionHandle(name.c_str(), &handle);
|
||||
err != vr::VRInputError_None || handle == vr::k_ulInvalidActionHandle) {
|
||||
logger.warning("Failed to get action handle for action {}: {}", name,
|
||||
std::to_underlying(err));
|
||||
}
|
||||
}
|
||||
|
||||
constexpr auto interval = 1000ms / 30;
|
||||
|
||||
signal(SIGINT, signal_handler);
|
||||
signal(SIGTERM, signal_handler);
|
||||
while (!should_exit) {
|
||||
vr::VREvent_t event{};
|
||||
while (sys->PollNextEvent(&event, sizeof(event))) {
|
||||
switch (event.eventType) {
|
||||
case vr::VREvent_Quit:
|
||||
logger.info("OpenVR runtime requested quit");
|
||||
should_exit = 1;
|
||||
break;
|
||||
case vr::VREvent_Input_BindingLoadFailed: {
|
||||
auto &loadData = event.data.inputBinding;
|
||||
logger.debug("Binding load failed (ulAppContainer={} "
|
||||
"pathMessage={} pathUrl={} pathControllerType={})",
|
||||
loadData.ulAppContainer, loadData.pathMessage,
|
||||
loadData.pathUrl, loadData.pathControllerType);
|
||||
break;
|
||||
}
|
||||
case vr::VREvent_Input_BindingLoadSuccessful: {
|
||||
auto &loadData = event.data.inputBinding;
|
||||
logger.debug("Binding load successful (ulAppContainer={} "
|
||||
"pathMessage={} pathUrl={} pathControllerType={})",
|
||||
loadData.ulAppContainer, loadData.pathMessage,
|
||||
loadData.pathUrl, loadData.pathControllerType);
|
||||
break;
|
||||
}
|
||||
case vr::VREvent_Input_ActionManifestReloaded:
|
||||
logger.debug("Action manifest reloaded");
|
||||
break;
|
||||
case vr::VREvent_Input_ActionManifestLoadFailed: {
|
||||
auto &manifestData = event.data.actionManifest;
|
||||
logger.debug(
|
||||
"Action manifest load failed (pathAppKey={} pathMessage={} "
|
||||
"pathMessageParam={} pathManifestPath={})",
|
||||
manifestData.pathAppKey, manifestData.pathMessage,
|
||||
manifestData.pathMessageParam, manifestData.pathManifestPath);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!conn.connected()) {
|
||||
logger.warning("Connection to SlimeVR lost, exiting");
|
||||
break;
|
||||
}
|
||||
|
||||
vr::VRActiveActionSet_t set{
|
||||
.ulActionSet = action_set,
|
||||
.ulRestrictedToDevice = vr::k_ulInvalidInputValueHandle,
|
||||
.ulSecondaryActionSet = vr::k_ulInvalidActionSetHandle,
|
||||
.nPriority = 0,
|
||||
};
|
||||
if (auto err = input->UpdateActionState(&set, sizeof(set), 1);
|
||||
err != vr::VRInputError_None) {
|
||||
logger.warning("Error when updating action states: {}",
|
||||
std::to_underlying(err));
|
||||
}
|
||||
|
||||
for (auto &[name, tuple] : actions) {
|
||||
auto &[handle, callback] = tuple;
|
||||
vr::InputDigitalActionData_t action_data{};
|
||||
if (auto err = input->GetDigitalActionData(
|
||||
handle, &action_data, sizeof(action_data),
|
||||
vr::k_ulInvalidInputValueHandle);
|
||||
err != vr::VRInputError_None) {
|
||||
logger.warning("Failed to get action state for {} ({}): {}", name,
|
||||
handle, std::to_underlying(err));
|
||||
continue;
|
||||
}
|
||||
|
||||
if (action_data.bActive && action_data.bChanged && action_data.bState) {
|
||||
logger.debug("Action {} triggered", name);
|
||||
callback(conn);
|
||||
}
|
||||
}
|
||||
|
||||
logger.flush();
|
||||
std::this_thread::sleep_for(interval);
|
||||
}
|
||||
|
||||
logger.info("Main loop done");
|
||||
} catch (std::exception &ex) {
|
||||
logger.error("Exception in main: {}", ex.what());
|
||||
logger.flush();
|
||||
return 1;
|
||||
}
|
||||
|
||||
logger.flush();
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
#include "paths.hpp"
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
fs::path Paths::getDataPath() {
|
||||
fs::path basePath{};
|
||||
|
||||
#if defined(__linux__)
|
||||
if (const char *dataHomeOverride = getenv("XDG_DATA_HOME")) {
|
||||
basePath = dataHomeOverride;
|
||||
} else {
|
||||
const char *homeDir = getenv("HOME");
|
||||
if (homeDir == nullptr)
|
||||
throw std::runtime_error("HOME is unset");
|
||||
|
||||
basePath = fs::path(homeDir) / ".local" / "share";
|
||||
}
|
||||
#elif defined(_WIN32)
|
||||
{
|
||||
const char *appData = getenv("APPDATA");
|
||||
if (appData == nullptr)
|
||||
throw std::runtime_error("APPDATA is unset");
|
||||
|
||||
basePath = appData;
|
||||
}
|
||||
#else
|
||||
#error "Unsupported platform"
|
||||
#endif
|
||||
|
||||
return basePath / "dev.slimevr.SlimeVR";
|
||||
}
|
||||
|
||||
fs::path Paths::getLogPath() { return Paths::getDataPath() / "logs"; }
|
||||
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
namespace Paths {
|
||||
// Throws when path cannot be found
|
||||
std::filesystem::path getDataPath() noexcept(false);
|
||||
|
||||
// Throws when path cannot be found
|
||||
std::filesystem::path getLogPath() noexcept(false);
|
||||
} // namespace Paths
|
||||
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"default_bindings": [
|
||||
{
|
||||
"controller_type": "generic",
|
||||
"binding_url": "generic.json"
|
||||
},
|
||||
{
|
||||
"controller_type": "oculus_touch",
|
||||
"binding_url": "oculus_touch.json"
|
||||
},
|
||||
{
|
||||
"controller_type": "knuckles",
|
||||
"binding_url": "knuckles.json"
|
||||
},
|
||||
{
|
||||
"controller_type": "vive_controller",
|
||||
"binding_url": "vive_controller.json"
|
||||
}
|
||||
],
|
||||
"actions": [
|
||||
{
|
||||
"name": "/actions/main/in/YawReset",
|
||||
"requirement": "optional",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "/actions/main/in/FullReset",
|
||||
"requirement": "optional",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "/actions/main/in/MountingCalibration",
|
||||
"requirement": "optional",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "/actions/main/in/FeetMountingCalibration",
|
||||
"requirement": "optional",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "/actions/main/in/ToggleTracking",
|
||||
"requirement": "optional",
|
||||
"type": "boolean"
|
||||
}
|
||||
],
|
||||
"action_sets": [
|
||||
{
|
||||
"name": "/actions/main",
|
||||
"usage": "leftright"
|
||||
}
|
||||
],
|
||||
"localization": [
|
||||
{
|
||||
"language_tag": "en_us",
|
||||
"/actions/main": "Utility Bindings",
|
||||
"/actions/main/in/YawReset": "Yaw Reset",
|
||||
"/actions/main/in/FullReset": "Full Reset",
|
||||
"/actions/main/in/MountingCalibration": "Mounting Calibration",
|
||||
"/actions/main/in/FeetMountingCalibration": "Feet Mounting Calibration",
|
||||
"/actions/main/in/ToggleTracking": "Toggle Tracking"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "Default Bindings for Generic",
|
||||
"controller_type": "generic",
|
||||
"bindings": {
|
||||
"/actions/main": {
|
||||
"sources": [],
|
||||
"skeleton": [],
|
||||
"haptics": [],
|
||||
"poses": []
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "Default Bindings for Knuckles",
|
||||
"controller_type": "knuckles",
|
||||
"bindings": {
|
||||
"/actions/main": {
|
||||
"sources": [],
|
||||
"skeleton": [],
|
||||
"haptics": [],
|
||||
"poses": []
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"source": "builtin",
|
||||
"applications": [{
|
||||
"app_key": "dev.slimevr.BindingsProvider",
|
||||
"is_dashboard_overlay": false,
|
||||
"action_manifest_path": "action_manifest.json",
|
||||
"strings": {
|
||||
"en_us": {
|
||||
"name": "SlimeVR Bindings Provider",
|
||||
"description": "SlimeVR Bindings Provider"
|
||||
}
|
||||
}
|
||||
}]
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "Default Bindings for Oculus Touch",
|
||||
"controller_type": "oculus_touch",
|
||||
"bindings": {
|
||||
"/actions/main": {
|
||||
"sources": [],
|
||||
"skeleton": [],
|
||||
"haptics": [],
|
||||
"poses": []
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#cmakedefine SVR_VRAPP_MANIFEST R"(@SVR_VRAPP_MANIFEST@)"
|
||||
#cmakedefine SVR_VRAPP_ACTION_MANIFEST R"(@SVR_VRAPP_ACTION_MANIFEST@)"
|
||||
#cmakedefine SVR_VRAPP_GENERIC_BINDS R"(@SVR_VRAPP_GENERIC_BINDS@)"
|
||||
#cmakedefine SVR_VRAPP_KNUCKLES_BINDS R"(@SVR_VRAPP_KNUCKLES_BINDS@)"
|
||||
#cmakedefine SVR_VRAPP_OCULUS_BINDS R"(@SVR_VRAPP_OCULUS_BINDS@)"
|
||||
#cmakedefine SVR_VRAPP_VIVE_BINDS R"(@SVR_VRAPP_VIVE_BINDS@)"
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "Default Bindings for Vive Wands",
|
||||
"controller_type": "vive_controller",
|
||||
"bindings": {
|
||||
"/actions/main": {
|
||||
"sources": [],
|
||||
"skeleton": [],
|
||||
"haptics": [],
|
||||
"poses": []
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,163 @@
|
||||
#include "solarxr.hpp"
|
||||
#include "logger.hpp"
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
#if defined(__linux__)
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#elif defined(_WIN32)
|
||||
#include <Windows.h>
|
||||
#else
|
||||
#error "Unsupported platform"
|
||||
#endif
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
fs::path SolarXRConnection::getSocketPath() {
|
||||
using namespace std::string_view_literals;
|
||||
#if defined(__linux__)
|
||||
#define MAKE_SOCKET_PATH(PATH) \
|
||||
std::make_pair(PATH##sv, static_cast<const char *>(getenv(PATH)))
|
||||
|
||||
constexpr std::string_view socketName = "SlimeVRRpc";
|
||||
std::array<std::pair<std::string_view, const char *>, 4> socketPaths{
|
||||
MAKE_SOCKET_PATH("SLIMEVR_SOCKET_DIR"),
|
||||
MAKE_SOCKET_PATH("XDG_RUNTIME_DIR"),
|
||||
MAKE_SOCKET_PATH("TMPDIR"),
|
||||
{ "/tmp", "/tmp" }
|
||||
};
|
||||
|
||||
#undef MAKE_SOCKET_PATH
|
||||
|
||||
for (auto [name, path] : socketPaths) {
|
||||
if (path == nullptr) {
|
||||
Logger::get().info(
|
||||
"Skipping socket directory {} because it doesn't exist", name);
|
||||
continue;
|
||||
}
|
||||
fs::path socketPath = fs::path(path) / socketName;
|
||||
if (fs::exists(socketPath))
|
||||
return socketPath;
|
||||
|
||||
Logger::get().info(
|
||||
"Skipping socket directory {} because socket does not exist", name);
|
||||
}
|
||||
#elif defined(_WIN32)
|
||||
throw std::logic_error(
|
||||
"SolarXRConnection::getSocketPath should not be called on Windows");
|
||||
#else
|
||||
#error "Unsupported platform"
|
||||
#endif
|
||||
|
||||
throw std::runtime_error("Failed to find socket directory");
|
||||
}
|
||||
|
||||
SolarXRConnection::SolarXRConnection() {
|
||||
#if defined(__linux__)
|
||||
sockaddr_un addr{};
|
||||
addr.sun_family = AF_UNIX;
|
||||
strcpy(addr.sun_path, getSocketPath().string().data());
|
||||
|
||||
fd = socket(AF_UNIX, SOCK_STREAM, 0);
|
||||
if (fd == -1) {
|
||||
throw std::runtime_error(
|
||||
std::format("Failed to create listen socket: {}", strerror(errno)));
|
||||
}
|
||||
|
||||
if (connect(fd, reinterpret_cast<sockaddr *>(&addr), sizeof(addr)) == -1) {
|
||||
int e = errno;
|
||||
close(fd);
|
||||
throw std::runtime_error(std::format("Failed to connect to socket {}: {}",
|
||||
addr.sun_path, strerror(e)));
|
||||
}
|
||||
|
||||
#elif defined(_WIN32)
|
||||
const char *pipeName = R"(\\.\pipe\SlimeVRRpc)";
|
||||
if (!WaitNamedPipe(pipeName, 5000)) {
|
||||
throw std::runtime_error("Timed out waiting for pipe");
|
||||
}
|
||||
|
||||
pipe = CreateFile(pipeName, GENERIC_READ | GENERIC_WRITE, 0, nullptr,
|
||||
OPEN_EXISTING, 0, nullptr);
|
||||
if (pipe == INVALID_HANDLE_VALUE) {
|
||||
throw std::runtime_error(
|
||||
std::format("Unable to open pipe (error={})", GetLastError()));
|
||||
}
|
||||
#else
|
||||
#error "Unsupported platform"
|
||||
#endif
|
||||
}
|
||||
|
||||
SolarXRConnection::~SolarXRConnection() {
|
||||
#if defined(__linux__)
|
||||
if (fd != -1)
|
||||
close(fd);
|
||||
#elif defined(_WIN32)
|
||||
if (pipe != INVALID_HANDLE_VALUE)
|
||||
CloseHandle(pipe);
|
||||
#else
|
||||
#error "Unsupported platform"
|
||||
#endif
|
||||
}
|
||||
|
||||
bool SolarXRConnection::connected() {
|
||||
#if defined(__linux__)
|
||||
if (read(fd, nullptr, 0) == -1) {
|
||||
return !(errno == EBADF || errno == EINVAL);
|
||||
}
|
||||
|
||||
return true;
|
||||
#elif defined(_WIN32)
|
||||
if (!WriteFile(pipe, nullptr, 0, nullptr, nullptr)) {
|
||||
int err = GetLastError();
|
||||
// The documentation says it should return ERROR_BROKEN_PIPE
|
||||
// when the write-end has been closed, but it seems to actually
|
||||
// return ERROR_NO_DATA...
|
||||
return !(err == ERROR_NO_DATA || err == ERROR_BROKEN_PIPE);
|
||||
}
|
||||
|
||||
return true;
|
||||
#else
|
||||
#error "Unsupported platform"
|
||||
#endif
|
||||
}
|
||||
|
||||
void SolarXRConnection::sendMsg(flatbuffers::FlatBufferBuilder &fbb) {
|
||||
// The server expects the total size of the buffer to be written at the
|
||||
// start of the packet, including the first 4 bytes for the size
|
||||
int size = fbb.GetSize() + 4;
|
||||
// This may be wrong on mixed-endianness, but oh well...
|
||||
if constexpr (std::endian::native != std::endian::little)
|
||||
size = std::byteswap(size);
|
||||
|
||||
#if defined(__linux__)
|
||||
if (write(fd, &size, sizeof(size)) == -1) {
|
||||
Logger::get().warning("Failed to write message size to socket: {}",
|
||||
strerror(errno));
|
||||
return;
|
||||
}
|
||||
|
||||
if (write(fd, fbb.GetBufferPointer(), fbb.GetSize()) == -1) {
|
||||
Logger::get().warning("Failed to write message to socket: {}",
|
||||
strerror(errno));
|
||||
return;
|
||||
}
|
||||
#elif defined(_WIN32)
|
||||
uint8_t tempBuf[2048];
|
||||
if (fbb.GetSize() > 2048 - 4) {
|
||||
Logger::get().warning("Message is too big for temporary buffer");
|
||||
return;
|
||||
}
|
||||
|
||||
*reinterpret_cast<int *>(&tempBuf[0]) = size;
|
||||
memcpy(&tempBuf[4], fbb.GetBufferPointer(), fbb.GetSize());
|
||||
if (!WriteFile(pipe, tempBuf, fbb.GetSize() + 4, nullptr, nullptr)) {
|
||||
Logger::get().warning("Failed to write message to pipe (error={})",
|
||||
GetLastError());
|
||||
return;
|
||||
}
|
||||
#else
|
||||
#error "Unsupported platform"
|
||||
#endif
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
#if defined(_WIN32)
|
||||
#define WIN32_MEAN_AND_LEAN
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
#include "flatbuffers/flatbuffer_builder.h"
|
||||
|
||||
class SolarXRConnection {
|
||||
private:
|
||||
#if defined(__linux__)
|
||||
int fd{ -1 };
|
||||
#elif defined(_WIN32)
|
||||
HANDLE pipe{ INVALID_HANDLE_VALUE };
|
||||
#else
|
||||
#error "Unsupported platform"
|
||||
#endif
|
||||
|
||||
static std::filesystem::path getSocketPath();
|
||||
|
||||
public:
|
||||
SolarXRConnection() noexcept(false);
|
||||
|
||||
~SolarXRConnection();
|
||||
|
||||
bool connected();
|
||||
void sendMsg(flatbuffers::FlatBufferBuilder &fbb);
|
||||
};
|
||||
@@ -0,0 +1,72 @@
|
||||
#include "vr_utils.hpp"
|
||||
#include "logger.hpp"
|
||||
#include "paths.hpp"
|
||||
#include "resources/resources.hpp"
|
||||
|
||||
#include <array>
|
||||
#include <fstream>
|
||||
#include <string_view>
|
||||
#include <utility>
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
std::optional<std::string>
|
||||
VRUtils::getStringProp(vr::TrackedDeviceIndex_t deviceIndex,
|
||||
vr::ETrackedDeviceProperty prop) {
|
||||
vr::IVRSystem *sys = vr::VRSystem();
|
||||
vr::ETrackedPropertyError err{ vr::TrackedProp_Success };
|
||||
|
||||
uint32_t required_len = sys->GetStringTrackedDeviceProperty(deviceIndex, prop, nullptr, 0, &err);
|
||||
if (err != vr::TrackedProp_BufferTooSmall) {
|
||||
Logger::get().info(
|
||||
"Failed to get size of string property {} for device {}: {}",
|
||||
std::to_underlying(prop), deviceIndex,
|
||||
sys->GetPropErrorNameFromEnum(err));
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
std::string s(required_len - 1, '\0');
|
||||
sys->GetStringTrackedDeviceProperty(deviceIndex, prop, s.data(), required_len,
|
||||
&err);
|
||||
if (err != vr::TrackedProp_Success) {
|
||||
Logger::get().info("Failed to get string property {} for device {}: {}",
|
||||
std::to_underlying(prop), deviceIndex,
|
||||
sys->GetPropErrorNameFromEnum(err));
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
std::tuple<fs::path, fs::path> VRUtils::initialiseManifest() {
|
||||
fs::path manifestDir = Paths::getDataPath() / "bindings-provider";
|
||||
std::error_code ec;
|
||||
fs::create_directories(manifestDir, ec);
|
||||
if (ec) {
|
||||
throw std::runtime_error(
|
||||
std::format("Failed to create manifest folder: {}", ec.message()));
|
||||
}
|
||||
|
||||
using namespace std::string_view_literals;
|
||||
// Make sure the vrmanifest and action manifest are 1st and 2nd respectively
|
||||
// in the array
|
||||
std::array requiredFiles{
|
||||
std::make_pair("manifest.vrmanifest"sv, SVR_VRAPP_MANIFEST),
|
||||
std::make_pair("action_manifest.json"sv, SVR_VRAPP_ACTION_MANIFEST),
|
||||
std::make_pair("generic.json"sv, SVR_VRAPP_GENERIC_BINDS),
|
||||
std::make_pair("knuckles.json"sv, SVR_VRAPP_KNUCKLES_BINDS),
|
||||
std::make_pair("oculus_touch.json"sv, SVR_VRAPP_OCULUS_BINDS),
|
||||
std::make_pair("vive_controller.json"sv, SVR_VRAPP_VIVE_BINDS),
|
||||
};
|
||||
|
||||
for (auto &[name, contents] : requiredFiles) {
|
||||
fs::path path = manifestDir / name;
|
||||
if (!fs::exists(path)) {
|
||||
std::ofstream stream(path);
|
||||
stream << contents;
|
||||
}
|
||||
}
|
||||
|
||||
return { manifestDir / requiredFiles.at(0).first,
|
||||
manifestDir / requiredFiles.at(1).first };
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
|
||||
#include "openvr.h"
|
||||
|
||||
namespace VRUtils {
|
||||
std::optional<std::string> getStringProp(vr::TrackedDeviceIndex_t deviceIndex,
|
||||
vr::ETrackedDeviceProperty prop);
|
||||
|
||||
// Returns <app vrmanifest path, action manifest json path>
|
||||
std::tuple<std::filesystem::path, std::filesystem::path> initialiseManifest();
|
||||
} // namespace VRUtils
|
||||
Generated
+9
-9
@@ -5,11 +5,11 @@
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1762980239,
|
||||
"narHash": "sha256-8oNVE8TrD19ulHinjaqONf9QWCKK+w4url56cdStMpM=",
|
||||
"lastModified": 1777988971,
|
||||
"narHash": "sha256-qIoWPDs+0/8JecyYgE3gpKQxW/4bLW/gp45vow9ioCQ=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "52a2caecc898d0b46b2b905f058ccc5081f842da",
|
||||
"rev": "0678d8986be1661af6bb555f3489f2fdfc31f6ff",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -20,11 +20,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1756787288,
|
||||
"narHash": "sha256-rw/PHa1cqiePdBxhF66V7R+WAP8WekQ0mCDG4CFqT8Y=",
|
||||
"lastModified": 1777954456,
|
||||
"narHash": "sha256-hGdgeU2Nk87RAuZyYjyDjFL6LK7dAZN5RE9+hrDTkDU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d0fc30899600b9b3466ddb260fd83deb486c32f1",
|
||||
"rev": "549bd84d6279f9852cae6225e372cc67fb91a4c1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -36,11 +36,11 @@
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1761765539,
|
||||
"narHash": "sha256-b0yj6kfvO8ApcSE+QmA6mUfu8IYG6/uU28OFn4PaC8M=",
|
||||
"lastModified": 1777168982,
|
||||
"narHash": "sha256-GOkGPcboWE9BmGCRMLX3worL4EMnsnG8MyKmXNeYuhQ=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "719359f4562934ae99f5443f20aa06c2ffff91fc",
|
||||
"rev": "f5901329dade4a6ea039af1433fb087bd9c1fe14",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -6,28 +6,77 @@
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, flake-parts, ... }:
|
||||
outputs =
|
||||
inputs@{
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-parts,
|
||||
...
|
||||
}:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = [ "x86_64-linux" ];
|
||||
|
||||
perSystem = { pkgs, ... }:
|
||||
perSystem =
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
runtimeLibs = pkgs: (with pkgs; [
|
||||
jdk17
|
||||
runtimeLibs =
|
||||
pkgs:
|
||||
(with pkgs; [
|
||||
jdk17
|
||||
|
||||
alsa-lib at-spi2-atk at-spi2-core cairo cups dbus expat
|
||||
gdk-pixbuf glib gtk3 libdrm libgbm libglvnd libnotify
|
||||
libxkbcommon mesa nspr nss pango systemd vulkan-loader
|
||||
wayland xorg.libX11 xorg.libXcomposite xorg.libXdamage
|
||||
xorg.libXext xorg.libXfixes xorg.libXrandr xorg.libxcb
|
||||
xorg.libxshmfence libusb1 udev libxcrypt-legacy
|
||||
rpm fpm
|
||||
alsa-lib
|
||||
libpulseaudio
|
||||
at-spi2-atk
|
||||
at-spi2-core
|
||||
cairo
|
||||
cups
|
||||
dbus
|
||||
expat
|
||||
gdk-pixbuf
|
||||
glib
|
||||
gtk3
|
||||
libdrm
|
||||
libgbm
|
||||
libglvnd
|
||||
libnotify
|
||||
libxkbcommon
|
||||
mesa
|
||||
nspr
|
||||
nss
|
||||
pango
|
||||
systemd
|
||||
vulkan-loader
|
||||
wayland
|
||||
libX11
|
||||
libXcomposite
|
||||
libXdamage
|
||||
libXext
|
||||
libXfixes
|
||||
libXrandr
|
||||
libxcb
|
||||
libxshmfence
|
||||
libusb1
|
||||
udev
|
||||
libxcrypt-legacy
|
||||
rpm
|
||||
fpm
|
||||
|
||||
wineWow64Packages.stable
|
||||
zlib squashfsTools fakeroot libarchive icu
|
||||
nodejs_22 pnpm pkg-config python3 gcc gnumake binutils git
|
||||
pkgs.nodePackages.node-gyp-build
|
||||
]);
|
||||
wineWow64Packages.stable
|
||||
zlib
|
||||
squashfsTools
|
||||
fakeroot
|
||||
libarchive
|
||||
icu
|
||||
nodejs_22
|
||||
pnpm
|
||||
pkg-config
|
||||
python3
|
||||
gcc
|
||||
gnumake
|
||||
binutils
|
||||
git
|
||||
node-gyp-build
|
||||
]);
|
||||
|
||||
slimeShell = pkgs.buildFHSEnv {
|
||||
name = "slimevr-env";
|
||||
|
||||
@@ -20,3 +20,7 @@ buildconfigVersion=6.0.7
|
||||
# We should probably stop using grgit, see:
|
||||
# https://andrewoberstar.com/posts/2024-04-02-dont-commit-to-grgit/
|
||||
grgitVersion=5.3.3
|
||||
|
||||
# Fix gradle leaving multiple java processes running that accumulate and use multiple GBs of RAM
|
||||
# This mostly seems to affect it when running from console, and then sending a SIGINT (Ctrl + C)
|
||||
org.gradle.daemon.idletimeout=10000
|
||||
@@ -35,6 +35,10 @@ linux:
|
||||
extraFiles:
|
||||
- from: "../server/desktop/build/libs/slimevr.jar"
|
||||
to: "."
|
||||
- from: "../bindings-provider/build/linux-${arch}/slimevr-bindings-provider"
|
||||
to: "."
|
||||
- from: "../bindings-provider/build/linux-${arch}/libopenvr_api.so"
|
||||
to: "."
|
||||
- from: "./electron/resources/69-slimevr-devices.rules"
|
||||
to: "."
|
||||
icon: "./electron/resources/icons"
|
||||
@@ -59,6 +63,10 @@ win:
|
||||
- from: "../server/core/resources"
|
||||
to: "."
|
||||
filter: ["**/*"]
|
||||
- from: "../bindings-provider/build/${os}-${arch}/Release/SlimeVR-Bindings-Provider.exe"
|
||||
to: "."
|
||||
- from: "../bindings-provider/build/${os}-${arch}/openvr_api.dll"
|
||||
to: "."
|
||||
|
||||
mac:
|
||||
target: dmg
|
||||
|
||||
+16
-22
@@ -1,21 +1,15 @@
|
||||
import { defineConfig } from 'electron-vite'
|
||||
import { resolve } from 'path'
|
||||
import rendererConfig from './vite.config' // Import your existing React config
|
||||
import { defineConfig } from 'electron-vite';
|
||||
import { resolve } from 'path';
|
||||
import rendererConfig from './vite.config'; // Import your existing React config
|
||||
|
||||
export default defineConfig({
|
||||
main: {
|
||||
build: {
|
||||
rollupOptions: {
|
||||
input: resolve(__dirname, 'electron/main/index.ts'),
|
||||
external: [
|
||||
'pino',
|
||||
'pino-pretty',
|
||||
'pino-roll',
|
||||
'commander',
|
||||
'open'
|
||||
]
|
||||
}
|
||||
}
|
||||
external: ['pino', 'pino-pretty', 'pino-roll', 'commander', 'open'],
|
||||
},
|
||||
},
|
||||
},
|
||||
preload: {
|
||||
build: {
|
||||
@@ -23,12 +17,12 @@ export default defineConfig({
|
||||
input: resolve(__dirname, 'electron/preload/index.ts'),
|
||||
output: {
|
||||
format: 'cjs', // Force CJS for the preload
|
||||
entryFileNames: 'index.js' // Change back to .js
|
||||
}
|
||||
}
|
||||
}
|
||||
entryFileNames: 'index.js', // Change back to .js
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
renderer: {
|
||||
renderer: {
|
||||
...rendererConfig,
|
||||
root: '.',
|
||||
build: {
|
||||
@@ -40,8 +34,8 @@ export default defineConfig({
|
||||
transformMixedEsModules: true,
|
||||
},
|
||||
rollupOptions: {
|
||||
input: resolve(__dirname, 'index.html')
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
input: resolve(__dirname, 'index.html'),
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -1,12 +1,22 @@
|
||||
import { program } from "commander";
|
||||
import { Option, program } from "commander";
|
||||
|
||||
program
|
||||
.option('-p --path <path>', 'set launch path')
|
||||
.option('-p, --path <path>', 'set launch path')
|
||||
.option('-s, --steam', 'steam mode')
|
||||
.option('-i, --install', 'run the driver installer')
|
||||
.option(
|
||||
'--skip-server-if-running',
|
||||
'gui will not launch the server if it is already running'
|
||||
)
|
||||
.allowUnknownOption();
|
||||
.allowUnknownOption()
|
||||
// Allow passing arguments to Electron.
|
||||
.allowExcessArguments();
|
||||
|
||||
if (process.platform === "linux") {
|
||||
const noUdevOption = new Option('--no-udev', 'disable udev warning');
|
||||
noUdevOption.negate = false;
|
||||
program.addOption(noUdevOption)
|
||||
}
|
||||
|
||||
program.parse(process.argv);
|
||||
export const options = program.opts();
|
||||
+86
-36
@@ -16,26 +16,29 @@ import open from 'open';
|
||||
import trayIcon from '../resources/icons/icon.png?asset';
|
||||
import appleTrayIcon from '../resources/icons/Square30x30Logo.png?asset';
|
||||
import { readFile, stat } from 'fs/promises';
|
||||
import { pathToFileURL } from 'node:url';
|
||||
import { getPlatform, handleIpc, isPortAvailable } from './utils';
|
||||
import {
|
||||
findServerJar,
|
||||
findSystemJRE,
|
||||
getExeFolder,
|
||||
getGuiDataFolder,
|
||||
getLogsFolder,
|
||||
getServerDataFolder,
|
||||
getWindowStateFile,
|
||||
} from './paths';
|
||||
import { stores } from './store';
|
||||
import { initStores } from './store';
|
||||
import { closeLogger, logger } from './logger';
|
||||
import { writeFileSync } from 'node:fs';
|
||||
|
||||
import { spawn } from 'node:child_process';
|
||||
import { discordPresence } from './presence';
|
||||
import { options } from './cli';
|
||||
import { ServerStatusEvent } from 'electron/preload/interface';
|
||||
import { mkdir } from 'node:fs/promises';
|
||||
import { mkdir, writeFile } from 'node:fs/promises';
|
||||
import { MenuItem } from 'electron/main';
|
||||
|
||||
type Stores = Awaited<ReturnType<typeof initStores>>;
|
||||
let stores: Stores;
|
||||
|
||||
// Fixes colors looking washed on linux
|
||||
// Might affect hdr
|
||||
if (process.platform === 'linux') {
|
||||
@@ -54,6 +57,7 @@ protocol.registerSchemesAsPrivileged([
|
||||
secure: true,
|
||||
supportFetchAPI: true,
|
||||
corsEnabled: true,
|
||||
stream: true,
|
||||
},
|
||||
},
|
||||
]);
|
||||
@@ -123,11 +127,11 @@ handleIpc(IPC_CHANNELS.LOG, (e, type, ...args) => {
|
||||
|
||||
handleIpc(IPC_CHANNELS.OPEN_URL, (e, url) => {
|
||||
const allowed_urls = [
|
||||
/steam:\/\/.*/,
|
||||
/ms-settings:network$/,
|
||||
/https:\/\/.*\.slimevr\.dev.*/,
|
||||
/https:\/\/github\.com\/.*/,
|
||||
/https:\/\/discord\.gg\/slimevr$/,
|
||||
/^steam:\/\//,
|
||||
/^ms-settings:network$/,
|
||||
/^https:\/\/(?:.+\.)?slimevr\.dev(?:\/.+)?$/,
|
||||
/^https:\/\/github\.com\/SlimeVR(?:\/.+)?$/,
|
||||
/^https:\/\/discord\.gg\/slimevr$/,
|
||||
];
|
||||
if (allowed_urls.find((a) => url.match(a))) open(url);
|
||||
else logger.error({ url }, 'attempted to open non-whitelisted URL');
|
||||
@@ -150,10 +154,10 @@ handleIpc(IPC_CHANNELS.STORAGE, async (e, { type, method, key, value }) => {
|
||||
});
|
||||
|
||||
handleIpc(IPC_CHANNELS.DISCORD_PRESENCE, async (e, options) => {
|
||||
if (options.enable && !discordPresence.state.ready) {
|
||||
await discordPresence.connect();
|
||||
discordPresence.updateActivity(options.activity);
|
||||
} else if (!options.enable && discordPresence.state.ready) {
|
||||
if (options.enable) {
|
||||
if (!discordPresence.state.ready) await discordPresence.connect();
|
||||
discordPresence.updateActivity(options.activity, options.iconText);
|
||||
} else if (discordPresence.state.ready) {
|
||||
discordPresence.destroy();
|
||||
}
|
||||
});
|
||||
@@ -182,12 +186,14 @@ handleIpc(IPC_CHANNELS.GET_FOLDER, (e, folder) => {
|
||||
return getGuiDataFolder();
|
||||
case 'logs':
|
||||
return getLogsFolder();
|
||||
case 'exe':
|
||||
return getExeFolder();
|
||||
}
|
||||
});
|
||||
|
||||
const windowStateFile = await readFile(getWindowStateFile(), {
|
||||
encoding: 'utf-8',
|
||||
}).catch(() => null);
|
||||
handleIpc(IPC_CHANNELS.IS_STEAM, () => {
|
||||
return options.steam;
|
||||
});
|
||||
|
||||
const defaultWindowState: {
|
||||
width: number;
|
||||
@@ -200,7 +206,15 @@ const defaultWindowState: {
|
||||
x: undefined,
|
||||
y: undefined,
|
||||
};
|
||||
const windowState = windowStateFile ? JSON.parse(windowStateFile) : defaultWindowState;
|
||||
|
||||
const windowState = await readFile(getWindowStateFile(), {
|
||||
encoding: 'utf-8',
|
||||
})
|
||||
.then((data) => JSON.parse(data))
|
||||
.catch(() => {
|
||||
logger.error('Failed to load window state, using defaults');
|
||||
return defaultWindowState;
|
||||
});
|
||||
|
||||
const MIN_WIDTH = 393;
|
||||
const MIN_HEIGHT = 667;
|
||||
@@ -233,7 +247,9 @@ function validateWindowState(state: typeof defaultWindowState) {
|
||||
|
||||
const saveWindowState = async () => {
|
||||
await mkdir(dirname(getWindowStateFile()), { recursive: true });
|
||||
writeFileSync(getWindowStateFile(), JSON.stringify(windowState));
|
||||
await writeFile(getWindowStateFile(), JSON.stringify(windowState), {
|
||||
encoding: 'utf-8',
|
||||
});
|
||||
};
|
||||
|
||||
function createWindow() {
|
||||
@@ -269,18 +285,20 @@ function createWindow() {
|
||||
});
|
||||
|
||||
handleIpc('window-actions', (e, action) => {
|
||||
if (mainWindow === null) return;
|
||||
switch (action) {
|
||||
case 'close':
|
||||
mainWindow?.close();
|
||||
mainWindow.close();
|
||||
break;
|
||||
case 'hide':
|
||||
mainWindow?.hide();
|
||||
mainWindow.hide();
|
||||
break;
|
||||
case 'minimize':
|
||||
mainWindow?.minimize();
|
||||
mainWindow.minimize();
|
||||
break;
|
||||
case 'maximize':
|
||||
mainWindow?.maximize();
|
||||
case 'toggle-maximize':
|
||||
if (mainWindow.isMaximized()) mainWindow.unmaximize();
|
||||
else mainWindow.maximize();
|
||||
break;
|
||||
}
|
||||
});
|
||||
@@ -387,22 +405,31 @@ const spawnServer = async () => {
|
||||
'SlimeVR',
|
||||
`Couldn't find a compatible Java version, please download Java 17 or higher`
|
||||
);
|
||||
app.quit()
|
||||
app.quit();
|
||||
return;
|
||||
}
|
||||
|
||||
logger.info({ javaBin, serverJar }, 'Found Java and server jar');
|
||||
const platform = getPlatform();
|
||||
const serverWorkdir = getServerDataFolder()
|
||||
const serverProcess = spawn(javaBin, ['-Xmx128M', '-jar', serverJar, 'run'], {
|
||||
cwd: serverWorkdir,
|
||||
|
||||
const serverArgs = ['-Xmx128M', '-jar', serverJar];
|
||||
if (options.steam) serverArgs.push('--steam');
|
||||
if (options.install) serverArgs.push('--install');
|
||||
if (options.noUdev) serverArgs.push('--no-udev');
|
||||
|
||||
serverArgs.push('run');
|
||||
|
||||
const serverProcess = spawn(javaBin, serverArgs, {
|
||||
cwd: sharedDir,
|
||||
shell: false,
|
||||
env:
|
||||
platform === 'windows'
|
||||
? {
|
||||
...process.env,
|
||||
APPDATA: app.getPath('appData'),
|
||||
LOCALAPPDATA: process.env['USERPROFILE'] ? path.join(process.env['USERPROFILE'], 'AppData', 'Local') : undefined,
|
||||
LOCALAPPDATA: process.env['USERPROFILE']
|
||||
? path.join(process.env['USERPROFILE'], 'AppData', 'Local')
|
||||
: undefined,
|
||||
}
|
||||
: undefined,
|
||||
});
|
||||
@@ -424,11 +451,11 @@ const spawnServer = async () => {
|
||||
serverProcess.on('error', (err) => {
|
||||
logger.info({ err }, 'Error launching the java server');
|
||||
if (!isQuitting) app.quit();
|
||||
})
|
||||
});
|
||||
|
||||
serverProcess.on('exit', () => {
|
||||
logger.info('Server process exiting');
|
||||
})
|
||||
});
|
||||
|
||||
const exited = new Promise<void>((resolve) => serverProcess.once('exit', resolve));
|
||||
|
||||
@@ -439,16 +466,33 @@ const spawnServer = async () => {
|
||||
};
|
||||
};
|
||||
|
||||
const createFolders = async () => {
|
||||
await mkdir(getServerDataFolder(), { recursive: true });
|
||||
await mkdir(getGuiDataFolder(), { recursive: true });
|
||||
};
|
||||
|
||||
let isQuitting = false;
|
||||
|
||||
app.whenReady().then(async () => {
|
||||
// Register protocol handler for app:// scheme to handle assets with leading slashes
|
||||
protocol.handle('app', (request) => {
|
||||
const url = request.url.slice('app://'.length);
|
||||
const filePath = path.normalize(join(__dirname, '../renderer', url));
|
||||
return net.fetch('file://' + filePath);
|
||||
const { pathname } = new URL(request.url);
|
||||
const filePath = path.normalize(join(__dirname, '../renderer', pathname));
|
||||
return net.fetch(pathToFileURL(filePath).toString(), { headers: request.headers });
|
||||
});
|
||||
|
||||
try {
|
||||
await createFolders();
|
||||
} catch (err) {
|
||||
logger.error(err, 'Failed to initialize stores');
|
||||
dialog.showErrorBox(
|
||||
'SlimeVR',
|
||||
'Failed to initialize application storage. Please make sure the application has write permissions to its data folder.'
|
||||
);
|
||||
app.quit();
|
||||
return;
|
||||
}
|
||||
|
||||
stores = await initStores();
|
||||
checkEnvironmentVariables();
|
||||
const server = await spawnServer();
|
||||
|
||||
@@ -456,6 +500,12 @@ app.whenReady().then(async () => {
|
||||
|
||||
logger.info('SlimeVR started!');
|
||||
|
||||
process.on('exit', async (code) => {
|
||||
console.log(code);
|
||||
server?.close();
|
||||
await server?.waitForExit();
|
||||
});
|
||||
|
||||
app.on('window-all-closed', () => {
|
||||
app.quit();
|
||||
});
|
||||
@@ -467,8 +517,8 @@ app.whenReady().then(async () => {
|
||||
logger.info('App quitting, saving...');
|
||||
server?.close();
|
||||
await server?.waitForExit();
|
||||
stores.settings.save();
|
||||
stores.cache.save();
|
||||
await stores.settings.save();
|
||||
await stores.cache.save();
|
||||
discordPresence.destroy();
|
||||
await saveWindowState();
|
||||
await closeLogger();
|
||||
|
||||
@@ -48,12 +48,21 @@ export const getLogsFolder = () => {
|
||||
return join(getGuiDataFolder(), 'logs');
|
||||
};
|
||||
|
||||
export const getExeFolder = () => {
|
||||
return path.dirname(app.getPath('exe'));
|
||||
};
|
||||
|
||||
export const getWindowStateFile = () =>
|
||||
join(getServerDataFolder(), '.window-state.json');
|
||||
|
||||
const localJavaBin = (sharedDir: string) => {
|
||||
const jre = join(sharedDir, 'jre/bin', javaBin);
|
||||
return jre;
|
||||
const platform = getPlatform();
|
||||
switch (platform) {
|
||||
case 'macos':
|
||||
return join(sharedDir, '../../../../jre/Contents/Home/bin', javaBin);
|
||||
default:
|
||||
return join(sharedDir, 'jre/bin', javaBin);
|
||||
}
|
||||
};
|
||||
|
||||
const javaHomeBin = () => {
|
||||
@@ -112,6 +121,9 @@ export const findServerJar = () => {
|
||||
// For flatpack container
|
||||
path.resolve('/app/share/slimevr/'),
|
||||
path.resolve('/usr/share/slimevr/'),
|
||||
|
||||
// For macos on steam
|
||||
path.resolve(`${app.getPath('exe')}/../../../../`),
|
||||
];
|
||||
return paths
|
||||
.filter((p) => !!p)
|
||||
|
||||
@@ -22,24 +22,27 @@ export const richPresence = () => {
|
||||
state,
|
||||
connect: async () => {
|
||||
try {
|
||||
logger.info('Logging into Discord RPC');
|
||||
await client.login();
|
||||
} catch (e) {
|
||||
logger.error(e, 'unable to connect to discord rpc');
|
||||
logger.error(e, 'Unable to connect to Discord RPC');
|
||||
}
|
||||
},
|
||||
updateActivity: (content: string) => {
|
||||
updateActivity: (content: string, iconText: string | undefined) => {
|
||||
if (!state.ready) return;
|
||||
client.user
|
||||
?.setActivity({
|
||||
state: content,
|
||||
largeImageKey: 'icon',
|
||||
largeImageText: iconText,
|
||||
startTimestamp: state.start,
|
||||
})
|
||||
.catch((e) => {
|
||||
logger.error(e, 'unable to update rpc activity');
|
||||
logger.error(e, 'Failed to update Discord RPC activity');
|
||||
});
|
||||
},
|
||||
destroy: () => {
|
||||
logger.info('Destroying Discord RPC');
|
||||
client.destroy();
|
||||
Object.assign(state, initialState());
|
||||
},
|
||||
|
||||
+23
-20
@@ -1,4 +1,4 @@
|
||||
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
||||
import { access, mkdir, readFile, writeFile } from "fs/promises";
|
||||
import { dirname, join } from "path";
|
||||
import { logger } from "./logger";
|
||||
import { getGuiDataFolder } from "./paths";
|
||||
@@ -10,25 +10,28 @@ export class CustomStore {
|
||||
private filePath: string;
|
||||
private debounceMs: number;
|
||||
|
||||
constructor(filePath: string, debounceMs: number = 2000) {
|
||||
private constructor(filePath: string, debounceMs: number = 2000) {
|
||||
this.filePath = filePath;
|
||||
this.debounceMs = debounceMs;
|
||||
this.load();
|
||||
}
|
||||
|
||||
private load() {
|
||||
static async create(filePath: string, debounceMs: number = 2000): Promise<CustomStore> {
|
||||
const store = new CustomStore(filePath, debounceMs);
|
||||
await store.load();
|
||||
return store;
|
||||
}
|
||||
|
||||
private async load(): Promise<void> {
|
||||
try {
|
||||
if (existsSync(this.filePath)) {
|
||||
const raw = readFileSync(this.filePath, 'utf-8');
|
||||
this.data = JSON.parse(raw);
|
||||
}
|
||||
} catch (err) {
|
||||
logger.error(err, `Failed to load store at ${this.filePath}`);
|
||||
await access(this.filePath);
|
||||
const raw = await readFile(this.filePath, 'utf-8');
|
||||
this.data = JSON.parse(raw);
|
||||
} catch {
|
||||
this.data = {};
|
||||
logger.warn(`No existing store found at ${this.filePath}, starting with empty store.`);
|
||||
}
|
||||
}
|
||||
|
||||
/** Set a key and trigger the debounced auto-save */
|
||||
set(key: string, value: unknown) {
|
||||
this.data[key] = value;
|
||||
this.triggerAutoSave();
|
||||
@@ -54,14 +57,12 @@ export class CustomStore {
|
||||
}, this.debounceMs);
|
||||
}
|
||||
|
||||
save(): boolean {
|
||||
async save(): Promise<boolean> {
|
||||
try {
|
||||
if (this.saveTimeout) clearTimeout(this.saveTimeout);
|
||||
|
||||
const dir = dirname(this.filePath);
|
||||
if (!existsSync(dir)) mkdirSync(dir, { recursive: true });
|
||||
|
||||
writeFileSync(this.filePath, JSON.stringify(this.data, null, 2), 'utf-8');
|
||||
await mkdir(dirname(this.filePath), { recursive: true });
|
||||
await writeFile(this.filePath, JSON.stringify(this.data, null, 2), 'utf-8');
|
||||
return true;
|
||||
} catch (err) {
|
||||
logger.error(err, 'Save failed', this.filePath);
|
||||
@@ -70,7 +71,9 @@ export class CustomStore {
|
||||
}
|
||||
}
|
||||
|
||||
export const stores = {
|
||||
settings: new CustomStore(join(getGuiDataFolder(), 'gui-settings.dat'), 1000),
|
||||
cache: new CustomStore(join(getGuiDataFolder(), 'gui-cache.dat'), 100),
|
||||
};
|
||||
export async function initStores() {
|
||||
return {
|
||||
settings: await CustomStore.create(join(getGuiDataFolder(), 'gui-settings.dat'), 1000),
|
||||
cache: await CustomStore.create(join(getGuiDataFolder(), 'gui-cache.dat'), 100),
|
||||
};
|
||||
}
|
||||
@@ -14,7 +14,8 @@ contextBridge.exposeInMainWorld('electronAPI', {
|
||||
close: () => ipcRenderer.invoke(IPC_CHANNELS.WINDOW_ACTIONS, 'close'),
|
||||
hide: () => ipcRenderer.invoke(IPC_CHANNELS.WINDOW_ACTIONS, 'hide'),
|
||||
minimize: () => ipcRenderer.invoke(IPC_CHANNELS.WINDOW_ACTIONS, 'minimize'),
|
||||
maximize: () => ipcRenderer.invoke(IPC_CHANNELS.WINDOW_ACTIONS, 'maximize'),
|
||||
toggleMaximize: () =>
|
||||
ipcRenderer.invoke(IPC_CHANNELS.WINDOW_ACTIONS, 'toggle-maximize'),
|
||||
getStorage: async (type) => {
|
||||
return {
|
||||
get: (key) =>
|
||||
@@ -32,9 +33,19 @@ contextBridge.exposeInMainWorld('electronAPI', {
|
||||
setTranslations: () => {},
|
||||
openDialog: (options) => ipcRenderer.invoke(IPC_CHANNELS.OPEN_DIALOG, options),
|
||||
saveDialog: (options) => ipcRenderer.invoke(IPC_CHANNELS.SAVE_DIALOG, options),
|
||||
openConfigFolder: async () => ipcRenderer.invoke(IPC_CHANNELS.OPEN_FILE, await ipcRenderer.invoke(IPC_CHANNELS.GET_FOLDER, 'config')),
|
||||
openLogsFolder: async () => ipcRenderer.invoke(IPC_CHANNELS.OPEN_FILE, await ipcRenderer.invoke(IPC_CHANNELS.GET_FOLDER, 'logs')),
|
||||
openConfigFolder: async () =>
|
||||
ipcRenderer.invoke(
|
||||
IPC_CHANNELS.OPEN_FILE,
|
||||
await ipcRenderer.invoke(IPC_CHANNELS.GET_FOLDER, 'config')
|
||||
),
|
||||
openLogsFolder: async () =>
|
||||
ipcRenderer.invoke(
|
||||
IPC_CHANNELS.OPEN_FILE,
|
||||
await ipcRenderer.invoke(IPC_CHANNELS.GET_FOLDER, 'logs')
|
||||
),
|
||||
openFile: (path) => ipcRenderer.invoke(IPC_CHANNELS.OPEN_FILE, path),
|
||||
ghGet: (req) => ipcRenderer.invoke(IPC_CHANNELS.GH_FETCH, req),
|
||||
setPresence: (options) => ipcRenderer.invoke(IPC_CHANNELS.DISCORD_PRESENCE, options)
|
||||
setPresence: (options) => ipcRenderer.invoke(IPC_CHANNELS.DISCORD_PRESENCE, options),
|
||||
getInstallDir: () => ipcRenderer.invoke(IPC_CHANNELS.GET_FOLDER, 'exe'),
|
||||
isSteam: () => ipcRenderer.invoke(IPC_CHANNELS.IS_STEAM),
|
||||
} satisfies IElectronAPI);
|
||||
Vendored
+6
-2
@@ -34,7 +34,9 @@ export type GHReturn = {
|
||||
| null;
|
||||
};
|
||||
|
||||
export type DiscordPresence = { enable: false } | { enable: true, activity: string }
|
||||
export type DiscordPresence =
|
||||
| { enable: false }
|
||||
| { enable: true; activity: string; iconText: string | undefined };
|
||||
|
||||
export interface IElectronAPI {
|
||||
onServerStatus: (cb: (data: ServerStatusEvent) => void) => () => void;
|
||||
@@ -45,7 +47,7 @@ export interface IElectronAPI {
|
||||
close: () => void;
|
||||
hide: () => void;
|
||||
minimize: () => void;
|
||||
maximize: () => void;
|
||||
toggleMaximize: () => void;
|
||||
showDecorations: (decorations: boolean) => void;
|
||||
setTranslations: (translations: Record<string, string>) => void;
|
||||
i18nOverride: () => Promise<string | false>;
|
||||
@@ -56,6 +58,8 @@ export interface IElectronAPI {
|
||||
openFile: (path: string) => void;
|
||||
ghGet: <T extends GHGet>(options: T) => Promise<GHReturn[T['type']]>;
|
||||
setPresence: (options: DiscordPresence) => void;
|
||||
getInstallDir: () => Promise<string>;
|
||||
isSteam: () => Promise<boolean>;
|
||||
}
|
||||
|
||||
declare global {
|
||||
|
||||
@@ -14,24 +14,24 @@
|
||||
|
||||
## QinHeng
|
||||
# CH340
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1A86", ATTRS{idProduct}=="7522", MODE="0660", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1A86", ATTRS{idProduct}=="7523", MODE="0660", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7522", MODE="0660", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", MODE="0660", TAG+="uaccess"
|
||||
# CH341
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1A86", ATTRS{idProduct}=="5523", MODE="0660", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="5523", MODE="0660", TAG+="uaccess"
|
||||
# CH343
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1A86", ATTRS{idProduct}=="55D3", MODE="0660", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="55d3", MODE="0660", TAG+="uaccess"
|
||||
# CH9102x
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1A86", ATTRS{idProduct}=="55D4", MODE="0660", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="55d4", MODE="0660", TAG+="uaccess"
|
||||
|
||||
## Silabs
|
||||
# CP210x
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="10C4", ATTRS{idProduct}=="EA60", MODE="0660", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", MODE="0660", TAG+="uaccess"
|
||||
|
||||
## Espressif
|
||||
# ESP32-S3 / ESP32-C3 / ESP32-C5 / ESP32-C6 / ESP32-C61 / ESP32-H2 / ESP32-P4
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="303A", ATTRS{idProduct}=="1001", MODE="0660", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="303a", ATTRS{idProduct}=="1001", MODE="0660", TAG+="uaccess"
|
||||
# ESP32-S2
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="303A", ATTRS{idProduct}=="0002", MODE="0660", TAG+="uaccess"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="303a", ATTRS{idProduct}=="0002", MODE="0660", TAG+="uaccess"
|
||||
|
||||
## FTDI
|
||||
# FT232BM/L/Q, FT245BM/L/Q
|
||||
|
||||
@@ -19,13 +19,16 @@ export const IPC_CHANNELS = {
|
||||
OPEN_FILE: 'open-file',
|
||||
GET_FOLDER: 'get-folder',
|
||||
GH_FETCH: 'gh-fetch',
|
||||
DISCORD_PRESENCE: 'discord-presence'
|
||||
DISCORD_PRESENCE: 'discord-presence',
|
||||
IS_STEAM: 'is-steam',
|
||||
} as const;
|
||||
|
||||
export interface IpcInvokeMap {
|
||||
[IPC_CHANNELS.OPEN_URL]: (url: string) => void;
|
||||
[IPC_CHANNELS.OS_STATS]: () => Promise<OSStats>;
|
||||
[IPC_CHANNELS.WINDOW_ACTIONS]: (action: 'close' | 'minimize' | 'maximize' | 'hide') => void;
|
||||
[IPC_CHANNELS.WINDOW_ACTIONS]: (
|
||||
action: 'close' | 'minimize' | 'toggle-maximize' | 'hide'
|
||||
) => void;
|
||||
[IPC_CHANNELS.LOG]: (type: 'info' | 'error' | 'warn', ...args: unknown[]) => void;
|
||||
[IPC_CHANNELS.OPEN_DIALOG]: (
|
||||
options: OpenDialogOptions
|
||||
@@ -41,9 +44,10 @@ export interface IpcInvokeMap {
|
||||
value?: unknown;
|
||||
}) => Promise<unknown>;
|
||||
[IPC_CHANNELS.OPEN_FILE]: (path: string) => void;
|
||||
[IPC_CHANNELS.GET_FOLDER]: (folder: 'config' | 'logs') => string;
|
||||
[IPC_CHANNELS.GET_FOLDER]: (folder: 'config' | 'logs' | 'exe') => string;
|
||||
[IPC_CHANNELS.GH_FETCH]: <T extends GHGet>(
|
||||
options: T
|
||||
) => Promise<GHReturn[T['type']]>;
|
||||
[IPC_CHANNELS.DISCORD_PRESENCE]: (options: DiscordPresence) => void;
|
||||
[IPC_CHANNELS.IS_STEAM]: () => boolean;
|
||||
}
|
||||
+3
-1
@@ -68,8 +68,10 @@
|
||||
"dmg-license": "^1.0.11",
|
||||
"dotenv": "^16.4.5",
|
||||
"electron": "^40.3.0",
|
||||
"electron-builder": "^26.7.0",
|
||||
"electron-builder": "^26.9.0",
|
||||
"electron-vite": "^5.0.0",
|
||||
"@eslint/eslintrc": "^3.3.5",
|
||||
"@eslint/js": "^9.39.4",
|
||||
"eslint": "^9.39.1",
|
||||
"eslint-import-resolver-typescript": "^3.10.1",
|
||||
"eslint-plugin-import": "^2.32.0",
|
||||
|
||||
@@ -811,9 +811,11 @@ onboarding-setup_warning =
|
||||
onboarding-setup_warning-skip = تخطى الإعداد
|
||||
onboarding-setup_warning-cancel = متابعة الإعداد
|
||||
|
||||
## Quiz
|
||||
|
||||
|
||||
## Wi-Fi setup
|
||||
|
||||
onboarding-wifi_creds-back = العودة إلى المقدمة
|
||||
onboarding-wifi_creds-skip = تخطى إعدادات واي فاي
|
||||
onboarding-wifi_creds-submit = إرسال!
|
||||
onboarding-wifi_creds-ssid =
|
||||
@@ -849,6 +851,9 @@ onboarding-reset_tutorial-2 =
|
||||
|
||||
يجب أن تكون في وضع تزلج كما هو موضح في معالج "التثبيت التلقائي" ولديك تأخير لمدة 3 ثوانٍ (قابل للتكوين) قبل أن يتم تشغيله.
|
||||
|
||||
## Install info
|
||||
|
||||
|
||||
## Setup start
|
||||
|
||||
onboarding-home = مرحبا بكم في سلايم في ار
|
||||
|
||||
@@ -836,9 +836,11 @@ onboarding-setup_warning =
|
||||
onboarding-setup_warning-skip = Přeskočit nastavení
|
||||
onboarding-setup_warning-cancel = Pokračovat v nastavení
|
||||
|
||||
## Quiz
|
||||
|
||||
|
||||
## Wi-Fi setup
|
||||
|
||||
onboarding-wifi_creds-back = Zpět na úvod
|
||||
onboarding-wifi_creds-v2 = Trackey používající Wi-Fi
|
||||
onboarding-wifi_creds-skip = Přeskočit nastavení Wi-Fi
|
||||
onboarding-wifi_creds-submit = Odeslat!
|
||||
@@ -870,6 +872,9 @@ onboarding-reset_tutorial-1 =
|
||||
Pro tuto funkci musíte stát v základní pozici (ruce podél těla). Před provedením resetu je zde 3 sekundová prodleva (lze nastavit).
|
||||
Tímto se kompletně resetuje pozice a rotace všech vašich trackerů, což by mělo vyřešit většinu problémů.
|
||||
|
||||
## Install info
|
||||
|
||||
|
||||
## Setup start
|
||||
|
||||
onboarding-home = Vítejte ve SlimeVR
|
||||
|
||||
@@ -480,9 +480,11 @@ onboarding-setup_warning =
|
||||
onboarding-setup_warning-skip = Spring opsætning over
|
||||
onboarding-setup_warning-cancel = Fortsæt konfigurationen
|
||||
|
||||
## Quiz
|
||||
|
||||
|
||||
## Wi-Fi setup
|
||||
|
||||
onboarding-wifi_creds-back = Gå tilbage til introduktion
|
||||
onboarding-wifi_creds-skip = Spring Wi-Fi-indstillinger over
|
||||
onboarding-wifi_creds-submit = Færdig!
|
||||
onboarding-wifi_creds-ssid =
|
||||
@@ -497,6 +499,9 @@ onboarding-wifi_creds-password =
|
||||
onboarding-reset_tutorial-back = Gå tilbage til monteringskalibrering
|
||||
onboarding-reset_tutorial = Start forfra
|
||||
|
||||
## Install info
|
||||
|
||||
|
||||
## Setup start
|
||||
|
||||
onboarding-home = Velkommen til SlimeVR
|
||||
|
||||
@@ -884,9 +884,11 @@ onboarding-setup_warning = <b>Warnung:</b> Für gutes Tracking ist die Ersteinri
|
||||
onboarding-setup_warning-skip = Einrichtung überspringen
|
||||
onboarding-setup_warning-cancel = Einrichtung fortsetzen
|
||||
|
||||
## Quiz
|
||||
|
||||
|
||||
## Wi-Fi setup
|
||||
|
||||
onboarding-wifi_creds-back = Zurück zur Einführung
|
||||
onboarding-wifi_creds-v2 = Tracker mit WLAN
|
||||
onboarding-wifi_creds-skip = WLAN-Zugangsdaten überspringen
|
||||
onboarding-wifi_creds-submit = Weiter!
|
||||
@@ -925,6 +927,9 @@ onboarding-reset_tutorial-2 =
|
||||
|
||||
Sie müssen sich in einer "Skifahren"-Pose, wie im Tracker-Ausrichtung-Assistenten gezeigt wird, befinden. Nach dem Auslösen wird der Reset nach 3 Sekunden (konfigurierbar) durchgeführt.
|
||||
|
||||
## Install info
|
||||
|
||||
|
||||
## Setup start
|
||||
|
||||
onboarding-home = Willkommen zu SlimeVR
|
||||
|
||||
@@ -291,12 +291,18 @@ settings-osc-vrchat-network-trackers-feet = Πόδια
|
||||
## Setup/onboarding menu
|
||||
|
||||
|
||||
## Quiz
|
||||
|
||||
|
||||
## Wi-Fi setup
|
||||
|
||||
|
||||
## Mounting setup
|
||||
|
||||
|
||||
## Install info
|
||||
|
||||
|
||||
## Setup start
|
||||
|
||||
|
||||
|
||||
@@ -739,9 +739,11 @@ onboarding-setup_warning =
|
||||
onboarding-setup_warning-skip = skipy setup
|
||||
onboarding-setup_warning-cancel = continu setup
|
||||
|
||||
## Quiz
|
||||
|
||||
|
||||
## Wi-Fi setup
|
||||
|
||||
onboarding-wifi_creds-back = gaww bawwk to intwoduction
|
||||
onboarding-wifi_creds-skip = skipy wi-fi settiwyngs
|
||||
onboarding-wifi_creds-submit = suwbmyt!
|
||||
onboarding-wifi_creds-ssid =
|
||||
@@ -777,6 +779,9 @@ onboarding-reset_tutorial-2 =
|
||||
|
||||
u need to be on pose wike you awe skiing wike it's shown on da Pawtomatic Meownting wizawd and you have a 3 second deway (configuwabwe) befowe it gets twiggewed.
|
||||
|
||||
## Install info
|
||||
|
||||
|
||||
## Setup start
|
||||
|
||||
onboarding-home = wewcome to SwimeVR
|
||||
|
||||
@@ -524,8 +524,10 @@ settings-general-steamvr-trackers-right_hand = Right hand
|
||||
settings-general-steamvr-trackers-tracker_toggling = Automatic tracker assignment
|
||||
settings-general-steamvr-trackers-tracker_toggling-description = Automatically handles toggling SteamVR trackers on or off depending on your current tracker assignments.
|
||||
settings-general-steamvr-trackers-tracker_toggling-label = Automatic tracker assignment
|
||||
settings-general-steamvr-trackers-hands-warning = <b>Warning:</b> hand trackers will override your controllers.
|
||||
Are you sure?
|
||||
settings-general-steamvr-trackers-hands-warning = <b>Warning:</b> Enabling the SteamVR hand trackers will disable inputs from real controllers.
|
||||
This should only be enabled if you are using SlimeVR for hand tracking.
|
||||
|
||||
Are you sure you want to do this?
|
||||
settings-general-steamvr-trackers-hands-warning-cancel = Cancel
|
||||
settings-general-steamvr-trackers-hands-warning-done = Yes
|
||||
|
||||
@@ -633,6 +635,9 @@ settings-general-fk_settings-enforce_joint_constraints-correct_constraints-descr
|
||||
settings-general-fk_settings-ik = Position data
|
||||
settings-general-fk_settings-ik-use_position = Use Position data
|
||||
settings-general-fk_settings-ik-use_position-description = Enables the use of position data from trackers that provide it. When enabling this make sure to full reset and recalibrate in game.
|
||||
settings-general-fk_settings-velocity_settings = Velocity Settings
|
||||
settings-general-fk_settings-velocity_settings-description = Send derived velocity data to SteamVR. Required for Natural Locomotion support. May cause jitter in FBT.
|
||||
settings-general-fk_settings-velocity_settings-send_derived_velocity = Send derived velocity to driver
|
||||
settings-general-fk_settings-arm_fk = Arm tracking
|
||||
settings-general-fk_settings-arm_fk-description = Force arms to be tracked from the headset (HMD) even if positional hand data is available.
|
||||
settings-general-fk_settings-arm_fk-force_arms = Force arms from HMD
|
||||
@@ -669,7 +674,7 @@ settings-general-fk_settings-self_localization-description = Mocap Mode allows t
|
||||
## Gesture control settings (tracker tapping)
|
||||
settings-general-gesture_control = Gesture control
|
||||
settings-general-gesture_control-subtitle = Tap based resets
|
||||
settings-general-gesture_control-description = Allows for resets to be triggered by tapping a tracker. The tracker highest up on your torso is used for Yaw Reset, the tracker highest up on your left leg is used for Full Reset, and the tracker highest up on your right leg is used for Mounting Calibration. Taps must occur within the time limit of 0.3 seconds times the number of taps to be recognized.
|
||||
settings-general-gesture_control-description = Allows for resets to be triggered by tapping a tracker. Taps must occur within the time limit of 0.3 seconds times the number of taps to be recognized.
|
||||
# This is a unit: 3 taps, 2 taps, 1 tap
|
||||
# $amount (Number) - Amount of taps (touches to the tracker's case)
|
||||
settings-general-gesture_control-taps = { $amount ->
|
||||
@@ -685,12 +690,17 @@ settings-general-gesture_control-trackers = { $amount ->
|
||||
settings-general-gesture_control-yawResetEnabled = Enable tap to yaw reset
|
||||
settings-general-gesture_control-yawResetDelay = Yaw reset delay
|
||||
settings-general-gesture_control-yawResetTaps = Taps for yaw reset
|
||||
settings-general-gesture_control-yawResetTracker = Yaw Reset Tracker
|
||||
settings-general-gesture_control-fullResetEnabled = Enable tap to full reset
|
||||
settings-general-gesture_control-fullResetDelay = Full reset delay
|
||||
settings-general-gesture_control-fullResetTaps = Taps for full reset
|
||||
settings-general-gesture_control-fullResetTracker = Full Reset Tracker
|
||||
settings-general-gesture_control-mountingResetEnabled = Enable tap to perform mounting calibration
|
||||
settings-general-gesture_control-mountingResetDelay = Mounting calibration delay
|
||||
settings-general-gesture_control-mountingResetTaps = Taps for mounting calibration
|
||||
settings-general-gesture_control-mountingResetTracker = Mounting Reset Tracker
|
||||
settings-general-gesture_control-yawResetTracker-title = Yaw Reset Tracker
|
||||
settings-general-gesture_control-fullResetTracker-title = Full Reset Tracker
|
||||
# The number of trackers that can have higher acceleration before a tap is rejected
|
||||
settings-general-gesture_control-numberTrackersOverThreshold = Trackers over threshold
|
||||
settings-general-gesture_control-numberTrackersOverThreshold-description = Increase this value if tap detection is not working. Do not increase it above what is needed to make tap detection work as it would cause more false positives.
|
||||
@@ -934,8 +944,50 @@ onboarding-setup_warning =
|
||||
onboarding-setup_warning-skip = Skip setup
|
||||
onboarding-setup_warning-cancel = Continue setup
|
||||
|
||||
## Quiz
|
||||
onboarding-quiz_continue = Continue
|
||||
onboarding-quiz_back = Back
|
||||
|
||||
onboarding-quiz-more_sets_modal-title = Have you connected all of your trackers?
|
||||
onboarding-quiz-more_sets_modal-desc = If you have sets of different models, we can connect them right now!
|
||||
onboarding-quiz-more_sets_modal-confirm = I have connected all my trackers
|
||||
onboarding-quiz-more_sets_modal-cancel = I want to connect more trackers
|
||||
|
||||
onboarding-quiz-slimeset-title = What type of trackers are you connecting?
|
||||
onboarding-quiz-slimeset-description = If you have multiple sets, you will be asked again later in the process
|
||||
onboarding-quiz-slimeset-official-sets = Official SlimeVR Trackers
|
||||
onboarding-quiz-slimeset-thirdparty-sets = Third-party or DIY Trackers
|
||||
onboarding-quiz-slimeset-answer-regular = SlimeVR V1.0 & V1.2
|
||||
onboarding-quiz-slimeset-answer-butterfly = Butterfly
|
||||
onboarding-quiz-slimeset-answer-wifi = WiFi-based Slime
|
||||
onboarding-quiz-slimeset-answer-dongle = Dongle-based Slime
|
||||
|
||||
onboarding-quiz-usage-title = What are you using your trackers for?
|
||||
onboarding-quiz-usage-description = If you plan on using SlimeVR for multiple purposes, you can change the affected settings later.
|
||||
onboarding-quiz-usage-answer-VRC = VR Gaming (e.g. VRChat)
|
||||
onboarding-quiz-usage-answer-mocap_vtubing = Mocap and VTubing
|
||||
|
||||
onboarding-quiz-runtime-title = Do you run games via SteamVR, or on the headset itself (standalone)?
|
||||
onboarding-quiz-runtime-answer-steamvr = SteamVR
|
||||
onboarding-quiz-runtime-answer-standalone = Standalone
|
||||
|
||||
onboarding-quiz-mocap_preferences-title = Mocap Preferences
|
||||
onboarding-quiz-mocap_preferences-desc = Specify how you plan to use SlimeVR for mocap or VTubing
|
||||
onboarding-quiz-mocap_preferences-playspace-title = What is your playspace?
|
||||
onboarding-quiz-mocap_preferences-playspace-desc = If standing, SlimeVR will try to track walking movement instead of anchoring you in one spot.
|
||||
onboarding-quiz-mocap_preferences-playspace-sitting = Sitting
|
||||
onboarding-quiz-mocap_preferences-playspace-standing = Standing
|
||||
onboarding-quiz-mocap_preferences-vrm_model-title = Do you have a VRM model? (Optional)
|
||||
onboarding-quiz-mocap_preferences-vrm_model-desc = Loading a VRM model will improve tracking quality and compatibility with applications that use VMC.
|
||||
onboarding-quiz-mocap_preferences-head_tracker-title = Are you wearing a tracker or VR headset on your head?
|
||||
onboarding-quiz-mocap_preferences-head_tracker-yes = Yes
|
||||
onboarding-quiz-mocap_preferences-head_tracker-no = No
|
||||
onboarding-quiz-mocap_preferences-head_tracker_location-title = Where is your head tracker located?
|
||||
onboarding-quiz-mocap_preferences-head_tracker_location-forehead = Forehead
|
||||
onboarding-quiz-mocap_preferences-head_tracker_location-face = Face
|
||||
|
||||
## Wi-Fi setup
|
||||
onboarding-wifi_creds-back = Go back to introduction
|
||||
onboarding-wifi_creds-back-v2 = Go back
|
||||
onboarding-wifi_creds-v2 = Trackers using Wi-Fi
|
||||
# This cares about multilines
|
||||
onboarding-wifi_creds-description-v2 =
|
||||
@@ -980,6 +1032,11 @@ onboarding-reset_tutorial-2 = Tap the highlighted tracker { $taps } times to tri
|
||||
|
||||
You need to be in a pose like you are skiing as shown in the Automatic Mounting wizard, and you have a 3 second delay (configurable) before it gets triggered.
|
||||
|
||||
## Install info
|
||||
install-info_udev-rules_modal_title = Hardware udev access rules not found
|
||||
install-info_udev-rules_warning = Access rules via udev are required for serial console access & dongle connection. Paste the following command into your terminal to add the udev rules.
|
||||
install-info_udev-rules_modal_button = Close
|
||||
install-info_udev-rules_modal-dont-show-again_checkbox = Don't show again
|
||||
## Setup start
|
||||
onboarding-home = Welcome to SlimeVR
|
||||
onboarding-home-start = Let's get set up!
|
||||
@@ -1306,6 +1363,7 @@ onboarding-user_height-description = We need your height to calculate your body
|
||||
onboarding-user_height-need_head_tracker = A headset and controllers with positional tracking are required to perform the calibration.
|
||||
onboarding-user_height-calculate = Calculate my height automatically
|
||||
onboarding-user_height-next_step = Continue and save
|
||||
onboarding-user_height-prev_step = Back
|
||||
onboarding-user_height-manual-proportions = Manual Proportions
|
||||
onboarding-user_height-calibration-title = Calibration Progress
|
||||
onboarding-user_height-calibration-RECORDING_FLOOR = Touch the floor with the tip of your controller
|
||||
@@ -1468,6 +1526,7 @@ firmware_tool-flashing_step-description =
|
||||
firmware_tool-flashing_step-warning-v2 = Do not unplug or turn off the tracker during the upload process unless told to, it may make your board unusable
|
||||
firmware_tool-flashing_step-flash_more = Flash more trackers
|
||||
firmware_tool-flashing_step-exit = Exit
|
||||
firmware_tool-flashing_step-onboarding_continue = Continue
|
||||
|
||||
## firmware tool build status
|
||||
firmware_tool-build-QUEUED = Waiting to build....
|
||||
@@ -1601,8 +1660,11 @@ tracking_checklist-FULL_RESET-desc = Some trackers need a reset to be performed.
|
||||
tracking_checklist-STEAMVR_DISCONNECTED = SteamVR not running
|
||||
tracking_checklist-STEAMVR_DISCONNECTED-desc = SteamVR is not running. Are you using it for VR?
|
||||
tracking_checklist-STEAMVR_DISCONNECTED-open = Launch SteamVR
|
||||
tracking_checklist-STEAMVR_HANDS_ENABLED = Hand trackers toggled on
|
||||
tracking_checklist-STEAMVR_HANDS_ENABLED-desc = You have enabled the SteamVR virtual hand trackers. This will cause button inputs to not work in SteamVR and in games.
|
||||
tracking_checklist-STEAMVR_HANDS_ENABLED-go = Disable them
|
||||
tracking_checklist-TRACKERS_REST_CALIBRATION = Calibrate your trackers
|
||||
tracking_checklist-TRACKERS_REST_CALIBRATION-desc = You didn't perform tracker calibration. Please let your trackers (highlighted in yellow) rest on a stable surface for a few secconds.
|
||||
tracking_checklist-TRACKERS_REST_CALIBRATION-desc = You didn't perform tracker calibration. Please let your trackers (highlighted in yellow) rest on a stable surface for a few seconds.
|
||||
tracking_checklist-TRACKER_ERROR = Trackers with Errors
|
||||
tracking_checklist-TRACKER_ERROR-desc = Some of your trackers have an error. Please restart the trackers highlighted in yellow.
|
||||
tracking_checklist-VRCHAT_SETTINGS = Configure VRChat settings
|
||||
|
||||
@@ -355,6 +355,7 @@ tracker-table-column-name = Nombre
|
||||
tracker-table-column-type = Tipo
|
||||
tracker-table-column-battery = Batería
|
||||
tracker-table-column-ping = Latencia
|
||||
tracker-table-column-packet_loss = Pérdida de paquetes
|
||||
tracker-table-column-tps = TPS
|
||||
tracker-table-column-temperature = Temp. °C
|
||||
tracker-table-column-linear-acceleration = Accel. X/Y/Z
|
||||
@@ -396,33 +397,36 @@ tracker-infos-magnetometer-status-v1 =
|
||||
[ENABLED] Habilitado
|
||||
*[NOT_SUPPORTED] No soportado
|
||||
}
|
||||
tracker-infos-packet_loss = Pérdida de paquetes
|
||||
tracker-infos-packets_lost = Paquetes perdidos
|
||||
tracker-infos-packets_received = Paquetes recibidos
|
||||
|
||||
## Tracker settings
|
||||
|
||||
tracker-settings-back = Volver a la lista de sensores
|
||||
tracker-settings-title = Ajustes de los sensores
|
||||
tracker-settings-back = Volver a la lista de trackers
|
||||
tracker-settings-title = Ajustes de los trackers
|
||||
tracker-settings-assignment_section = Asignación
|
||||
tracker-settings-assignment_section-description = Parte del cuerpo asignado al sensor.
|
||||
tracker-settings-assignment_section-edit = Editar asignación
|
||||
tracker-settings-mounting_section = Posición de montura
|
||||
tracker-settings-mounting_section-description = ¿Dónde está montado el sensor?
|
||||
tracker-settings-mounting_section-description = ¿Dónde está montado el tracker?
|
||||
tracker-settings-mounting_section-edit = Editar montura
|
||||
tracker-settings-drift_compensation_section = Permitir compensación de desviación
|
||||
tracker-settings-drift_compensation_section-description = ¿Este sensor deberia compensar la desviación?
|
||||
tracker-settings-drift_compensation_section-description = ¿Este tracker debería compensar la desviación?
|
||||
tracker-settings-drift_compensation_section-edit = Permitir compensación de desviación
|
||||
tracker-settings-use_mag = Permitir el uso del magnetómetro en este tracker
|
||||
# Multiline!
|
||||
tracker-settings-use_mag-description =
|
||||
¿Debería este tracker usar el magnetómetro para reducir la desviacion cuando se permite el uso del magnetómetro? <b>¡Por favor, no apagues tu tracker mientras alternas esto!</b>
|
||||
|
||||
|
||||
Primero debes permitir el uso del magnetómetro, <magSetting>haga clic aquí para ir al ajuste</magSetting>.
|
||||
tracker-settings-use_mag-label = Permitir el uso del magnetómetro
|
||||
# The .<name> means it's an attribute and it's related to the top key.
|
||||
# In this case that is the settings for the assignment section.
|
||||
tracker-settings-name_section = Nombre del sensor
|
||||
tracker-settings-name_section = Nombre del tracker
|
||||
tracker-settings-name_section-description = Dale un apodo bonito :)
|
||||
tracker-settings-name_section-placeholder = Pata izquierda de Manteca
|
||||
tracker-settings-name_section-label = Nombre del sensor
|
||||
tracker-settings-name_section-label = Nombre del tracker
|
||||
tracker-settings-forget = Olvidar tracker
|
||||
tracker-settings-forget-description = Remueve el tracker del servidor de SlimeVR y lo previene de conectarse hasta que el servidor se reinicie. La configuración del tracker no se perderá.
|
||||
tracker-settings-forget-label = Olvidar tracker
|
||||
@@ -444,11 +448,11 @@ tracker-part_card-unassigned = Sin asignar
|
||||
|
||||
## Body assignment menu
|
||||
|
||||
body_assignment_menu = ¿Dónde quieres que esté este sensor?
|
||||
body_assignment_menu-description = Selecciona la posición donde quieres asignar este sensor. También puedes escoger administrar todos los sensores al mismo tiempo en vez de uno por uno.
|
||||
body_assignment_menu = ¿Dónde quieres que esté este tracker?
|
||||
body_assignment_menu-description = Selecciona la posición donde quieres asignar este tracker. También puedes escoger administrar todos los trackers al mismo tiempo en vez de uno por uno.
|
||||
body_assignment_menu-show_advanced_locations = Mostrar posiciones de asignación avanzadas
|
||||
body_assignment_menu-manage_trackers = Administrar todos los sensores
|
||||
body_assignment_menu-unassign_tracker = Desasignar sensor
|
||||
body_assignment_menu-manage_trackers = Administrar todos los trackers
|
||||
body_assignment_menu-unassign_tracker = Desasignar tracker
|
||||
|
||||
## Tracker assignment menu
|
||||
|
||||
@@ -457,8 +461,8 @@ body_assignment_menu-unassign_tracker = Desasignar sensor
|
||||
#
|
||||
# We are using it here because english doesn't require changing the text in each case but
|
||||
# maybe your language does.
|
||||
-tracker_selection-part = ¿Qué sensor asignar a tu
|
||||
tracker_selection_menu-NONE = ¿Qué sensor quieres que esté sin asignar?
|
||||
-tracker_selection-part = ¿Qué tracker asignar a tu
|
||||
tracker_selection_menu-NONE = ¿Qué tracker quieres que esté sin asignar?
|
||||
tracker_selection_menu-HEAD = { -tracker_selection-part } cabeza?
|
||||
tracker_selection_menu-NECK = { -tracker_selection-part } cuello?
|
||||
tracker_selection_menu-RIGHT_SHOULDER = { -tracker_selection-part } hombro derecho?
|
||||
@@ -481,8 +485,8 @@ tracker_selection_menu-LEFT_UPPER_LEG = { -tracker_selection-part } muslo izquie
|
||||
tracker_selection_menu-LEFT_LOWER_LEG = { -tracker_selection-part } tobillo izquiero?
|
||||
tracker_selection_menu-LEFT_FOOT = { -tracker_selection-part } pie izquierdo?
|
||||
tracker_selection_menu-LEFT_CONTROLLER = { -tracker_selection-part } mando izquierdo?
|
||||
tracker_selection_menu-unassigned = Sensores sin asignar
|
||||
tracker_selection_menu-assigned = Sensores asignados
|
||||
tracker_selection_menu-unassigned = Trackers sin asignar
|
||||
tracker_selection_menu-assigned = Trackers asignados
|
||||
tracker_selection_menu-dont_assign = No asignar
|
||||
# This line cares about multilines.
|
||||
# <b>text</b> means that the text should be bold.
|
||||
@@ -494,7 +498,7 @@ tracker_selection_menu-neck_warning-cancel = Cancelar
|
||||
|
||||
## Mounting menu
|
||||
|
||||
mounting_selection_menu = ¿Dónde quieres colocar el sensor?
|
||||
mounting_selection_menu = ¿Dónde quieres colocar el tracker?
|
||||
mounting_selection_menu-close = Cerrar
|
||||
|
||||
## Sidebar settings
|
||||
@@ -502,13 +506,13 @@ mounting_selection_menu-close = Cerrar
|
||||
settings-sidebar-title = Ajustes
|
||||
settings-sidebar-general = General
|
||||
settings-sidebar-steamvr = SteamVR
|
||||
settings-sidebar-tracker_mechanics = Mecánicas del sensor
|
||||
settings-sidebar-tracker_mechanics = Mecánicas del tracker
|
||||
settings-sidebar-stay_aligned = Mantente Alineado
|
||||
settings-sidebar-fk_settings = Ajustes de FK
|
||||
settings-sidebar-gesture_control = Control de gestos
|
||||
settings-sidebar-interface = Interfaz
|
||||
settings-sidebar-osc_router = Router OSC
|
||||
settings-sidebar-osc_trackers = Sensores OSC de VRChat
|
||||
settings-sidebar-osc_trackers = Trackers OSC de VRChat
|
||||
settings-sidebar-osc_vmc = VMC
|
||||
settings-sidebar-utils = Utilidades
|
||||
settings-sidebar-serial = Consola serial
|
||||
@@ -578,12 +582,12 @@ settings-general-tracker_mechanics-drift_compensation-prediction = Compensación
|
||||
# This cares about multilines
|
||||
settings-general-tracker_mechanics-drift_compensation-prediction-description =
|
||||
Predice la desviación horizontal y compensa cuando esta mas allá del rango previamente medido.
|
||||
Activa esto si el sensor esta girando continuamente en el eje horizontal.
|
||||
Activa esto si el tracker esta girando continuamente en el eje horizontal.
|
||||
settings-general-tracker_mechanics-drift_compensation-prediction-label = Compensación mediante la predicción del desvío
|
||||
settings-general-tracker_mechanics-drift_compensation_warning =
|
||||
<b>Advertencia:</b> Solo usa la compensación de desviación si necesitas reiniciar
|
||||
muy seguido (cada ~5-10 minutos).
|
||||
|
||||
|
||||
Algunos IMUs propensos a reinicios frecuentes incluyen:
|
||||
Joy-Cons, owoTrack y MPU (sin un firmware reciente).
|
||||
settings-general-tracker_mechanics-drift_compensation_warning-cancel = Cancelar
|
||||
@@ -600,6 +604,9 @@ settings-general-tracker_mechanics-use_mag_on_all_trackers-description =
|
||||
Usa el magnetómetro en todos los trackers que tienen un firmware compatible, lo que reduce la desviación en entornos magnéticos estables.
|
||||
Se puede desactivar por sensor en la configuración del sensor. <b>¡Por favor, no apagues ninguno de los trackers mientras activas esta opción!</b>
|
||||
settings-general-tracker_mechanics-use_mag_on_all_trackers-label = Usar magnetómetro en trackers
|
||||
settings-general-tracker_mechanics-trackers_over_usb = Trackers por USB
|
||||
settings-general-tracker_mechanics-trackers_over_usb-description = Permite recibir datos de trackers HID por USB. ¡Asegúrate de que los trackers conectados tengan <b>conexión por HID</b> activados!
|
||||
settings-general-tracker_mechanics-trackers_over_usb-enabled-label = Permite a los trackers HID conectarse directamente por USB
|
||||
settings-stay_aligned = Mantente Alineado
|
||||
settings-stay_aligned-description = Mantente Alineado reduce el desvío ajustando gradualmente tus trackers para calzar tus poses relajadas.
|
||||
settings-stay_aligned-setup-label = Configurar Mantente Alineado
|
||||
@@ -772,9 +779,9 @@ settings-general-interface-discord_presence-message =
|
||||
settings-interface-behavior-error_tracking = Recopilación de errores a través de Sentry.io
|
||||
settings-interface-behavior-error_tracking-description_v2 =
|
||||
<h1>Consientes a la recopilación de datos de errores anonimizados?</h1>
|
||||
|
||||
|
||||
<b>No recopilamos información personal</b> como tu dirección IP o credenciales del Wi-Fi. ¡SlimeVR respeta tu privacidad!
|
||||
|
||||
|
||||
Para proveer la mejor experiencia de usuario, recopilamos reportes de errores anonimizados, métricas de rendimiento, e información del sistema operativo. Esto nos ayuda a detectar errores y problemas con SlimeVR. Estas métricas son recopiladas a través de Sentry.io.
|
||||
settings-interface-behavior-error_tracking-label = Enviar errores a los desarrolladores
|
||||
settings-interface-behavior-bvh_directory = Carpeta para guardar grabaciones de BVH
|
||||
@@ -842,7 +849,7 @@ settings-osc-vrchat-description-v1 =
|
||||
Cambia los ajustes específicos de los trackers OSC utilizados para enviar
|
||||
datos de seguimiento a aplicaciones sin SteamVR (ej. VRChat en Quest).
|
||||
Asegúrate de activar OSC en VRChat a través del menú Acción en OSC > Activado.
|
||||
Para permitir la recepción de datos del HMD y de los mandos desde VRChat, ve a los ajustes de tu menú principal
|
||||
Para permitir la recepción de datos del HMD y de los mandos desde VRChat, ve a los ajustes de tu menú principal
|
||||
en Tracking & IK > Permitir el envío de datos OSC de seguimiento de RV de cabeza y muñeca.
|
||||
settings-osc-vrchat-enable = Habilitar
|
||||
settings-osc-vrchat-enable-description = Habilita el envio y recibo de datos.
|
||||
@@ -967,15 +974,51 @@ onboarding-setup_warning =
|
||||
onboarding-setup_warning-skip = Saltar configuración
|
||||
onboarding-setup_warning-cancel = Continuar configuración
|
||||
|
||||
## Quiz
|
||||
|
||||
onboarding-quiz_continue = Continuar
|
||||
onboarding-quiz_back = Atrás
|
||||
onboarding-quiz-more_sets_modal-title = ¿Has conectado todos tus trackers?
|
||||
onboarding-quiz-more_sets_modal-desc = Si tienes sets de diferentes modelos, ¡los podemos conectar ahora!
|
||||
onboarding-quiz-more_sets_modal-confirm = He conectado todos mis trackers
|
||||
onboarding-quiz-more_sets_modal-cancel = Quiero conectar mas trackers
|
||||
onboarding-quiz-slimeset-title = ¿Que tipo de trackers estás conectando?
|
||||
onboarding-quiz-slimeset-description = Si tienes múltiples sets, se te preguntará de nuevo más adelante en el proceso
|
||||
onboarding-quiz-slimeset-official-sets = Trackers SlimeVR Oficiales
|
||||
onboarding-quiz-slimeset-thirdparty-sets = Trackers DIY o de terceros
|
||||
onboarding-quiz-slimeset-answer-regular = SlimeVR V1.0 y V1.2
|
||||
onboarding-quiz-slimeset-answer-butterfly = Mariposa
|
||||
onboarding-quiz-usage-title = ¿Para que usas tus trackers?
|
||||
onboarding-quiz-usage-description = Si planeas usar SlimeVR para múltiples propósitos, puedes cambiar los ajustes afectados más adelante.
|
||||
onboarding-quiz-usage-answer-VRC = Juegos VR (por ejemplo, VRChat)
|
||||
onboarding-quiz-usage-answer-mocap_vtubing = Mocap y VTubing
|
||||
onboarding-quiz-runtime-title = ¿Ejecutas los juegos por SteamVR o directamente del casco (independiente)?
|
||||
onboarding-quiz-runtime-answer-steamvr = SteamVR
|
||||
onboarding-quiz-runtime-answer-standalone = Independiente
|
||||
onboarding-quiz-mocap_preferences-title = Preferencias de Mocap
|
||||
onboarding-quiz-mocap_preferences-desc = Especifica cómo planeas usar SlimeVR para mocap o VTubing
|
||||
onboarding-quiz-mocap_preferences-playspace-title = ¿Cuál es tu espacio de juego?
|
||||
onboarding-quiz-mocap_preferences-playspace-desc = Si estás de pie, SlimeVR intentará trackear el movimiento al caminar en vez de anclarte en un lugar.
|
||||
onboarding-quiz-mocap_preferences-playspace-sitting = Sentado
|
||||
onboarding-quiz-mocap_preferences-playspace-standing = De pie
|
||||
onboarding-quiz-mocap_preferences-vrm_model-title = ¿Tienes un modelo VRM? (Opcional)
|
||||
onboarding-quiz-mocap_preferences-vrm_model-desc = Cargar un modelo VRM mejorará la calidad de trackeo y la compatibilidad con aplicaciones que usan VMC.
|
||||
onboarding-quiz-mocap_preferences-head_tracker-title = ¿Tienes un tracker o un casco VR en tu cabeza?
|
||||
onboarding-quiz-mocap_preferences-head_tracker-yes = Sí
|
||||
onboarding-quiz-mocap_preferences-head_tracker-no = No
|
||||
onboarding-quiz-mocap_preferences-head_tracker_location-title = ¿Donde se encuentra el tracker de cabeza?
|
||||
onboarding-quiz-mocap_preferences-head_tracker_location-forehead = Frente
|
||||
onboarding-quiz-mocap_preferences-head_tracker_location-face = Cara
|
||||
|
||||
## Wi-Fi setup
|
||||
|
||||
onboarding-wifi_creds-back = Volver a la introducción
|
||||
onboarding-wifi_creds-back-v2 = Volver a la introducción
|
||||
onboarding-wifi_creds-v2 = Trackers utilizando Wi-Fi
|
||||
# This cares about multilines
|
||||
onboarding-wifi_creds-description-v2 =
|
||||
La mayoría de trackers (como los trackers oficiales de SlimeVR) utilizan Wi-Fi para conectar al servidor.
|
||||
Por favor utiliza las credenciales de la red Wi-Fi donde tu dispositivo esta actualmente conectado.
|
||||
|
||||
|
||||
¡Asegúrate de utilizar una conexión Wi-Fi 2.4Ghz para tus trackers!
|
||||
onboarding-wifi_creds-skip = Saltar ajustes de Wi-Fi
|
||||
onboarding-wifi_creds-submit = ¡Enviar!
|
||||
@@ -1000,22 +1043,27 @@ onboarding-reset_tutorial-skip = Saltar paso
|
||||
# Cares about multiline
|
||||
onboarding-reset_tutorial-0 =
|
||||
Toca { $taps } veces el tracker resaltado para activar el reinicio horizontal.
|
||||
|
||||
|
||||
Esto va a hacer que tus sensores miren para la misma dirección que tu HMD.
|
||||
# Cares about multiline
|
||||
onboarding-reset_tutorial-1 =
|
||||
Toca { $taps } veces el tracker resaltado para activar el reinicio completo.
|
||||
|
||||
|
||||
Se requiere que estés de pie (pose en i). Esto tiene una demora de 3 segundos (configurable) antes de que realmente suceda.
|
||||
Esto reinicia completamente la posición y rotación de todos tus trackers. Debería de arreglar la mayoría de los problemas.
|
||||
# Cares about multiline
|
||||
onboarding-reset_tutorial-2 =
|
||||
Toca { $taps } veces el tracker resaltado para activar el reinicio de montura.
|
||||
|
||||
|
||||
El reinicio de montura ayuda en como tus sensores están puestos en tu cuerpo, ya que si los movistes o cambiaste para donde están orientados bastante, esto debería de ayudar.
|
||||
|
||||
|
||||
Requiere que estas en una pose como que estás esquiando, como se muestra en el tutorial de montura automática y tenes un retraso de 3 segundos (configurable) antes de que actualmente suceda.
|
||||
|
||||
## Install info
|
||||
|
||||
install-info_udev-rules_modal_button = Cerrar
|
||||
install-info_udev-rules_modal-dont-show-again_checkbox = No mostrar de nuevo
|
||||
|
||||
## Setup start
|
||||
|
||||
onboarding-home = Bienvenido a SlimeVR
|
||||
@@ -1359,6 +1407,7 @@ onboarding-user_height-description = Necesitamos tu altura para calcular tus pro
|
||||
onboarding-user_height-need_head_tracker = Un casco y controles con rastreo posicional son requeridos para realizar la calibración.
|
||||
onboarding-user_height-calculate = Calcular mi altura automáticamente
|
||||
onboarding-user_height-next_step = Continuar y guardar
|
||||
onboarding-user_height-prev_step = Atrás
|
||||
onboarding-user_height-manual-proportions = Proporciones Manuales
|
||||
onboarding-user_height-calibration-title = Progreso de Calibración
|
||||
onboarding-user_height-calibration-RECORDING_FLOOR = Toca el suelo con la punta de tu control
|
||||
@@ -1412,6 +1461,7 @@ onboarding-stay_aligned-previous_step = Atrás
|
||||
onboarding-stay_aligned-next_step = Siguiente
|
||||
onboarding-stay_aligned-restart = Reiniciar
|
||||
onboarding-stay_aligned-done = Hecho
|
||||
onboarding-stay_aligned-manual_mounting-done = Hecho
|
||||
|
||||
## Home
|
||||
|
||||
@@ -1462,6 +1512,9 @@ firmware_tool-select_source-firmware = Fuente del Firmware
|
||||
firmware_tool-select_source-version = Versión del Firmware
|
||||
firmware_tool-select_source-official = Oficial
|
||||
firmware_tool-select_source-dev = Desarrollo
|
||||
firmware_tool-select_source-not_selected = Ninguna fuente seleccionada
|
||||
firmware_tool-select_source-no_boards = No hay placas disponibles para esta fuente
|
||||
firmware_tool-select_source-no_versions = No hay versiones disponibles para esta fuente
|
||||
firmware_tool-board_defaults = Configura tu placa
|
||||
firmware_tool-board_defaults-description = Establece los pines o ajustes relativos a tu hardware
|
||||
firmware_tool-board_defaults-add = Añadir
|
||||
@@ -1488,7 +1541,7 @@ firmware_tool-flashbtn_step-board_SLIMEVR-r12-v2 = Enciende el tracker mientras
|
||||
firmware_tool-flashbtn_step-board_SLIMEVR-r14-v2 = Enciende el tracker mientras pulsas el botón FLASH en la parte superior de la placa. El LED del tracker deberia hacer un parpadeo breve.
|
||||
firmware_tool-flashbtn_step-board_OTHER =
|
||||
Antes de flashear, probablemente tendrá que poner el sensor en modo bootloader.
|
||||
La mayoría de las veces, esto significa presionar el botón de boot en la placa antes de que comience el proceso de flasheo. Si el proceso de flasheo se agota al comienzo, probablemente significa que el sensor no estaba en modo bootloader.
|
||||
La mayoría de las veces, esto significa presionar el botón de boot en la placa antes de que comience el proceso de flasheo. Si el proceso de flasheo se agota al comienzo, probablemente significa que el sensor no estaba en modo bootloader.
|
||||
Por favor, consulte las instrucciones de flasheo de su placa para saber cómo activar el modo bootloader.
|
||||
firmware_tool-flash_method_ota-title = Flashear por Wi-Fi
|
||||
firmware_tool-flash_method_ota-devices = Dispositivos OTA detectados:
|
||||
@@ -1505,6 +1558,7 @@ firmware_tool-flashing_step-description = Sus trackers se están flasheando, por
|
||||
firmware_tool-flashing_step-warning-v2 = No desconectes o apagues el tracker durante el proceso de subida a menos que se te indique, puede causar que tu placa quede inutilizable.
|
||||
firmware_tool-flashing_step-flash_more = Flashear más sensores
|
||||
firmware_tool-flashing_step-exit = Salir
|
||||
firmware_tool-flashing_step-onboarding_continue = Continuar
|
||||
|
||||
## firmware tool build status
|
||||
|
||||
@@ -1560,7 +1614,7 @@ tray_or_exit_modal-title = ¿Que debería hacer el botón de cerrar?
|
||||
# Multiline text
|
||||
tray_or_exit_modal-description =
|
||||
Esto te deja escoger si quieres cerrar el servidor o minimizarlo a la bandeja cuando se presiona el botón de cerrar.
|
||||
|
||||
|
||||
¡Puedes cambiar esto luego en los ajustes de la interfaz!
|
||||
tray_or_exit_modal-radio-exit = Salir al cerrar
|
||||
tray_or_exit_modal-radio-tray = Minimizar a la bandeja del sistema
|
||||
@@ -1621,7 +1675,7 @@ vrc_config-avatar_measurement_type-ARM_SPAN = Longitud del brazo
|
||||
error_collection_modal-title = ¿Podemos recopilar errores?
|
||||
error_collection_modal-description_v2 =
|
||||
{ settings-interface-behavior-error_tracking-description_v2 }
|
||||
|
||||
|
||||
Tu puedes cambiar esta configuración más tarde en la sección de comportamiento de la pagina de configuración.
|
||||
error_collection_modal-confirm = Acepto
|
||||
error_collection_modal-cancel = No quiero
|
||||
@@ -1646,6 +1700,9 @@ tracking_checklist-FULL_RESET-desc = Algunos trackers necesitan realizar un rein
|
||||
tracking_checklist-STEAMVR_DISCONNECTED = SteamVR no se está ejecutando
|
||||
tracking_checklist-STEAMVR_DISCONNECTED-desc = SteamVR no se esta ejecutando. ¿Lo estas usando para VR?
|
||||
tracking_checklist-STEAMVR_DISCONNECTED-open = Abrir SteamVR
|
||||
tracking_checklist-STEAMVR_HANDS_ENABLED = Trackers de mano activados
|
||||
tracking_checklist-STEAMVR_HANDS_ENABLED-desc = Has activado los trackers de mano virtuales de SteamVR. Esto causará que los botones no funcionarán en SteamVR ni en juegos.
|
||||
tracking_checklist-STEAMVR_HANDS_ENABLED-go = Desactívalos
|
||||
tracking_checklist-TRACKERS_REST_CALIBRATION = Calibra tus trackers
|
||||
tracking_checklist-TRACKERS_REST_CALIBRATION-desc = No realizaste una calibración para los trackers. Por favor deja reposar tus trackers (resaltados en amarillo) en una superficie estable por unos segundos.
|
||||
tracking_checklist-TRACKER_ERROR = Trackers con Errores
|
||||
|
||||
@@ -904,9 +904,11 @@ onboarding-setup_warning =
|
||||
onboarding-setup_warning-skip = Omitir configuración
|
||||
onboarding-setup_warning-cancel = Continuar con la configuración
|
||||
|
||||
## Quiz
|
||||
|
||||
|
||||
## Wi-Fi setup
|
||||
|
||||
onboarding-wifi_creds-back = Volver a la introducción
|
||||
onboarding-wifi_creds-skip = Omitir configuración Wi-Fi
|
||||
onboarding-wifi_creds-submit = ¡Enviar!
|
||||
onboarding-wifi_creds-ssid =
|
||||
@@ -942,6 +944,9 @@ onboarding-reset_tutorial-2 =
|
||||
|
||||
Necesitas estar en una pose como si estuvieras esquiando como se muestra en el asistente de montaje automático y tienes un retraso de 3 segundos (configurable) antes de que se active.
|
||||
|
||||
## Install info
|
||||
|
||||
|
||||
## Setup start
|
||||
|
||||
onboarding-home = Bienvenido a SlimeVR
|
||||
|
||||
@@ -556,9 +556,11 @@ onboarding-setup_warning =
|
||||
onboarding-setup_warning-skip = Jäta seadistamine vahele
|
||||
onboarding-setup_warning-cancel = Jätka seadistamist
|
||||
|
||||
## Quiz
|
||||
|
||||
|
||||
## Wi-Fi setup
|
||||
|
||||
onboarding-wifi_creds-back = Mine tagasi juhistele
|
||||
onboarding-wifi_creds-skip = Jätke Wi-Fi seaded vahele.
|
||||
onboarding-wifi_creds-submit = Jätka!
|
||||
onboarding-wifi_creds-ssid =
|
||||
@@ -593,6 +595,9 @@ onboarding-reset_tutorial-2 =
|
||||
|
||||
Peate olema poosis, nagu suusatate, nagu see on näidatud automaatse paigaldamise viisardil, ja teil on 3-sekundiline viivitus (konfigureeritav), enne kui see käivitub.
|
||||
|
||||
## Install info
|
||||
|
||||
|
||||
## Setup start
|
||||
|
||||
onboarding-home = Tere tulemast SlimeVR-i
|
||||
|
||||
@@ -589,9 +589,11 @@ onboarding-setup_warning =
|
||||
onboarding-setup_warning-skip = Ohita asennus
|
||||
onboarding-setup_warning-cancel = Jatka asennusta
|
||||
|
||||
## Quiz
|
||||
|
||||
|
||||
## Wi-Fi setup
|
||||
|
||||
onboarding-wifi_creds-back = Palaa esittelyyn
|
||||
onboarding-wifi_creds-skip = Ohita Wi-Fi-asetukset
|
||||
onboarding-wifi_creds-submit = Lähetä!
|
||||
onboarding-wifi_creds-ssid =
|
||||
@@ -626,6 +628,9 @@ onboarding-reset_tutorial-2 =
|
||||
|
||||
Sinun on oltava hiihto-asennossa, kuten on näytettynä Automaattisessa Asennuksessa ja sinulla on 3 sekunnin viive (muokattavissa), ennen kuin se käynnistyy.
|
||||
|
||||
## Install info
|
||||
|
||||
|
||||
## Setup start
|
||||
|
||||
onboarding-home = Tervetuloa SlimeVR:ään
|
||||
|
||||
@@ -971,9 +971,11 @@ onboarding-setup_warning =
|
||||
onboarding-setup_warning-skip = Passer la configuration
|
||||
onboarding-setup_warning-cancel = Continuer la configuration
|
||||
|
||||
## Quiz
|
||||
|
||||
|
||||
## Wi-Fi setup
|
||||
|
||||
onboarding-wifi_creds-back = Retour à l'introduction
|
||||
onboarding-wifi_creds-v2 = Capteurs utilisant le Wi-Fi
|
||||
# This cares about multilines
|
||||
onboarding-wifi_creds-description-v2 =
|
||||
@@ -1020,6 +1022,9 @@ onboarding-reset_tutorial-2 =
|
||||
|
||||
Accroupissez-vous dans une position de « ski » comme affiché sur l'assistant d'alignement des capteurs. Vous aurez un délai de 3 secondes (configurable) avant la réinitialisation.
|
||||
|
||||
## Install info
|
||||
|
||||
|
||||
## Setup start
|
||||
|
||||
onboarding-home = Bienvenue sur SlimeVR
|
||||
|
||||
@@ -291,12 +291,18 @@ settings-osc-vrchat-network-trackers-elbows = מרפקים
|
||||
## Setup/onboarding menu
|
||||
|
||||
|
||||
## Quiz
|
||||
|
||||
|
||||
## Wi-Fi setup
|
||||
|
||||
|
||||
## Mounting setup
|
||||
|
||||
|
||||
## Install info
|
||||
|
||||
|
||||
## Setup start
|
||||
|
||||
|
||||
|
||||
@@ -907,9 +907,11 @@ onboarding-setup_warning =
|
||||
onboarding-setup_warning-skip = Salta la configurazione
|
||||
onboarding-setup_warning-cancel = Continua la configurazione
|
||||
|
||||
## Quiz
|
||||
|
||||
|
||||
## Wi-Fi setup
|
||||
|
||||
onboarding-wifi_creds-back = Torna all'introduzione
|
||||
onboarding-wifi_creds-skip = Salta impostazioni Wi-Fi
|
||||
onboarding-wifi_creds-submit = Conferma!
|
||||
onboarding-wifi_creds-ssid =
|
||||
@@ -945,6 +947,9 @@ onboarding-reset_tutorial-2 =
|
||||
|
||||
Devi essere in posa come se stessi sciando come mostrato nella procedura guidata di posizionamento automatico e ha un ritardo di 3 secondi (configurabile) prima che venga attivato.
|
||||
|
||||
## Install info
|
||||
|
||||
|
||||
## Setup start
|
||||
|
||||
onboarding-home = Benvenuti a SlimeVR
|
||||
|
||||
@@ -574,9 +574,11 @@ onboarding-wip = 実行中
|
||||
onboarding-setup_warning-skip = セットアップをスキップする
|
||||
onboarding-setup_warning-cancel = セットアップを続行する
|
||||
|
||||
## Quiz
|
||||
|
||||
|
||||
## Wi-Fi setup
|
||||
|
||||
onboarding-wifi_creds-back = 戻る
|
||||
onboarding-wifi_creds-skip = Wi-Fi設定をスキップする
|
||||
onboarding-wifi_creds-submit = 実行!
|
||||
onboarding-wifi_creds-ssid =
|
||||
@@ -592,6 +594,9 @@ onboarding-reset_tutorial-back = マウントキャリブレーションに戻
|
||||
onboarding-reset_tutorial = リセットチュートリアル
|
||||
onboarding-reset_tutorial-skip = ステップをスキップする
|
||||
|
||||
## Install info
|
||||
|
||||
|
||||
## Setup start
|
||||
|
||||
onboarding-home = SlimeVRへようこそ
|
||||
|
||||
@@ -740,9 +740,11 @@ onboarding-setup_warning =
|
||||
onboarding-setup_warning-skip = 설정 건너뛰기
|
||||
onboarding-setup_warning-cancel = 설정 계속하기
|
||||
|
||||
## Quiz
|
||||
|
||||
|
||||
## Wi-Fi setup
|
||||
|
||||
onboarding-wifi_creds-back = 처음으로 돌아가기
|
||||
onboarding-wifi_creds-skip = Wi-Fi 설정 건너뛰기
|
||||
onboarding-wifi_creds-submit = 저장!
|
||||
onboarding-wifi_creds-ssid =
|
||||
@@ -778,6 +780,9 @@ onboarding-reset_tutorial-2 =
|
||||
|
||||
자동 착용 방향 설정 마법사에서 봤던 것처럼 스키를 타는 듯한 자세로 몸을 구부리고 있으세요. 탭한 다음 3초 뒤에(설정에서 변경 가능) 보정이 시작될 거예요.
|
||||
|
||||
## Install info
|
||||
|
||||
|
||||
## Setup start
|
||||
|
||||
onboarding-home = SlimeVR에 어서오세요!
|
||||
|
||||
@@ -609,12 +609,18 @@ settings-general-gesture_control-trackers =
|
||||
## Setup/onboarding menu
|
||||
|
||||
|
||||
## Quiz
|
||||
|
||||
|
||||
## Wi-Fi setup
|
||||
|
||||
|
||||
## Mounting setup
|
||||
|
||||
|
||||
## Install info
|
||||
|
||||
|
||||
## Setup start
|
||||
|
||||
|
||||
|
||||
@@ -494,9 +494,11 @@ onboarding-skip = Hopp over oppsett
|
||||
onboarding-continue = Fortsett
|
||||
onboarding-wip = Arbeid pågår
|
||||
|
||||
## Quiz
|
||||
|
||||
|
||||
## Wi-Fi setup
|
||||
|
||||
onboarding-wifi_creds-back = Gå tilbake til introduksjonen
|
||||
onboarding-wifi_creds-skip = Hopp over Wi-Fi innstillinger
|
||||
onboarding-wifi_creds-submit = Send inn!
|
||||
onboarding-wifi_creds-ssid =
|
||||
@@ -512,6 +514,9 @@ onboarding-reset_tutorial-back = Gå tilbake til monterings kalibrering
|
||||
onboarding-reset_tutorial = Nullstill opplæringen
|
||||
onboarding-reset_tutorial-skip = Hopp over trinn
|
||||
|
||||
## Install info
|
||||
|
||||
|
||||
## Setup start
|
||||
|
||||
onboarding-home = Velkommen til SlimeVR
|
||||
|
||||
@@ -962,9 +962,11 @@ onboarding-setup_warning =
|
||||
onboarding-setup_warning-skip = Setupgids overslaan
|
||||
onboarding-setup_warning-cancel = Doorgaan met setupgids
|
||||
|
||||
## Quiz
|
||||
|
||||
|
||||
## Wi-Fi setup
|
||||
|
||||
onboarding-wifi_creds-back = Ga terug naar de introductie
|
||||
onboarding-wifi_creds-v2 = Trackers die Wi-Fi gebruiken
|
||||
# This cares about multilines
|
||||
onboarding-wifi_creds-description-v2 =
|
||||
@@ -1011,6 +1013,9 @@ onboarding-reset_tutorial-2 =
|
||||
|
||||
Je moet in een houding staan alsof je aan het skiën bent, zoals wordt weergegeven in de Automatische montage wizard, je hebt een vertraging van 3 seconden (instelbaar) voordat deze wordt geactiveerd.
|
||||
|
||||
## Install info
|
||||
|
||||
|
||||
## Setup start
|
||||
|
||||
onboarding-home = Welkom bij SlimeVR
|
||||
|
||||
@@ -960,9 +960,11 @@ onboarding-setup_warning =
|
||||
onboarding-setup_warning-skip = Pomiń konfigurację
|
||||
onboarding-setup_warning-cancel = Kontynuuj konfigurację
|
||||
|
||||
## Quiz
|
||||
|
||||
|
||||
## Wi-Fi setup
|
||||
|
||||
onboarding-wifi_creds-back = Cofnij się do początku
|
||||
onboarding-wifi_creds-skip = Pomiń ustawienia Wi-Fi
|
||||
onboarding-wifi_creds-submit = Potwierdź!
|
||||
onboarding-wifi_creds-ssid =
|
||||
@@ -998,6 +1000,9 @@ onboarding-reset_tutorial-2 =
|
||||
|
||||
Musisz być w pozie, jakbyś jechał na nartach, tak jak jest to pokazane w kreatorze automatycznego montażu, i masz 3-sekundowe opóźnienie (konfigurowalne), zanim zostanie uruchomione.
|
||||
|
||||
## Install info
|
||||
|
||||
|
||||
## Setup start
|
||||
|
||||
onboarding-home = Witamy w SlimeVR
|
||||
|
||||
@@ -654,6 +654,8 @@ settings-general-fk_settings-enforce_joint_constraints-correct_constraints-descr
|
||||
settings-general-fk_settings-ik = Dados de posição
|
||||
settings-general-fk_settings-ik-use_position = Usar dados de posição
|
||||
settings-general-fk_settings-ik-use_position-description = Ativa o uso de dados de posição dos trackers que os fornecem. Ao ativar isso, certifique-se de executar "Redefinir Tudo" e recalibrar no jogo.
|
||||
settings-general-fk_settings-velocity_settings = Configurações de Velocidade
|
||||
settings-general-fk_settings-velocity_settings-description = Envia dados de velocidade derivados para o SteamVR. Necessário para suporte ao Natural Locomotion. Pode causar instabilidade no FBT.
|
||||
settings-general-fk_settings-arm_fk = Rastreamento dos braços
|
||||
settings-general-fk_settings-arm_fk-description = Forçar o rastreamento dos braços a partir do headset (HMD), mesmo que dados posicionais das mãos estejam disponíveis.
|
||||
settings-general-fk_settings-arm_fk-force_arms = Forçar braços do HMD
|
||||
@@ -970,9 +972,47 @@ onboarding-setup_warning =
|
||||
onboarding-setup_warning-skip = Pular configurações
|
||||
onboarding-setup_warning-cancel = Continuar configurações
|
||||
|
||||
## Quiz
|
||||
|
||||
onboarding-quiz_continue = Continuar
|
||||
onboarding-quiz_back = Voltar
|
||||
onboarding-quiz-more_sets_modal-title = Você conectou todos os seus trackers?
|
||||
onboarding-quiz-more_sets_modal-desc = Se você tiver conjuntos de modelos diferentes, podemos conectá-los agora mesmo!
|
||||
onboarding-quiz-more_sets_modal-confirm = Eu conectei todos os meus trackers
|
||||
onboarding-quiz-more_sets_modal-cancel = Quero conectar mais trackers
|
||||
onboarding-quiz-slimeset-title = Que tipo de trackers você está conectando?
|
||||
onboarding-quiz-slimeset-description = Se você tiver vários conjuntos, você será solicitado novamente mais tarde no processo
|
||||
onboarding-quiz-slimeset-official-sets = Trackers Oficiais do SlimeVR
|
||||
onboarding-quiz-slimeset-thirdparty-sets = Trackers de Terceiros ou Feitos por Você.
|
||||
onboarding-quiz-slimeset-answer-regular = SlimeVR V1.0 e V1.2
|
||||
onboarding-quiz-slimeset-answer-butterfly = Butterfly
|
||||
onboarding-quiz-slimeset-answer-wifi = Slime baseado em Wi-Fi
|
||||
onboarding-quiz-slimeset-answer-dongle = Slime baseado em Dongle
|
||||
onboarding-quiz-usage-title = Para que você está usando seus trackers?
|
||||
onboarding-quiz-usage-description = Se você pretende usar o SlimeVR para múltiplas finalidades, você pode alterar as configurações afetadas mais tarde.
|
||||
onboarding-quiz-usage-answer-VRC = Jogos em VR (ex.: VRChat)
|
||||
onboarding-quiz-usage-answer-mocap_vtubing = Mocap e VTubing
|
||||
onboarding-quiz-runtime-title = Você executa jogos via SteamVR ou diretamente no headset (standalone)?
|
||||
onboarding-quiz-runtime-answer-steamvr = SteamVR
|
||||
onboarding-quiz-runtime-answer-standalone = Standalone
|
||||
onboarding-quiz-mocap_preferences-title = Preferências de Mocap
|
||||
onboarding-quiz-mocap_preferences-desc = Especifique como você pretende usar o SlimeVR para mocap ou VTubing
|
||||
onboarding-quiz-mocap_preferences-playspace-title = Qual é o seu espaço de jogo?
|
||||
onboarding-quiz-mocap_preferences-playspace-desc = Se estiver em pé, o SlimeVR tentará rastrear o movimento de caminhada em vez de manter você ancorado em um único lugar.
|
||||
onboarding-quiz-mocap_preferences-playspace-sitting = Sentado
|
||||
onboarding-quiz-mocap_preferences-playspace-standing = Em Pé
|
||||
onboarding-quiz-mocap_preferences-vrm_model-title = Você tem um modelo VRM? (Opcional)
|
||||
onboarding-quiz-mocap_preferences-vrm_model-desc = Carregar um modelo VRM melhorará a qualidade do rastreamento e a compatibilidade com aplicativos que usam VMC.
|
||||
onboarding-quiz-mocap_preferences-head_tracker-title = Você está usando um tracker ou um headset VR na cabeça?
|
||||
onboarding-quiz-mocap_preferences-head_tracker-yes = Sim
|
||||
onboarding-quiz-mocap_preferences-head_tracker-no = Não
|
||||
onboarding-quiz-mocap_preferences-head_tracker_location-title = Onde está localizado o seu rastreador de cabeça?
|
||||
onboarding-quiz-mocap_preferences-head_tracker_location-forehead = Testa
|
||||
onboarding-quiz-mocap_preferences-head_tracker_location-face = Rosto
|
||||
|
||||
## Wi-Fi setup
|
||||
|
||||
onboarding-wifi_creds-back = Voltar para introdução
|
||||
onboarding-wifi_creds-back-v2 = Voltar
|
||||
onboarding-wifi_creds-v2 = Trackers conectados via Wi-Fi
|
||||
# This cares about multilines
|
||||
onboarding-wifi_creds-description-v2 =
|
||||
@@ -1018,6 +1058,13 @@ onboarding-reset_tutorial-2 =
|
||||
|
||||
Você precisa estar em uma pose como se estivesse esquiando, conforme mostrado no assistente de montagem automática, e há um atraso de 3 segundos (configurável) antes que ela seja acionada.
|
||||
|
||||
## Install info
|
||||
|
||||
install-info_udev-rules_modal_title = Regras de acesso udev de hardware não encontradas
|
||||
install-info_udev-rules_warning = Regras de acesso via udev são necessárias para acesso ao console serial e conexão do dongle. Cole o seguinte comando no seu terminal para adicionar as regras do udev.
|
||||
install-info_udev-rules_modal_button = Fechar
|
||||
install-info_udev-rules_modal-dont-show-again_checkbox = Não mostrar novamente
|
||||
|
||||
## Setup start
|
||||
|
||||
onboarding-home = Bem-vindo ao SlimeVR
|
||||
@@ -1360,6 +1407,7 @@ onboarding-user_height-description = Precisamos da sua altura para calcular as p
|
||||
onboarding-user_height-need_head_tracker = É necessário um headset e controles com rastreamento posicional para realizar a calibração.
|
||||
onboarding-user_height-calculate = Calcular minha altura automaticamente
|
||||
onboarding-user_height-next_step = Continuar e salvar
|
||||
onboarding-user_height-prev_step = Voltar
|
||||
onboarding-user_height-manual-proportions = Proporções Manuais
|
||||
onboarding-user_height-calibration-title = Progresso da Calibração
|
||||
onboarding-user_height-calibration-RECORDING_FLOOR = Toque o chão com a ponta do seu controle
|
||||
@@ -1515,6 +1563,7 @@ firmware_tool-flashing_step-description = Seus trackers estão atualizando, por
|
||||
firmware_tool-flashing_step-warning-v2 = Não desconecte nem desligue o tracker durante o processo de envio, a menos que seja instruído a fazê-lo, pois isso pode tornar sua placa inutilizável
|
||||
firmware_tool-flashing_step-flash_more = Atualizar mais trackers
|
||||
firmware_tool-flashing_step-exit = Sair
|
||||
firmware_tool-flashing_step-onboarding_continue = Continuar
|
||||
|
||||
## firmware tool build status
|
||||
|
||||
@@ -1655,6 +1704,8 @@ tracking_checklist-FULL_RESET-desc = Alguns trackers precisam que uma redefiniç
|
||||
tracking_checklist-STEAMVR_DISCONNECTED = O SteamVR não está em execução
|
||||
tracking_checklist-STEAMVR_DISCONNECTED-desc = O SteamVR não está em execução. Você está usando ele para VR?
|
||||
tracking_checklist-STEAMVR_DISCONNECTED-open = Iniciar o SteamVR
|
||||
tracking_checklist-STEAMVR_HANDS_ENABLED-desc = Você ativou os Trackers de mãos virtuais do SteamVR. Isso fará com que os comandos feitos por meio de botões não funcionem no SteamVR e nos jogos.
|
||||
tracking_checklist-STEAMVR_HANDS_ENABLED-go = Desabilitá-los
|
||||
tracking_checklist-TRACKERS_REST_CALIBRATION = Calibre seus trackers
|
||||
tracking_checklist-TRACKERS_REST_CALIBRATION-desc = Você não realizou a calibração dos trackers. Por favor, deixe os trackers (destacados em amarelo) repousarem sobre uma superfície estável por alguns segundos.
|
||||
tracking_checklist-TRACKER_ERROR = Trackers com Erros
|
||||
|
||||
@@ -917,9 +917,11 @@ onboarding-setup_warning =
|
||||
onboarding-setup_warning-skip = Пропустить настройку
|
||||
onboarding-setup_warning-cancel = Продолжить настройку
|
||||
|
||||
## Quiz
|
||||
|
||||
|
||||
## Wi-Fi setup
|
||||
|
||||
onboarding-wifi_creds-back = Вернуться к введению
|
||||
onboarding-wifi_creds-skip = Пропустить настройки Wi-Fi
|
||||
onboarding-wifi_creds-submit = Отправить!
|
||||
onboarding-wifi_creds-ssid =
|
||||
@@ -955,6 +957,9 @@ onboarding-reset_tutorial-2 =
|
||||
|
||||
Вы должны быть в позе, как будто вы катаетесь на лыжах, как показано в мастере автоматического монтажа крепления, и у вас есть 3-секундная задержка (настраиваемая) перед тем, как она сработает.
|
||||
|
||||
## Install info
|
||||
|
||||
|
||||
## Setup start
|
||||
|
||||
onboarding-home = Добро пожаловать в SlimeVR
|
||||
|
||||
@@ -839,9 +839,11 @@ onboarding-setup_warning =
|
||||
onboarding-setup_warning-skip = Hoppa över inställning
|
||||
onboarding-setup_warning-cancel = Fortsätt inställning
|
||||
|
||||
## Quiz
|
||||
|
||||
|
||||
## Wi-Fi setup
|
||||
|
||||
onboarding-wifi_creds-back = Gå tillbaka till introduktion
|
||||
onboarding-wifi_creds-skip = Hoppa över Wi-Fi inställningar.
|
||||
onboarding-wifi_creds-submit = Överlämna!
|
||||
onboarding-wifi_creds-ssid =
|
||||
@@ -864,6 +866,9 @@ onboarding-reset_tutorial-0 =
|
||||
|
||||
Detta gör att spårarna vänds i samma riktning som ditt headset (HMD).
|
||||
|
||||
## Install info
|
||||
|
||||
|
||||
## Setup start
|
||||
|
||||
onboarding-home = Välkommen till SlimeVR
|
||||
|
||||
@@ -954,9 +954,11 @@ onboarding-setup_warning =
|
||||
onboarding-setup_warning-skip = ข้ามการตั้งค่า
|
||||
onboarding-setup_warning-cancel = ดำเนินการตั้งค่าต่อ
|
||||
|
||||
## Quiz
|
||||
|
||||
|
||||
## Wi-Fi setup
|
||||
|
||||
onboarding-wifi_creds-back = กลับไปที่หน้าบทนำ
|
||||
onboarding-wifi_creds-v2 = แทร็กเกอร์ที่ใช้ Wi-Fi
|
||||
# This cares about multilines
|
||||
onboarding-wifi_creds-description-v2 =
|
||||
@@ -1001,6 +1003,9 @@ onboarding-reset_tutorial-2 =
|
||||
|
||||
คุณต้องอยู่ในท่าเล่นสกีตามที่แสดงในตัวช่วยตั้งค่า โดยจะนับถอยหลังใน 3 วินาที (สามารถกำหนดได้) ก่อนที่การรีเซ็ตจะเกิดขึ้น
|
||||
|
||||
## Install info
|
||||
|
||||
|
||||
## Setup start
|
||||
|
||||
onboarding-home = ยินดีต้อนรับสู่ SlimeVR!
|
||||
|
||||
@@ -7,68 +7,194 @@
|
||||
|
||||
## Websocket (server) status
|
||||
|
||||
websocket-connecting = Sunucuya bağlanılıyor
|
||||
websocket-connecting = Sunucuya bağlanılıyor...
|
||||
websocket-connection_lost = Sunucuyla bağlantı kesildi. Tekrar bağlanılmaya çalışılıyor...
|
||||
websocket-connection_lost-desc = SlimeVR sunucusu çöktü. Kayıtları kontrol edip programı yeniden başlat.
|
||||
websocket-timedout = Sunucuya bağlanılamadı
|
||||
websocket-timedout-desc = SlimeVR sunucusu çöktü veya zaman aşımına uğradı. Kayıtları kontrol et ve programı yeniden başlat.
|
||||
websocket-error-close = SlimeVR'ı kapat
|
||||
websocket-error-logs = Kayıtlar klasörünü aç
|
||||
|
||||
## Update notification
|
||||
|
||||
version_update-title = Yeni sürüm mevcut: { $version }
|
||||
version_update-description = "{ version_update-update }" seçeneğine tıklamak SlimeVR kurulum uygulamasını indirir.
|
||||
version_update-update = Güncelle
|
||||
version_update-close = Kapat
|
||||
|
||||
## Tips
|
||||
|
||||
tips-find_tracker = Hangi takipçi hangisi emin değil misin? Takipçilerden birini hareket ettirerek belirleyebilirsin.
|
||||
tips-do_not_move_heels = Kayıt sırasında ayaklarınızın hareket etmediğinden emin olun!
|
||||
tips-do_not_move_heels = Kayıt sırasında ayaklarının hareket etmediğinden emin ol!
|
||||
tips-file_select = Dosyaları sürükleyip bırak veya dosyalarından <u>seç</u>.
|
||||
tips-tap_setup = Menüden seçmek yerine takipçine 2 kez yavaşça dokunarak da seçebilirsin.
|
||||
tips-turn_on_tracker = Resmi SlimeVR takipçisi mi kullanıyorsun? Takipçilerini bilgisayara bağladıktan sonra onları <b><em>açmayı</em></b> unutma!
|
||||
tips-failed_webgl = WebGL başlatılamadı.
|
||||
|
||||
## Units
|
||||
|
||||
unit-meter = Metre
|
||||
unit-foot = Ayak
|
||||
unit-inch = Inç
|
||||
unit-cm = cm
|
||||
|
||||
## Body parts
|
||||
|
||||
body_part-NONE = Atanmamış
|
||||
body_part-HEAD = Kafa
|
||||
body_part-NECK = Boyun
|
||||
body_part-RIGHT_SHOULDER = Sağ omuz
|
||||
body_part-RIGHT_UPPER_ARM = Sağ üst kol
|
||||
body_part-RIGHT_LOWER_ARM = Sağ alt kol
|
||||
body_part-RIGHT_HAND = Sağ el
|
||||
body_part-RIGHT_UPPER_LEG = Sağ uyluk
|
||||
body_part-RIGHT_LOWER_LEG = Sağ ayak bileği
|
||||
body_part-RIGHT_FOOT = Sağ ayak
|
||||
body_part-UPPER_CHEST = Üst göğüs
|
||||
body_part-RIGHT_SHOULDER = Sağ Omuz
|
||||
body_part-RIGHT_UPPER_ARM = Sağ Üst Kol
|
||||
body_part-RIGHT_LOWER_ARM = Sağ Alt Kol
|
||||
body_part-RIGHT_HAND = Sağ El
|
||||
body_part-RIGHT_UPPER_LEG = Sağ Uyluk
|
||||
body_part-RIGHT_LOWER_LEG = Sağ Ayak Bileği
|
||||
body_part-RIGHT_FOOT = Sağ Ayak
|
||||
body_part-UPPER_CHEST = Üst Göğüs
|
||||
body_part-CHEST = Göğüs
|
||||
body_part-WAIST = Bel
|
||||
body_part-HIP = Kalça
|
||||
body_part-LEFT_SHOULDER = Sol omuz
|
||||
body_part-LEFT_UPPER_ARM = Sol üst kol
|
||||
body_part-LEFT_LOWER_ARM = Sol alt kol
|
||||
body_part-LEFT_HAND = Sol el
|
||||
body_part-LEFT_UPPER_LEG = Sol uyluk
|
||||
body_part-LEFT_LOWER_LEG = Sol ayak bileği
|
||||
body_part-LEFT_FOOT = Sol ayak
|
||||
body_part-LEFT_SHOULDER = Sol Omuz
|
||||
body_part-LEFT_UPPER_ARM = Sol Üst Kol
|
||||
body_part-LEFT_LOWER_ARM = Sol Alt Kol
|
||||
body_part-LEFT_HAND = Sol El
|
||||
body_part-LEFT_UPPER_LEG = Sol Uyluk
|
||||
body_part-LEFT_LOWER_LEG = Sol Ayak Bileği
|
||||
body_part-LEFT_FOOT = Sol Ayak
|
||||
body_part-LEFT_THUMB_METACARPAL = Sol başparmak metakarpal kemiği
|
||||
body_part-LEFT_THUMB_PROXIMAL = Sol başparmak proksimal kemiği
|
||||
body_part-LEFT_THUMB_DISTAL = Sol başparmak distal falanks kemiği
|
||||
body_part-LEFT_INDEX_PROXIMAL = Sol işaret parmağının proksimal falanks kemiği
|
||||
body_part-LEFT_INDEX_INTERMEDIATE = Sol işaret parmağının orta falanks kemiği
|
||||
body_part-LEFT_INDEX_DISTAL = Sol işaret parmağının distal falanks kemiği
|
||||
body_part-LEFT_MIDDLE_PROXIMAL = Sol orta parmağın proksimal falanks kemiği
|
||||
body_part-LEFT_MIDDLE_INTERMEDIATE = Sol orta parmağın orta falanks kemiği
|
||||
body_part-LEFT_MIDDLE_DISTAL = Sol orta parmağın distal falanks kemiği
|
||||
body_part-LEFT_RING_PROXIMAL = Sol yüzük parmağının proksimal falanks kemiği
|
||||
body_part-LEFT_RING_INTERMEDIATE = Sol yüzük parmağının orta falanks kemiği
|
||||
body_part-LEFT_RING_DISTAL = Sol yüzük parmağının distal falanks kemiği
|
||||
body_part-LEFT_LITTLE_PROXIMAL = Sol küçük parmağın proksimal falanks kemiği
|
||||
body_part-LEFT_LITTLE_INTERMEDIATE = Sol küçük parmağın orta falanks kemiği
|
||||
body_part-LEFT_LITTLE_DISTAL = Sol küçük parmağın distal falanks kemiği
|
||||
body_part-RIGHT_THUMB_METACARPAL = Sağ başparmak metakarpal kemiği
|
||||
body_part-RIGHT_THUMB_PROXIMAL = Sağ başparmağın proksimal falanks kemiği
|
||||
body_part-RIGHT_THUMB_DISTAL = Sağ başparmağın distal falanks kemiği
|
||||
body_part-RIGHT_INDEX_PROXIMAL = Sağ işaret parmağının proksimal falanks kemiği
|
||||
body_part-RIGHT_INDEX_INTERMEDIATE = Sağ işaret parmağının orta falanks kemiği
|
||||
body_part-RIGHT_INDEX_DISTAL = Sağ işaret parmağının distal falanks kemiği
|
||||
body_part-RIGHT_MIDDLE_PROXIMAL = Sağ orta parmağın proksimal falanks kemiği
|
||||
body_part-RIGHT_MIDDLE_INTERMEDIATE = Sağ orta parmağın orta falanks kemiği
|
||||
body_part-RIGHT_MIDDLE_DISTAL = Sağ orta parmağın distal falanks kemiği
|
||||
body_part-RIGHT_RING_PROXIMAL = Sağ yüzük parmağının proksimal falanks kemiği
|
||||
body_part-RIGHT_RING_INTERMEDIATE = Sağ yüzük parmağının orta falanks kemiği
|
||||
body_part-RIGHT_RING_DISTAL = Sağ yüzük parmağının distal falanks kemiği
|
||||
body_part-RIGHT_LITTLE_PROXIMAL = Sağ küçük parmağın proksimal falanks kemiği
|
||||
body_part-RIGHT_LITTLE_INTERMEDIATE = Sağ küçük parmağın orta falanks kemiği
|
||||
body_part-RIGHT_LITTLE_DISTAL = Sağ küçük parmağın distal falanks kemiği
|
||||
|
||||
## BoardType
|
||||
|
||||
board_type-UNKNOWN = Bilinmeyen
|
||||
board_type-NODEMCU = NodeMCU
|
||||
board_type-WROOM32 = WROOM32
|
||||
board_type-WEMOSD1MINI = Wemos D1 Mini
|
||||
board_type-TTGO_TBASE = TTGO T-Base
|
||||
board_type-ESP01 = ESP-01
|
||||
board_type-SLIMEVR = SlimeVR
|
||||
board_type-SLIMEVR_DEV = SlimeVR Dev Board
|
||||
board_type-SLIMEVR_V1_2 = SlimeVR v1.2
|
||||
board_type-LOLIN_C3_MINI = Lolin C3 Mini
|
||||
board_type-BEETLE32C3 = Beetle ESP32-C3
|
||||
board_type-ESP32C3DEVKITM1 = Espressif ESP32-C3 DevKitM-1
|
||||
board_type-OWOTRACK = owoTrack
|
||||
board_type-WRANGLER = Wrangler Joycons
|
||||
board_type-MOCOPI = Sony Mocopi
|
||||
board_type-WEMOSWROOM02 = Wemos Wroom-02 D1 Mini
|
||||
board_type-XIAO_ESP32C3 = Seeed Studio XIAO ESP32C3
|
||||
board_type-HARITORA = Haritora
|
||||
board_type-ESP32C6DEVKITC1 = Espressif ESP32-C6 DevKitC-1
|
||||
board_type-GLOVE_IMU_SLIMEVR_DEV = SlimeVR Dev IMU Eldiveni
|
||||
board_type-GESTURES = Hareketler
|
||||
board_type-ESP32S3_SUPERMINI = ESP32-S3 Supermini
|
||||
board_type-GENERIC_NRF = Jenerik nRF
|
||||
board_type-SLIMEVR_BUTTERFLY_DEV = SlimeVR Dev Butterfly
|
||||
board_type-SLIMEVR_BUTTERFLY = SlimeVR Butterfly
|
||||
|
||||
## Proportions
|
||||
|
||||
skeleton_bone-NONE = Yok
|
||||
skeleton_bone-HEAD = Kafa hizası
|
||||
skeleton_bone-HEAD = Kafa Hizası
|
||||
skeleton_bone-HEAD-desc =
|
||||
Bu, kulaklığın ile başının ortası arasındaki mesafedir.
|
||||
Ayarlamak için, 'hayır' der gibi başını soldan sağa ve sağdan sola salla,
|
||||
diğer takipçiler yerinden oynamayana kadar bunu tekrarlayıp ayarla.
|
||||
skeleton_bone-NECK = Boyun Uzunluğu
|
||||
skeleton_bone-torso_group = Gövde uzunluğu
|
||||
skeleton_bone-NECK-desc =
|
||||
Bu, başının ortasından boynunun başlangıcına kadar olan mesafedir.
|
||||
Ayarlamak için başını 'evet' der gibi yukarı-aşağı hareket ettir veya başını hafifçe öne eğip, başını sola ve sağa kaydır,
|
||||
diğer takipçiler yerinden oynamayana kadar bunu tekrarlayıp ayarla.
|
||||
skeleton_bone-torso_group = Gövde Uzunluğu
|
||||
skeleton_bone-torso_group-desc =
|
||||
Bu, boynunun başlangıcından kalçalarına kadar olan mesafedir.
|
||||
Ayarlamak için dik dur ve sanal kalçaların, gerçek kalçalarınla hizalanana kadar değeri değiştir.
|
||||
skeleton_bone-UPPER_CHEST = Üst Göğüs Uzunluğu
|
||||
skeleton_bone-CHEST_OFFSET = Göğüs hizası
|
||||
skeleton_bone-UPPER_CHEST-desc =
|
||||
Bu, boynunun başlangıcından göğsünün ortasına kadar olan mesafedir.
|
||||
Gövde uzunluğunu doğru şekilde ayarlayıp (otururken, eğilirken, uzanırken vb. duruşlarda) sanal omurgan,
|
||||
gerçek omurganla eşleşene kadar bu değeri değiştir.
|
||||
skeleton_bone-CHEST_OFFSET = Göğüs Hizası
|
||||
skeleton_bone-CHEST_OFFSET-desc =
|
||||
Bu, bazı oyun veya uygulamalarda kalibrasyona yardımcı olmak için,
|
||||
sanal göğüs takipçisini yukarı ya da aşağı hareket ettirmene izin verir.
|
||||
skeleton_bone-CHEST = Göğüs Uzunluğu
|
||||
skeleton_bone-CHEST-desc =
|
||||
Bu, göğsünün ortasından omurganın ortasına kadar olan mesafedir.
|
||||
Gövde uzunluğunu doğru şekilde ayarlayıp (otururken, eğilirken, uzanırken vb. duruşlarda) sanal omurgan,
|
||||
gerçek omurganla eşleşene kadar bu değeri değiştir.
|
||||
skeleton_bone-WAIST = Bel Uzunluğu
|
||||
skeleton_bone-WAIST-desc =
|
||||
Bu, omurganın ortasından göbek deliğine kadar olan mesafedir.
|
||||
Gövde uzunluğunu doğru şekilde ayarlayıp (otururken, eğilirken, uzanırken vb. duruşlarda) sanal omurgan,
|
||||
gerçek omurganla eşleşene kadar bu değeri değiştir.
|
||||
skeleton_bone-HIP = Kalça Uzunluğu
|
||||
skeleton_bone-HIP_OFFSET = Kalça hizası
|
||||
skeleton_bone-HIP-desc =
|
||||
Bu, göbek deliğinden kalçalarına kadar olan mesafedir.
|
||||
Gövde uzunluğunu doğru şekilde ayarlayıp (otururken, eğilirken, uzanırken vb. duruşlarda) sanal omurgan,
|
||||
gerçek omurganla eşleşene kadar bu değeri değiştir.
|
||||
skeleton_bone-HIP_OFFSET = Kalça Hizası
|
||||
skeleton_bone-HIP_OFFSET-desc =
|
||||
Bu, bazı oyun veya uygulamalarda kalibrasyona yardımcı olmak için,
|
||||
sanal kalça takipçisini yukarı ya da aşağı hareket ettirmene izin verir.
|
||||
skeleton_bone-HIPS_WIDTH = Kalça Genişliği
|
||||
skeleton_bone-HIPS_WIDTH-desc =
|
||||
Bu, bacaklarının başladığı noktalar arasındaki mesafedir.
|
||||
Ayarlamak için bacaklarını düz tutarak tam bir sıfırlama yap ve,
|
||||
sanal bacaklarının aralığı, gerçek bacaklarının aralığıyla hizalanana kadar bu değeri değiştir.
|
||||
skeleton_bone-leg_group = Bacak uzunluğu
|
||||
skeleton_bone-leg_group-desc =
|
||||
Bu, kalçandan ayaklarına olan mesafedir.
|
||||
Ayarlamak için Gövde uzunluğunu doğru şekilde ayarla ve,
|
||||
sanal ayakların gerçek ayaklarınla aynı seviyeye gelene kadar bu değeri değiştir.
|
||||
skeleton_bone-UPPER_LEG = Üst Bacak Uzunluğu
|
||||
skeleton_bone-UPPER_LEG-desc =
|
||||
Bu, kalçandan dizlerine olan mesafedir.
|
||||
Ayarlamak için Bacak uzunluğunu doğru şekilde ayarla ve,
|
||||
sanal dizlerin gerçek dizlerinle aynı seviyeye gelene kadar bu değeri değiştir.
|
||||
skeleton_bone-LOWER_LEG = Alt Bacak Uzunluğu
|
||||
skeleton_bone-LOWER_LEG-desc =
|
||||
Bu, dizlerinden ayak bileklerine olan mesafedir.
|
||||
Ayarlamak için Bacak uzunluğunu doğru şekilde ayarla ve,
|
||||
sanal dizlerin gerçek dizlerinle aynı seviyeye gelene kadar bu değeri değiştir.
|
||||
skeleton_bone-FOOT_LENGTH = Ayak Uzunluğu
|
||||
skeleton_bone-FOOT_LENGTH-desc =
|
||||
Bu, ayak bileklerinden ayak parmaklarına olan mesafedir.
|
||||
Ayarlamak için parmak uçlarına çık ve sanal ayakların sabit kalana kadar bu değeri değiştir.
|
||||
skeleton_bone-FOOT_SHIFT = Ayak hizası
|
||||
skeleton_bone-FOOT_SHIFT-desc =
|
||||
Bu değer, dizinden ayak bileğine olan yatay mesafedir.
|
||||
Bu, dik dururken alt bacaklarının geriye doğru konumlanmasını telafi eder.
|
||||
Ayarlamak için Ayak uzunluğunu 0 olarak ayarla, tam sıfırlama yap ve,
|
||||
sanal ayakların ayak bileklerinin ortasıyla hizalanana kadar bu değeri değiştir.
|
||||
skeleton_bone-SKELETON_OFFSET = İskelet hizası
|
||||
skeleton_bone-SHOULDERS_DISTANCE = Omuz Mesafesi
|
||||
skeleton_bone-SHOULDERS_WIDTH = Omuz Genişliği
|
||||
@@ -80,7 +206,10 @@ skeleton_bone-ELBOW_OFFSET = Dirsek hizası
|
||||
## Tracker reset buttons
|
||||
|
||||
reset-reset_all = Tüm oranları sıfırla
|
||||
reset-reset_all_warning-cancel = İptal et
|
||||
reset-full = Sıfırlama
|
||||
reset-mounting-feet = Ayak Kalibrasyonu
|
||||
reset-mounting-fingers = Parmak Kalibrasyonu
|
||||
|
||||
## Serial detection stuff
|
||||
|
||||
@@ -128,10 +257,13 @@ widget-developer_mode-more_info = Daha fazla bilgi
|
||||
## Widget: IMU Visualizer
|
||||
|
||||
widget-imu_visualizer = Rotasyon
|
||||
widget-imu_visualizer-preview = Önizle
|
||||
widget-imu_visualizer-hide = Gizle
|
||||
widget-imu_visualizer-rotation_preview = Önizle
|
||||
|
||||
## Widget: Skeleton Visualizer
|
||||
|
||||
widget-skeleton_visualizer-hide = Gizle
|
||||
|
||||
## Tracker status
|
||||
|
||||
@@ -140,6 +272,7 @@ tracker-status-busy = Meşgul
|
||||
tracker-status-error = Hata
|
||||
tracker-status-disconnected = Bağlantı kesildi
|
||||
tracker-status-ok = İYİ
|
||||
tracker-status-timed_out = Zaman aşımı
|
||||
|
||||
## Tracker status columns
|
||||
|
||||
@@ -293,12 +426,18 @@ settings-osc-vrchat-network-address = Ağ adresi
|
||||
## Setup/onboarding menu
|
||||
|
||||
|
||||
## Quiz
|
||||
|
||||
|
||||
## Wi-Fi setup
|
||||
|
||||
|
||||
## Mounting setup
|
||||
|
||||
|
||||
## Install info
|
||||
|
||||
|
||||
## Setup start
|
||||
|
||||
|
||||
|
||||
@@ -612,9 +612,11 @@ onboarding-setup_warning =
|
||||
onboarding-setup_warning-skip = Пропустити налаштування
|
||||
onboarding-setup_warning-cancel = Продовжити налаштування
|
||||
|
||||
## Quiz
|
||||
|
||||
|
||||
## Wi-Fi setup
|
||||
|
||||
onboarding-wifi_creds-back = Повернутися до вступу
|
||||
onboarding-wifi_creds-skip = Пропустити налаштування Wi-Fi
|
||||
onboarding-wifi_creds-submit = Підтвердити!
|
||||
onboarding-wifi_creds-ssid =
|
||||
@@ -649,6 +651,9 @@ onboarding-reset_tutorial-2 =
|
||||
|
||||
Вам потрібно бути в позі, ніби ви катаєтеся на лижах, як показано на майстрі автоматичної прив'язки положення. У вас є затримка у 3 секунди (можна налаштувати), перш ніж спрацює скидання.
|
||||
|
||||
## Install info
|
||||
|
||||
|
||||
## Setup start
|
||||
|
||||
onboarding-home = Ласкаво просимо до SlimeVR
|
||||
|
||||
@@ -649,9 +649,11 @@ onboarding-setup_warning =
|
||||
onboarding-setup_warning-skip = Bỏ qua cài đặt
|
||||
onboarding-setup_warning-cancel = Tiếp tục thiết lập
|
||||
|
||||
## Quiz
|
||||
|
||||
|
||||
## Wi-Fi setup
|
||||
|
||||
onboarding-wifi_creds-back = Quay lại giới thiệu
|
||||
onboarding-wifi_creds-skip = Bỏ qua cài đặt Wi-Fi
|
||||
onboarding-wifi_creds-submit = Gửi
|
||||
onboarding-wifi_creds-ssid =
|
||||
@@ -686,6 +688,9 @@ onboarding-reset_tutorial-2 =
|
||||
|
||||
Bạn cần phải ở trên một tư thế như bạn đang trượt tuyết như nó được hiển thị trên trình hướng dẫn gắn tự động và bạn có độ trễ 3 giây (có thể định cấu hình) trước khi nó được kích hoạt.
|
||||
|
||||
## Install info
|
||||
|
||||
|
||||
## Setup start
|
||||
|
||||
onboarding-home = Chào mừng bạn đến với SlimeVR!
|
||||
|
||||
@@ -955,9 +955,47 @@ onboarding-setup_warning =
|
||||
onboarding-setup_warning-skip = 跳过设置
|
||||
onboarding-setup_warning-cancel = 继续设置
|
||||
|
||||
## Quiz
|
||||
|
||||
onboarding-quiz_continue = 继续
|
||||
onboarding-quiz_back = 返回
|
||||
onboarding-quiz-more_sets_modal-title = 已经连接好所有的追踪器了吗?
|
||||
onboarding-quiz-more_sets_modal-desc = 如有不同类型的追踪器,现在可以继续进行连接
|
||||
onboarding-quiz-more_sets_modal-confirm = 所有的追踪器都连接好了
|
||||
onboarding-quiz-more_sets_modal-cancel = 还需要连接更多追踪器
|
||||
onboarding-quiz-slimeset-title = 将要连接什么类型的追踪器?
|
||||
onboarding-quiz-slimeset-description = 如果有多组不同类型的追踪器,稍后将会继续连接其余类型
|
||||
onboarding-quiz-slimeset-official-sets = 官方SlimeVR追踪器
|
||||
onboarding-quiz-slimeset-thirdparty-sets = 第三方或DIY追踪器
|
||||
onboarding-quiz-slimeset-answer-regular = SlimeVR V1.0 和 V1.2
|
||||
onboarding-quiz-slimeset-answer-butterfly = Butterfly (蝴蝶)
|
||||
onboarding-quiz-slimeset-answer-wifi = 通过ESP/WiFi连接的追踪器
|
||||
onboarding-quiz-slimeset-answer-dongle = 通过USB接收器连接的追踪器
|
||||
onboarding-quiz-usage-title = 将使用SlimeVR进行何种应用?
|
||||
onboarding-quiz-usage-description = 如果打算将SlimeVR用至不同用途,可之后在设置中进行修改。
|
||||
onboarding-quiz-usage-answer-VRC = VR游戏(如VRChat)
|
||||
onboarding-quiz-usage-answer-mocap_vtubing = 动作捕捉与虚拟偶像直播
|
||||
onboarding-quiz-runtime-title = 将通过SteamVR运行游戏,还是在直接在头显上运行?
|
||||
onboarding-quiz-runtime-answer-steamvr = SteamVR
|
||||
onboarding-quiz-runtime-answer-standalone = 头显独立运行
|
||||
onboarding-quiz-mocap_preferences-title = 动作捕捉偏好
|
||||
onboarding-quiz-mocap_preferences-desc = 设置使用SlimeVR进行动作捕捉或虚拟偶像直播的方式
|
||||
onboarding-quiz-mocap_preferences-playspace-title = 将在怎样的空间内使用?
|
||||
onboarding-quiz-mocap_preferences-playspace-desc = 如果选择站立使用,SlimeVR会试图追踪你的行走动作,而不是固定在原地。
|
||||
onboarding-quiz-mocap_preferences-playspace-sitting = 坐下
|
||||
onboarding-quiz-mocap_preferences-playspace-standing = 站立
|
||||
onboarding-quiz-mocap_preferences-vrm_model-title = 你有将要使用的VRM模型吗?(可选)
|
||||
onboarding-quiz-mocap_preferences-vrm_model-desc = 加载VRM模型将提升跟踪质量,并与使用VMC的应用程序兼容。
|
||||
onboarding-quiz-mocap_preferences-head_tracker-title = 你头上戴着追踪器或VR头显吗?
|
||||
onboarding-quiz-mocap_preferences-head_tracker-yes = 是
|
||||
onboarding-quiz-mocap_preferences-head_tracker-no = 否
|
||||
onboarding-quiz-mocap_preferences-head_tracker_location-title = 你的头部追踪器放在哪里?
|
||||
onboarding-quiz-mocap_preferences-head_tracker_location-forehead = 额头
|
||||
onboarding-quiz-mocap_preferences-head_tracker_location-face = 脸
|
||||
|
||||
## Wi-Fi setup
|
||||
|
||||
onboarding-wifi_creds-back = 返回简介
|
||||
onboarding-wifi_creds-back-v2 = 返回
|
||||
onboarding-wifi_creds-v2 = 通过 Wi-Fi 连接
|
||||
# This cares about multilines
|
||||
onboarding-wifi_creds-description-v2 =
|
||||
@@ -1004,6 +1042,13 @@ onboarding-reset_tutorial-2 =
|
||||
|
||||
你需要摆出一个像滑雪那样的姿势,就像在运行自动设置佩戴向导时做的那样,在重置实际发生前有 3 秒延迟(可配置)。
|
||||
|
||||
## Install info
|
||||
|
||||
install-info_udev-rules_modal_title = 未找到硬件udev访问规则
|
||||
install-info_udev-rules_warning = 通过udev设置访问规则是串口控制台访问和USB接收器连接的必需条件。将以下命令粘贴到终端并执行,以添加udev规则。
|
||||
install-info_udev-rules_modal_button = 关闭
|
||||
install-info_udev-rules_modal-dont-show-again_checkbox = 不再显示
|
||||
|
||||
## Setup start
|
||||
|
||||
onboarding-home = 欢迎来到 SlimeVR
|
||||
@@ -1331,6 +1376,7 @@ onboarding-user_height-description = 我们需要你的身高来计算躯干比
|
||||
onboarding-user_height-need_head_tracker = 进行校准需要具备定位功能的头戴显示器与控制器。
|
||||
onboarding-user_height-calculate = 自动计算我的身高
|
||||
onboarding-user_height-next_step = 保存并继续
|
||||
onboarding-user_height-prev_step = 返回
|
||||
onboarding-user_height-manual-proportions = 手动调整躯干比例
|
||||
onboarding-user_height-calibration-title = 校准进度
|
||||
onboarding-user_height-calibration-RECORDING_FLOOR = 用控制器的前端触碰地面
|
||||
@@ -1480,6 +1526,7 @@ firmware_tool-flashing_step-description = 正在向追踪器烧录固件,请
|
||||
firmware_tool-flashing_step-warning-v2 = 除非特别指示,在固件传输过程中请勿断开或关闭追踪器,否则可能会导致您的电路板无法使用
|
||||
firmware_tool-flashing_step-flash_more = 烧录更多的追踪器
|
||||
firmware_tool-flashing_step-exit = 退出
|
||||
firmware_tool-flashing_step-onboarding_continue = 继续
|
||||
|
||||
## firmware tool build status
|
||||
|
||||
@@ -1615,6 +1662,9 @@ tracking_checklist-FULL_RESET-desc = 有些追踪器需要进行重置
|
||||
tracking_checklist-STEAMVR_DISCONNECTED = SteamVR 未在运行
|
||||
tracking_checklist-STEAMVR_DISCONNECTED-desc = SteamVR 未在运行。你要将追踪器用于 VR 吗?
|
||||
tracking_checklist-STEAMVR_DISCONNECTED-open = 启动 SteamVR
|
||||
tracking_checklist-STEAMVR_HANDS_ENABLED = 手部追踪器已开启
|
||||
tracking_checklist-STEAMVR_HANDS_ENABLED-desc = 你已经启用了SteamVR的虚拟手部追踪器。这会导致SteamVR和游戏中的按键输入无法使用。
|
||||
tracking_checklist-STEAMVR_HANDS_ENABLED-go = 关闭它们
|
||||
tracking_checklist-TRACKERS_REST_CALIBRATION = 校准追踪器
|
||||
tracking_checklist-TRACKERS_REST_CALIBRATION-desc = 您尚未执行追踪器校准。请将(黄色高亮显示的)追踪器放置在平稳表面上,并静置数秒。
|
||||
tracking_checklist-TRACKER_ERROR = 追踪器出现错误
|
||||
|
||||
@@ -957,9 +957,11 @@ onboarding-setup_warning =
|
||||
onboarding-setup_warning-skip = 跳過設定
|
||||
onboarding-setup_warning-cancel = 繼續設定
|
||||
|
||||
## Quiz
|
||||
|
||||
|
||||
## Wi-Fi setup
|
||||
|
||||
onboarding-wifi_creds-back = 返回簡介
|
||||
onboarding-wifi_creds-v2 = 透過 Wi-Fi 連接
|
||||
# This cares about multilines
|
||||
onboarding-wifi_creds-description-v2 =
|
||||
@@ -1006,6 +1008,9 @@ onboarding-reset_tutorial-2 =
|
||||
|
||||
做此校正時需要進行滑雪姿勢,如自動配戴校正的畫面所示。在觸發 3 秒後(可修改)才會真正進行重置。
|
||||
|
||||
## Install info
|
||||
|
||||
|
||||
## Setup start
|
||||
|
||||
onboarding-home = 歡迎來到 SlimeVR
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 91 KiB |
+19
-1
@@ -11,16 +11,18 @@ import {
|
||||
WebSocketApiContext,
|
||||
} from './hooks/websocket-api';
|
||||
|
||||
import { OnboardingContextProvider } from './components/onboarding/OnboardingContextProvicer';
|
||||
import { OnboardingContextProvider } from './components/onboarding/OnboardingContextProvider';
|
||||
import { OnboardingLayout } from './components/onboarding/OnboardingLayout';
|
||||
import { AutomaticProportionsPage } from './components/onboarding/pages/body-proportions/AutomaticProportions';
|
||||
import { ManualProportionsPage } from './components/onboarding/pages/body-proportions/ManualProportions';
|
||||
import { ConnectTrackersPage } from './components/onboarding/pages/ConnectTracker';
|
||||
import { HomePage } from './components/onboarding/pages/Home';
|
||||
import { ErrorCollectingConsentPage } from './components/onboarding/pages/ErrorCollectingConsent';
|
||||
import { AutomaticMountingPage } from './components/onboarding/pages/mounting/AutomaticMounting';
|
||||
import { ManualMountingPage } from './components/onboarding/pages/mounting/ManualMounting';
|
||||
import { TrackersAssignPage } from './components/onboarding/pages/trackers-assign/TrackerAssignment';
|
||||
import { WifiCredsPage } from './components/onboarding/pages/WifiCreds';
|
||||
import { DonglePage } from './components/onboarding/pages/Dongle';
|
||||
import { ConfigContextProvider } from './components/providers/ConfigContext';
|
||||
import { SerialDetectionModal } from './components/SerialDetectionModal';
|
||||
import { VRCOSCSettings } from './components/settings/pages/VRCOSCSettings';
|
||||
@@ -50,9 +52,14 @@ import { StayAlignedSetup } from './components/onboarding/pages/stay-aligned/Sta
|
||||
import { TrackingChecklistProvider } from './components/tracking-checklist/TrackingChecklistProvider';
|
||||
import { HomeScreenSettings } from './components/settings/pages/HomeScreenSettings';
|
||||
import { ChecklistPage } from './components/tracking-checklist/TrackingChecklist';
|
||||
import { QuizSlimeSetQuestion } from './components/onboarding/pages/quiz/SlimeSetQuestion';
|
||||
import { QuizUsageQuestion } from './components/onboarding/pages/quiz/UsageQuestion';
|
||||
import { QuizRuntimeQuestion } from './components/onboarding/pages/quiz/RuntimeQuestion';
|
||||
import { QuizMocapPosQuestion } from './components/onboarding/pages/quiz/MocapPreferencesQuestions';
|
||||
import { ElectronContextC, provideElectron } from './hooks/electron';
|
||||
import { AppLocalizationProvider } from './i18n/config';
|
||||
import { openUrl } from './hooks/crossplatform';
|
||||
import { UdevRulesModal } from './components/onboarding/UdevRulesModal';
|
||||
|
||||
export const GH_REPO = 'SlimeVR/SlimeVR-Server';
|
||||
export const VersionContext = createContext('');
|
||||
@@ -70,6 +77,7 @@ function Layout() {
|
||||
<SerialDetectionModal />
|
||||
<VersionUpdateModal />
|
||||
<UnknownDeviceModal />
|
||||
<UdevRulesModal />
|
||||
<SentryRoutes>
|
||||
<Route element={<AppLayout />}>
|
||||
<Route
|
||||
@@ -147,7 +155,17 @@ function Layout() {
|
||||
}
|
||||
>
|
||||
<Route path="home" element={<HomePage />} />
|
||||
<Route
|
||||
path="error-collecting-consent"
|
||||
element={<ErrorCollectingConsentPage />}
|
||||
/>
|
||||
<Route path="wifi-creds" element={<WifiCredsPage />} />
|
||||
<Route path="quiz/slime-set" element={<QuizSlimeSetQuestion />} />
|
||||
<Route path="quiz/usage" element={<QuizUsageQuestion />} />
|
||||
<Route path="quiz/runtime" element={<QuizRuntimeQuestion />} />
|
||||
<Route path="quiz/mocap-pos" element={<QuizMocapPosQuestion />} />
|
||||
<Route path="dongle" element={<DonglePage />} />
|
||||
<Route path="firmware-tool" element={<FirmwareToolSettings />} />
|
||||
<Route path="connect-trackers" element={<ConnectTrackersPage />} />
|
||||
<Route path="trackers-assign" element={<TrackersAssignPage />} />
|
||||
<Route path="mounting/choose" element={<MountingChoose />} />
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { useLayoutEffect } from 'react';
|
||||
import { useConfig } from './hooks/config';
|
||||
import { Outlet, useNavigate } from 'react-router-dom';
|
||||
import { Outlet, useLocation, useNavigate } from 'react-router-dom';
|
||||
|
||||
export function AppLayout() {
|
||||
const { config } = useConfig();
|
||||
const { pathname } = useLocation();
|
||||
const navigate = useNavigate();
|
||||
|
||||
useLayoutEffect(() => {
|
||||
@@ -28,10 +29,14 @@ export function AppLayout() {
|
||||
}, [config]);
|
||||
|
||||
useLayoutEffect(() => {
|
||||
if (config && !config.doneOnboarding) {
|
||||
if (
|
||||
config &&
|
||||
!config.doneOnboarding &&
|
||||
!pathname.startsWith('/onboarding/')
|
||||
) {
|
||||
navigate('/onboarding/home');
|
||||
}
|
||||
}, [config?.doneOnboarding]);
|
||||
}, [config]);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
import { Localized, useLocalization } from '@fluent/react';
|
||||
import { BaseModal } from './commons/BaseModal';
|
||||
import { Button } from './commons/Button';
|
||||
import { Typography } from './commons/Typography';
|
||||
|
||||
export function ErrorConsentModal({
|
||||
isOpen = true,
|
||||
cancel,
|
||||
accept,
|
||||
}: {
|
||||
/**
|
||||
* Is the parent/sibling component opened?
|
||||
*/
|
||||
isOpen: boolean;
|
||||
/**
|
||||
* Function to trigger when you still want to close the app
|
||||
*/
|
||||
accept: () => void;
|
||||
/**
|
||||
* Function to trigger when cancelling app close
|
||||
*/
|
||||
cancel?: () => void;
|
||||
}) {
|
||||
const { l10n } = useLocalization();
|
||||
|
||||
return (
|
||||
<BaseModal isOpen={isOpen} onRequestClose={cancel} closeable={false}>
|
||||
<div className="flex flex-col gap-3">
|
||||
<>
|
||||
<div className="flex flex-col items-center gap-3 fill-accent-background-20">
|
||||
<div className="flex flex-col items-center gap-2 max-w-[512px]">
|
||||
<Typography variant="main-title">
|
||||
{l10n.getString('error_collection_modal-title')}
|
||||
</Typography>
|
||||
<Localized
|
||||
id={'error_collection_modal-description_v2'}
|
||||
elems={{
|
||||
b: <b />,
|
||||
h1: <span className="text-lg font-bold" />,
|
||||
}}
|
||||
>
|
||||
<Typography
|
||||
variant="standard"
|
||||
whitespace="whitespace-pre-line"
|
||||
/>
|
||||
</Localized>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Button variant="primary" onClick={accept}>
|
||||
{l10n.getString('error_collection_modal-confirm')}
|
||||
</Button>
|
||||
<Button variant="tertiary" onClick={cancel}>
|
||||
{l10n.getString('error_collection_modal-cancel')}
|
||||
</Button>
|
||||
</>
|
||||
</div>
|
||||
</BaseModal>
|
||||
);
|
||||
}
|
||||
@@ -14,7 +14,8 @@
|
||||
't t t' var(--topbar-h)
|
||||
'n b s' var(--toolbar-h)
|
||||
'n c s' calc(100% - var(--topbar-h) - var(--toolbar-h))
|
||||
/ var(--navbar-w) calc(100% - var(--navbar-w) - var(--right-section-w)) var(--right-section-w);
|
||||
/ var(--navbar-w) calc(100% - var(--navbar-w) - var(--right-section-w))
|
||||
var(--right-section-w);
|
||||
}
|
||||
|
||||
@screen nsm {
|
||||
|
||||
@@ -22,7 +22,6 @@ import { GearIcon } from './commons/icon/GearIcon';
|
||||
import { TrackersStillOnModal } from './TrackersStillOnModal';
|
||||
import { useConfig } from '@/hooks/config';
|
||||
import { TrayOrExitModal } from './TrayOrExitModal';
|
||||
import { ErrorConsentModal } from './ErrorConsentModal';
|
||||
import { useAtomValue } from 'jotai';
|
||||
import { connectedIMUTrackersAtom } from '@/store/app-store';
|
||||
import { useElectron } from '@/hooks/electron';
|
||||
@@ -72,6 +71,7 @@ export function TopBar({
|
||||
await saveConfig();
|
||||
electron.api.close();
|
||||
};
|
||||
|
||||
const tryCloseApp = async (dontTray = false) => {
|
||||
if (!electron.isElectron) throw 'no electron';
|
||||
|
||||
@@ -234,7 +234,7 @@ export function TopBar({
|
||||
</div>
|
||||
<div
|
||||
className="flex items-center justify-center hover:bg-background-60 rounded-full w-7 h-7"
|
||||
onClick={() => electron.api.maximize()}
|
||||
onClick={() => electron.api.toggleMaximize()}
|
||||
>
|
||||
<MaximiseIcon />
|
||||
</div>
|
||||
@@ -286,11 +286,6 @@ export function TopBar({
|
||||
setConnectedTrackerWarning(false);
|
||||
}}
|
||||
/>
|
||||
<ErrorConsentModal
|
||||
isOpen={config?.errorTracking === null}
|
||||
accept={() => setConfig({ errorTracking: true })}
|
||||
cancel={() => setConfig({ errorTracking: false })}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
import { useState } from 'react';
|
||||
import { BaseModal } from './BaseModal';
|
||||
import { Button, ButtonProps } from './Button';
|
||||
|
||||
export type ButtonConfirmModal = Omit<ButtonProps, 'onClick' | 'to'> & {
|
||||
onConfirm: () => void;
|
||||
onCancel: (reason: 'cancel' | 'backdrop') => void;
|
||||
|
||||
confirmLabel: string;
|
||||
cancelLabel: string;
|
||||
};
|
||||
|
||||
export function ButtonConfirmModal(props: ButtonConfirmModal) {
|
||||
const {
|
||||
onConfirm,
|
||||
onCancel,
|
||||
cancelLabel,
|
||||
confirmLabel,
|
||||
children,
|
||||
...buttonProps
|
||||
} = props;
|
||||
|
||||
const [isOpen, setOpen] = useState(false);
|
||||
|
||||
return (
|
||||
<>
|
||||
<BaseModal
|
||||
isOpen={isOpen}
|
||||
onRequestClose={() => {
|
||||
setOpen(false);
|
||||
onCancel('backdrop');
|
||||
}}
|
||||
appendClasses="w-full max-w-2xl"
|
||||
>
|
||||
<div className="flex flex-col justify-between gap-4">
|
||||
{children}
|
||||
<div className="flex w-full justify-between gap-2 xs:flex-row flex-col">
|
||||
<Button
|
||||
id={cancelLabel}
|
||||
variant="tertiary"
|
||||
onClick={() => {
|
||||
setOpen(false);
|
||||
onCancel('cancel');
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
id={confirmLabel}
|
||||
variant="primary"
|
||||
onClick={() => {
|
||||
setOpen(false);
|
||||
onConfirm();
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</BaseModal>
|
||||
<Button {...buttonProps} onClick={() => setOpen(true)} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import classNames from 'classnames';
|
||||
import { forwardRef, useMemo } from 'react';
|
||||
import { Control, Controller } from 'react-hook-form';
|
||||
import { Control, Controller, FieldPath, FieldValues } from 'react-hook-form';
|
||||
|
||||
export const CHECKBOX_CLASSES = classNames(
|
||||
'bg-background-50 border-background-50 cursor-pointer rounded-md w-5 h-5 text-accent-background-30 focus:border-accent-background-40 focus:ring-transparent focus:ring-offset-transparent focus:outline-transparent'
|
||||
@@ -112,7 +112,7 @@ export const CheckboxInternal = forwardRef<
|
||||
);
|
||||
});
|
||||
|
||||
export function CheckBox({
|
||||
export function CheckBox<T extends FieldValues = FieldValues>({
|
||||
label,
|
||||
variant = 'checkbox',
|
||||
color = 'primary',
|
||||
@@ -123,8 +123,8 @@ export function CheckBox({
|
||||
disabled,
|
||||
}: {
|
||||
label: string;
|
||||
control: Control<any>;
|
||||
name: string;
|
||||
control: Control<T>;
|
||||
name: FieldPath<T>;
|
||||
variant?: 'checkbox' | 'toggle';
|
||||
color?: 'primary' | 'secondary' | 'tertiary';
|
||||
outlined?: boolean;
|
||||
|
||||
@@ -10,6 +10,8 @@ import {
|
||||
import {
|
||||
Control,
|
||||
FieldError,
|
||||
FieldPath,
|
||||
FieldValues,
|
||||
useController,
|
||||
UseControllerProps,
|
||||
} from 'react-hook-form';
|
||||
@@ -17,7 +19,7 @@ import { ArrowDownIcon, ArrowUpIcon } from './icon/ArrowIcons';
|
||||
import { a11yClick } from '@/utils/a11y';
|
||||
import { createPortal } from 'react-dom';
|
||||
|
||||
type DropdownItem = {
|
||||
export type DropdownItem = {
|
||||
value: string;
|
||||
label: ReactNode;
|
||||
};
|
||||
@@ -415,14 +417,15 @@ export function DropdownInside({
|
||||
);
|
||||
}
|
||||
|
||||
export function Dropdown({
|
||||
export function Dropdown<T extends FieldValues = FieldValues>({
|
||||
control,
|
||||
name,
|
||||
rules,
|
||||
...props
|
||||
}: DropdownProps & {
|
||||
control: Control<any>;
|
||||
rules?: UseControllerProps<any>['rules'];
|
||||
control: Control<T>;
|
||||
name: FieldPath<T>;
|
||||
rules?: UseControllerProps<T, FieldPath<T>>['rules'];
|
||||
}) {
|
||||
const {
|
||||
field: { value, onChange },
|
||||
|
||||
@@ -7,7 +7,13 @@ import {
|
||||
useRef,
|
||||
useState,
|
||||
} from 'react';
|
||||
import { Control, Controller, UseControllerProps } from 'react-hook-form';
|
||||
import {
|
||||
Control,
|
||||
Controller,
|
||||
FieldPath,
|
||||
FieldValues,
|
||||
UseControllerProps,
|
||||
} from 'react-hook-form';
|
||||
import { FileIcon } from './icon/FileIcon';
|
||||
import { UploadFileIcon } from './icon/UploadFileIcon';
|
||||
import { Typography } from './Typography';
|
||||
@@ -87,9 +93,10 @@ export const FileInputContentFile = ({
|
||||
</div>
|
||||
<span className="flex-grow" />
|
||||
<a
|
||||
href="#"
|
||||
href=""
|
||||
className="h-12 w-12 hover:bg-accent-background-20 cursor-pointer"
|
||||
onClick={(ev) => {
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
onClearPicker();
|
||||
}}
|
||||
@@ -193,7 +200,7 @@ export const FileInputInside = forwardRef<
|
||||
);
|
||||
});
|
||||
|
||||
export const FileInput = ({
|
||||
export const FileInput = <T extends FieldValues = FieldValues>({
|
||||
control,
|
||||
name,
|
||||
label,
|
||||
@@ -204,8 +211,9 @@ export const FileInput = ({
|
||||
capture,
|
||||
importedFileName,
|
||||
}: {
|
||||
rules: UseControllerProps<any>['rules'];
|
||||
control: Control<any>;
|
||||
rules: UseControllerProps<T, FieldPath<T>>['rules'];
|
||||
control: Control<T>;
|
||||
name: FieldPath<T>;
|
||||
accept: string;
|
||||
multiple?: boolean;
|
||||
capture?: boolean | 'user' | 'environment';
|
||||
@@ -214,7 +222,7 @@ export const FileInput = ({
|
||||
**/
|
||||
label?: string;
|
||||
importedFileName: string | null;
|
||||
} & InputProps &
|
||||
} & Omit<InputProps, 'name'> &
|
||||
Partial<HTMLInputElement>) => {
|
||||
return (
|
||||
<Controller
|
||||
|
||||
@@ -4,6 +4,8 @@ import {
|
||||
Control,
|
||||
Controller,
|
||||
FieldError,
|
||||
FieldPath,
|
||||
FieldValues,
|
||||
UseControllerProps,
|
||||
} from 'react-hook-form';
|
||||
import { EyeIcon } from './icon/EyeIcon';
|
||||
@@ -117,7 +119,7 @@ export const InputInside = forwardRef<
|
||||
);
|
||||
});
|
||||
|
||||
export const Input = ({
|
||||
export const Input = <T extends FieldValues = FieldValues>({
|
||||
type = 'text',
|
||||
control,
|
||||
name,
|
||||
@@ -128,10 +130,11 @@ export const Input = ({
|
||||
variant = 'primary',
|
||||
rules,
|
||||
}: {
|
||||
rules?: UseControllerProps<any>['rules'];
|
||||
control: Control<any>;
|
||||
rules?: UseControllerProps<T, FieldPath<T>>['rules'];
|
||||
control: Control<T>;
|
||||
name: FieldPath<T>;
|
||||
autocomplete?: boolean | string;
|
||||
} & InputProps &
|
||||
} & Omit<InputProps, 'name'> &
|
||||
Partial<React.HTMLProps<HTMLInputElement>>) => {
|
||||
return (
|
||||
<Controller
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Control, Controller } from 'react-hook-form';
|
||||
import { Control, Controller, FieldPath, FieldValues } from 'react-hook-form';
|
||||
import { Button } from './Button';
|
||||
import { Typography } from './Typography';
|
||||
import { useCallback, useMemo } from 'react';
|
||||
import { useLocaleConfig } from '@/i18n/config';
|
||||
|
||||
export function NumberSelector({
|
||||
export function NumberSelector<T extends FieldValues = FieldValues>({
|
||||
label,
|
||||
valueLabelFormat,
|
||||
control,
|
||||
@@ -18,8 +18,8 @@ export function NumberSelector({
|
||||
}: {
|
||||
label?: string;
|
||||
valueLabelFormat?: (value: number) => string;
|
||||
control: Control<any>;
|
||||
name: string;
|
||||
control: Control<T>;
|
||||
name: FieldPath<T>;
|
||||
min: number;
|
||||
max: number;
|
||||
step: number | ((value: number, add: boolean) => number);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import classNames from 'classnames';
|
||||
import { Control, Controller } from 'react-hook-form';
|
||||
import { Control, Controller, FieldPath, FieldValues } from 'react-hook-form';
|
||||
import { Typography } from './Typography';
|
||||
import { ReactNode } from 'react';
|
||||
|
||||
export function Radio({
|
||||
export function Radio<T extends FieldValues = FieldValues>({
|
||||
control,
|
||||
name,
|
||||
label,
|
||||
@@ -14,8 +14,8 @@ export function Radio({
|
||||
disabled,
|
||||
...props
|
||||
}: {
|
||||
control: Control<any>;
|
||||
name: string;
|
||||
control: Control<T>;
|
||||
name: FieldPath<T>;
|
||||
label?: string;
|
||||
value: string;
|
||||
description?: string | null;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import classNames from 'classnames';
|
||||
import { Control, Controller } from 'react-hook-form';
|
||||
import { Control, Controller, FieldPath, FieldValues } from 'react-hook-form';
|
||||
|
||||
export function Range({
|
||||
export function Range<T extends FieldValues = FieldValues>({
|
||||
control,
|
||||
name,
|
||||
values,
|
||||
@@ -11,8 +11,8 @@ export function Range({
|
||||
// input props
|
||||
...props
|
||||
}: {
|
||||
control: Control<any>;
|
||||
name: string;
|
||||
control: Control<T>;
|
||||
name: FieldPath<T>;
|
||||
max: number;
|
||||
min: number;
|
||||
step: number;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import {
|
||||
Control,
|
||||
Controller,
|
||||
FieldPath,
|
||||
FieldValues,
|
||||
RefCallBack,
|
||||
UseControllerProps,
|
||||
} from 'react-hook-form';
|
||||
@@ -48,20 +50,20 @@ export function InnerSystemFileInput({
|
||||
);
|
||||
}
|
||||
|
||||
export function SystemFileInput({
|
||||
export function SystemFileInput<T extends FieldValues = FieldValues>({
|
||||
control,
|
||||
rules,
|
||||
name,
|
||||
label,
|
||||
directory = false,
|
||||
}: {
|
||||
rules: UseControllerProps<any>['rules'];
|
||||
control: Control<any>;
|
||||
rules: UseControllerProps<T, FieldPath<T>>['rules'];
|
||||
control: Control<T>;
|
||||
/**
|
||||
* Use a translation key!
|
||||
**/
|
||||
label: string;
|
||||
name: string;
|
||||
name: FieldPath<T>;
|
||||
directory?: boolean;
|
||||
disabled?: boolean;
|
||||
}) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import classNames from 'classnames';
|
||||
import { Control, Controller } from 'react-hook-form';
|
||||
import { Control, Controller, FieldPath, FieldValues } from 'react-hook-form';
|
||||
|
||||
export function ThemeSelector({
|
||||
export function ThemeSelector<T extends FieldValues = FieldValues>({
|
||||
control,
|
||||
name,
|
||||
value,
|
||||
@@ -10,8 +10,8 @@ export function ThemeSelector({
|
||||
colors,
|
||||
...props
|
||||
}: {
|
||||
control: Control<any>;
|
||||
name: string;
|
||||
control: Control<T>;
|
||||
name: FieldPath<T>;
|
||||
colors: string | undefined;
|
||||
value: string;
|
||||
} & React.HTMLProps<HTMLInputElement>) {
|
||||
|
||||
@@ -60,15 +60,15 @@ export function BatteryIcon({
|
||||
/>
|
||||
</mask>
|
||||
<g mask="url(#mask0_4_39)" className={classNames(col, 'opacity-100')}>
|
||||
<rect width={charging ? 18 : value * 18} height="9" />
|
||||
<rect width={charging ? 18 : value > 2 ? 0 : value * 18} height="9" />
|
||||
</g>
|
||||
{charging && value <= 1 && (
|
||||
{charging && (value <= 1 || value > 2) && (
|
||||
<path
|
||||
d="M 7.7638355,8.4189633 8.0112251,4.9834646 5.7712838,4.9834645 8.5644084,0.07977871 8.3170195,3.5152773 H 10.55696 Z"
|
||||
fill="#081e30"
|
||||
/>
|
||||
)}
|
||||
{charging && value > 1 && (
|
||||
{charging && value > 1 && value <= 2 && (
|
||||
<path
|
||||
d="M 5.5342464,4.6225095 C 6.1777799,5.0106205 6.6131537,5.2516456 7.5253371,6.545223 8.4340868,4.4016445 8.7809738,3.661475 10.605195,1.5520288"
|
||||
fill="none"
|
||||
|
||||
@@ -1,10 +1,19 @@
|
||||
export function HeadsetIcon({ width = 24 }: { width?: number }) {
|
||||
export function HeadsetIcon({
|
||||
width = 24,
|
||||
disabled = false,
|
||||
}: {
|
||||
width?: number;
|
||||
disabled?: boolean;
|
||||
}) {
|
||||
return (
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width={width} viewBox="0 0 640 512">
|
||||
<path
|
||||
transform="scale(0.75, 0.75) translate(120, 96)"
|
||||
d="M576 64H64C28.7 64 0 92.7 0 128v256c0 35.3 28.7 64 64 64h120.4c24.2 0 46.4-13.7 57.2-35.4l32-64c8.8-17.5 26.7-28.6 46.3-28.6s37.5 11.1 46.3 28.6l32 64c10.8 21.7 33 35.4 57.2 35.4H576c35.3 0 64-28.7 64-64V128c0-35.3-28.7-64-64-64zM96 240a64 64 0 11128 0 64 64 0 11-128 0zm384-64a64 64 0 110 128 64 64 0 110-128z"
|
||||
/>
|
||||
{disabled && (
|
||||
<line x1="20" y1="20" x2="620" y2="492" stroke="red" strokeWidth="30" />
|
||||
)}
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
export function SittingIcon({ size = 24 }: { size?: number }) {
|
||||
return (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
height={size}
|
||||
viewBox="0 -960 960 960"
|
||||
width={size}
|
||||
>
|
||||
<path d="M600-160H320q-33 0-56.5-23.5T240-240v-440h80v440h280v80ZM460-720q-33 0-56.5-23.5T380-800q0-33 23.5-56.5T460-880q33 0 56.5 23.5T540-800q0 33-23.5 56.5T460-720ZM640-80v-200H440q-33 0-56.5-23.5T360-360v-220q0-42 29-71t71-29q42 0 71 29t29 71v180h80q33 0 56.5 23.5T720-320v240h-80Z" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
export function SteamIcon() {
|
||||
export function SteamIcon({ size = 20 }) {
|
||||
return (
|
||||
<svg
|
||||
width="20"
|
||||
height="18"
|
||||
viewBox="0 0 20 18"
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox="0 0 20 20"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path d="M17.6562 5.32031C17.6562 6.10938 17.3903 6.7832 16.8583 7.3418C16.3263 7.90039 15.6845 8.17969 14.933 8.17969C14.1815 8.17969 13.5398 7.90039 13.0078 7.3418C12.4758 6.7832 12.2098 6.10938 12.2098 5.32031C12.2098 4.53125 12.4758 3.85742 13.0078 3.29883C13.5398 2.74023 14.1815 2.46094 14.933 2.46094C15.6845 2.46094 16.3263 2.74023 16.8583 3.29883C17.3903 3.85742 17.6562 4.53125 17.6562 5.32031ZM9.0625 14.0156C9.0625 13.2031 8.79092 12.5117 8.24777 11.9414C7.70461 11.3711 7.04613 11.0859 6.27232 11.0859C6.07143 11.0859 5.87054 11.1094 5.66964 11.1562L6.83036 11.6484C7.40327 11.8906 7.81064 12.3066 8.05246 12.8965C8.29427 13.4863 8.29985 14.0781 8.0692 14.6719C7.83854 15.2734 7.44048 15.6992 6.875 15.9492C6.30952 16.1992 5.74405 16.2031 5.17857 15.9609C5.02232 15.8984 4.79167 15.8027 4.48661 15.6738C4.18155 15.5449 3.95461 15.4492 3.8058 15.3867C4.0439 15.8555 4.38244 16.2324 4.82143 16.5176C5.26042 16.8027 5.74405 16.9453 6.27232 16.9453C7.04613 16.9453 7.70461 16.6602 8.24777 16.0898C8.79092 15.5195 9.0625 14.8281 9.0625 14.0156ZM18.3259 5.33203C18.3259 4.34766 17.9929 3.50586 17.327 2.80664C16.6611 2.10742 15.8594 1.75781 14.9219 1.75781C13.9769 1.75781 13.1715 2.10742 12.5056 2.80664C11.8397 3.50586 11.5067 4.34766 11.5067 5.33203C11.5067 6.32422 11.8397 7.16797 12.5056 7.86328C13.1715 8.55859 13.9769 8.90625 14.9219 8.90625C15.8594 8.90625 16.6611 8.55859 17.327 7.86328C17.9929 7.16797 18.3259 6.32422 18.3259 5.33203ZM20 5.33203C20 6.80859 19.5033 8.06641 18.51 9.10547C17.5167 10.1445 16.3207 10.6641 14.9219 10.6641L10.0446 14.4023C9.95536 15.4102 9.54985 16.2617 8.82812 16.957C8.1064 17.6523 7.25446 18 6.27232 18C5.37202 18 4.57589 17.7031 3.88393 17.1094C3.19196 16.5156 2.75298 15.7656 2.56696 14.8594L0 13.7812V8.75391L4.34152 10.5938C4.92932 10.2188 5.57292 10.0312 6.27232 10.0312C6.36905 10.0312 6.49926 10.0391 6.66295 10.0547L9.83259 5.28516C9.84747 3.82422 10.3516 2.57812 11.3449 1.54688C12.3382 0.515625 13.5305 0 14.9219 0C16.3207 0 17.5167 0.521484 18.51 1.56445C19.5033 2.60742 20 3.86328 20 5.33203Z" />
|
||||
|
||||
@@ -1,15 +1,6 @@
|
||||
export function VMCIcon({ width }: { width?: number }) {
|
||||
export function VMCIcon() {
|
||||
return (
|
||||
<svg
|
||||
id="svg5"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlnsXlink="http://www.w3.org/1999/xlink"
|
||||
x={0}
|
||||
y={0}
|
||||
width={width ?? 'fit-content'}
|
||||
viewBox="-38 0 409 155"
|
||||
xmlSpace="preserve"
|
||||
>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-38 0 409 155">
|
||||
<style>
|
||||
{
|
||||
'.st1,.st3{stroke:#000;stroke-width:13}.st3{display:inline;fill:none;stroke-width:12.9402;stroke-miterlimit:11.3386}'
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
export function VRCIcon({ width }: { width?: number }) {
|
||||
export function VRCIcon() {
|
||||
return (
|
||||
<svg
|
||||
viewBox="100 100 824 824"
|
||||
width={width ?? 'fit-content'}
|
||||
className="fill-background-10"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="100 100 824 824">
|
||||
<path d="M246.1 418.9h531.8c8.4 0 16 3.4 21.5 8.9s8.9 13.1 8.9 21.5v125.4c0 8.4-3.4 16-8.9 21.5-4.8 4.8-11.1 8-18.1 8.7v46.3c0 10.9-8.8 19-19.5 15.1-3.8-1.4-7.9-4.6-11.9-9.9L709.6 605H246.1c-8.4 0-16-3.4-21.5-8.9s-8.9-13.1-8.9-21.5V449.3c0-8.4 3.4-16 8.9-21.5s13.1-8.9 21.5-8.9zm523.8 174.8h8c5.2 0 10-2.1 13.5-5.6 3.5-3.5 5.6-8.2 5.6-13.5V449.3c0-5.2-2.1-10-5.6-13.5-3.5-3.5-8.2-5.6-13.5-5.6H246.1c-5.2 0-10 2.1-13.5 5.6-3.5 3.5-5.6 8.2-5.6 13.5v125.4c0 5.2 2.1 10 5.6 13.5 3.5 3.5 8.2 5.6 13.5 5.6h469.4c15.8 19.8 31.1 40 46.9 59.8 2.5 3.3 7.7 3.9 7.6-2.5v-57.4h-.1zm-132.3-67.1h23.9l-12-42.2-11.9 42.2zm110.8-74.2H460.6c-10.8 0-19.6 8.8-19.6 19.6v79.7c0 10.8 8.8 19.6 19.6 19.6h287.8c10.8 0 19.6-8.8 19.6-19.6V472c0-10.7-8.8-19.6-19.6-19.6zm-270.3 91.4c2.5 2.6 6.2 3.9 10.9 3.9 3.1 0 5.6-.5 7.4-1.5 1.8-1 3.2-2.2 4.1-3.7.9-1.5 1.5-3.1 1.9-4.7.3-1.7.5-3.3.6-4.7.2-2.1 1.1-3.6 2.8-4.4 1.7-.8 3.7-1.2 6.1-1.2 3.1 0 5.4.6 6.9 1.8 1.5 1.2 2.2 3.5 2.2 7 0 4.1-.8 7.9-2.4 11.3-1.6 3.4-3.9 6.3-6.8 8.6s-6.4 4.1-10.5 5.4c-4 1.3-8.4 1.9-13.2 1.9-4.3 0-8.4-.6-12.2-1.7-3.9-1.1-7.2-3-10.1-5.4-2.9-2.5-5.2-5.7-6.8-9.7-1.7-4-2.5-8.9-2.5-14.7v-38.4c0-5.8.8-10.7 2.5-14.7s4-7.2 6.9-9.7c2.9-2.5 6.3-4.3 10.1-5.4 3.9-1.1 7.9-1.7 12.2-1.7 4.8 0 9.2.6 13.2 1.9 4 1.2 7.5 3 10.4 5.2 2.9 2.2 5.1 5 6.7 8.3 1.6 3.3 2.4 6.9 2.4 10.8 0 3.6-.7 5.9-2.2 7.1-1.5 1.1-3.7 1.7-6.7 1.7-2.6 0-4.7-.4-6.3-1.2-1.7-.8-2.5-2.3-2.6-4.4-.1-1.1-.3-2.4-.6-3.9s-.9-3-1.9-4.5c-1-1.5-2.4-2.7-4.2-3.7-1.8-1-4.4-1.5-7.7-1.5-4.7 0-8.3 1.3-10.7 3.9-2.5 2.6-3.7 6.6-3.7 12v38.4c0 5.1 1.3 9.1 3.8 11.6zm122.7 13.1c0 1.8-.9 3.2-2.8 4.2s-3.9 1.4-6.1 1.4c-2.3 0-4.4-.5-6.2-1.4-1.8-1-2.8-2.4-2.8-4.2v-39.5h-31v39.5c0 1.8-.9 3.2-2.8 4.2s-3.9 1.4-6.1 1.4c-2.3 0-4.4-.5-6.2-1.4-1.8-1-2.8-2.4-2.8-4.2v-89.4c0-1.9.9-3.3 2.8-4.2 1.8-.9 3.9-1.3 6.2-1.3 2.2 0 4.2.4 6.1 1.3 1.9.9 2.8 2.3 2.8 4.2v35.9h31v-35.9c0-1.9.9-3.3 2.8-4.2 1.8-.9 3.9-1.3 6.2-1.3 2.2 0 4.2.4 6.1 1.3 1.9.9 2.8 2.3 2.8 4.2v89.4zm86 1.2c-.7.9-1.7 1.7-2.8 2.3-1.1.7-2.3 1.2-3.6 1.6-1.3.4-2.6.6-3.8.6-1.6 0-2.9-.3-3.9-.8-1.1-.6-1.8-1.5-2.1-2.8l-5.2-18.3h-31.5l-5.2 18.3c-.4 1.3-1.1 2.2-2.1 2.8-1.1.5-2.4.8-3.9.8-1.2 0-2.5-.2-3.8-.6-1.3-.4-2.5-.9-3.6-1.5s-2-1.4-2.8-2.3c-.7-.9-1.1-1.9-1.1-3 0-.2.1-.6.3-1.4l26.6-86.5c.6-2.1 2.1-3.6 4.3-4.6 2.2-1 4.6-1.4 7.2-1.4 2.7 0 5.1.5 7.3 1.4 2.2 1 3.6 2.5 4.3 4.6l26.6 86.5c.2.7.3 1.2.3 1.4-.4 1-.7 2-1.5 2.9zm65-82.5c-1 1.7-2.4 2.5-4.2 2.5h-20.1v78.8c0 1.8-.9 3.2-2.8 4.2s-3.9 1.4-6.1 1.4c-2.3 0-4.4-.5-6.2-1.4-1.8-1-2.8-2.4-2.8-4.2v-78.8h-20.2c-1.8 0-3.2-.8-4.2-2.4-1-1.6-1.4-3.5-1.4-5.7 0-1.9.5-3.7 1.4-5.4.9-1.7 2.3-2.5 4.3-2.5h58.2c1.9 0 3.3.8 4.3 2.5.9 1.7 1.4 3.5 1.4 5.4-.2 2.1-.7 3.9-1.6 5.6zm-495.2-4.8 26.6 86.5c.7 2.1 2.2 3.6 4.3 4.6 2.2 1 4.6 1.4 7.2 1.4 2.7 0 5.1-.5 7.3-1.4 2.2-1 3.6-2.5 4.3-4.6l26.4-86.5c.2-.7.3-1.2.3-1.4 0-1.1-.4-2.1-1.1-3-.7-.9-1.7-1.7-2.8-2.3-1.1-.7-2.3-1.2-3.6-1.6-1.3-.4-2.6-.5-3.8-.5-1.6 0-2.9.3-3.9.8-1.1.5-1.8 1.5-2.1 2.8l-20.9 74.6-21-74.6c-.4-1.3-1.1-2.2-2.1-2.8-1.1-.6-2.4-.8-3.9-.8-1.2 0-2.5.2-3.8.5-1.3.4-2.5.9-3.6 1.5s-2 1.4-2.8 2.3c-.7.9-1.1 1.9-1.1 3-.2.3-.1.7.1 1.5zm86.9-3.3c0-1.5.5-2.8 1.6-3.9s2.5-1.7 4.2-1.7h27.2c4.5 0 8.7.5 12.7 1.4 3.9 1 7.4 2.5 10.4 4.7s5.3 5.1 7 8.8c1.7 3.7 2.5 8.3 2.5 13.8 0 7.9-1.7 14.1-5.2 18.5-3.4 4.4-7.7 7.5-12.9 9l18 33.4c.3.4.5.8.5 1.2.1.4.1.8.1 1 0 1.1-.3 2.2-1 3.4-.7 1.1-1.6 2.2-2.6 3-1.1.9-2.2 1.6-3.6 2.1-1.3.6-2.6.8-3.9.8-1.3 0-2.5-.4-3.5-1.1-1.1-.7-1.9-1.8-2.7-3.2l-19.5-38h-11.6v35.9c0 1.8-.9 3.2-2.8 4.2-1.8 1-3.9 1.4-6.2 1.4-2.2 0-4.2-.5-6.1-1.4-1.9-1-2.8-2.4-2.8-4.2v-89.1h.2zm17.9 10.2V507h15.1c4.5 0 8.1-1.1 10.7-3.2 2.7-2.2 4-5.9 4-11.3s-1.3-9.2-4-11.4c-2.7-2.2-6.2-3.3-10.7-3.3h-15.1v-.1z" />
|
||||
</svg>
|
||||
);
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
} from '@/hooks/firmware-tool';
|
||||
import { useLocalization } from '@fluent/react';
|
||||
import classNames from 'classnames';
|
||||
import { Control, Controller } from 'react-hook-form';
|
||||
import { Control, Controller, FieldPath, FieldValues } from 'react-hook-form';
|
||||
import {
|
||||
FirmwareUpdateStatus,
|
||||
TrackerStatus as TrackerStatusEnum,
|
||||
@@ -22,9 +22,9 @@ interface DeviceCardProps {
|
||||
color?: string;
|
||||
}
|
||||
|
||||
interface DeviceCardControlProps {
|
||||
control?: Control<any>;
|
||||
name?: string;
|
||||
interface DeviceCardControlProps<T extends FieldValues = FieldValues> {
|
||||
control?: Control<T>;
|
||||
name?: FieldPath<T>;
|
||||
progress?: number;
|
||||
disabled?: boolean;
|
||||
}
|
||||
@@ -55,7 +55,7 @@ export function DeviceCardContent({ deviceNames, status }: DeviceCardProps) {
|
||||
);
|
||||
}
|
||||
|
||||
export function DeviceCardControl({
|
||||
export function DeviceCardControl<T extends FieldValues = FieldValues>({
|
||||
control,
|
||||
name,
|
||||
progress,
|
||||
@@ -63,7 +63,7 @@ export function DeviceCardControl({
|
||||
online = null,
|
||||
color = 'bg-background-60',
|
||||
...props
|
||||
}: DeviceCardControlProps & DeviceCardProps) {
|
||||
}: DeviceCardControlProps<T> & DeviceCardProps) {
|
||||
const cardborder = useMemo(() => {
|
||||
if (!props.status) return 'border-transparent';
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import {
|
||||
} from '@/firmware-tool-api/firmwareToolComponents';
|
||||
import { useEffect, useMemo, useState } from 'react';
|
||||
import { useSafeLocalization } from '@/i18n/config';
|
||||
import semver from 'semver';
|
||||
|
||||
function Selector({
|
||||
text,
|
||||
@@ -142,16 +143,33 @@ export function SelectSourceSetep({
|
||||
!source.availableBoards.includes(partialBoard.board) ||
|
||||
source.source !== partialBoard.source,
|
||||
name: source.version,
|
||||
isBranch: source.branch == source.version,
|
||||
});
|
||||
|
||||
return curr;
|
||||
},
|
||||
[] as { name: string; disabled: boolean; isBranch: boolean }[]
|
||||
[] as { name: string; disabled: boolean }[]
|
||||
)
|
||||
.sort((a, b) => {
|
||||
if (a.isBranch !== b.isBranch) return a.isBranch ? 1 : -1;
|
||||
return a.name.localeCompare(b.name);
|
||||
// safeguard against inf loop
|
||||
if (a == b) return 0;
|
||||
|
||||
const versionA = semver.valid(a.name);
|
||||
const versionB = semver.valid(b.name);
|
||||
|
||||
// if both are not valid versions:
|
||||
// if one is main, push that higher
|
||||
// otherwise, push up the one which is alphabetically sooner
|
||||
if (versionA == null && versionB == null) {
|
||||
if (a.name == 'main') return -1;
|
||||
return a.name.localeCompare(b.name);
|
||||
}
|
||||
|
||||
// if one isn't valid, push the one that's valid up
|
||||
if ((versionA == null) != (versionB == null))
|
||||
return versionA == null ? 1 : -1;
|
||||
|
||||
// if A is lower, push B up
|
||||
return semver.lt(versionA!, versionB!) ? 1 : -1;
|
||||
}),
|
||||
};
|
||||
}, [sources, partialBoard]);
|
||||
|
||||
@@ -58,7 +58,7 @@ const DeviceList = ({
|
||||
control,
|
||||
devices,
|
||||
}: {
|
||||
control: Control<any>;
|
||||
control: Control<FirmwareUpdateForm>;
|
||||
devices: DeviceDataT[];
|
||||
}) => {
|
||||
const { l10n } = useLocalization();
|
||||
|
||||
File renamed without changes.
@@ -0,0 +1,113 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import { Button } from '@/components/commons/Button';
|
||||
import { BaseModal } from '@/components/commons/BaseModal';
|
||||
import { CheckboxInternal } from '@/components/commons/Checkbox';
|
||||
import { Typography } from '@/components/commons/Typography';
|
||||
import { useElectron } from '@/hooks/electron';
|
||||
import { useWebsocketAPI } from '@/hooks/websocket-api';
|
||||
import { RpcMessage, InstalledInfoResponseT } from 'solarxr-protocol';
|
||||
import { useConfig } from '@/hooks/config';
|
||||
import { useLocalization } from '@fluent/react';
|
||||
|
||||
export function UdevRulesModal() {
|
||||
const { config, setConfig } = useConfig();
|
||||
const { useRPCPacket, sendRPCPacket } = useWebsocketAPI();
|
||||
const electron = useElectron();
|
||||
const [udevContent, setUdevContent] = useState('');
|
||||
const [isUdevInstalledResponse, setIsUdevInstalledResponse] = useState(true);
|
||||
const [showUdevWarning, setShowUdevWarning] = useState(false);
|
||||
const [dontShowThisSession, setDontShowThisSession] = useState(false);
|
||||
const [dontShowAgain, setDontShowAgain] = useState(false);
|
||||
const { l10n } = useLocalization();
|
||||
|
||||
const handleUdevContent = async () => {
|
||||
if (electron.isElectron) {
|
||||
const dir = await electron.api.getInstallDir();
|
||||
const rulesPath = `${dir}/69-slimevr-devices.rules`;
|
||||
setUdevContent(
|
||||
`cat ${rulesPath} | sudo sh -c 'tee /etc/udev/rules.d/69-slimevr-devices.rules >/dev/null && udevadm control --reload-rules && udevadm trigger'`
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
handleUdevContent();
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (!config) throw 'Invalid state!';
|
||||
if (electron.isElectron) {
|
||||
const isLinux = electron.data().os.type === 'linux';
|
||||
const udevMissing = !isUdevInstalledResponse;
|
||||
const notHiddenGlobally = !config.dontShowUdevModal;
|
||||
const notHiddenThisSession = !dontShowThisSession;
|
||||
const shouldShow =
|
||||
isLinux && udevMissing && notHiddenGlobally && notHiddenThisSession;
|
||||
setShowUdevWarning(shouldShow);
|
||||
}
|
||||
}, [config, isUdevInstalledResponse, dontShowThisSession]);
|
||||
|
||||
useEffect(() => {
|
||||
sendRPCPacket(
|
||||
RpcMessage.InstalledInfoRequest,
|
||||
new InstalledInfoResponseT()
|
||||
);
|
||||
}, []);
|
||||
|
||||
useRPCPacket(
|
||||
RpcMessage.InstalledInfoResponse,
|
||||
({ isUdevInstalled }: InstalledInfoResponseT) => {
|
||||
setIsUdevInstalledResponse(isUdevInstalled);
|
||||
}
|
||||
);
|
||||
|
||||
const handleModalClose = () => {
|
||||
if (!config) throw 'Invalid State!';
|
||||
setConfig({ dontShowUdevModal: dontShowAgain });
|
||||
setDontShowThisSession(true);
|
||||
};
|
||||
|
||||
const copyToClipboard = () => {
|
||||
navigator.clipboard.writeText(udevContent);
|
||||
};
|
||||
|
||||
return (
|
||||
<BaseModal isOpen={showUdevWarning} appendClasses={'w-full max-w-2xl'}>
|
||||
<div className="flex w-full h-full flex-col gap-4">
|
||||
<div className="flex flex-col gap-3">
|
||||
<div className="flex flex-col gap-2">
|
||||
<Typography
|
||||
variant="main-title"
|
||||
id="install-info_udev-rules_modal_title"
|
||||
/>
|
||||
<Typography id="install-info_udev-rules_warning" />
|
||||
</div>
|
||||
<div className="relative w-full max-w-2xl">
|
||||
<div className="absolute right-2 top-2">
|
||||
<Button variant="secondary" onClick={copyToClipboard}>
|
||||
Copy
|
||||
</Button>
|
||||
</div>
|
||||
<div className="bg-background-80 rounded-lg overflow-auto p-2 w-full h-[300px]">
|
||||
<pre className="text-wrap">{udevContent}</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex justify-between gap-2">
|
||||
<CheckboxInternal
|
||||
label={l10n.getString(
|
||||
'install-info_udev-rules_modal-dont-show-again_checkbox'
|
||||
)}
|
||||
name="dismiss-udev-rules-checkbox"
|
||||
onChange={(e) => setDontShowAgain(e.currentTarget.checked)}
|
||||
/>
|
||||
<Button
|
||||
variant="primary"
|
||||
onClick={handleModalClose}
|
||||
id="install-info_udev-rules_modal_button"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</BaseModal>
|
||||
);
|
||||
}
|
||||
Loaded 100 of 200 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user