From 4c101009ffefe3ff9d4264d02cf1bb460e01565e Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Thu, 20 Aug 2020 12:18:04 +0200 Subject: [PATCH] Rewrite ReadMe --- JTDLIB_LICENSE | 16 ++++++++ README.md | 101 +++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 96 insertions(+), 21 deletions(-) create mode 100644 JTDLIB_LICENSE diff --git a/JTDLIB_LICENSE b/JTDLIB_LICENSE new file mode 100644 index 0000000..128cc54 --- /dev/null +++ b/JTDLIB_LICENSE @@ -0,0 +1,16 @@ +Copyright (C) 2018 Ernesto Castellotti + +Ernesto Castellotti is the copyright holder of this software, for +any need, do not hesitate to contact him. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation, either version 3 of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with this program in the file called "LICENSE". If not, contact the copyright holder. \ No newline at end of file diff --git a/README.md b/README.md index bf39303..e83366d 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,80 @@ -LICENSE -======= - JTDLib, an wrapper of Tdlib for interaction with TDLib. +TDLight Java Wrapper +==================== - Copyright (C) 2018 Ernesto Castellotti - - Ernesto Castellotti is the copyright holder of this software, for - any need, do not hesitate to contact him. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License. +## Requirements +JVM: Oracle JVM and OpenJDK - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. +Java versions: Java 10, 11, 12, 13, 14 - You should have received a copy of the GNU Lesser General Public License - along with this program in the file called "LICENSE". If not, contact the copyright holder. - -LIBRARIES/EXTERNAL CODE -======================= +Operating system: Windows, Linux + +Supported CPU architectures: amd64 (linux, windows), aarch64 (linux) + +Required libraries for linux: OpenSSL and zlib + +## Including TDLight in a project +Maven configuration example to use this version of tdlight-java: +```xml + + + tdlight-gihtub + GitHub TDLight Team Apache Maven Packages + https://maven.pkg.github.com/tdlight-team/tdlight-java + + + + + + it.ernytech + tdlib + REPLACE_WITH_LATEST_VERSION + + +``` +Gradle configuration example to use this version of tdlight-java: +```groovy +repositories { + maven { url "https://maven.pkg.github.com/tdlight-team/tdlight-java" } +} +dependencies { + implementation 'com.github.tdlight-team.tdlight-java:tdlib:REPLACE_WITH_LATEST_VERSION' +} +``` + +Replace `REPLACE_WITH_LATEST_VERSION` with the latest version of tdlight, you can find it on the **Releases** tab on github. + +## Usage +Simple initialization of a native TDLib client +```java +import java.io.File; + +import it.tdlight.tdlight.Client; +import it.tdlight.tdlight.Init; +import it.tdlight.tdlight.Log; + +public class Example { + public static void main(String[] args) { + // Initialize TDLight native libraries + Init.start(); + + // Set TDLib log level to 1 + Log.setVerbosityLevel(1); + + // Uncomment this line to print TDLib logs to a file + // Log.setFilePath("logs" + File.separatorChar + "tdlib.log"); + + Client client = new Client(); + + // Initialize the TDLib client + client.initializeClient(); + + // Now you can use the client + } +} +``` + +## About +#### Libraries and external code Telegram Tdlib-TD Copyright owner and contributors: - Aliaksei Levin - Arseny Smirnov @@ -31,4 +85,9 @@ Telegram Tdlib-TD Copyright owner and contributors: - Felix Krause - Mark -TDLib is licensed under the terms of the Boost Software License \ No newline at end of file +#### License +TDLight is licensed by Andrea Cavalli under the terms of the GNU Lesser General Public License 3 + +JTDlib is licensed by Ernesto Castellotti under the terms of the GNU Lesser General Public License 3 + +TDLib is licensed by Aliaksei Levin Ale under the terms of the Boost Software License \ No newline at end of file