Update compile_td.sh, compile_tdjni.sh, and 4 more files...
This commit is contained in:
parent
ce7133bba2
commit
d7331326ac
@ -49,7 +49,7 @@ echo "Creating missing folders..."
|
|||||||
echo "Configuring CMake..."
|
echo "Configuring CMake..."
|
||||||
cd ./generated/td_build/
|
cd ./generated/td_build/
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release \
|
cmake -DCMAKE_BUILD_TYPE=Release \
|
||||||
-DCMAKE_INSTALL_PREFIX:PATH=$(realpath ../td_bin/) \
|
-DCMAKE_INSTALL_PREFIX:PATH=$(realpath -m ../td_bin/) \
|
||||||
-DTD_ENABLE_JNI=ON \
|
-DTD_ENABLE_JNI=ON \
|
||||||
${CMAKE_EXTRA_ARGUMENTS} \
|
${CMAKE_EXTRA_ARGUMENTS} \
|
||||||
../implementation
|
../implementation
|
||||||
|
@ -61,16 +61,16 @@ echo "Configuring CMake..."
|
|||||||
cd ./generated/tdjni_build/
|
cd ./generated/tdjni_build/
|
||||||
cmake \
|
cmake \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DTD_GENERATED_BINARIES_DIR=$(realpath ../td_tools/td/generate/) \
|
-DTD_GENERATED_BINARIES_DIR=$(realpath -m ../td_tools/td/generate/) \
|
||||||
-DTD_SRC_DIR=$(realpath ../implementation/) \
|
-DTD_SRC_DIR=$(realpath -m ../implementation/) \
|
||||||
-DTDNATIVES_BIN_DIR=$(realpath ../tdjni_bin/) \
|
-DTDNATIVES_BIN_DIR=$(realpath -m ../tdjni_bin/) \
|
||||||
-DTDNATIVES_DOCS_BIN_DIR=$(realpath ../tdjni_docs/) \
|
-DTDNATIVES_DOCS_BIN_DIR=$(realpath -m ../tdjni_docs/) \
|
||||||
-DTd_DIR=$(realpath ../td_bin/lib/cmake/Td/) \
|
-DTd_DIR=$(realpath -m ../td_bin/lib/cmake/Td/) \
|
||||||
-DJAVA_SRC_DIR=$(realpath ../src/main/jni-java-src/) \
|
-DJAVA_SRC_DIR=$(realpath -m ../src/main/jni-java-src/) \
|
||||||
-DTDNATIVES_CPP_SRC_DIR:PATH=$(realpath ../src/main/jni-cpp-src/) \
|
-DTDNATIVES_CPP_SRC_DIR:PATH=$(realpath -m ../src/main/jni-cpp-src/) \
|
||||||
-DOPENSSL_USE_STATIC_LIBS=True \
|
-DOPENSSL_USE_STATIC_LIBS=True \
|
||||||
${CMAKE_EXTRA_ARGUMENTS} \
|
${CMAKE_EXTRA_ARGUMENTS} \
|
||||||
$(realpath ../src/main/jni-cpp-src/)
|
$(realpath -m ../src/main/jni-cpp-src/)
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
echo "Compiling ${IMPLEMENTATION_NAME} jni..."
|
echo "Compiling ${IMPLEMENTATION_NAME} jni..."
|
||||||
|
@ -62,13 +62,13 @@ cmake --build . --target prepare_cross_compiling ${CPU_CORES}
|
|||||||
echo "Generating java tools..."
|
echo "Generating java tools..."
|
||||||
cmake --build . --target td_generate_java_api ${CPU_CORES}
|
cmake --build . --target td_generate_java_api ${CPU_CORES}
|
||||||
|
|
||||||
echo "Generated executable '$(realpath ./td/generate/generate_common)'"
|
echo "Generated executable '$(realpath -m ./td/generate/generate_common)'"
|
||||||
echo "Generated executable '$(realpath ./td/generate/td_generate_java_api)'"
|
echo "Generated executable '$(realpath -m ./td/generate/td_generate_java_api)'"
|
||||||
echo "Generated executable '$(realpath ./td/generate/td_generate_json)'"
|
echo "Generated executable '$(realpath -m ./td/generate/td_generate_json)'"
|
||||||
echo "Generated executable '$(realpath ../implementation/td/generate/JavadocTlDocumentationGenerator.php)'"
|
echo "Generated executable '$(realpath -m ../implementation/td/generate/JavadocTlDocumentationGenerator.php)'"
|
||||||
echo "Generated executable '$(realpath ../implementation/td/generate/TlDocumentationGenerator.php)'"
|
echo "Generated executable '$(realpath -m ../implementation/td/generate/TlDocumentationGenerator.php)'"
|
||||||
echo "Generated executable '$(realpath ../implementation/td/generate/scheme/td_api.tl)'"
|
echo "Generated executable '$(realpath -m ../implementation/td/generate/scheme/td_api.tl)'"
|
||||||
echo "Generated executable '$(realpath ../implementation/td/generate/scheme/td_api.tlo)'"
|
echo "Generated executable '$(realpath -m ../implementation/td/generate/scheme/td_api.tlo)'"
|
||||||
|
|
||||||
echo "Done."
|
echo "Done."
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -61,16 +61,16 @@ cp -r ./src/main/jni-java-src ./generated/src/main/jni-java-src
|
|||||||
# Configure cmake
|
# Configure cmake
|
||||||
echo "Configuring CMake..."
|
echo "Configuring CMake..."
|
||||||
cd ./generated/tdapi_java_build/
|
cd ./generated/tdapi_java_build/
|
||||||
echo "Telegram source path: '$(realpath ../implementation/)'"
|
echo "Telegram source path: '$(realpath -m ../implementation/)'"
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release \
|
cmake -DCMAKE_BUILD_TYPE=Release \
|
||||||
-DTD_SRC_DIR=$(realpath ../implementation/) \
|
-DTD_SRC_DIR=$(realpath -m ../implementation/) \
|
||||||
-DTD_GENERATED_BINARIES_DIR=$(realpath ../td_tools/td/generate) \
|
-DTD_GENERATED_BINARIES_DIR=$(realpath -m ../td_tools/td/generate) \
|
||||||
-DTd_DIR=$(realpath ../td_bin/lib/cmake/Td/) \
|
-DTd_DIR=$(realpath -m ../td_bin/lib/cmake/Td/) \
|
||||||
-DTDNATIVES_BIN_DIR=$(realpath ../tdjni_bin/) \
|
-DTDNATIVES_BIN_DIR=$(realpath -m ../tdjni_bin/) \
|
||||||
-DTDNATIVES_DOCS_BIN_DIR=$(realpath ../tdjni_docs/) \
|
-DTDNATIVES_DOCS_BIN_DIR=$(realpath -m ../tdjni_docs/) \
|
||||||
-DJAVA_SRC_DIR=$(realpath ../src/main/jni-java-src/) \
|
-DJAVA_SRC_DIR=$(realpath -m ../src/main/jni-java-src/) \
|
||||||
${CMAKE_EXTRA_ARGUMENTS} \
|
${CMAKE_EXTRA_ARGUMENTS} \
|
||||||
$(realpath ../src/main/jni-cpp-src/)
|
$(realpath -m ../src/main/jni-cpp-src/)
|
||||||
|
|
||||||
# Run cmake to generate TdApi.java
|
# Run cmake to generate TdApi.java
|
||||||
echo "Generating TdApi.java..."
|
echo "Generating TdApi.java..."
|
||||||
@ -81,13 +81,13 @@ echo "Patching TdApi.java..."
|
|||||||
cd ./tdlib-serializer/
|
cd ./tdlib-serializer/
|
||||||
python3 -m pip install -r requirements.txt
|
python3 -m pip install -r requirements.txt
|
||||||
cd ../
|
cd ../
|
||||||
python3 ../tdlib-serializer/ $(realpath ./src/main/jni-java-src/it/tdlight/jni/TdApi.java) $(realpath ./src/main/jni-java-src/it/tdlight/jni/new_TdApi.java) $(realpath ../tdlib-serializer/headers.txt)
|
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)
|
||||||
rm ./src/main/jni-java-src/it/tdlight/jni/TdApi.java
|
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
|
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
|
rm ./src/main/jni-java-src/it/tdlight/jni/new_TdApi.java
|
||||||
cp ./src/main/jni-java-src/it/tdlight/jni/TdApi.java ./src/main/java/it/tdlight/jni/TdApi.java
|
cp ./src/main/jni-java-src/it/tdlight/jni/TdApi.java ./src/main/java/it/tdlight/jni/TdApi.java
|
||||||
|
|
||||||
echo "Generated '$(realpath ./src/main/java/it/tdlight/jni/TdApi.java)'"
|
echo "Generated '$(realpath -m ./src/main/java/it/tdlight/jni/TdApi.java)'"
|
||||||
|
|
||||||
echo "Done."
|
echo "Done."
|
||||||
exit 0
|
exit 0
|
||||||
|
4
src/main/replacements/replace-osx-amd64-tdlib.sed
Normal file
4
src/main/replacements/replace-osx-amd64-tdlib.sed
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
s/${OPERATING_SYSTEM_NAME}/osx/
|
||||||
|
s/${OPERATING_SYSTEM_NAME_SHORT}/osx/
|
||||||
|
s/${CPU_ARCHITECTURE_NAME}/amd64/
|
||||||
|
s/${IMPLEMENTATION_NAME}/tdlib/
|
4
src/main/replacements/replace-osx-amd64-tdlight.sed
Normal file
4
src/main/replacements/replace-osx-amd64-tdlight.sed
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
s/${OPERATING_SYSTEM_NAME}/osx/
|
||||||
|
s/${OPERATING_SYSTEM_NAME_SHORT}/osx/
|
||||||
|
s/${CPU_ARCHITECTURE_NAME}/amd64/
|
||||||
|
s/${IMPLEMENTATION_NAME}/tdlight/
|
Loading…
Reference in New Issue
Block a user