From efc336e60cf1331bf5f3213d296981b87b8b2a6c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 4 Jun 2023 19:24:05 +0300 Subject: =?UTF-8?q?fixes=20#3537=20(Telegram:=2032-=D1=80=D0=B0=D0=B7?= =?UTF-8?q?=D1=80=D1=8F=D0=B4=D0=BD=D0=B0=D1=8F=20=D0=B2=D0=B5=D1=80=D1=81?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=BF=D0=B0=D0=B4=D0=B0=D0=B5=D1=82=20=D0=B2=20?= =?UTF-8?q?64-=D1=80=D0=B0=D0=B7=D1=80=D1=8F=D0=B4=D0=BD=D0=BE=D0=B9=20Win?= =?UTF-8?q?dows)=20+=20update=20to=20the=20fresh=20TDLIB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tdlib/td/example/android/check-environment.sh | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 protocols/Telegram/tdlib/td/example/android/check-environment.sh (limited to 'protocols/Telegram/tdlib/td/example/android/check-environment.sh') diff --git a/protocols/Telegram/tdlib/td/example/android/check-environment.sh b/protocols/Telegram/tdlib/td/example/android/check-environment.sh new file mode 100644 index 0000000000..249df33987 --- /dev/null +++ b/protocols/Telegram/tdlib/td/example/android/check-environment.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash + +# The script checks that all needed tools are installed and sets OS_NAME, HOST_ARCH, and WGET variables + +if [[ "$OSTYPE" == "linux"* ]] ; then + OS_NAME="linux" + HOST_ARCH="linux-x86_64" +elif [[ "$OSTYPE" == "darwin"* ]] ; then + OS_NAME="mac" + HOST_ARCH="darwin-x86_64" +elif [[ "$OSTYPE" == "msys" ]] ; then + OS_NAME="win" + HOST_ARCH="windows-x86_64" +else + echo "Error: this script supports only Bash shell on Linux, macOS, or Windows." + exit 1 +fi + +if which wget >/dev/null 2>&1 ; then + WGET="wget -q" +elif which curl >/dev/null 2>&1 ; then + WGET="curl -sfLO" +else + echo "Error: this script requires either curl or wget tool installed." + exit 1 +fi + +for TOOL_NAME in gperf jar java javadoc make perl php sed tar yes unzip ; do + if ! which "$TOOL_NAME" >/dev/null 2>&1 ; then + echo "Error: this script requires $TOOL_NAME tool installed." + exit 1 + fi +done + +if [[ $(which make) = *" "* ]] ; then + echo "Error: OpenSSL expects that full path to make tool doesn't contain spaces. Move it to some other place." + exit 1 +fi + +if ! perl -MExtUtils::MakeMaker -MLocale::Maketext::Simple -MPod::Usage -e '' >/dev/null 2>&1 ; then + echo "Error: Perl installation is broken." + if [[ "$OSTYPE" == "msys" ]] ; then + echo "For Git Bash you need to manually copy ExtUtils, Locale and Pod modules to /usr/share/perl5/core_perl from any compatible Perl installation." + fi + exit 1 +fi + +if ! java --help >/dev/null 2>&1 ; then + echo "Error: Java installation is broken. Install JDK from https://www.oracle.com/java/technologies/downloads/." + exit 1 +fi -- cgit v1.2.3