Termux: build with make, install to $PREFIX, no nl_langinfo on Android

- bootstrap_termux.sh installs pkg-config/binutils, builds with make,
  runs the tests and installs into Termux's $PREFIX/bin.
- Makefile drops -lpthread on Android (pthreads are in bionic libc).
- TUI assumes UTF-8 on Android: nl_langinfo needs API 26, Termux
  targets 24. All sources compile for aarch64-linux-android24 (NDK 27).
This commit is contained in:
WHC
2026-10-05 01:55:49 +08:00
parent 2fde898da0
commit a77f27ed59
4 changed files with 29 additions and 20 deletions
+7 -2
View File
@@ -118,8 +118,13 @@ API Key:TUI 里输入并按 provider 保存到配置目录的 `credentials`(
### Termux
```bash
pkg install clang make cmake libcurl ncurses-ui-libs
cmake -B build -DCST_BUILD_TUI=ON && cmake --build build
# 一键:装依赖、克隆、编译、安装到 $PREFIX/bin
curl -fsSL https://git.whcself.xyz/WHC/CST-agent/raw/branch/main/scripts/bootstrap_termux.sh | bash
# 或手动
pkg install git clang make pkg-config binutils libcurl ncurses
git clone https://git.whcself.xyz/WHC/CST-agent.git && cd CST-agent
make && make install # 装到 Termux 的 $PREFIX/bin,之后任意目录运行 cst-agent
# 可选:旁路 Unix busybox
# ./scripts/build_third_party_mingw.sh busybox-unix
```