New README

This commit is contained in:
Bildcraft1 2021-10-01 16:59:34 +02:00
parent 988314e074
commit 35f5d37f67
2 changed files with 43 additions and 23 deletions

View File

@ -1,18 +1,26 @@
TDLight Java <div align=center>
==================== <img src="./tdlight-jtdlib.png" width="256">
<br /><br />
<h2><b>TDLight Java</b></h2>
<p>Complete Bot and Userbot Telegram library written in Java based on <a href="https://github.com/tdlib/td">TDLib</p>
<a href="https://travis-ci.com/tdlight-team/tdlight-java-natives">
<img alt="Java CI" src="https://img.shields.io/github/workflow/status/tdlight-team/tdlight-java/Maven%20Package?style=flat-square)"></a>
<a href="https://github.com/tdlight-team/tdlight-java/releases">
<img alt="Release" src="https://img.shields.io/github/v/release/tdlight-team/tdlight-java.svg?include_prereleases&style=flat-square)">
</a>
<a href="https://www.ej-technologies.com/products/jprofiler/overview.html">
<img alt="Jprofiler" src="https://local.cavallium.it/mirrors/jprofiler-logo/jprofiler-logo-badge.svg">
</a>
</div>
<br>
[![Build Status](https://img.shields.io/github/workflow/status/tdlight-team/tdlight-java/Maven%20Package?style=flat-square)](https://travis-ci.com/tdlight-team/tdlight-java-natives) # **💻 - Supported platforms**
[![Release tag](https://img.shields.io/github/v/release/tdlight-team/tdlight-java.svg?include_prereleases&style=flat-square)](https://github.com/tdlight-team/tdlight-java/releases)
[![Java profiler](https://local.cavallium.it/mirrors/jprofiler-logo/jprofiler-logo-badge.svg)](https://www.ej-technologies.com/products/jprofiler/overview.html)
Complete Bot and Userbot Telegram library written in Java based on TDLib **Java versions**: from Java 8 to Java 17
## Supported platforms **Operating systems**: Linux, Windows, MacOS
Java versions: from Java 8 to Java 17
Operating systems: Linux, Windows, MacOS **CPU architectures**:
CPU architectures:
- i386/x86 (Linux, Windows) - i386/x86 (Linux, Windows)
- amd64/x86_64 (Linux, Windows, OSX) - amd64/x86_64 (Linux, Windows, OSX)
- armhf/armv7 (Linux) - armhf/armv7 (Linux)
@ -20,12 +28,23 @@ CPU architectures:
- s390x (Linux) - s390x (Linux)
- ppc64el/ppc64le (Linux) - ppc64el/ppc64le (Linux)
Required libraries for linux: OpenSSL and zlib **Required libraries for Linux: OpenSSL and zlib**
Required libraries for OSX: brew, openssl **Note: If you'r using OSX read down below otherwise the library won't work**
## How to use the library ## macOS and OpenSSL
### Installing with Maven Because macOS ships with LibreSSL, wich is not compatible with TDLight-Java, you must install `openssl@1.1` using the <a href="https://brew.sh">brew package manager </a> and then linking it to `/usr/local/opt/openssl`
If you don't know how to do this, here below you can find the two commands you have to execute to get this working
```bash
brew install openssl@1.1
ln -sf /usr/local/Cellar/openssl@1.1/1.1.1l /usr/local/opt/openssl
```
# 📚 - **How to use the library**
## **Setting up the library using Maven**
If your are using Maven, put this code into your `pom.xml` file
```xml ```xml
<project> <project>
<repositories> <repositories>
@ -56,7 +75,8 @@ Replace `VERSION` with the latest release version, you can find it [here](https:
Replace `NATIVES_VERSION` with the latest native version. Replace `NATIVES_VERSION` with the latest native version.
Make sure that you are using the correct natives version for the release that you are using. Make sure that you are using the correct natives version for the release that you are using.
### Installing with Gradle ## **Setting up the library using Gradle**
If you'r using Gradle, put this code on your `build.gradle`
```groovy ```groovy
repositories { repositories {
maven { url "https://mvn.mchv.eu/repository/mchv/" } maven { url "https://mvn.mchv.eu/repository/mchv/" }
@ -72,7 +92,7 @@ Replace `VERSION` with the latest release version, you can find it [here](https:
Replace `NATIVES_VERSION` with the latest native version. Replace `NATIVES_VERSION` with the latest native version.
Make sure that you are using the correct natives version for the release that you are using. Make sure that you are using the correct natives version for the release that you are using.
### Native dependencies # ⚒️ - **Native dependencies**
To use TDLight Java you need to include one or more native dependencies: To use TDLight Java you need to include one or more native dependencies:
- `tdlight-natives-linux-amd64` - `tdlight-natives-linux-amd64`
- `tdlight-natives-linux-aarch64` - `tdlight-natives-linux-aarch64`
@ -83,22 +103,22 @@ To use TDLight Java you need to include one or more native dependencies:
- `tdlight-natives-windows-amd64` - `tdlight-natives-windows-amd64`
- `tdlight-natives-osx-amd64` - `tdlight-natives-osx-amd64`
## Usage ## **Usage**
Simple initialization of a native TDLib client Simple initialization of a native TDLib client
An example on how to use TDLight Java can be found here: [Example.java](https://github.com/tdlight-team/tdlight-java/blob/master/example/src/main/java/it.tdlight.example/Example.java) An example on how to use TDLight Java can be found here: [Example.java](https://github.com/tdlight-team/tdlight-java/blob/master/example/src/main/java/it.tdlight.example/Example.java)
### TDLight methods documentation ### **TDLight methods documentation**
[TdApi JavaDoc](https://tdlight-team.github.io/tdlight-docs) [TdApi JavaDoc](https://tdlight-team.github.io/tdlight-docs)
### TDLight extended features ### **TDLight extended features**
TDLight has some extended features compared to TDLib, that you can see on the [TDLight official repository](https://github.com/tdlight-team/tdlight#tdlight-extra-features). TDLight has some extended features compared to TDLib, that you can see on the [TDLight official repository](https://github.com/tdlight-team/tdlight#tdlight-extra-features).
## About # - **About**
### License ## **License**
TDLight is licensed by Andrea Cavalli <andrea@cavallium.it> under the terms of the GNU Lesser General Public License 3 TDLight is licensed by Andrea Cavalli <andrea@cavallium.it> under the terms of the GNU Lesser General Public License 3
### Libraries licenses ## **Libraries licenses**
JTDlib is licensed by Ernesto Castellotti <erny.castell@gmail.com> under the terms of the GNU Lesser General Public License 3 JTDlib is licensed by Ernesto Castellotti <erny.castell@gmail.com> under the terms of the GNU Lesser General Public License 3

BIN
tdlight-jtdlib.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 725 KiB