Skip to content

Commit

Permalink
Merge branch 'main' into kotlin-warnings-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ImUrX authored Mar 30, 2024
2 parents d96f93a + 1aa8679 commit 4782aef
Show file tree
Hide file tree
Showing 164 changed files with 15,289 additions and 19,630 deletions.
3 changes: 2 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

# Make Loucas and Uriel the owners of all GUI stuff
/gui/ @ImUrX
/package-lock.json @ImUrX
/pnpm-lock.yaml @ImUrX
/pnpm-workspace.yaml @ImUrX

# Uriel and Erimel responsible for i18n
/gui/public/i18n/ @ImUrX @Louka3000
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/build-gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,18 @@ jobs:
with:
submodules: recursive

- name: Use Node.js ${{ matrix.node-version }}
- uses: pnpm/action-setup@v2
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
cache: 'npm'
cache: 'pnpm'

- name: Build
run: |
npm ci
pnpm i
cd gui
npm run lint
pnpm run lint
build:
strategy:
Expand Down Expand Up @@ -71,16 +72,17 @@ jobs:
with:
shared-key: "${{ matrix.os }}"

- name: Use Node.js ${{ matrix.node-version }}
- uses: pnpm/action-setup@v2
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
cache: 'npm'
cache: 'pnpm'

- name: Build
run: |
npm ci
npm run skipbundler
pnpm i
pnpm run skipbundler
- if: matrix.os == 'windows-latest'
name: Upload a Build Artifact (Windows)
Expand Down
37 changes: 21 additions & 16 deletions .github/workflows/gradle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,17 @@ jobs:
- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- uses: pnpm/action-setup@v2
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
cache: 'npm'
cache: 'pnpm'

- name: Build GUI
run: |
npm ci
cd gui && npm run build
pnpm i
cd gui && pnpm run build
- name: Build with Gradle
run: ./gradlew :server:android:assembleDebug
Expand Down Expand Up @@ -172,16 +173,17 @@ jobs:
with:
shared-key: "ubuntu-22.04"

- uses: pnpm/action-setup@v2
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
cache: 'npm'
cache: 'pnpm'

- name: Build
run: |
npm ci
npm run tauri build
pnpm i
pnpm run tauri build
- uses: actions/[email protected]
with:
Expand Down Expand Up @@ -244,20 +246,22 @@ jobs:
with:
shared-key: "macos-latest"

- uses: pnpm/action-setup@v2
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
cache: 'npm'
cache: 'pnpm'

- name: Build
run: |
npm ci
npm run tauri build -- "--target universal-apple-darwin"
rustup target add aarch64-apple-darwin
pnpm i
pnpm run tauri build --target universal-apple-darwin
- name: Modify Application
run: |
cd target/release/bundle/macos/slimevr.app/Contents/MacOS
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 ../../../../dmg/
./bundle_dmg.sh --volname slimevr --icon slimevr 180 170 --app-drop-link 480 170 \
Expand All @@ -268,17 +272,17 @@ jobs:
- uses: actions/[email protected]
with:
name: SlimeVR-GUI-MacApp
path: target/release/bundle/macos/slimevr*.app
path: target/universal-apple-darwin/release/bundle/macos/slimevr*.app

- uses: actions/[email protected]
with:
name: SlimeVR-GUI-MacDmg
path: target/release/bundle/dmg/slimevr.dmg
path: target/universal-apple-darwin/release/bundle/dmg/slimevr.dmg

- name: Prepare for release
if: startsWith(github.ref, 'refs/tags/')
run: |
cp target/release/bundle/dmg/slimevr.dmg ./SlimeVR-mac.dmg
cp target/universal-apple-darwin/release/bundle/dmg/slimevr.dmg ./SlimeVR-mac.dmg
- name: Upload to draft release
uses: softprops/action-gh-release@v1
Expand Down Expand Up @@ -309,16 +313,17 @@ jobs:
with:
shared-key: "windows-latest"

- uses: pnpm/action-setup@v2
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
cache: 'npm'
cache: 'pnpm'

