Files
lingxi-web/telegram-gateway/docker/scripts/install-tdlib.sh
T
wmq 06112602ec feat(gateway): include production Telegram user gateway
Version the NestJS TDLib gateway with Docker deployment, migrations, automated tests and platform integration documentation while excluding all account sessions, credentials, runtime databases and backups.
2026-08-01 18:38:20 +08:00

36 lines
772 B
Bash

#!/bin/sh
# Install TDLib shared library for the gateway
# This script downloads and installs pre-built tdlib
set -e
TDLIB_VERSION="1.8.0"
TDLIB_URL="https://github.com/tdlib/td/archive/refs/tags/v${TDLIB_VERSION}.tar.gz"
echo "Installing TDLib v${TDLIB_VERSION}..."
# Install build dependencies
apk add --no-cache \
g++ \
make \
cmake \
openssl-dev \
zlib-dev \
linux-headers \
git
# Build TDLib
cd /tmp
wget -q "${TDLIB_URL}" -O tdlib.tar.gz
tar xzf tdlib.tar.gz
cd "td-${TDLIB_VERSION}"
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --target tdjson -j$(nproc)
# Install
cp libtdjson.so /usr/local/lib/
cp libtdjson.so.${TDLIB_VERSION} /usr/local/lib/
echo "TDLib installed successfully to /usr/local/lib/libtdjson.so"