ruen-ui/docs/DEVELOPMENT.md

58 lines
2.7 KiB
Markdown
Raw Normal View History

# Reproducing checks
Run installer tests from the repository root:
```sh
PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s tests -v
RUEN_PWSH=/path/to/pwsh PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s tests -v
```
These use tiny offline companion archives and disposable fake game directories, never the installed game. Native Windows remains a separate manual test requirement.
Lua harnesses require LuaJIT (Lua 5.1 semantics and `bit`). `tests/check-timers-optimizer.lua` runs with the addon directory as its first argument, including a trailing slash.
The other layout/pet/meter harnesses load selected matching Blizzard UI source files. Those files are **not redistributed**. Set `RUEN_NATIVE_UI` to a directory containing the matching Forever client exports:
```text
EditModeManagerConstantsDocumentation.lua
NamePlateConstantsDocumentation.lua
Mainline-ContainerFrame.lua
PetActionBar.lua
MultiActionBars.lua
SecureTemplates.lua
DamageMeter.lua
DamageMeterSessionWindow.lua
CooldownViewer.lua
CooldownViewerSettingsDataProvider.lua
ActionButtonUtil.lua
Blizzard_SpellSearchUtil.lua
```
Example:
```sh
export RUEN_NATIVE_UI=/path/to/matching-native-fixtures
luajit tests/check-layout.lua "$PWD/RuenUI/" unused /tmp/ruen-matrix.txt
luajit tests/check-pet-actions.lua "$PWD/RuenUI/"
luajit tests/check-meter.lua "$PWD/RuenUI/"
luajit tests/check-timers-optimizer.lua "$PWD/RuenUI/"
```
The gun test accepts a directory containing both `RuenUI/` and an author-downloaded `GunSilencerForever/`:
```sh
luajit tests/check-gun-audio.lua /path/to/test-addons
```
These harnesses simulate engine state and execute selected native methods. They are not a substitute for live rendering or the secure game VM. Review changes against the exact client UI revision rather than making tests pass against a different branch.
Build the downloadable installer:
```sh
python3 scripts/build_release.py /path/to/output
```
The allowlist excludes tests, third-party payloads, caches, account saves and Git metadata. The ZIP includes the launcher source and installer helpers. `SHA256SUMS.txt` verifies the ZIP; `manifest.json` verifies its extracted files. Neither is a digital signature. Publish the named ZIP and checksum as Gitea prerelease assets. A Gitea source archive is for development and lacks the generated installer manifest.
The Windows launcher can be rebuilt with Clang targeting x86_64-pc-windows-msvc and LLD in link mode. Compile `Tools/Ruen-Setup.c` with `-Os -ffreestanding -fno-stack-protector -fshort-wchar`; create a KERNEL32 import library from `Tools/kernel32.def`; link with `/entry:entry /subsystem:console /machine:x64 /nodefaultlib /opt:ref /timestamp:0`. It uses only KERNEL32 imports, no bundled runtime. The included binary is unsigned.