обновил лаунчер под новую версию веба

This commit is contained in:
2026-10-04 13:19:12 +04:00
parent dd189fe48f
commit d3d19bfaeb
20 changed files with 486 additions and 64 deletions
+28 -13
View File
@@ -8,7 +8,7 @@ This document specifies the current launcher behavior for:
- installation directory selection
- local file scan and hash calculation
- manifest-based synchronization
- client launch from `Wow.exe`
- launch and game authorization for the Rust MoonWell 1.12.1 client
The launcher no longer uses S3/MinIO directly. All server interaction goes
through the Web API.
@@ -18,6 +18,7 @@ through the Web API.
The launcher API base URL is provided via:
- `MOONWELL_API_BASE_URL`
- optional `MOONWELL_AUTH_ADDRESS` for the game auth endpoint (`host[:port]`)
Current integration mode is compile-time:
@@ -111,9 +112,10 @@ Game authorization sequence:
1. Immediately before starting the game, the launcher calls
`POST /api/launcher/game-ticket` with bearer authentication and
`{ "client_build": 12340 }` in the JSON body.
`{ "client_build": 5875 }` in the JSON body.
2. The API returns `account`, a 16-character `A-Z0-9` single-use `ticket`, and
`expires_at`. The ticket must remain valid for at least five more seconds.
`expires_at`. The account is 3–16 uppercase `A-Z0-9` characters. The ticket
must remain valid for at least five more seconds, including at process start.
3. Issuing a ticket atomically revokes any previous unused game ticket for the
same account. Production lifetime must not exceed 60 seconds.
4. The launcher never persists or logs the ticket.
@@ -142,6 +144,7 @@ The launcher excludes these top-level directories from verification:
- `Logs`
- `Screenshots`
- `WTF`
- `benilla-config`
Files under these directories:
@@ -244,20 +247,32 @@ Pause is implemented as cooperative cancellation:
When the user presses `Play`:
1. launcher removes every `SET accountName ...` line from
`<install-root>/WTF/Config.wtf` when that file exists
2. launcher resolves `<install-root>/Wow.exe`
3. launcher clears `<install-root>/Cache`
4. launcher requests a single-use game ticket
5. launcher starts `Wow.exe` with working directory set to installation root,
1. launcher requests a single-use game ticket for build 5875
2. launcher resolves `<install-root>/MoonWell.exe` on Windows,
`<install-root>/MoonWell.app/Contents/MacOS/launch` on macOS, or
`<install-root>/MoonWell` on Linux
3. launcher reads the auth address from `MOONWELL_AUTH_ADDRESS` when configured,
otherwise from `set realmlist <host[:port]>` in `realmlist.wtf`; this file is
never modified and the default auth port is 3724
4. launcher resolves the player's data in `Data/`, falling back to `WoW/Data/`,
and verifies that the ticket still has at least five seconds of validity
5. launcher starts MoonWell with working directory set to the installation root,
no authorization command-line arguments, and these child environment values:
- `MOONWELL_LAUNCH_ACCOUNT=<account>`
- `MOONWELL_LAUNCH_TICKET=<ticket>`
- `WOW_USER=<account>`
- `WOW_PASS=<ticket>`
- `WOW_HOST=<auth-address>`
- `WOW_DATA=<absolute-data-directory>`
- `BENILLA_HOME=<install-root>/benilla-config`
6. launcher retains a process handle; while the process is alive, it disables repeated game launches
and client synchronization
7. when the process exits, the launcher returns to the ready-to-play state
If `Wow.exe` is missing, launch fails with an error.
Launching never edits `WTF/Config.wtf` or clears `Cache`. macOS executes the
bundle launcher directly; that script `exec`s MoonWell so the handle follows
the game rather than an `open` helper. Settings remain outside the `.app`.
If the executable, data directory, or auth endpoint is missing or invalid,
launch fails with an error. A consumed ticket cannot authenticate again; close
the client and press Play for a fresh ticket after a session ends.
## Error Behavior
@@ -271,7 +286,7 @@ The launcher surfaces errors for:
- checksum mismatch after download
- missing downloaded temp files before verification
- final verification mismatch after update
- missing `Wow.exe`
- missing MoonWell executable, WoW data, or game auth endpoint
- invalid, expired, or unavailable game ticket
## Tested Invariants