Skip to content

Commit

Permalink
Update build script to build all arches at once
Browse files Browse the repository at this point in the history
  • Loading branch information
MoNTE48 committed Aug 20, 2024
1 parent 40a1b64 commit 3fa102e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Dependencies for the MultiCraft (Android)

Copyright © 2021-2022 Maksim Gamarnik [MoNTE48] <[email protected]>
Copyright © 2021-2024 Maksim Gamarnik [MoNTE48] <[email protected]>

Licensed to libraries under the license of their authors.

Expand Down
33 changes: 15 additions & 18 deletions Start.sh
Original file line number Diff line number Diff line change
@@ -1,31 +1,21 @@
#!/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:]]*//')"

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" ];
Expand All @@ -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
Expand All @@ -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!"

0 comments on commit 3fa102e

Please sign in to comment.