Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add desktop wrapper. #192

Merged
merged 35 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
1525f03
Initialize Tauri wrapper
Gigabyte5671 Oct 10, 2023
8cd7c41
Generate app icons
Gigabyte5671 Oct 10, 2023
4f6e483
Fix invalid Cargo configuration
Gigabyte5671 Oct 10, 2023
c7fb73a
Adjust the Quasar dev server config when running the desktop wrapper
Gigabyte5671 Oct 10, 2023
4b0c755
Create install, dev, and build scripts for the desktop wrapper
Gigabyte5671 Oct 10, 2023
c536b86
Update tauri.conf.json
Gigabyte5671 Oct 10, 2023
802b8ee
Increase the density of the header bar
Gigabyte5671 Oct 10, 2023
c126e63
Simplify overlay toggling logic
Gigabyte5671 Oct 10, 2023
1dfb841
Don't open the chat & menu by default when in the desktop app
Gigabyte5671 Oct 10, 2023
ad3d420
Add a preloader
Gigabyte5671 Oct 12, 2023
1b88cf2
Style adjustments
Gigabyte5671 Oct 12, 2023
b0e3971
Style adjustments
Gigabyte5671 Oct 12, 2023
199a214
Create a workflow to test the desktop build
Gigabyte5671 Oct 12, 2023
2e5bda0
Update build_test_desktop.yml
Gigabyte5671 Oct 12, 2023
7004a09
Update build_test_desktop.yml
Gigabyte5671 Oct 12, 2023
60ffb0e
Update build_test_desktop.yml
Gigabyte5671 Oct 12, 2023
19ef7cb
Update build_test_desktop.yml
Gigabyte5671 Oct 12, 2023
5ca3922
Update build_test_desktop.yml
Gigabyte5671 Oct 12, 2023
3cf201f
Simplify workflow names
Gigabyte5671 Oct 24, 2023
bc2ca21
Clarify environment variable name
Gigabyte5671 Oct 24, 2023
54d8530
Remove some static assets
Gigabyte5671 Oct 24, 2023
360e48b
Install the desktop dependencies with a `postinstall` script
Gigabyte5671 Oct 24, 2023
f9a6aa7
Add the `vircadia-assets` repo as a submodule
Gigabyte5671 Oct 24, 2023
deb29c4
Fix broken asset links
Gigabyte5671 Oct 24, 2023
df95ac9
Update the `vircadia-assets` submodule
Gigabyte5671 Oct 24, 2023
5592dc8
Don't lint the `vircadia-assets` submodule
Gigabyte5671 Oct 24, 2023
86ca936
Fix broken asset links
Gigabyte5671 Oct 24, 2023
f9f029c
Retrieve avatar models from the `vircadia-assets` submodule
Gigabyte5671 Oct 24, 2023
5ed3ed5
Update the `vircadia-assets` submodule
Gigabyte5671 Oct 24, 2023
0e885aa
Merge branch 'master' into feature/desktop-wrapper
Gigabyte5671 Oct 24, 2023
e7680a2
Update build_desktop.yml
Gigabyte5671 Oct 24, 2023
3bbc271
Update README.md
Gigabyte5671 Oct 24, 2023
f7e7bec
Update package-lock.json
Gigabyte5671 Oct 24, 2023
e27b550
Reduce the number of warnings coming from `LODManager.ts`
Gigabyte5671 Oct 24, 2023
05705e3
Fix invisible nametag corners
Gigabyte5671 Oct 24, 2023
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: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ quasar.config.js
/build_scripts
/dist
/node_modules
/public/assets
/src/*.d.ts
/src-bex/www
/src-capacitor
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/build_desktop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: '🖥️ Desktop Build'
on:
pull_request:
branches: [ "master" ]

jobs:
desktop-build:
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-20.04, windows-latest]

runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Install Dependencies (Ubuntu Only)
if: matrix.platform == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf

- name: Install Dependencies
run: npm ci

- name: Build
env:
NODE_OPTIONS: "--max_old_space_size=4096"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VRCA_DESKTOP_MODE: build
run: cd desktop && npm run tauri build

- name: Upload Build
uses: actions/upload-artifact@v3
with:
name: build-desktop-${{ matrix.platform }}-${{ github.event.number }}
path: |
${{ runner.workspace }}/vircadia-web/desktop/src-tauri/target/release/bundle/**/*.app
${{ runner.workspace }}/vircadia-web/desktop/src-tauri/target/release/bundle/**/*.dmg
${{ runner.workspace }}/vircadia-web/desktop/src-tauri/target/release/bundle/**/*.deb
${{ runner.workspace }}/vircadia-web/desktop/src-tauri/target/release/bundle/**/*.AppImage
${{ runner.workspace }}/vircadia-web/desktop/src-tauri/target/release/bundle/**/*.msi
${{ runner.workspace }}/vircadia-web/desktop/src-tauri/target/release/bundle/**/*.exe
if-no-files-found: error
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Test the latest changes.
name: ⚙️ Web Build
on:
# Triggers the workflow on PRs in "master" and push events in every branch except "master".
push:
Expand All @@ -10,9 +11,8 @@ on:
# Allows this workflow to be run manually from the Actions tab.
workflow_dispatch:

name: ⚙️ Build Test
jobs:
build-test:
web-build:
name: ⚒️ Build
runs-on: ubuntu-latest
steps:
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "public/assets"]
path = public/assets
url = https://github.com/vircadia/vircadia-assets.git
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,20 @@ npm run test
npm run build
```

## Desktop

The web client can also be compiled to a standalone desktop app. When doing so, the `VRCA_DESKTOP_MODE` environment variable must be set to either `dev` or `build`.

To run the desktop wrapper in development mode:
```sh
npm run dev-desktop
```

To build the desktop executable:
```sh
npm run build-desktop
```

## To Update Contributors

```sh
Expand Down
24 changes: 24 additions & 0 deletions desktop/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
7 changes: 7 additions & 0 deletions desktop/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"Vue.volar",
"tauri-apps.tauri-vscode",
"rust-lang.rust-analyzer"
]
}
36 changes: 36 additions & 0 deletions desktop/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Vircadia Desktop

This is a desktop wrapper around the Vircadia Web interface, made using [Tauri](https://tauri.app/).


## Recommended IDE Setup

[VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer)


## Installation

```sh
npm install
```


## Development

Start in dev mode with hot-reloading:
```sh
npm run dev
```

New app icons can be generated with:
```sh
npm run make-icon
```
The icons are generated from the Vircadia logo image: `../public/assets/images/branding/vircadia-icon-256.png`


## Building

```sh
npm run build
```
Loading
Loading