Skip to content
Merged
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
95 changes: 95 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,98 @@ jobs:
working-directory: rmgr-viewer
- run: npm run format:check
working-directory: rmgr-viewer

# Keeps the Rust side of the desktop app from rotting between releases.
tauri-check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
path: rmgr-viewer
- uses: actions/checkout@v4
with:
repository: hopskipnfall/rmgr-ts
path: rmgr-ts
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm ci
working-directory: rmgr-ts
- run: npm run build
working-directory: rmgr-ts
- name: Install Tauri system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- uses: dtolnay/rust-toolchain@stable
- uses: swatinem/rust-cache@v2
with:
workspaces: rmgr-viewer/src-tauri
- run: npm ci
working-directory: rmgr-viewer
# tauri::generate_context! needs frontendDist (../dist) to exist.
- run: npm run build
working-directory: rmgr-viewer
- run: cargo check --manifest-path src-tauri/Cargo.toml
working-directory: rmgr-viewer

# Builds the installers on every push to master and every PR, uploading them
# as workflow artifacts (no release is created; that's release.yml on tags).
tauri-build:
needs: tauri-check
strategy:
fail-fast: false
matrix:
include:
- platform: macos-latest
args: --target universal-apple-darwin
artifact: macos-universal
- platform: windows-latest
args: ""
artifact: windows
- platform: ubuntu-22.04
args: ""
artifact: linux
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
with:
path: rmgr-viewer
- uses: actions/checkout@v4
with:
repository: hopskipnfall/rmgr-ts
path: rmgr-ts
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm ci
working-directory: rmgr-ts
- run: npm run build
working-directory: rmgr-ts
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
- uses: swatinem/rust-cache@v2
with:
workspaces: rmgr-viewer/src-tauri
- name: Install Tauri system dependencies (Linux)
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- run: npm ci
working-directory: rmgr-viewer
- uses: tauri-apps/tauri-action@v0
with:
projectPath: rmgr-viewer
args: ${{ matrix.args }}
- uses: actions/upload-artifact@v4
with:
name: rmgr-viewer-${{ matrix.artifact }}
path: |
rmgr-viewer/src-tauri/target/**/release/bundle/dmg/*.dmg
rmgr-viewer/src-tauri/target/release/bundle/msi/*.msi
rmgr-viewer/src-tauri/target/release/bundle/nsis/*.exe
rmgr-viewer/src-tauri/target/release/bundle/appimage/*.AppImage
rmgr-viewer/src-tauri/target/release/bundle/deb/*.deb
if-no-files-found: error
63 changes: 63 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Release desktop app

on:
push:
tags: ["v*"]

permissions:
contents: write

jobs:
release:
strategy:
fail-fast: false
matrix:
include:
- platform: macos-latest
args: --target universal-apple-darwin
- platform: windows-latest
args: ""
- platform: ubuntu-22.04
args: ""
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
with:
path: rmgr-viewer
- uses: actions/checkout@v4
with:
repository: hopskipnfall/rmgr-ts
path: rmgr-ts

- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm ci
working-directory: rmgr-ts
- run: npm run build
working-directory: rmgr-ts

- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}

- name: Install Tauri system dependencies (Linux)
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf

- run: npm ci
working-directory: rmgr-viewer

# Unsigned: see README "Desktop app" for first-launch steps.
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
projectPath: rmgr-viewer
tagName: ${{ github.ref_name }}
releaseName: RMGR Viewer ${{ github.ref_name }}
releaseDraft: true
prerelease: false
args: ${{ matrix.args }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ dist/
/.worktrees/
/.superpowers/

src-tauri/target
src-tauri/gen
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,23 @@ npm run lint
npm run format:check
```

## Desktop app

A Tauri desktop build (macOS, Windows, Linux) points at a library folder and keeps read access to it, so replays never need re-importing, and new recordings appear automatically.

**Install.** Download the installer for your OS from the [Releases](https://github.com/hopskipnfall/rmgr-viewer/releases) page (`.dmg`, `.msi`/`-setup.exe`, `.AppImage`/`.deb`). Builds are unsigned, so the first launch needs one extra step:

- **macOS (Gatekeeper):** right-click the app and choose Open, then Open again. Or run `xattr -dr com.apple.quarantine "/Applications/RMGR Viewer.app"`.
- **Windows (SmartScreen):** click More info, then Run anyway.

**Library folder.** Defaults to `~/Documents/Replays` (created on first launch). Use Change… in the sidebar to pick another folder; Rescan re-reads it. The folder is scanned on launch and watched while the app runs. Replays are read-only; renaming one outside the app keeps its notes.

**Project file.** Notes, session and matchup comments, your identity, YouTube links and hand-set perspectives are saved to `rmgr-viewer-project.json` in the library folder (written atomically, with the last 3 backups as `.bak.1` to `.bak.3`), so they survive app updates and reinstalls. The stats cache stays inside the app and is rebuilt from your replays. Each library folder has its own project file.

**Bringing over web data.** The desktop app has its own storage. In the web app use project export, then project import in the desktop app to carry over notes, comments and settings.

**Development.** Requires the Rust toolchain and [Tauri's platform prerequisites](https://tauri.app/start/prerequisites/). Run `npm run tauri:dev` (or `npm run tauri:build`).

## Deployment

Pushes to `master` build and deploy automatically to GitHub Pages (see
Expand Down
Loading
Loading