Skip to content

Commit

Permalink
Merge pull request #192 from vircadia/feature/desktop-wrapper
Browse files Browse the repository at this point in the history
Add desktop wrapper.
  • Loading branch information
digisomni authored Oct 24, 2023
2 parents 87fe6c7 + 05705e3 commit b83a14d
Show file tree
Hide file tree
Showing 56 changed files with 17,349 additions and 13,224 deletions.
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

0 comments on commit b83a14d

Please sign in to comment.