docs: document wails3 development and distribution
Replace the NPM-first workflow with Wails v3 dev and build instructions, including platform prerequisites for macOS and Windows. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -4,37 +4,63 @@ Annotate keyboard key presses on a video timeline and preview/export mechanical
|
|||||||
|
|
||||||
Keyboard sounds are sourced from [kbsim](https://github.com/tplai/kbsim) (MIT license) — recorded press and release samples with per-key variation.
|
Keyboard sounds are sourced from [kbsim](https://github.com/tplai/kbsim) (MIT license) — recorded press and release samples with per-key variation.
|
||||||
|
|
||||||
|
sfxkeeb is a **Wails v3 desktop app** (Go shell + Svelte frontend). Native file dialogs are used for opening videos/projects and saving exports.
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- Node.js 18+ and npm
|
- **Go** 1.22+
|
||||||
|
- **Wails v3 CLI**: `go install github.com/wailsapp/wails/v3/cmd/wails3@latest`
|
||||||
|
- **Node.js** 18+ and npm
|
||||||
- **git** (to fetch kbsim sample assets)
|
- **git** (to fetch kbsim sample assets)
|
||||||
|
|
||||||
|
### Platform tooling
|
||||||
|
|
||||||
|
| Platform | Additional requirements |
|
||||||
|
| -------- | ----------------------- |
|
||||||
|
| macOS | Xcode Command Line Tools |
|
||||||
|
| Windows | [WebView2 runtime](https://developer.microsoft.com/en-us/microsoft-edge/webview2/) (usually pre-installed on Windows 11); build tools for `wails3 task build` |
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Frontend dependencies
|
# Frontend dependencies
|
||||||
cd frontend && npm install
|
cd frontend && npm install
|
||||||
|
|
||||||
|
# Download kbsim switch samples (~151 MP3 files)
|
||||||
|
cd .. && ./scripts/fetch_kbsim_samples.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
```bash
|
From the repository root:
|
||||||
cd frontend && npm run dev
|
|
||||||
```
|
|
||||||
|
|
||||||
Open http://localhost:5173
|
|
||||||
|
|
||||||
## Production
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd frontend && npm run build && npm run preview
|
wails3 dev
|
||||||
```
|
```
|
||||||
|
|
||||||
Or serve `frontend/dist` with any static file host.
|
This builds the Go backend, starts the Vite dev server, and opens the desktop window. File I/O uses native dialogs via Wails bindings.
|
||||||
|
|
||||||
|
For frontend-only work (no Wails bindings), you can still run `cd frontend && npm run dev`, but open/save dialogs will not function outside the Wails shell.
|
||||||
|
|
||||||
|
## Production build
|
||||||
|
|
||||||
|
From the repository root:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
wails3 task build
|
||||||
|
```
|
||||||
|
|
||||||
|
The compiled binary is written to `bin/sfxkeeb`. On macOS, package a `.app` bundle with:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
wails3 task package
|
||||||
|
```
|
||||||
|
|
||||||
|
Build on each target platform (macOS for `.app`, Windows for `.exe`). Windows users need the WebView2 runtime installed.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
1. **Open Video** — load an MP4 file
|
1. **Open Video** — pick an MP4 (or other supported video) via native file dialog
|
||||||
2. Press keys while the playhead is at the desired time to add markers (works while playing or paused)
|
2. Press keys while the playhead is at the desired time to add markers (works while playing or paused)
|
||||||
- Press sound plays on keydown; release sound plays on keyup
|
- Press sound plays on keydown; release sound plays on keyup
|
||||||
- Each physical key maps to a stable press variant (same key always sounds the same)
|
- Each physical key maps to a stable press variant (same key always sounds the same)
|
||||||
@@ -42,7 +68,7 @@ Or serve `frontend/dist` with any static file host.
|
|||||||
4. Choose a mechanical switch sound from the dropdown (13 kbsim profiles)
|
4. Choose a mechanical switch sound from the dropdown (13 kbsim profiles)
|
||||||
5. Adjust preview speed (25–200%) for fast-paced content — preview only; export is always at 1×
|
5. Adjust preview speed (25–200%) for fast-paced content — preview only; export is always at 1×
|
||||||
6. **Save Project** / **Open Project** — JSON with version, markers, and switch setting (no video path)
|
6. **Save Project** / **Open Project** — JSON with version, markers, and switch setting (no video path)
|
||||||
7. **Export Audio** — download a WAV file of keyboard sounds only, full video length (rendered client-side)
|
7. **Export Audio** — save a WAV file of keyboard sounds only, full video length (rendered client-side)
|
||||||
|
|
||||||
### Keyboard shortcuts
|
### Keyboard shortcuts
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user