122 lines
6.1 KiB
Markdown
122 lines
6.1 KiB
Markdown
# Getting started
|
|
|
|
What you need, what each step does, and which tool does it. This is a guide to
|
|
the tools in this repository; it is not a one-command installer. Several steps
|
|
were only ever run on the author's machine, and the guide says so where that
|
|
applies.
|
|
|
|
## 1. What you must bring yourself
|
|
|
|
Nothing in this repository is a game. You need your own:
|
|
|
|
| You need | Used for |
|
|
|---|---|
|
|
| The native client, `WowB.exe` build 1.60.1.70334, with its data store | It is the client that gets adapted. Other builds will not match the pinned code addresses and data layouts. |
|
|
| A source client of the Turtle/Octo family (its `.MPQ` archives) | Input for the content pipeline: items, models, spells, maps. Read-only. |
|
|
| An account on a server you are allowed to use | Logging in. For development a local Tortoise-WoW server in Docker was used so that nothing touches a live realm. |
|
|
|
|
Keep an untouched copy of the native client. Every installing tool here works
|
|
on a separate disposable copy and keeps what it replaces, so that a bad install
|
|
can be rolled back; none of them is meant to run against your only copy.
|
|
|
|
## 2. What the machine needs
|
|
|
|
Developed on Arch-based Linux, x86-64.
|
|
|
|
- **To build and test the protocol core:** CMake 3.20+, a C++20 compiler,
|
|
OpenSSL 3, Boost headers, zlib, the MariaDB client library with pkg-config,
|
|
Python 3, Lua 5.x (the `lua` command, for the addon tests).
|
|
- **To build the in-client modules:** a MinGW-w64 cross toolchain
|
|
(`tools/mingw-cross` holds the helper), or a Windows machine/VM with the
|
|
profiles in `cmake/Windows*.cmake`.
|
|
- **To run the client on Linux:** Wine, and for the tools that drive the client
|
|
window: X11 or XWayland, `tesseract`, `kdialog`, `qdbus`, and the Python
|
|
modules `capstone`, `pefile`, `python-xlib`, `Pillow`, `evdev`.
|
|
- **Disk:** the client data store is tens of gigabytes and the pipeline keeps
|
|
copies. A copy-on-write filesystem (btrfs, XFS with reflinks) makes those
|
|
copies nearly free; the tools use reflinks where they can.
|
|
|
|
[TOOLS.md](TOOLS.md) lists, per tool, which Python modules it imports.
|
|
|
|
## 3. Build and run the offline tests
|
|
|
|
```sh
|
|
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
|
|
cmake --build build -j2
|
|
ctest --test-dir build --output-on-failure -R native-chat # one area
|
|
ctest --test-dir build --output-on-failure # everything (slow)
|
|
```
|
|
|
|
The tests are fixtures: loopback sockets, synthetic packets, a fake addon
|
|
environment for the Lua files. They show that a translation is internally
|
|
consistent. They do not show that the real client accepts it; see
|
|
[VERIFICATION.md](VERIFICATION.md).
|
|
|
|
Some tests read evidence files that the published copy leaves out
|
|
(`evidence/PUBLISHED_OMISSIONS.md`), and many read private inputs under
|
|
`runtime/` that only exist on the development machine. Those tests fail or skip
|
|
elsewhere; that is expected.
|
|
|
|
## 4. The work, in order
|
|
|
|
Each line names the tool family; [TOOLS.md](TOOLS.md) has every tool with its
|
|
purpose, and each takes `--help`.
|
|
|
|
1. **Read the source data.** `octo_*`, `turtle_*`, `source_*` read the source
|
|
client's archives and the local server database and write catalogues
|
|
(items, spells, talents, maps). Background: [OCTO_CLIENT_DATA.md](OCTO_CLIENT_DATA.md).
|
|
2. **Convert content.** `item_*` (items, appearances, materials), `spell_*`,
|
|
`aura_*`, `talent_*`, `class_*` (spell and class data), `map_*`, `adt_*`,
|
|
`m2_*`, `creature_*` (terrain, models, creatures) turn those catalogues into
|
|
rows and files in the native formats. Accepted item inputs are pinned in
|
|
[ITEM_BUILD_BASE.md](ITEM_BUILD_BASE.md).
|
|
3. **Package and install content.** `casc_*`, `content_*`, `install_*`,
|
|
`published_*` assemble a candidate data store, publish it into a disposable
|
|
client copy and record a journal for rollback. `verify_*` checks an install
|
|
against its journal.
|
|
4. **Build the in-client modules.** `native_*`, `nohelper_*`, `build_*`,
|
|
`windows_*` build the loader, bridge, wire, backend and codec that run
|
|
inside the client, for Windows and for Wine, and install matched sets
|
|
together. Design: [NATIVE_SESSION_LIFECYCLE.md](NATIVE_SESSION_LIFECYCLE.md)
|
|
and the other `NATIVE_*.md` records.
|
|
5. **Start the client.** `start_native_client.py --endpoint-profile local`
|
|
(or `octo`) starts the prepared client; it never types credentials. You log
|
|
in on the client's own login screen.
|
|
6. **Package a client folder.** `linux_client_package.py --output <new folder>`
|
|
stages a self-contained Linux folder from a verified install; see
|
|
[ONE_CLICK_LAUNCHER.md](ONE_CLICK_LAUNCHER.md) and
|
|
[DEVELOPMENT_BUILD.md](DEVELOPMENT_BUILD.md).
|
|
|
|
Steps 3 to 6 have so far been run only in the author's workspace, with private
|
|
inputs (account metadata, pinned protocol inputs, a prepared Wine prefix) that
|
|
are not published. Reproducing them on another machine needs additional setup
|
|
that is not written down end to end yet. The exact current recipe for the
|
|
in-client build and its installation changes with the work in progress; the
|
|
newest entries at the top of [DEVELOPMENT_BACKLOG.md](DEVELOPMENT_BACKLOG.md)
|
|
describe the state of the day.
|
|
|
|
## 5. Rules the tools assume
|
|
|
|
- **Assess first.** Before implementing against client behaviour, record how
|
|
the original client actually behaves (an "REA"). The `engine_*` and `rea_*`
|
|
tools exist for that and only read.
|
|
- **Disposable copies.** Install only into a client copy made for testing.
|
|
Keep the original client, the last working client and every rollback
|
|
preimage.
|
|
- **No credentials in tools or files.** Tools never take passwords as
|
|
arguments and never store them; account metadata stays in the ignored
|
|
`secrets/` directory.
|
|
- **Five states, never mixed up.** Implemented, tested offline, packaged,
|
|
installed, accepted in the game. A passing fixture is the second of five.
|
|
|
|
The full working rules are in `AGENTS.md` and `CLAUDE.md` at the repository
|
|
root.
|
|
|
|
## 6. Publishing this repository
|
|
|
|
`ops/publish_export.py <target> --identity "Name <mail>"` writes the committed
|
|
state into a separate clean repository, without screenshots, large data dumps
|
|
and private leftovers, and refuses to continue if it finds a private key block
|
|
or the configured git e-mail address in a tracked file. It never pushes; push
|
|
from the target directory.
|