- name: Build
run: |
npm ci
npm run skipbundler
pnpm i
pnpm run skipbundler
- name: Bundle to zips
shell: bash
Expand Down
1 change: 1 addition & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"bradlc.vscode-tailwindcss",
"EditorConfig.EditorConfig",
"macabeus.vscode-fluent",
"redhat.vscode-yaml"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
Expand Down
13 changes: 7 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ 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+](https://nodejs.org) (We recommend the use of `nvm` instead of installing Node.js directly)
- [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)

Expand Down Expand Up @@ -34,9 +34,10 @@ be at `server/build/libs/slimevr.jar` (you can ignore `server.jar`).

### Tauri (gui)

- Run `npm install` in your IDE's terminal to download and install dependencies.
- To launch the GUI in dev mode, run `npm run gui`.
- Finally, to compile for production, run `npm run tauri build`. The result
- 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`.

## Code style
Expand Down Expand Up @@ -87,8 +88,8 @@ Eclipse will only do a subset of the checks in `spotless`, so you may still want

We use ESLint and Prettier to format GUI code.
- First, go into the GUI's directory with your terminal by running `cd gui`.
- To check code formatting, run `npm run lint`.
- To fix code formatting, run `npm run lint:fix` and `npm run format`
- To check code formatting, run `pnpm run lint`.
- To fix code formatting, run `pnpm run lint:fix` and `pnpm run format`

Don't forget to run `cd ..` to return to the root directory.

Expand Down
22 changes: 18 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
plugins {
id("org.ajoberstar.grgit") version "5.2.0"
id("org.ajoberstar.grgit")
}
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
freetype
expat
libayatana-appindicator
libusb1
])
++ lib.optionals pkgs.stdenv.isDarwin [
pkgs.darwin.apple_sdk.frameworks.Security
Expand Down
7 changes: 4 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ android.useAndroidX=true
android.nonTransitiveRClass=true
org.gradle.unsafe.configuration-cache=false

kotlinVersion=1.9.0-RC
spotlessVersion=6.12.0
kotlinVersion=1.9.23
spotlessVersion=6.25.0
shadowJarVersion=8.1.1
buildconfigVersion=3.1.0
buildconfigVersion=5.3.5
grgitVersion=5.2.2
5 changes: 4 additions & 1 deletion gui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@tauri-apps/plugin-fs": "=2.0.0-alpha.1",
"@tauri-apps/plugin-os": "=2.0.0-alpha.2",
"@tauri-apps/plugin-shell": "=2.0.0-alpha.1",
"@tauri-apps/plugin-store": "=2.0.0-alpha.1",
"@tauri-apps/plugin-window": "=2.0.0-alpha.1",
"@vitejs/plugin-react": "^3.0.0",
"browser-fs-access": "^0.34.1",
Expand All @@ -32,6 +33,7 @@
"react": "^18.0.0",
"react-dev-utils": "^12.0.0",
"react-dom": "^18.0.0",
"react-error-boundary": "^4.0.12",
"react-helmet": "^6.1.0",
"react-hook-form": "^7.29.0",
"react-modal": "^3.15.1",
Expand All @@ -50,7 +52,7 @@
"skipbundler": "tauri build -b none",
"tauri": "tauri",
"lint": "tsc --noEmit && eslint --max-warnings=0 \"src/**/*.{js,jsx,ts,tsx,json}\" && prettier --check \"src/**/*.{js,jsx,ts,tsx,css,md,json}\"",
"lint:fix": "tsc --noEmit && eslint --fix --max-warnings=0 \"src/**/*.{js,jsx,ts,tsx,json}\" && npm run format",
"lint:fix": "tsc --noEmit && eslint --fix --max-warnings=0 \"src/**/*.{js,jsx,ts,tsx,json}\" && pnpm run format",
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,css,md,json}\"",
"preview-vite": "vite preview",
"javaversion-build": "cd src-tauri/src/ && javac JavaVersion.java && jar cvfe JavaVersion.jar JavaVersion JavaVersion.class"
Expand Down Expand Up @@ -81,6 +83,7 @@
"@types/react-dom": "^18.0.5",
"@types/react-helmet": "^6.1.6",
"@types/react-modal": "3.13.1",
"@types/semver": "^7.5.4",
"@types/three": "^0.155.0",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
Expand Down
Loading

0 comments on commit 4782aef

Please sign in to comment.