From 3fa102e05f9c57c921ae17f5f0e1262b28693939 Mon Sep 17 00:00:00 2001 From: "Maksym H." Date: Tue, 20 Aug 2024 06:19:08 +0300 Subject: [PATCH] Update build script to build all arches at once --- README.md | 2 +- Start.sh | 33 +++++++++++++++------------------ 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 940c124..67c7185 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## Dependencies for the MultiCraft (Android) -Copyright © 2021-2022 Maksim Gamarnik [MoNTE48] +Copyright © 2021-2024 Maksim Gamarnik [MoNTE48] Licensed to libraries under the license of their authors. diff --git a/Start.sh b/Start.sh index 458d414..306c43e 100755 --- a/Start.sh +++ b/Start.sh @@ -1,23 +1,13 @@ #!/bin/bash -e -# Set ARCH +# List of ARCH'es +ARCHS=("armv7" "arm64" "x86_64") -export ARCH="$(grep '^arch' local.properties | sed 's/^.*=[[:space:]]*//')" +for ARCH in "${ARCHS[@]}"; do +echo "Building for ARCH: $ARCH" -if [ -z "$ARCH" ]; -then - echo "Please specify ARCH" - echo "e.g. \"armv7\", \"arm64\" or \"x86_64\"" - read ARCH - - if [ "$ARCH" != armv7 ] && [ "$ARCH" != arm64 ] && [ "$ARCH" != x86_64 ]; - then - echo "$ARCH is not a valid ARCH" - exit 1 - fi - - echo "arch = $ARCH" >> local.properties -fi +sed -i '' '/^arch/d' local.properties +echo "arch = $ARCH" >> local.properties # Set NDK path export ANDROID_NDK="$(grep '^ndk\.dir' local.properties | sed 's/^.*=[[:space:]]*//')" @@ -25,7 +15,7 @@ export ANDROID_NDK="$(grep '^ndk\.dir' local.properties | sed 's/^.*=[[:space:]] if [ ! -d "$ANDROID_NDK" ]; then echo "Please specify path of ANDROID NDK" - echo "e.g. $HOME/Android/android-ndk-r25" + echo "e.g. $HOME/Android/android-ndk-r26" read ANDROID_NDK if [ ! -d "$ANDROID_NDK" ]; @@ -37,6 +27,10 @@ then echo "ndk.dir = $ANDROID_NDK" >> local.properties fi +# Clean the deps +rm -rf deps +mkdir deps + # Build libs sh gettext.sh @@ -52,4 +46,7 @@ sh mbedtls.sh sh libcurl.sh sh vorbis.sh -echo "Done!" +echo "Done building for $ARCH!" +done + +echo "All builds completed!"