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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
fi

nix_direnv_watch_file rust-toolchain.toml
nix_direnv_watch_file package.json
if ! use flake . --impure
then
Expand Down
38 changes: 0 additions & 38 deletions .github/CODEOWNERS

This file was deleted.

44 changes: 15 additions & 29 deletions .github/workflows/build-gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,25 +63,17 @@ jobs:
with:
submodules: recursive

- if: startsWith(matrix.os, 'ubuntu')
name: Set up Linux dependencies
uses: awalsh128/cache-apt-pkgs-action@v1.6.0
with:
packages: libgtk-3-dev webkit2gtk-4.1 libappindicator3-dev librsvg2-dev patchelf
# Increment to invalidate the cache
version: ${{ format('v1.0-{0}', env.BUILD_ARCH) }}
# Enables a workaround to attempt to run pre and post install scripts
execute_install_scripts: true
# Disables uploading logs as a build artifact
debug: false

- if: matrix.os == 'windows-11-arm'
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false

- name: Cache cargo dependencies
uses: Swatinem/rust-cache@v2
# - if: startsWith(matrix.os, 'ubuntu')
# name: Set up Linux dependencies
# uses: awalsh128/cache-apt-pkgs-action@v1.6.0
# with:
# packages: libgtk-3-dev libappindicator3-dev librsvg2-dev patchelf
# # Increment to invalidate the cache
# version: ${{ format('v2-{0}', env.BUILD_ARCH) }}
# # Enables a workaround to attempt to run pre and post install scripts
# execute_install_scripts: true
# # Disables uploading logs as a build artifact
# debug: false

- uses: pnpm/action-setup@v4
- name: Use Node.js
Expand All @@ -99,31 +91,25 @@ jobs:
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
NODE_OPTIONS: ${{ matrix.os == 'macos-latest' && '--max-old-space-size=4096' || '' }}
run: pnpm run skipbundler --config $( ./gui/scripts/gitversion.mjs )
run: cd gui && pnpm run build

- if: startsWith(matrix.os, 'windows')
name: Upload a Build Artifact (Windows)
uses: actions/upload-artifact@v6
with:
# Artifact name
name: ${{ format('SlimeVR-GUI-Windows-{0}', env.BUILD_ARCH) }}
# A file, directory or wildcard pattern that describes what to upload
path: target/release/slimevr.exe
path: gui/out/**/*

- if: startsWith(matrix.os, 'ubuntu')
name: Upload a Build Artifact (Linux)
uses: actions/upload-artifact@v6
with:
# Artifact name
name: ${{ format('SlimeVR-GUI-Linux-{0}', env.BUILD_ARCH) }}
# A file, directory or wildcard pattern that describes what to upload
path: target/release/slimevr
path: gui/out/**/*

- if: matrix.os == 'macos-latest'
name: Upload a Build Artifact (macOS)
uses: actions/upload-artifact@v6
with:
# Artifact name
name: SlimeVR-GUI-macOS
# A file, directory or wildcard pattern that describes what to upload
path: target/release/slimevr
path: gui/out/**/*
80 changes: 25 additions & 55 deletions .github/workflows/gradle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -190,27 +190,14 @@ jobs:
uses: awalsh128/cache-apt-pkgs-action@v1.6.0
with:
packages: |
build-essential curl wget file libssl-dev libgtk-3-dev libappindicator3-dev librsvg2-dev xdg-utils
build-essential curl wget file libssl-dev libgtk-3-dev libappindicator3-dev librsvg2-dev xdg-utils patchelf
# Increment to invalidate the cache
version: ${{ format('v1.0-{0}', env.BUILD_ARCH) }}
version: ${{ format('v2.0-electron-{0}', env.BUILD_ARCH) }}
# Enables a workaround to attempt to run pre and post install scripts
execute_install_scripts: true
# Disables uploading logs as a build artifact
debug: false

- name: Set up specific Linux versioned dependencies
run: |
sudo apt-get update && sudo apt-get install -y \
libwebkit2gtk-4.1-0=2.44.0-2 \
libwebkit2gtk-4.1-dev=2.44.0-2 \
libjavascriptcoregtk-4.1-0=2.44.0-2 \
libjavascriptcoregtk-4.1-dev=2.44.0-2 \
gir1.2-javascriptcoregtk-4.1=2.44.0-2 \
gir1.2-webkit2-4.1=2.44.0-2;

