docs: add openfut-launcher to CLAUDE.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
funman300
2026-06-26 08:58:34 -07:00
parent 1daaebaefa
commit 06b6cdd043
+39 -2
View File
@@ -4,12 +4,13 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
## Repository Layout ## Repository Layout
This is a monorepo containing two independent Rust crates as git submodules: This is a monorepo containing three independent Rust crates as git submodules:
| Submodule | Role | | Submodule | Role |
|---|---| |---|---|
| `openfut-core/` | Game-independent offline FUT backend (Axum + SQLite) | | `openfut-core/` | Game-independent offline FUT backend (Axum + SQLite) |
| `openfut-bridge/` | FIFA 23 integration layer and reverse-engineering proxy | | `openfut-bridge/` | FIFA 23 integration layer and reverse-engineering proxy |
| `openfut-launcher/` | Native GUI launcher (egui/eframe) for starting/stopping services and managing setup |
Each submodule has its own `Cargo.toml`, `src/`, `tests/`, and `target/`. Commands must be run from within the submodule directory or with `--manifest-path`. Each submodule has its own `Cargo.toml`, `src/`, `tests/`, and `target/`. Commands must be run from within the submodule directory or with `--manifest-path`.
@@ -56,6 +57,20 @@ cargo clippy -- -D warnings
cargo fmt cargo fmt
``` ```
### openfut-launcher
```bash
# Run (native GUI window)
cargo run
# Build release
cargo build --release
# Build the hook DLL (Windows cross-compile, required for FIFA 23 integration)
cd openfut-hook
cargo build --release --target x86_64-pc-windows-gnu
```
### Full-stack via setup.sh (Linux, from repo root) ### Full-stack via setup.sh (Linux, from repo root)
```bash ```bash
@@ -156,6 +171,28 @@ openfut-bridge (port 8443)
3. Add a mapping in `src/mapper.rs` (`EXACT` array or `prefix_routes()`) 3. Add a mapping in `src/mapper.rs` (`EXACT` array or `prefix_routes()`)
4. Implement the handler in Core if needed 4. Implement the handler in Core if needed
## openfut-launcher internals
A native desktop GUI (egui/eframe) that wraps Core and Bridge as managed child processes. It is the recommended way to run OpenFUT on a desktop — no terminal or `setup.sh` required.
**Module map:**
| Path | Purpose |
|---|---|
| `src/main.rs` | Entry point: eframe window setup |
| `src/app.rs` | `LauncherApp` — main UI state + four tabs (Dashboard, Logs, Setup, Config) |
| `src/config.rs` | `LauncherConfig` — persisted settings (binary paths, ports, game dir) |
| `src/process.rs` | `ServiceHandle` — spawns/kills Core and Bridge child processes, tracks status |
| `src/logs.rs` | `LogBuffer` — ring buffer collecting stdout/stderr from child processes |
| `src/setup.rs` | Hook DLL deployment, TLS cert installation into Wine/Proton cert store |
| `openfut-hook/` | Windows DLL (`version.dll`) injected into FIFA 23 via Proton to redirect EA hostnames to the local bridge (cross-compiled with `x86_64-pc-windows-gnu`) |
**Setup flow the launcher automates:**
1. Deploy `openfut_hook.dll` → FIFA 23 game dir as `version.dll` (intercepts network calls inside Wine/Proton, no `/etc/hosts` changes needed)
2. Configure redirect IP written into `openfut.cfg` alongside the DLL
3. Install bridge's self-signed TLS cert into the Wine/Proton cert store
4. Start Core then Bridge (Dashboard tab shows live status)
## Testing approach ## Testing approach
**Core** uses a single `tests/integration_test.rs` that spins up a full Axum app against an in-memory SQLite database (`build_app(pool, "data")`). Tests use raw HTTP via `tower::ServiceExt::oneshot`. The `data/` directory is always required at test time (tests run from `openfut-core/`). **Core** uses a single `tests/integration_test.rs` that spins up a full Axum app against an in-memory SQLite database (`build_app(pool, "data")`). Tests use raw HTTP via `tower::ServiceExt::oneshot`. The `data/` directory is always required at test time (tests run from `openfut-core/`).
@@ -177,4 +214,4 @@ data/achievements/← AchievementDefinition[]
## Version control ## Version control
Both `openfut-core` and `openfut-bridge` are git submodules with their own independent history. Use `tea` (Gitea CLI) for remote operations, not `gh`. All three submodules (`openfut-core`, `openfut-bridge`, `openfut-launcher`) have their own independent git history. Use `tea` (Gitea CLI) for remote operations, not `gh`.