Files
yugioh-legacy-engine/build/android.sh
T
donnyandClaude Fable 5.1 548d5c859e build: Linux x64 and Android arm64 in Docker (TICKET-389)
build/Dockerfile, targets linux and android; build/linux.sh and
build/android.sh run them with docker build -o into out/linux-x64 and
out/android-arm64. The host needs Docker and nothing else.

- Base: Ubuntu 22.04 pinned by digest (glibc 2.35 is the floor of the
  outputs; a bookworm build needed 2.36 and did not start on the Linux
  box; bullseye is end of life and its package pool is gone). premake
  5.0.0-beta8 bootstrapped from its tag, Android NDK r23b pinned by sha1
  (23.1.7779620, the build id of the shipped .so), API level 26.
- Same contract-header check as windows.ps1 before the build, same
  export gate after it: the plain C export count (dynamic, defined, no
  leading underscore) must be exactly Linux 855 / Android 849 and every
  name declared in contract/ocgapi.h must be exported; then engine.json
  with protocol and capabilities read from the server source.
- Linux builds the tree twice: the library (SERVER_PRO3_SUPPORT,
  libygol-engine.so) and the plain server executable (project ygopro
  with zip support and tag surrender confirm, the same rules), renamed
  ygoserver for the server repo's duel-server. Every dependency from the
  vendored sources (BUILD_ALL); libevent configured by its own
  configure. obj/ bin/ build/ wiped before every compile.
- Android: upstream's exec_android_pro3 job, one library; libocgcore.so
  is not built any more. Verified against the shipped
  Assets/Plugins/Android/libygoserver.so: all 5886 dynamic symbols kept,
  7 added (the six ygol_sb_* and ygol_engine_version).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DJUFwdiGCHipsxLkgxssSR
2026-10-15 10:34:59 -07:00

14 lines
630 B
Bash
Executable File

#!/usr/bin/env bash
# build/android.sh [version]
# Builds out/android-arm64/{libygol-engine.so, engine.json} in Docker (build/Dockerfile, target
# android; NDK r23b, API level 26, arm64 only). Needs nothing on the host but Docker. [version] is
# what ygol_engine_version() returns.
set -euo pipefail
repo="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
version="${1:-local}"
DOCKER_BUILDKIT=1 docker build --progress=plain -f "$repo/build/Dockerfile" --target android \
--build-arg "VERSION=$version" -o "$repo/out/android-arm64" "$repo"
echo
echo "Built: $repo/out/android-arm64"
cat "$repo/out/android-arm64/engine.json"