Files
kam-mobile/README.md
T

64 lines
4.0 KiB
Markdown
Raw Normal View History

2026-09-14 20:47:20 +05:00
# KaM Remake Mobile
2026-09-12 16:50:30 +05:00
2026-09-14 20:47:20 +05:00
This repository is the Android development baseline for the KaM Remake r16020 port. Its upstream authority is KaM Remake r16020, commit `962fb850324b79bbe5480e1c2087d98f83a60917`. It is the permanent single-application build, source, and resource baseline for later port work; it is not yet a complete playable game.
2026-09-12 16:50:30 +05:00
2026-09-14 20:47:20 +05:00
## Build
2026-09-12 16:50:30 +05:00
2026-09-14 20:47:20 +05:00
The one supported entrypoint is:
2026-09-12 16:50:30 +05:00
```bash
./build-android.sh
```
2026-09-14 20:47:20 +05:00
Supported options are `--local`, `--cpu {aarch64,arm,x86_64}`, `--no-fetch`, and `--timeout <positive seconds>`.
2026-09-12 16:50:30 +05:00
2026-09-14 20:47:20 +05:00
- `--local` uses host tooling while keeping the Android target unchanged.
- `--cpu` selects an ABI for the same application identity.
- `--no-fetch` requires the pinned vendor source to already be present and verified.
- `--timeout` is the per-external-tool-invocation timeout.
2026-09-12 16:50:30 +05:00
2026-09-14 20:47:20 +05:00
Each build is one permanent Castle application transaction. Read `out/current/build.json` for its finalized state. On `PASS`, the current package is described by `out/current/package.json` and is at `out/current/kam-mobile.apk`.
2026-09-12 16:50:30 +05:00
`build/work/<cpu>/application/` is the persistent compiler workspace. FPC reuses its compiled units without `-B`; source edits trigger incremental compilation. Changes to the manifest, source selection, or toolchain reset this workspace. Delete `build/work/` to force a clean build. Concurrent runner invocations are serialized.
Each attempt keeps separate logs under `build/<build_id>/logs/`: `compile.log`, `package.log`, `compiler-cache.json` (cache reuse/reset details), and, when apksigner is available and invoked, `signature.log`.
2026-09-15 11:04:58 +05:00
After every completed build, the compact logs and final `build.json` are copied to the tracked `build-evidence/<build_id>/` directory. It never contains the temporary application, compiler cache, or APK.
2026-09-12 16:50:30 +05:00
2026-09-14 20:47:20 +05:00
## Source and resources
2026-09-12 16:50:30 +05:00
2026-09-14 20:47:20 +05:00
Pinned vendor source is at `vendor/kam_remake`. Project-owned source adaptation and registration are centralized, in order, in `config/extra-paths.json` and `tools/source_resolution.py`. Do not edit generated working manifests for source paths. `code/` is the permanent project-owned application source root; Pascal units enter through normal dependency closure from `GameInitialize`.
2026-09-12 16:50:30 +05:00
2026-09-14 20:47:20 +05:00
Private runtime-resource contents live under `private-assets/`. `config/runtime-resources.json` owns selection and `tools/resource_staging.py` owns staging. Selected files preserve their exact relative paths into Castle data. Proprietary game contents are not committed to public Git, and this baseline neither converts nor repacks them.
2026-09-12 16:50:30 +05:00
2026-09-14 20:47:20 +05:00
The permanent application definition is `app/CastleEngineManifest.xml`: `kam_mobile`, `org.kammobile.kamremake`, and `GameInitialize`.
2026-09-12 16:50:30 +05:00
Project-owned Android service templates, when needed, belong in `app/android_services/<service_name>/`. They are copied into the transient application and exposed to Castle only by the normal disposable-container build; use `./build-android.sh`, not `--local`, when they are present.
2026-09-14 20:47:20 +05:00
## Optional device helper
2026-09-12 16:50:30 +05:00
2026-09-14 20:47:20 +05:00
After a successful current build, optionally run:
2026-09-12 16:50:30 +05:00
2026-09-14 20:47:20 +05:00
```bash
python3 tools/device.py [--serial <device-serial>]
```
It validates the current metadata and APK, selects the authorized device, installs, and launches the application.
## Current versus historical state
`out/current/**` is the only current finalized application/package state. `reports/**` and `dist/**` are frozen Task-1 historical evidence; files named `LATEST` there are historical pointers, not current build or package locators. Do not use them when the current build is missing or failed.
## Repository structure
2026-09-12 16:50:30 +05:00
```text
2026-09-14 20:47:20 +05:00
app/ permanent application definition
code/ permanent project-owned application source
config/ source and runtime-resource owners
tools/ build, source-resolution, resource-staging, and device tools
private-assets/ private runtime-resource contents
vendor/ pinned vendor source
build/ persistent compiler workspace and per-attempt logs
2026-09-14 20:47:20 +05:00
out/ generated current finalized state
reports/ frozen Task-1 history
dist/ frozen Task-1 history
2026-09-12 16:50:30 +05:00
```