Update lib build script
This commit is contained in:
parent
ec2da18050
commit
96b5ccd17d
@ -18,13 +18,15 @@
|
||||
build_path="out/${build_os_type}_${build_os_arch}/"
|
||||
|
||||
function query_system_link() {
|
||||
data=$(ldd ../../../environment/TeaSpeakServer | grep "$1")
|
||||
local _binary="$2"
|
||||
[[ -z "$_binary" ]] && _binary="../../../environment/TeaSpeakServer"
|
||||
data=$(ldd "$_binary" | grep "$1")
|
||||
# shellcheck disable=SC2206
|
||||
data=($data)
|
||||
library_path=${data[2]}
|
||||
|
||||
[[ -z "${library_path}" ]] && { echo "failed to resolve library path for $1"; exit 1; }
|
||||
[[ "${library_path}" == "not" ]] && { echo "failed to resolve library path for $1"; exit 1; }
|
||||
[[ -z "${library_path}" ]] && { echo "failed to resolve library path for $1 in $_binary"; exit 1; }
|
||||
[[ "${library_path}" == "not" ]] && { echo "failed to resolve library path for $1 in $_binary"; exit 1; }
|
||||
}
|
||||
|
||||
cd $(dirname $0) || exit 1
|
||||
@ -50,6 +52,7 @@ cp "$library_path" . || { echo "failed to copy libcrypto.so"; exit 1; }
|
||||
# Setting up DataPipes
|
||||
library_path=$(realpath "${library_base}//DataPipes/${build_path}/lib/libDataPipes.so")
|
||||
cp "$library_path" . || { echo "failed to copy libDataPipes.so"; exit 1; }
|
||||
_dp_path="$library_path"
|
||||
|
||||
# Setting up Sqlite3
|
||||
query_system_link "libsqlite3.so.0"
|
||||
@ -82,7 +85,7 @@ if ldd "../../../environment/TeaSpeakServer" | grep -q "libnice.so.10"; then
|
||||
# "libglib-2.0.so.0" (only for web)
|
||||
|
||||
# Setting up libpcre
|
||||
query_system_link "libpcre.so.3"
|
||||
query_system_link "libpcre.so.3" "$_dp_path"
|
||||
cp "${library_path}" . || { echo "failed to copy libpcre.so.3"; exit 1; }
|
||||
fi
|
||||
|
||||
@ -94,4 +97,4 @@ for file in *.so*; do
|
||||
patchelf --set-rpath "./libs/:./" "$file"
|
||||
done
|
||||
|
||||
echo "All libraries have been copied successfully"
|
||||
echo "All libraries have been copied successfully"
|
||||
|
Loading…
Reference in New Issue
Block a user