Update build.sh, compile_tdjni.sh, and 2 more files...
This commit is contained in:
parent
bcef11fb5e
commit
80adf864f0
@ -1,11 +1,11 @@
|
||||
#!/bin/bash -e
|
||||
set -e
|
||||
cd ./scripts/
|
||||
./generate_maven_project.sh
|
||||
./generate_td_tools.sh
|
||||
./compile_td.sh
|
||||
./compile_tdjni.sh
|
||||
./build_generated_maven_project.sh
|
||||
source ./generate_maven_project.sh
|
||||
source ./generate_td_tools.sh
|
||||
source ./compile_td.sh
|
||||
source ./compile_tdjni.sh
|
||||
source ./build_generated_maven_project.sh
|
||||
|
||||
echo "Done."
|
||||
exit 0
|
||||
|
@ -57,7 +57,7 @@ cp -r ./src/main/jni-java-src ./generated/src/main/jni-java-src
|
||||
|
||||
# Copy executables
|
||||
echo "Copying executables..."
|
||||
if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
|
||||
if [[ "$OPERATING_SYSTEM_NAME" == "windows" ]]; then
|
||||
export TD_GENERATED_BINARIES_DIR=$(realpath -m ./generated/td_tools/td/generate/Release)
|
||||
else
|
||||
export TD_GENERATED_BINARIES_DIR=$(realpath -m ./generated/td_tools/td/generate)
|
||||
@ -87,11 +87,11 @@ cd ..
|
||||
# Copy to resources
|
||||
echo "Copying to resources..."
|
||||
[ -d ./src/main/resources/libs/${OPERATING_SYSTEM_NAME_SHORT}/${CPU_ARCHITECTURE_NAME}/ ] || mkdir -p ./src/main/resources/libs/${OPERATING_SYSTEM_NAME_SHORT}/${CPU_ARCHITECTURE_NAME}/
|
||||
if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
|
||||
if [[ "$OPERATING_SYSTEM_NAME" == "windows" ]]; then
|
||||
cp ./tdjni_bin/tdjni.dll ./src/main/resources/libs/${OPERATING_SYSTEM_NAME_SHORT}/${CPU_ARCHITECTURE_NAME}/tdjni.dll
|
||||
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
elif [[ "$OPERATING_SYSTEM_NAME" == "osx" ]]; then
|
||||
cp ./tdjni_bin/libtdjni.dylib ./src/main/resources/libs/${OPERATING_SYSTEM_NAME_SHORT}/${CPU_ARCHITECTURE_NAME}/tdjni.dylib
|
||||
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
||||
elif [[ "$OPERATING_SYSTEM_NAME" == "linux" ]]; then
|
||||
cp ./tdjni_bin/libtdjni.so ./src/main/resources/libs/${OPERATING_SYSTEM_NAME_SHORT}/${CPU_ARCHITECTURE_NAME}/tdjni.so
|
||||
fi
|
||||
|
||||
|
@ -36,7 +36,7 @@ echo "CPU cores count: ${CPU_CORES}"
|
||||
echo "CMake extra arguments: '${CMAKE_EXTRA_ARGUMENTS}'"
|
||||
|
||||
# Setup constants
|
||||
if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
|
||||
if [[ "$OPERATING_SYSTEM_NAME" == "windows" ]]; then
|
||||
export PYTHON_EXECUTABLE="python"
|
||||
else
|
||||
export PYTHON_EXECUTABLE="python3"
|
||||
@ -68,7 +68,7 @@ cp -r ./src/main/jni-java-src ./generated/src/main/jni-java-src
|
||||
|
||||
# Copy executables
|
||||
echo "Copying executables..."
|
||||
if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
|
||||
if [[ "$OPERATING_SYSTEM_NAME" == "windows" ]]; then
|
||||
export TD_GENERATED_BINARIES_DIR=$(realpath -m ./generated/td_tools/td/generate/Release)
|
||||
else
|
||||
export TD_GENERATED_BINARIES_DIR=$(realpath -m ./generated/td_tools/td/generate)
|
||||
@ -105,7 +105,7 @@ cd ..
|
||||
echo "Patching TdApi.java..."
|
||||
${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
|
||||
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
if [[ "$OPERATING_SYSTEM_NAME" == "osx" ]]; then
|
||||
unexpand --tabs=2 ./src/main/jni-java-src/it/tdlight/jni/new_TdApi.java > ./src/main/jni-java-src/it/tdlight/jni/TdApi.java
|
||||
else
|
||||
unexpand -t 2 ./src/main/jni-java-src/it/tdlight/jni/new_TdApi.java > ./src/main/jni-java-src/it/tdlight/jni/TdApi.java
|
||||
|
@ -5,11 +5,11 @@
|
||||
# IMPLEMENTATION_NAME = <tdlib | tdlight>
|
||||
# CPU_CORES = <cores>
|
||||
|
||||
./generate_maven_project.sh
|
||||
./generate_td_tools.sh
|
||||
./compile_td.sh
|
||||
./compile_tdjni.sh
|
||||
./build_generated_maven_project.sh
|
||||
source ./generate_maven_project.sh
|
||||
source ./generate_td_tools.sh
|
||||
source ./compile_td.sh
|
||||
source ./compile_tdjni.sh
|
||||
source ./build_generated_maven_project.sh
|
||||
|
||||
echo "Done."
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user