1
0
forked from ErnyTech/JTDLib

Update .gitmodules, TdApi.java, and 3 more files...

This commit is contained in:
Andrea Cavalli 2020-05-14 22:24:49 +02:00
parent 7fc7417fbd
commit a0f86ec9bf
4 changed files with 36 additions and 19 deletions

3
.gitmodules vendored
View File

@ -1,3 +1,6 @@
[submodule "src/main/jni/td"]
path = src/main/jni/td
url = git@ssh.git.ignuranza.net:andreacavalli/tdlib-fork.git
[submodule "src/main/jni/tdlib-serializer"]
path = src/main/jni/tdlib-serializer
url = ssh://git@ssh.git.ignuranza.net/windoz/tdlib-serializer.git

View File

@ -1,12 +1,12 @@
package it.ernytech.tdlib;
import java.io.ByteArrayOutputStream;
import java.io.DataInput;
import java.io.DataOutputStream;
import java.io.DataInputStream;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.lang.IllegalStateException;
import java.io.IOException;
import java.io.DataInput;
public class TdApi {

View File

@ -2,6 +2,9 @@
#rm -r jtdlib/jnibuild
#rm -r jtdlib/build
rm ../java/it/ernytech/tdlib/TdApi.java || true
rm ../java/it/ernytech/tdlib/new_TdApi.java || true
export TD_SRC_DIR=${PWD}/td
export TD_BIN_DIR=${PWD}/jtdlib/td
export JAVA_SRC_DIR=$(dirname `pwd`)/java
@ -19,7 +22,7 @@ cmake -DCMAKE_BUILD_TYPE=Release -DTD_ENABLE_JNI=ON -DCMAKE_INSTALL_PREFIX:PATH=
cmake --build . --target install -- -j1
cd ../../../../../
mvn install -X
#mvn install -X
cd src/main/jni/jtdlib/build
cmake -DCMAKE_BUILD_TYPE=Release -DTd_DIR=${TD_BIN_DIR}/lib/cmake/Td -DJAVA_SRC_DIR=${JAVA_SRC_DIR} -DCMAKE_INSTALL_PREFIX:PATH=.. ..
@ -37,5 +40,15 @@ mv bin/libtdjni.so ../bin/tdjni.so
cd ../
cp bin/tdjni.so ../resources/libs/linux/amd64/tdjni.so
echo "Compilation done. Patching TdApi.java"
python3 tdlib-serializer ../java/it/ernytech/tdlib/TdApi.java ../java/it/ernytech/tdlib/new_TdApi.java tdlib-serializer/headers.txt
rm ../java/it/ernytech/tdlib/TdApi.java
unexpand --tabs=2 ../java/it/ernytech/tdlib/new_TdApi.java > ../java/it/ernytech/tdlib/TdApi.java
rm ../java/it/ernytech/tdlib/new_TdApi.java
cd ../../../
mvn install -X
echo "Installing jar"
mvn clean install -X

@ -0,0 +1 @@
Subproject commit 57bf30757952daafcd28352e38fda21e260ce664