- name: Cache cargo dependencies
uses: Swatinem/rust-cache@v2

- uses: pnpm/action-setup@v4
- name: Use Node.js
uses: actions/setup-node@v6
Expand All @@ -224,11 +211,14 @@ jobs:
- name: Build
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: pnpm run tauri build --config $( ./gui/scripts/gitversion.mjs )
run: |
cd gui
pnpm run build
pnpm exec electron-builder --linux --publish never

- name: Make GUI tarball
run: |
tar czf slimevr-gui-dist.tar.gz -C gui/dist/ .
tar czf slimevr-gui-dist.tar.gz -C gui/out/renderer/ .

- uses: actions/upload-artifact@v6
if: matrix.os == 'ubuntu-latest'
Expand All @@ -239,24 +229,24 @@ jobs:
- uses: actions/upload-artifact@v6
with:
name: ${{ format('SlimeVR-GUI-Deb-{0}', env.BUILD_ARCH) }}
path: target/release/bundle/deb/slimevr*.deb
path: gui/dist/artifacts/*.deb

- uses: actions/upload-artifact@v6
with:
name: ${{ format('SlimeVR-GUI-AppImage-{0}', env.BUILD_ARCH) }}
path: target/release/bundle/appimage/slimevr*.AppImage
path: gui/dist/artifacts/*.AppImage

- uses: actions/upload-artifact@v6
with:
name: ${{ format('SlimeVR-GUI-RPM-{0}', env.BUILD_ARCH) }}
path: target/release/bundle/rpm/slimevr*.rpm
path: gui/dist/artifacts/*.rpm

- name: Prepare for release
if: startsWith(github.ref, 'refs/tags/')
run: |
cp target/release/bundle/appimage/slimevr*.AppImage "./SlimeVR-$BUILD_ARCH.appimage"
cp target/release/bundle/deb/slimevr*.deb "./SlimeVR-$BUILD_ARCH.deb"
cp target/release/bundle/rpm/slimevr*.rpm "./SlimeVR-$BUILD_ARCH.rpm"
cp gui/dist/artifacts/*.AppImage "./SlimeVR-$BUILD_ARCH.appimage"
cp gui/dist/artifacts/*.deb "./SlimeVR-$BUILD_ARCH.deb"
cp gui/dist/artifacts/*.rpm "./SlimeVR-$BUILD_ARCH.rpm"

- name: Upload to draft release
uses: softprops/action-gh-release@v2
Expand Down Expand Up @@ -284,9 +274,6 @@ jobs:
name: 'SlimeVR-Server'
path: server/desktop/build/libs/

- name: Cache cargo dependencies
uses: Swatinem/rust-cache@v2

- uses: pnpm/action-setup@v4
- name: Use Node.js
uses: actions/setup-node@v6
Expand All @@ -296,44 +283,31 @@ jobs:

- name: Install dependencies
run: |
rustup target add x86_64-apple-darwin
pnpm i

- name: Build
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
NODE_OPTIONS: --max-old-space-size=4096
run: pnpm run tauri build --target universal-apple-darwin --config $( ./gui/scripts/gitversion.mjs )

- name: Modify Application
run: |
cd target/universal-apple-darwin/release/bundle/macos/slimevr.app/Contents/MacOS
cp $( git rev-parse --show-toplevel )/server/desktop/build/libs/slimevr.jar ./
cd ../../../
/usr/libexec/PlistBuddy -c "Set :CFBundleDisplayName SlimeVR" slimevr.app/Contents/Info.plist
/usr/libexec/PlistBuddy -c "Set :CFBundleName SlimeVR" slimevr.app/Contents/Info.plist
codesign --sign - --deep --force slimevr.app
mv slimevr.app SlimeVR.app
cd ../dmg/
./bundle_dmg.sh --volname SlimeVR --icon slimevr 180 170 --app-drop-link 480 170 \
--window-size 660 400 --hide-extension ../macos/SlimeVR.app \
--volicon ../macos/SlimeVR.app/Contents/Resources/icon.icns --skip-jenkins \
--eula ../../../../../LICENSE-MIT slimevr.dmg ../macos/SlimeVR.app
cd gui
pnpm run build
pnpm exec electron-builder --mac --universal --publish never

- uses: actions/upload-artifact@v6
with:
name: SlimeVR-GUI-MacApp
path: target/universal-apple-darwin/release/bundle/macos/SlimeVR*.app
path: gui/dist/artifacts/*.app

- uses: actions/upload-artifact@v6
with:
name: SlimeVR-GUI-MacDmg
path: target/universal-apple-darwin/release/bundle/dmg/slimevr.dmg
path: gui/dist/artifacts/*.dmg

- name: Prepare for release
if: startsWith(github.ref, 'refs/tags/')
run: |
cp target/universal-apple-darwin/release/bundle/dmg/slimevr.dmg ./SlimeVR-mac.dmg
cp gui/dist/artifacts/*.dmg ./SlimeVR-mac.dmg

- name: Upload to draft release
uses: softprops/action-gh-release@v2
Expand Down Expand Up @@ -364,13 +338,6 @@ jobs:
name: 'SlimeVR-Server'
path: server/desktop/build/libs/

- if: matrix.os == 'windows-11-arm'
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false

- name: Cache cargo dependencies
uses: Swatinem/rust-cache@v2

- uses: pnpm/action-setup@v4
- name: Use Node.js
Expand All @@ -387,16 +354,19 @@ jobs:
shell: bash
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: pnpm run skipbundler --config $( ./gui/scripts/gitversion.mjs )
run: |
cd gui
pnpm run build
pnpm exec electron-builder --win portable --publish never

- name: Bundle to zips
shell: bash
run: |
mkdir SlimeVR
cp gui/src-tauri/icons/icon.ico ./SlimeVR/run.ico
cp gui/dist/artifacts/*.exe ./SlimeVR/slimevr.exe
cp gui/electron/ressources/icons/icon.ico ./SlimeVR/run.ico
cp server/desktop/build/libs/slimevr.jar ./SlimeVR/slimevr.jar
cp server/core/resources/* ./SlimeVR/
cp target/release/slimevr.exe ./SlimeVR/
7z a -tzip "SlimeVR-$BUILD_ARCH.zip" ./SlimeVR/

- uses: actions/upload-artifact@v6
Expand Down
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@
# ignore gradle build folder
build/

# Rust build artifacts
/target

# direnv has been claimed for Nix usage
.direnv/
.devenv
Expand All @@ -46,3 +43,7 @@ local.properties

# Ignore temporary config
vrconfig.yml.tmp


# Nixos
.bin/
1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"gaborv.flatbuffers",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"rust-lang.rust-analyzer",
"bradlc.vscode-tailwindcss",
"EditorConfig.EditorConfig",
"macabeus.vscode-fluent",
Expand Down
7 changes: 2 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ This document describes essential knowledge required to contribute to the SlimeV
- [Git](https://git-scm.com/downloads)
- [Java v17+](https://adoptium.net/temurin/releases/)
- [Node.js v16.9+](https://nodejs.org) (We recommend the use of `nvm` instead of installing Node.js directly)
- [Microsoft Edge WebView2](https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section) or `webkit2gtk` for Linux
- [Rust](https://rustup.rs)

## Cloning the code
First, clone the codebase using git in a terminal in the folder you want.
Expand All @@ -32,13 +30,12 @@ be at `server/build/libs/slimevr.jar` (you can ignore `server.jar`).

(Note: Your IDE may be able to do all of the above for you.)

### Tauri (gui)
### Electron (gui)

- Activate corepack (included with Node.JS) via `corepack enable` (might require administrator permissions)
- Run `pnpm i` in your IDE's terminal to download and install dependencies.
- To launch the GUI in dev mode, run `pnpm gui`.
- Finally, to compile for production, run `pnpm run tauri build`. The result
will be at `target/release/slimevr.exe`.
- Finally, to compile for production, run `pnpm build`. The result

## Code style

Expand Down
Loading
Loading