Renamed tdnatives to tdlib
This commit is contained in:
parent
4fcc752f24
commit
f02164b148
6
.gitignore
vendored
6
.gitignore
vendored
@ -58,8 +58,8 @@ tdlib.iml
|
||||
|
||||
/bin-docs
|
||||
/bin-td
|
||||
/bin-tdnatives
|
||||
/bin-tdlib
|
||||
/build-td
|
||||
/build-tdnatives
|
||||
/build-tdlib
|
||||
__pycache__
|
||||
/src/tdnatives-java/it/tdlight/tdnatives/TdApi.java
|
||||
/src/tdlib-java/it/tdlight/tdlib/TdApi.java
|
||||
|
16
build.sh
16
build.sh
@ -3,12 +3,12 @@
|
||||
# ====== Variables
|
||||
export TD_SRC_DIR=${PWD}/dependencies/tdlight
|
||||
export TD_BIN_DIR=${PWD}/bin-td
|
||||
export TDNATIVES_BIN_DIR=${PWD}/bin-tdnatives
|
||||
export TDNATIVES_CPP_SRC_DIR=${PWD}/src/tdnatives-cpp
|
||||
export TDNATIVES_BIN_DIR=${PWD}/bin-tdlib
|
||||
export TDNATIVES_CPP_SRC_DIR=${PWD}/src/tdlib-cpp
|
||||
export TDNATIVES_DOCS_BIN_DIR=${PWD}/bin-docs
|
||||
export TD_BUILD_DIR=${PWD}/build-td
|
||||
export TDNATIVES_CPP_BUILD_DIR=${PWD}/build-tdnatives
|
||||
export JAVA_SRC_DIR=${PWD}/src/tdnatives-java
|
||||
export TDNATIVES_CPP_BUILD_DIR=${PWD}/build-tdlib
|
||||
export JAVA_SRC_DIR=${PWD}/src/tdlib-java
|
||||
export TDLIB_SERIALIZER_DIR=${PWD}/dependencies/tdlib-serializer
|
||||
|
||||
# ====== Print variables
|
||||
@ -34,8 +34,8 @@ cmake --build $TDNATIVES_CPP_BUILD_DIR --target install -- -j4
|
||||
|
||||
# ====== Patch generated java code
|
||||
echo "Compilation done. Patching TdApi.java"
|
||||
python3 $TDLIB_SERIALIZER_DIR $JAVA_SRC_DIR/it/tdlight/tdnatives/TdApi.java $JAVA_SRC_DIR/it/tdlight/tdnatives/new_TdApi.java $TDLIB_SERIALIZER_DIR/headers.txt
|
||||
rm $JAVA_SRC_DIR/it/tdlight/tdnatives/TdApi.java
|
||||
unexpand --tabs=2 $JAVA_SRC_DIR/it/tdlight/tdnatives/new_TdApi.java > $JAVA_SRC_DIR/it/tdlight/tdnatives/TdApi.java
|
||||
rm $JAVA_SRC_DIR/it/tdlight/tdnatives/new_TdApi.java
|
||||
python3 $TDLIB_SERIALIZER_DIR $JAVA_SRC_DIR/it/tdlight/tdlib/TdApi.java $JAVA_SRC_DIR/it/tdlight/tdlib/new_TdApi.java $TDLIB_SERIALIZER_DIR/headers.txt
|
||||
rm $JAVA_SRC_DIR/it/tdlight/tdlib/TdApi.java
|
||||
unexpand --tabs=2 $JAVA_SRC_DIR/it/tdlight/tdlib/new_TdApi.java > $JAVA_SRC_DIR/it/tdlight/tdlib/TdApi.java
|
||||
rm $JAVA_SRC_DIR/it/tdlight/tdlib/new_TdApi.java
|
||||
|
||||
|
@ -26,7 +26,7 @@ message(STATUS "Java Source Directory: ${JAVA_SRC_DIR}")
|
||||
# Generating TdApi.java
|
||||
find_program(PHP_EXECUTABLE php)
|
||||
|
||||
set(TD_API_JAVA_PACKAGE "it/tdlight/tdnatives")
|
||||
set(TD_API_JAVA_PACKAGE "it/tdlight/tdlib")
|
||||
set(TD_API_JAVA_PATH ${JAVA_SRC_DIR})
|
||||
set(TD_API_TLO_PATH ${TD_BIN_DIR}/bin/td/generate/scheme/td_api.tlo)
|
||||
set(TD_API_TL_PATH ${TD_BIN_DIR}/bin/td/generate/scheme/td_api.tl)
|
||||
@ -51,7 +51,7 @@ add_custom_target(build_java
|
||||
)
|
||||
|
||||
add_custom_target(generate_javadoc
|
||||
COMMAND ${Java_JAVADOC_EXECUTABLE} -d ${TDNATIVES_DOCS_BIN_DIR} it.tdlight.tdnatives
|
||||
COMMAND ${Java_JAVADOC_EXECUTABLE} -d ${TDNATIVES_DOCS_BIN_DIR} it.tdlight.tdlib
|
||||
WORKING_DIRECTORY ${TD_API_JAVA_PATH}
|
||||
COMMENT "Generating Javadoc documentation"
|
||||
DEPENDS td_generate_java_api
|
||||
|
@ -1,3 +1,3 @@
|
||||
../src/tdnatives-java/it/tdlight/tdnatives/NativeClient.java
|
||||
../src/tdnatives-java/it/tdlight/tdnatives/NativeLog.java
|
||||
../src/tdnatives-java/it/tdlight/tdnatives/TdApi.java
|
||||
../src/tdlib-java/it/tdlight/tdlib/NativeClient.java
|
||||
../src/tdlib-java/it/tdlight/tdlib/NativeLog.java
|
||||
../src/tdlib-java/it/tdlight/tdlib/TdApi.java
|
||||
|
@ -18,8 +18,8 @@ package it.tdlight.tdlight.natives;
|
||||
|
||||
|
||||
|
||||
import it.tdlight.tdnatives.TdApi.Function;
|
||||
import it.tdlight.tdnatives.TdApi.Object;
|
||||
import it.tdlight.tdlib.TdApi.Function;
|
||||
import it.tdlight.tdlib.TdApi.Object;
|
||||
|
||||
public class NativeClient {
|
||||
protected static native long createNativeClient();
|
||||
|
@ -68,10 +68,10 @@ if [ "$TRAVIS_OS_NAME_STANDARD" = "linux" ]; then
|
||||
|
||||
# Patch TdApi.java
|
||||
echo "Patching TdApi.java"
|
||||
python3 $TDLIB_SERIALIZER_DIR $JAVA_SRC_DIR/it/tdlight/tdnatives/TdApi.java $JAVA_SRC_DIR/it/tdlight/tdnatives/new_TdApi.java $TDLIB_SERIALIZER_DIR/headers.txt
|
||||
rm $JAVA_SRC_DIR/it/tdlight/tdnatives/TdApi.java
|
||||
unexpand --tabs=2 $JAVA_SRC_DIR/it/tdlight/tdnatives/new_TdApi.java > $JAVA_SRC_DIR/it/tdlight/tdnatives/TdApi.java
|
||||
rm $JAVA_SRC_DIR/it/tdlight/tdnatives/new_TdApi.java
|
||||
python3 $TDLIB_SERIALIZER_DIR $JAVA_SRC_DIR/it/tdlight/tdlib/TdApi.java $JAVA_SRC_DIR/it/tdlight/tdlib/new_TdApi.java $TDLIB_SERIALIZER_DIR/headers.txt
|
||||
rm $JAVA_SRC_DIR/it/tdlight/tdlib/TdApi.java
|
||||
unexpand --tabs=2 $JAVA_SRC_DIR/it/tdlight/tdlib/new_TdApi.java > $JAVA_SRC_DIR/it/tdlight/tdlib/TdApi.java
|
||||
rm $JAVA_SRC_DIR/it/tdlight/tdlib/new_TdApi.java
|
||||
|
||||
# Upgrade the file of tdlight-java
|
||||
cd $TRAVIS_BUILD_DIR
|
||||
@ -79,13 +79,13 @@ if [ "$TRAVIS_OS_NAME_STANDARD" = "linux" ]; then
|
||||
git clone --depth=1 -b master --single-branch git@ssh.git.ignuranza.net:tdlight-team/tdlight-java.git
|
||||
cd $TRAVIS_BUILD_DIR/tdlight-java
|
||||
git checkout master
|
||||
cp $JAVA_SRC_DIR/it/tdlight/tdnatives/TdApi.java $TRAVIS_BUILD_DIR/tdlight-java/src/main/java/it/tdlight/tdnatives/TdApi.java
|
||||
cp $JAVA_SRC_DIR/it/tdlight/tdlib/TdApi.java $TRAVIS_BUILD_DIR/tdlight-java/src/main/java/it/tdlight/tdlib/TdApi.java
|
||||
|
||||
# IF TdApi.java IS CHANGED
|
||||
if [[ ! -z "$(git status --porcelain | grep "$JAVA_SRC_DIR/it/tdlight/tdnatives/TdApi.java")" ]]; then
|
||||
if [[ ! -z "$(git status --porcelain | grep "$JAVA_SRC_DIR/it/tdlight/tdlib/TdApi.java")" ]]; then
|
||||
# Upgrade TdApi.java in repository master
|
||||
cd $TRAVIS_BUILD_DIR/tdlight-java
|
||||
git add src/main/java/it/tdlight/tdnatives/TdApi.java
|
||||
git add src/main/java/it/tdlight/tdlib/TdApi.java
|
||||
git commit -m "Upgraded TdApi.java"
|
||||
git push
|
||||
else
|
||||
|
@ -5,8 +5,8 @@ set -e
|
||||
source ./travis/setup_variables.sh
|
||||
|
||||
# ====== Environment cleanup
|
||||
[ -f $JAVA_SRC_DIR/it/tdlight/tdnatives/TdApi.java ] && rm $JAVA_SRC_DIR/it/tdlight/tdnatives/TdApi.java
|
||||
[ -f $JAVA_SRC_DIR/it/tdlight/tdnatives/new_TdApi.java ] && rm $JAVA_SRC_DIR/it/tdlight/tdnatives/new_TdApi.java
|
||||
[ -f $JAVA_SRC_DIR/it/tdlight/tdlib/TdApi.java ] && rm $JAVA_SRC_DIR/it/tdlight/tdlib/TdApi.java
|
||||
[ -f $JAVA_SRC_DIR/it/tdlight/tdlib/new_TdApi.java ] && rm $JAVA_SRC_DIR/it/tdlight/tdlib/new_TdApi.java
|
||||
|
||||
# ====== Environment setup
|
||||
[ -d $TRAVIS_BUILD_DIR/out ] || mkdir -p $TRAVIS_BUILD_DIR/out
|
||||
|
@ -4,12 +4,12 @@ set -e
|
||||
# ====== Variables
|
||||
export TD_SRC_DIR=${PWD}/dependencies/tdlight
|
||||
export TD_BIN_DIR=${PWD}/bin-td
|
||||
export TDNATIVES_BIN_DIR=${PWD}/bin-tdnatives
|
||||
export TDNATIVES_CPP_SRC_DIR=${PWD}/src/tdnatives-cpp
|
||||
export TDNATIVES_BIN_DIR=${PWD}/bin-tdlib
|
||||
export TDNATIVES_CPP_SRC_DIR=${PWD}/src/tdlib-cpp
|
||||
export TDNATIVES_DOCS_BIN_DIR=${PWD}/bin-docs
|
||||
export TD_BUILD_DIR=${PWD}/build-td
|
||||
export TDNATIVES_CPP_BUILD_DIR=${PWD}/build-tdnatives
|
||||
export JAVA_SRC_DIR=${PWD}/src/tdnatives-java
|
||||
export TDNATIVES_CPP_BUILD_DIR=${PWD}/build-tdlib
|
||||
export JAVA_SRC_DIR=${PWD}/src/tdlib-java
|
||||
export TDLIB_SERIALIZER_DIR=${PWD}/dependencies/tdlib-serializer
|
||||
export MAVEN_OPTS="--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/javax.crypto=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED"
|
||||
export TRAVIS_CPU_ARCH_JAVA="${TRAVIS_CPU_ARCH,,}"
|
||||
|
Loading…
Reference in New Issue
Block a user