Fix exports
This commit is contained in:
parent
e28fbcdf28
commit
e79894be71
@ -54,7 +54,7 @@ elif [[ "$OPERATING_SYSTEM_NAME" == "windows" ]]; then
|
|||||||
#choco install php --version=7.4.9 --package-parameters='"/ThreadSafe ""/InstallDir:C:\PHP"""'
|
#choco install php --version=7.4.9 --package-parameters='"/ThreadSafe ""/InstallDir:C:\PHP"""'
|
||||||
#choco install python3 --params "/InstallDir:C:\Python3"
|
#choco install python3 --params "/InstallDir:C:\Python3"
|
||||||
|
|
||||||
[ -d ./windowsenv/ ] && $(yes | rm -rf ./windowsenv/)
|
#[ -d ./windowsenv/ ] && $(yes | rm -rf ./windowsenv/)
|
||||||
#[ -d $VCPKG_DIR ] && $(yes | rm -rf $VCPKG_DIR)
|
#[ -d $VCPKG_DIR ] && $(yes | rm -rf $VCPKG_DIR)
|
||||||
#git clone --depth=1 https://github.com/tdlight-team/windows-amd64-prebuilt-libraries.git windowsenv
|
#git clone --depth=1 https://github.com/tdlight-team/windows-amd64-prebuilt-libraries.git windowsenv
|
||||||
#mv windowsenv/vcpkg $VCPKG_DIR
|
#mv windowsenv/vcpkg $VCPKG_DIR
|
||||||
|
@ -12,11 +12,14 @@ else
|
|||||||
export PCRE="r"
|
export PCRE="r"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export GH_CPU_ARCH=$(echo $GH_MATRIX_ARCH | sed -$PCRE 's/^(linux\/|windows\/|macos\/)?(386|amd64|arm64|ppc64le|arm)(\/(v6|v7))?$/\2\4/g')
|
GH_CPU_ARCH=$(echo "$GH_MATRIX_ARCH" | sed -$PCRE 's/^(linux\/|windows\/|macos\/)?(386|amd64|arm64|ppc64le|arm)(\/(v6|v7))?$/\2\4/g')
|
||||||
export GH_OS_NAME=$(echo $GH_MATRIX_ARCH | sed -$PCRE 's/^((linux)\/|(windows)\/|(macos)\/)?(386|amd64|arm64|ppc64le|arm)(\/(v6|v7))?$/\2\3\4/g')
|
export GH_CPU_ARCH
|
||||||
|
GH_OS_NAME=$(echo "$GH_MATRIX_ARCH" | sed -$PCRE 's/^((linux)\/|(windows)\/|(macos)\/)?(386|amd64|arm64|ppc64le|arm)(\/(v6|v7))?$/\2\3\4/g')
|
||||||
|
export GH_OS_NAME
|
||||||
|
|
||||||
if [[ -z "$GH_OS_NAME" ]]; then
|
if [[ -z "$GH_OS_NAME" ]]; then
|
||||||
export GH_OS_NAME=$(echo $GH_MATRIX_OS | sed -$PCRE 's/^([^-]+).*$/\1/g')
|
GH_OS_NAME=$(echo "$GH_MATRIX_OS" | sed -$PCRE 's/^([^-]+).*$/\1/g')
|
||||||
|
export GH_OS_NAME
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$GH_CPU_ARCH" == "arm64" ]]; then
|
if [[ "$GH_CPU_ARCH" == "arm64" ]]; then
|
||||||
@ -67,7 +70,8 @@ echo "============================="
|
|||||||
if [[ "$OPERATING_SYSTEM_NAME" == "windows" ]]; then
|
if [[ "$OPERATING_SYSTEM_NAME" == "windows" ]]; then
|
||||||
export CMAKE_BUILD_TYPE=MinSizeRel
|
export CMAKE_BUILD_TYPE=MinSizeRel
|
||||||
export BUILD_TYPE=MinSizeRel
|
export BUILD_TYPE=MinSizeRel
|
||||||
export VCPKG_DIR="$(realpath .)/vcpkg"
|
VCPKG_DIR="$(realpath .)/vcpkg"
|
||||||
|
export VCPKG_DIR
|
||||||
export CMAKE_EXTRA_ARGUMENTS="-A x64 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=$VCPKG_DIR/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DOPENSSL_USE_STATIC_LIBS=ON"
|
export CMAKE_EXTRA_ARGUMENTS="-A x64 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=$VCPKG_DIR/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DOPENSSL_USE_STATIC_LIBS=ON"
|
||||||
export PATH="/c/Python3:$PATH:/c/tools/php74:/c/PHP:/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64:/c/Program Files/OpenJDK/openjdk-11.0.8_10/bin:/c/Program Files/CMake/bin:/c/ProgramData/chocolatey/bin:/c/Program Files/apache-maven-3.6.3/bin:/c/ProgramData/chocolatey/lib/maven/apache-maven-3.6.3/bin:/c/ProgramData/chocolatey/lib/base64/tools:/c/Program Files/NASM"
|
export PATH="/c/Python3:$PATH:/c/tools/php74:/c/PHP:/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64:/c/Program Files/OpenJDK/openjdk-11.0.8_10/bin:/c/Program Files/CMake/bin:/c/ProgramData/chocolatey/bin:/c/Program Files/apache-maven-3.6.3/bin:/c/ProgramData/chocolatey/lib/maven/apache-maven-3.6.3/bin:/c/ProgramData/chocolatey/lib/base64/tools:/c/Program Files/NASM"
|
||||||
export CPU_CORES=" -- -m"
|
export CPU_CORES=" -- -m"
|
||||||
|
@ -80,17 +80,18 @@ echo "Creating missing jni-src folders..."
|
|||||||
# Copy executables
|
# Copy executables
|
||||||
echo "Copying executables..."
|
echo "Copying executables..."
|
||||||
if [[ "$OPERATING_SYSTEM_NAME" == "windows" ]]; then
|
if [[ "$OPERATING_SYSTEM_NAME" == "windows" ]]; then
|
||||||
export TD_GENERATED_BINARIES_DIR=$(realpath -m ./generated/td_tools/td/generate/Release)
|
TD_GENERATED_BINARIES_DIR=$(realpath -m ./generated/td_tools/td/generate/Release)
|
||||||
else
|
else
|
||||||
export TD_GENERATED_BINARIES_DIR=$(realpath -m ./generated/td_tools/td/generate)
|
TD_GENERATED_BINARIES_DIR=$(realpath -m ./generated/td_tools/td/generate)
|
||||||
fi
|
fi
|
||||||
|
export TD_GENERATED_BINARIES_DIR
|
||||||
|
|
||||||
# Configure cmake
|
# Configure cmake
|
||||||
echo "Configuring CMake..."
|
echo "Configuring CMake..."
|
||||||
cd ./generated/tdjni_build/
|
cd ./generated/tdjni_build/
|
||||||
|
|
||||||
CMAKE_EXTRA_ARGUMENTS_TDJNI=""
|
CMAKE_EXTRA_ARGUMENTS_TDJNI=""
|
||||||
if [[ -z "$CROSS_BUILD_DEPS_DIR" ]]; then
|
if [[ ! -z "$CROSS_BUILD_DEPS_DIR" ]]; then
|
||||||
# shellcheck disable=SC2089
|
# shellcheck disable=SC2089
|
||||||
CMAKE_EXTRA_ARGUMENTS_TDJNI="${CMAKE_EXTRA_ARGUMENTS_TDJNI} -DCMAKE_TOOLCHAIN_FILE=${CROSS_BUILD_DEPS_DIR}/toolchain.cmake"
|
CMAKE_EXTRA_ARGUMENTS_TDJNI="${CMAKE_EXTRA_ARGUMENTS_TDJNI} -DCMAKE_TOOLCHAIN_FILE=${CROSS_BUILD_DEPS_DIR}/toolchain.cmake"
|
||||||
fi
|
fi
|
||||||
@ -99,16 +100,16 @@ fi
|
|||||||
cmake \
|
cmake \
|
||||||
"-DCMAKE_BUILD_TYPE=${BUILD_TYPE}" \
|
"-DCMAKE_BUILD_TYPE=${BUILD_TYPE}" \
|
||||||
-DTD_GENERATED_BINARIES_DIR=${TD_GENERATED_BINARIES_DIR} \
|
-DTD_GENERATED_BINARIES_DIR=${TD_GENERATED_BINARIES_DIR} \
|
||||||
-DTD_SRC_DIR=$(realpath -m ../implementation/) \
|
"-DTD_SRC_DIR=$(realpath -m ../implementation/)" \
|
||||||
-DTDNATIVES_BIN_DIR=$(realpath -m ../tdjni_bin/) \
|
"-DTDNATIVES_BIN_DIR=$(realpath -m ../tdjni_bin/)" \
|
||||||
-DTDNATIVES_DOCS_BIN_DIR=$(realpath -m ../tdjni_docs/) \
|
"-DTDNATIVES_DOCS_BIN_DIR=$(realpath -m ../tdjni_docs/)" \
|
||||||
-DTd_DIR=$(realpath -m ../td_bin/lib/cmake/Td/) \
|
"-DTd_DIR=$(realpath -m ../td_bin/lib/cmake/Td/)" \
|
||||||
-DJAVA_SRC_DIR=$(realpath -m ../src/main/jni-java-src/) \
|
"-DJAVA_SRC_DIR=$(realpath -m ../src/main/jni-java-src/)" \
|
||||||
-DTDNATIVES_CPP_SRC_DIR:PATH=$(realpath -m ../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_TDJNI} \
|
${CMAKE_EXTRA_ARGUMENTS_TDJNI} \
|
||||||
${CMAKE_EXTRA_ARGUMENTS} \
|
${CMAKE_EXTRA_ARGUMENTS} \
|
||||||
$(realpath -m ../src/main/jni-cpp-src/)
|
"$(realpath -m ../src/main/jni-cpp-src/)"
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
echo "Compiling ${IMPLEMENTATION_NAME} jni..."
|
echo "Compiling ${IMPLEMENTATION_NAME} jni..."
|
||||||
|
@ -55,16 +55,18 @@ echo "Creating missing folders..."
|
|||||||
# Configure cmake
|
# Configure cmake
|
||||||
echo "Configuring CMake..."
|
echo "Configuring CMake..."
|
||||||
cd ./generated/td_build/
|
cd ./generated/td_build/
|
||||||
export CMAKE_EXTRA_ARGUMENTS_TD;
|
|
||||||
if [[ "$IMPLEMENTATION_NAME" = "tdlight" ]]; then
|
if [[ "$IMPLEMENTATION_NAME" = "tdlight" ]]; then
|
||||||
CMAKE_EXTRA_ARGUMENTS_TD="-DTD_SKIP_BENCHMARK=ON -DTD_SKIP_TEST=ON -DTD_SKIP_TG_CLI=ON"
|
CMAKE_EXTRA_ARGUMENTS_TD="-DTD_SKIP_BENCHMARK=ON -DTD_SKIP_TEST=ON -DTD_SKIP_TG_CLI=ON"
|
||||||
else
|
else
|
||||||
CMAKE_EXTRA_ARGUMENTS_TD=""
|
CMAKE_EXTRA_ARGUMENTS_TD=""
|
||||||
fi
|
fi
|
||||||
if [[ -z "$CROSS_BUILD_DEPS_DIR" ]]; then
|
if [[ ! -z "$CROSS_BUILD_DEPS_DIR" ]]; then
|
||||||
# shellcheck disable=SC2089
|
# shellcheck disable=SC2089
|
||||||
CMAKE_EXTRA_ARGUMENTS_TD="${CMAKE_EXTRA_ARGUMENTS_TD} -DCMAKE_TOOLCHAIN_FILE=${CROSS_BUILD_DEPS_DIR}/toolchain.cmake"
|
CMAKE_EXTRA_ARGUMENTS_TD="${CMAKE_EXTRA_ARGUMENTS_TD} -DCMAKE_TOOLCHAIN_FILE=${CROSS_BUILD_DEPS_DIR}/toolchain.cmake"
|
||||||
fi
|
fi
|
||||||
|
export CMAKE_EXTRA_ARGUMENTS_TD
|
||||||
|
|
||||||
INSTALL_PREFIX="$(realpath -m ../td_bin/)"
|
INSTALL_PREFIX="$(realpath -m ../td_bin/)"
|
||||||
INSTALL_BINDIR="$(realpath -m ../td_bin/bin)"
|
INSTALL_BINDIR="$(realpath -m ../td_bin/bin)"
|
||||||
echo "Install prefix: $INSTALL_PREFIX"
|
echo "Install prefix: $INSTALL_PREFIX"
|
||||||
|
@ -66,12 +66,14 @@ echo "Creating missing folders..."
|
|||||||
|
|
||||||
# Copy executables
|
# Copy executables
|
||||||
echo "Copying executables..."
|
echo "Copying executables..."
|
||||||
export TD_GENERATED_BINARIES_DIR;
|
|
||||||
if [[ "$OPERATING_SYSTEM_NAME" == "windows" ]]; then
|
if [[ "$OPERATING_SYSTEM_NAME" == "windows" ]]; then
|
||||||
TD_GENERATED_BINARIES_DIR="$(realpath -m ./generated/td_tools/td/generate/Release)"
|
TD_GENERATED_BINARIES_DIR="$(realpath -m ./generated/td_tools/td/generate/Release)"
|
||||||
else
|
else
|
||||||
TD_GENERATED_BINARIES_DIR="$(realpath -m ./generated/td_tools/td/generate)"
|
TD_GENERATED_BINARIES_DIR="$(realpath -m ./generated/td_tools/td/generate)"
|
||||||
fi
|
fi
|
||||||
|
export TD_GENERATED_BINARIES_DIR
|
||||||
|
|
||||||
# Configure cmake
|
# Configure cmake
|
||||||
echo "Configuring CMake..."
|
echo "Configuring CMake..."
|
||||||
cd ./generated/
|
cd ./generated/
|
||||||
|
@ -50,7 +50,6 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
unset CROSS_BUILD_DEPS_DIR
|
unset CROSS_BUILD_DEPS_DIR
|
||||||
export CROSS_BUILD_DEPS_DIR
|
|
||||||
if [[ "$OPERATING_SYSTEM_NAME" == "linux" ]]; then
|
if [[ "$OPERATING_SYSTEM_NAME" == "linux" ]]; then
|
||||||
if [[ "$CPU_ARCHITECTURE_NAME" == "aarch64" ]]; then
|
if [[ "$CPU_ARCHITECTURE_NAME" == "aarch64" ]]; then
|
||||||
export CMAKE_EXTRA_ARGUMENTS="$CMAKE_EXTRA_ARGUMENTS"
|
export CMAKE_EXTRA_ARGUMENTS="$CMAKE_EXTRA_ARGUMENTS"
|
||||||
@ -73,6 +72,7 @@ if [[ "$OPERATING_SYSTEM_NAME" == "linux" ]]; then
|
|||||||
export CROSS_CXX="${CPU_ARCH_CMAKE}-linux-gnu-g++"
|
export CROSS_CXX="${CPU_ARCH_CMAKE}-linux-gnu-g++"
|
||||||
|
|
||||||
CROSS_BUILD_DEPS_DIR="$(realpath "../../")/.cache/tdlib-build-cross-${CPU_ARCH_DPKG}/"
|
CROSS_BUILD_DEPS_DIR="$(realpath "../../")/.cache/tdlib-build-cross-${CPU_ARCH_DPKG}/"
|
||||||
|
export CROSS_BUILD_DEPS_DIR
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ====== Print variables
|
# ====== Print variables
|
||||||
|
Loading…
Reference in New Issue
Block a user