Build all required artifacts with one command:
./build.sh -b -d-d builds the native libraries in Docker with an Ubuntu 20.04 toolchain so they run on
all common distributions (see Portability). Without -d the libraries are
built with the host toolchain and may require a newer glibc than your users have; the build
prints a warning in that case.
Expected output files:
browser/dist/darkbot_browser_linux.AppImagebuild/client/DarkTanos.sobuild/do_lib/libdo_lib.so
cmakeand a C++ toolchain (gcc/g++,make)strip(usually frombinutils)nvminstalled (~/.nvm/nvm.shmust exist)- Node.js version from
browser/.nvmrc(the script runsnvm use || nvm install) npmdocker(only for-d, recommended for builds you distribute)
From repo root:
./build.sh -bWhat this does:
- Builds browser AppImage in
browser/dist/(-b) - Configures/builds CMake project in
build/(optimized-O2, LTO; in Docker with-d) - Renames
build/client/libDarkTanos.sotobuild/client/DarkTanos.so - Strips symbols from
DarkTanos.soandlibdo_lib.so - Reports the minimum glibc version the libraries need
- Runs
./copy.shautomatically if that file exists and is executable
Flags: -c clean build, -b build the browser, -d portable build in Docker,
--no-copy skip copy.sh (e.g. test builds).
chmod +x browser/dist/darkbot_browser_linux.AppImageCheck artifacts exist:
ls -lh \
browser/dist/darkbot_browser_linux.AppImage \
build/client/DarkTanos.so \
build/do_lib/libdo_lib.soCheck library dependencies resolve:
ldd build/client/DarkTanos.so
ldd build/do_lib/libdo_lib.soOptional AppImage smoke check:
./browser/dist/darkbot_browser_linux.AppImage --appimage-version# native tests: flash IPC protocol, /proc + memory utilities, browser command channel,
# command server fuzzing
tests/run_tests.sh
# end-to-end: real JVM + DarkTanos.so + AppImage + pepper flash under Xvfb (Docker)
tests/integration/run.sh # without FUSE (AppImage extract-and-run mode)
tests/integration/run.sh "" fuse # with FUSE
# the built libraries load on Ubuntu 20.04-24.04, Mint 21-22, Debian 11-12, Fedora, Arch
tests/distro/run.shIntegration test options (environment variables for tests/integration/run.sh):
| Variable | Effect |
|---|---|
TEST_SWF=/path/main.swf |
load a real game client instead of the generated test SWF |
SOAK_SECONDS=N |
keep the client running N seconds, report validity and memory scan speed |
STRESS_SECONDS=N |
busy-bot simulation: concurrent API use, periodic refresh/crash injection, resource stats per minute |
JAVA_PRELOAD=...libasan.so.6 + ASAN_OPTIONS=... |
run with a sanitizer-instrumented DarkTanos.so |
Sanitizer builds of the native tests: configure with
-DBUILD_TESTS=ON -DCMAKE_CXX_FLAGS="-fsanitize=address,undefined" (or thread) into a
build-* directory.
The native tests use the production IPC server (do_lib/ipc.cpp) and client
(client/flash_ipc_client.cpp) against a simulated game thread, and the production
browser command server (browser/src/command_server.js) in Node.
- Libraries built with
-dneed glibc 2.18+ and link libstdc++/libgcc statically; the only runtime dependencies arelibX11andlibXext(present on any desktop). - The AppImage normally mounts itself with FUSE 2. Distributions that don't ship
libfuse.so.2(Ubuntu 22.04+, Mint 21+, Fedora, ...) are detected and the browser runs in extract-and-run mode automatically; the same fallback kicks in if mounting fails. - The browser is started with
--no-sandbox(required where unprivileged user namespaces are restricted, e.g. Ubuntu 24.04). - X11 or XWayland is required for window control and mouse input (
DISPLAYset).
Logs are written to logs/<start time>_TanosApi.log (bot client, browser and flash
process share one file). Set TANOS_DEBUG=1 in the bot's environment to also log flash
hook activity (JIT verifications, GC chunk frees).
Leftover shared memory segments from older versions (killed flash processes) can be
listed with ipcs -m (1024 byte segments with nattch 0) and removed with ipcrm -m <id>.
Your DarkBot base must be:
- Latest changes from: https://github.com/darkbot-reloaded/DarkBot
- Including PR: darkbot-reloaded/DarkBot#449
- Including PR: darkbot-reloaded/DarkBot#448
- Including PR: darkbot-reloaded/DarkBot#453
After building, copy these files into your DarkBot lib directory:
browser/dist/darkbot_browser_linux.AppImagebuild/client/DarkTanos.sobuild/do_lib/libdo_lib.so
You can copy them manually, or use copy.sh as described below.
In DarkBot LibSetup, disable/skip logic that overwrites these files in the bot lib directory:
DarkTanos.solibdo_lib.so
This is required so your locally built versions remain in use.
If you want automatic copy to your DarkBot lib folder after each build:
- Copy
copy.sh.exampletocopy.sh - Set destination path (
DEST) incopy.sh - Make it executable:
cp copy.sh.example copy.sh
chmod +x copy.shThen ./build.sh -b will copy artifacts automatically.