Consolidate build into one root Makefile; split run.sh into run-engine.sh/run-interpreter.sh

This commit is contained in:
ml
2026-07-05 16:35:18 +02:00
parent bd739ccfdf
commit 28558b4343
12 changed files with 300 additions and 199 deletions
+17 -12
View File
@@ -33,10 +33,11 @@ know before changing the engine. This document is the visual overview.
- **`engine/i18n/`** holds the translation source files (`en.lang`,
`de.lang`, ...), one `key=value` file per language — see
[`CLAUDE.md`](../CLAUDE.md) for the key-naming convention.
- **`dist/`** is generated by `make`: the `deck-engine` binary, a copy of
the card art under `img/`, a copy of the translation files under
`i18n/`, `run.sh`, and a `user.properties` template that's seeded once
and never overwritten by later builds.
- **`dist/`** is generated by the single root `Makefile`: the
`deck-engine` and `interpreter-cli` binaries, a copy of the card art
under `img/`, a copy of the translation files under `i18n/`,
`run-engine.sh`/`run-interpreter.sh`, and a `user.properties` template
that's seeded once and never overwritten by later builds.
- **The Pebble watchapp does not exist yet.** When it's built, it will
call `reading_generate()` directly and walk the returned struct to lay
out its own screens — it has no reason to touch `reading_print_*`.
@@ -70,15 +71,19 @@ Every display string produced along the way (`tarot_data.c`'s card and
position text, `astro.c`'s body/sign/moon-phase/aspect names, and
`reading.c`'s section headers) is looked up in `i18n.c`'s translation
catalog, with the built-in English text as the fallback. `main.c` loads
the catalog from `--lang`/`--i18n-dir` (or `run.sh`'s `lang=` property)
before calling `reading_generate`, so this is orthogonal to the three
computations above — it only affects how their results are rendered as
text, not the underlying `TarotCard`/`ZodiacSign`/etc. enum values.
the catalog from `--lang`/`--i18n-dir` (or `run-engine.sh`'s `lang=`
property) before calling `reading_generate`, so this is orthogonal to
the three computations above — it only affects how their results are
rendered as text, not the underlying `TarotCard`/`ZodiacSign`/etc. enum
values.
Both entry points (direct CLI flags, or `run.sh` pulling the seed/date
from the OS clock and birth data from `user.properties`) converge on the
same `main.c` argument parsing before calling `reading_generate` — there
is exactly one code path from parsed input to a reading.
Both entry points (direct CLI flags, or `run-engine.sh` pulling the
seed/date from the OS clock and birth data from `user.properties`)
converge on the same `main.c` argument parsing before calling
`reading_generate` — there is exactly one code path from parsed input to
a reading. `run-interpreter.sh` reuses those same OS-clock/`user.properties`
inputs, but calls `deck-engine --format json` and pipes the result into
`interpreter-cli` instead of printing a reading directly.
## Regenerating the diagrams