Add check for JDK to be actually installed. macOS has dummy /usr/bin/java.

This commit is contained in:
levlam 2022-08-15 01:00:19 +03:00
parent 7d1d5e636c
commit b52e3e0e12
2 changed files with 7 additions and 2 deletions

View File

@ -1,7 +1,7 @@
# TDLib Android example
This is an example of building `TDLib` for Android.
You need a Bash shell on Linux, macOS, or Windows with some common tools, a C++ compiler, cmake, JDK, PHP, and gperf pre-installed.
You need a Bash shell on Linux, macOS, or Windows with some common tools, a C++ compiler, JDK, PHP, perl, and gperf pre-installed.
## Building TDLib for Android

View File

@ -25,7 +25,7 @@ else
exit 1
fi
for TOOL_NAME in gperf jar javadoc make perl php sed tar yes unzip ; do
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
@ -43,3 +43,8 @@ if ! perl -MExtUtils::MakeMaker -MLocale::Maketext::Simple -MPod::Usage -e '' >/
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