Update generate_tdapi_java_file.sh and setup_variables.sh
This commit is contained in:
parent
d65297916d
commit
296d61625a
@ -35,6 +35,14 @@ echo "Td implementation: ${IMPLEMENTATION_NAME}"
|
||||
echo "CPU cores count: ${CPU_CORES}"
|
||||
echo "CMake extra arguments: '${CMAKE_EXTRA_ARGUMENTS}'"
|
||||
|
||||
# Setup constants
|
||||
if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
|
||||
export PYTHON_EXECUTABLE="python"
|
||||
else
|
||||
export PYTHON_EXECUTABLE="python3"
|
||||
fi
|
||||
|
||||
|
||||
# Delete old data
|
||||
echo "Deleting old data..."
|
||||
[ -d ./generated/tdapi_java_build/ ] && rm -r ./generated/tdapi_java_build/
|
||||
@ -95,7 +103,7 @@ cmake --build . --target td_generate_java_api --config Release ${CPU_CORES}
|
||||
cd ..
|
||||
|
||||
echo "Patching TdApi.java..."
|
||||
python3 ../tdlib-serializer/ $(realpath -m ./src/main/jni-java-src/it/tdlight/jni/TdApi.java) $(realpath -m ./src/main/jni-java-src/it/tdlight/jni/new_TdApi.java) $(realpath -m ../tdlib-serializer/headers.txt)
|
||||
${PYTHON_EXECUTABLE} ../tdlib-serializer/ $(realpath -m ./src/main/jni-java-src/it/tdlight/jni/TdApi.java) $(realpath -m ./src/main/jni-java-src/it/tdlight/jni/new_TdApi.java) $(realpath -m ../tdlib-serializer/headers.txt)
|
||||
rm ./src/main/jni-java-src/it/tdlight/jni/TdApi.java
|
||||
unexpand --tabs=2 ./src/main/jni-java-src/it/tdlight/jni/new_TdApi.java > ./src/main/jni-java-src/it/tdlight/jni/TdApi.java
|
||||
rm ./src/main/jni-java-src/it/tdlight/jni/new_TdApi.java
|
||||
|
@ -38,8 +38,7 @@ elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
export JAVA_HOME="$(/usr/libexec/java_home -v 14)"
|
||||
export JAVA_INCLUDE_PATH="$(/usr/libexec/java_home -v 14)/include"
|
||||
export CPU_CORES=" -- -j${CPU_CORES_NUM}"
|
||||
export CXXFLAGS="-stdlib=libc++"
|
||||
export CFLAGS="-stdlib=libc++"
|
||||
export CXXFLAGS="-stdlib=libstdc++"
|
||||
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
||||
export CMAKE_EXTRA_ARGUMENTS=""
|
||||
export TRAVIS_CPU_ARCH_JAVA="$(tr '[:upper:]' '[:lower:]'<<<"${TRAVIS_CPU_ARCH}")"
|
||||
|
Loading…
Reference in New Issue
Block a user