Files
simplex-chat/scripts/android/download-libs.sh
Stanislav Dmitrenko 695d47da2d desktop: Windows build (#3143)
* desktop: Windows build

* temp

* temp

* new way of libs loading

* new way of libs loading

* Revert "new way of libs loading"

This reverts commit 8632f8a8f7.

* made VLC working on Windows

* unused lib

* scripts

* updated script

* fix path

* fix lib loading

* fix lib loading

* packaging options

* different file manager implementation on Windows

---------

Co-authored-by: Avently <avently.local>
Co-authored-by: avently <avently@local>
Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
2023-10-01 13:33:15 +01:00

50 lines
1.5 KiB
Bash
Executable File

#!/bin/bash
set -e
function readlink() {
echo "$(cd "$(dirname "$1")"; pwd -P)"
}
if [ -z "${1}" ]; then
echo "Job repo is unset. Provide it via first argument like: $(readlink "$0")/download-libs.sh https://something.com/job/something/{master,stable}"
exit 1
fi
job_repo=$1
default_arch=$2
arches=("aarch64" "armv7a")
output_arches=("arm64-v8a" "armeabi-v7a")
if [ -z "${default_arch}" ]; then
# No custom architectures were specified, using defaults
echo "Libs for all supported architectures will be downloaded. To use single arch, pass one of the following values to the end of command: ${arches[*]}"
else
for ((i = 0 ; i < ${#output_arches[@]}; i++)); do
if [ "${arches[$i]}" == "$default_arch" ]; then
output_arches=("${output_arches[$i]}")
fi
done
arches=("$default_arch")
fi
root_dir="$(dirname "$(dirname "$(readlink "$0")")")"
for ((i = 0 ; i < ${#arches[@]}; i++)); do
arch="${arches[$i]}"
output_arch="${output_arches[$i]}"
output_dir="$root_dir/apps/multiplatform/common/src/commonMain/cpp/android/libs/$output_arch/"
mkdir -p "$output_dir" 2> /dev/null
curl --location -o libsupport.zip $job_repo/$arch-android:lib:support.x86_64-linux/latest/download/1 && \
unzip -o libsupport.zip && \
mv libsupport.so "$output_dir" && \
rm libsupport.zip
curl --location -o libsimplex.zip "$job_repo"/"$arch"-android:lib:simplex-chat.x86_64-linux/latest/download/1 && \
unzip -o libsimplex.zip && \
mv libsimplex.so "$output_dir" && \
rm libsimplex.zip
done