From 80adf864f0523c5f9efdb4a4d1d7098057436519 Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Sun, 27 Dec 2020 14:05:47 +0100 Subject: [PATCH] Update build.sh, compile_tdjni.sh, and 2 more files... --- github-workflows/build.sh | 10 +++++----- scripts/compile_tdjni.sh | 8 ++++---- scripts/generate_tdapi_java_file.sh | 6 +++--- scripts/run-all.sh | 10 +++++----- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/github-workflows/build.sh b/github-workflows/build.sh index 3b3b394..37f52d5 100755 --- a/github-workflows/build.sh +++ b/github-workflows/build.sh @@ -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 diff --git a/scripts/compile_tdjni.sh b/scripts/compile_tdjni.sh index 346b630..801a08e 100755 --- a/scripts/compile_tdjni.sh +++ b/scripts/compile_tdjni.sh @@ -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 diff --git a/scripts/generate_tdapi_java_file.sh b/scripts/generate_tdapi_java_file.sh index 4bcd5de..2b20325 100755 --- a/scripts/generate_tdapi_java_file.sh +++ b/scripts/generate_tdapi_java_file.sh @@ -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 diff --git a/scripts/run-all.sh b/scripts/run-all.sh index c2269b6..4478239 100755 --- a/scripts/run-all.sh +++ b/scripts/run-all.sh @@ -5,11 +5,11 @@ # IMPLEMENTATION_NAME = # CPU_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