summaryrefslogtreecommitdiff
path: root/protocols/Telegram/tdlib/td/example/android/Dockerfile
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-06-04 19:24:05 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-06-04 19:24:05 +0300
commitefc336e60cf1331bf5f3213d296981b87b8b2a6c (patch)
treeea59ea1a324f45f6e8a06cc0887b376bfba90ca9 /protocols/Telegram/tdlib/td/example/android/Dockerfile
parent6e83622d2af1cec3c759f4cff6efe4df2fe3328c (diff)
fixes #3537 (Telegram: 32-разрядная версия падает в 64-разрядной Windows) + update to the fresh TDLIB
Diffstat (limited to 'protocols/Telegram/tdlib/td/example/android/Dockerfile')
-rw-r--r--protocols/Telegram/tdlib/td/example/android/Dockerfile26
1 files changed, 26 insertions, 0 deletions
diff --git a/protocols/Telegram/tdlib/td/example/android/Dockerfile b/protocols/Telegram/tdlib/td/example/android/Dockerfile
new file mode 100644
index 0000000000..310e8f7eb1
--- /dev/null
+++ b/protocols/Telegram/tdlib/td/example/android/Dockerfile
@@ -0,0 +1,26 @@
+FROM --platform=linux/amd64 ubuntu:22.04 as build
+
+RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -yq default-jdk g++ git gperf make perl php-cli unzip wget && rm -rf /var/lib/apt/lists/*
+
+WORKDIR /home
+
+ARG ANDROID_NDK_VERSION=23.2.8568313
+COPY ./check-environment.sh ./fetch-sdk.sh ./
+RUN ./fetch-sdk.sh SDK "$ANDROID_NDK_VERSION"
+
+ARG OPENSSL_VERSION=OpenSSL_1_1_1t
+COPY ./build-openssl.sh ./
+RUN ./build-openssl.sh SDK "$ANDROID_NDK_VERSION" openssl "$OPENSSL_VERSION"
+
+ADD "https://api.github.com/repos/tdlib/td/git/refs/heads/master" version.json
+ARG COMMIT_HASH=master
+RUN git clone https://github.com/tdlib/td.git && cd td && git checkout "$COMMIT_HASH"
+RUN cd td && git merge-base --is-ancestor bcd89728c3b93b67448b93b4863dc5bd4e122a4c "$COMMIT_HASH"
+
+ARG ANDROID_STL=c++_static
+RUN td/example/android/build-tdlib.sh SDK "$ANDROID_NDK_VERSION" openssl "$ANDROID_STL" && rm -rf td/example/android/build-*
+
+
+FROM scratch
+
+COPY --from=build /home/td/example/android/tdlib/tdlib* /