обновил лаунчер под новую версию веба
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -22,7 +22,7 @@ release that has not passed the remote download and checksum verification.
|
||||
|
||||
The release machine needs:
|
||||
|
||||
- latest stable Flutter and Dart available on `PATH`
|
||||
- latest stable Flutter and Dart selected through FVM
|
||||
- Inno Setup 6, normally installed at
|
||||
`C:\Program Files (x86)\Inno Setup 6\ISCC.exe`
|
||||
- OpenSSL, normally supplied by Git for Windows at
|
||||
@@ -45,6 +45,13 @@ Back up `.moonwell_signing\dsa_priv.pem` in the project secret store. Never
|
||||
commit it, upload it to Object Storage, or send it through chat. Losing this key
|
||||
prevents released launchers from accepting future updates.
|
||||
|
||||
The deploy script copies the x64 Visual C++ CRT DLLs from Visual Studio's
|
||||
redistributable directory into the application folder before compiling the
|
||||
installer. Use `-VcRuntimePath` to override the detected directory. This keeps
|
||||
the per-user installer usable without installing system runtimes as an admin;
|
||||
Windows 10/11 supplies the Universal CRT. See Microsoft's
|
||||
[app-local deployment guidance](https://learn.microsoft.com/en-us/cpp/windows/choosing-a-deployment-method?view=msvc-170).
|
||||
|
||||
## Local `.env`
|
||||
|
||||
For local releases, copy `.env.example` to `.env` and fill in the real values.
|
||||
@@ -125,6 +132,19 @@ The production defaults are:
|
||||
- installer:
|
||||
`https://storage.yandexcloud.net/warcraft-client/moonwell_launcher_setup.exe`
|
||||
|
||||
Use a versioned `-S3Key`, such as
|
||||
`moonwell_launcher/releases/1.0.4/moonwell_launcher_setup.exe`, to preserve the
|
||||
installer referenced by each signed AppCast. After the feed has been verified,
|
||||
publish the same verified installer at `moonwell_launcher_setup.exe` for the
|
||||
website's stable download link. Set `MOONWELL_CLIENT_OBJECT_KEY` to that key in
|
||||
the web app when its download button should install the launcher. The game
|
||||
files use their separate client manifest and release prefix.
|
||||
|
||||
For FVM, `-FlutterCommand` and `-DartCommand` can point to local `.cmd` wrappers
|
||||
that run `call fvm flutter %*` and `call fvm dart %*` respectively and return
|
||||
`exit /b %errorlevel%`. Keep wrappers inside ignored `build/` and ensure the
|
||||
FVM executable is on `PATH` or use its absolute path in the wrapper.
|
||||
|
||||
On success, the command prints the deployed version, installer URL, SHA-256,
|
||||
and AppCast URL. The tracked root `appcast.xml` contains the exact feed sent to
|
||||
the server.
|
||||
|
||||
Reference in New Issue
Block a user