Update README

This commit is contained in:
Andrea Cavalli 2021-10-01 19:40:35 +02:00
parent 35f5d37f67
commit e36ca566da
2 changed files with 28 additions and 26 deletions

View File

Before

Width:  |  Height:  |  Size: 725 KiB

After

Width:  |  Height:  |  Size: 725 KiB

View File

@ -1,20 +1,19 @@
<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>
<div style="text-align: center" align="center">
<a href="https://github.com/tdlight-team/tdlight-java"><img src="./.media/tdlight-logo.png" alt="TDLight logo" style="width: 5rem; height: 5rem"></a>
<h1>TDLight Java</h1>
<p>Complete Bot and Userbot Telegram library written in Java, based on <a href="https://github.com/tdlib/td">TDLib</a></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">
<img alt="JProfiler" src="https://local.cavallium.it/mirrors/jprofiler-logo/jprofiler-logo-badge.svg">
</a>
</div>
<br>
# **💻 - Supported platforms**
## 💻 Supported platforms
**Java versions**: from Java 8 to Java 17
@ -30,32 +29,35 @@
**Required libraries for Linux: OpenSSL and zlib**
**Note: If you'r using OSX read down below otherwise the library won't work**
### Install OpenSSL on macOS
You must install `openssl@1.1` using the <a href="https://brew.sh">brew package manager </a>, then link openssl to `/usr/local/opt/openssl`
## macOS and OpenSSL
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
If you don't know how to do this, type the following commands in your terminal:
```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
## 📚 How to use the library
### Setting up the library using Maven
If you are using Maven, edit your `pom.xml` file as below:
```xml
<project>
<repositories>
<!-- Add the following repository -->
<repository>
<id>mchv</id>
<name>MCHV Apache Maven Packages</name>
<url>https://mvn.mchv.eu/repository/mchv/</url>
</repository>
</repositories>
<dependencies>
<!-- Add the following dependencies -->
<dependency>
<groupId>it.tdlight</groupId>
<artifactId>tdlight-java</artifactId>
@ -67,6 +69,7 @@ If your are using Maven, put this code into your `pom.xml` file
<version>NATIVES_VERSION</version>
</dependency>
<!-- Include other native versions that you want, for example for windows, osx, ... -->
</dependencies>
</project>
```
@ -75,8 +78,8 @@ Replace `VERSION` with the latest release version, you can find it [here](https:
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.
## **Setting up the library using Gradle**
If you'r using Gradle, put this code on your `build.gradle`
## Setting up the library using Gradle
If you are using Gradle, add the following lines into your `build.gradle` file
```groovy
repositories {
maven { url "https://mvn.mchv.eu/repository/mchv/" }
@ -92,7 +95,7 @@ Replace `VERSION` with the latest release version, you can find it [here](https:
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.
# ⚒ - **Native dependencies**
## ⚒ Native dependencies
To use TDLight Java you need to include one or more native dependencies:
- `tdlight-natives-linux-amd64`
- `tdlight-natives-linux-aarch64`
@ -103,24 +106,23 @@ To use TDLight Java you need to include one or more native dependencies:
- `tdlight-natives-windows-amd64`
- `tdlight-natives-osx-amd64`
## **Usage**
Simple initialization of a native TDLib client
## Usage
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)
### **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).
# - **About**
## **License**
## About
### **License**
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
TDLib is licensed by Aliaksei Levin <levlam@telegram.org> and Arseny Smirnov <arseny30@gmail.com> under the terms of the Boost Software License