Skip to content

Commit

Permalink
Linux fixes (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
luk3yx authored Dec 23, 2024
1 parent 9a805dc commit 3e035e6
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 29 deletions.
2 changes: 1 addition & 1 deletion SDL2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

SDL2_VERSION=2.30.10

. sdk.sh
. ./sdk.sh

mkdir -p output/sdl2/lib/$TARGET_ABI
mkdir -p deps; cd deps
Expand Down
36 changes: 23 additions & 13 deletions Start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@ ARCHS=("armv7" "arm64" "x86_64")
for ARCH in "${ARCHS[@]}"; do
echo "Building for ARCH: $ARCH"

sed -i '' '/^arch/d' local.properties
case "$OSTYPE" in
darwin*)
sed -i '' '/^arch/d' local.properties
;;
*)
touch local.properties
sed -i '/^arch/d' local.properties
;;
esac
echo "arch = $ARCH" >> local.properties

# Set NDK path
Expand Down Expand Up @@ -39,18 +47,20 @@ chmod -R u+w deps

# Build libs

sh gettext.sh
sh leveldb.sh
#sh luajit.sh
sh libjpeg.sh
sh libpng.sh
sh freetype.sh
sh SDL2.sh
sh irrlicht.sh
sh openal.sh
sh openssl.sh
sh libcurl.sh
sh vorbis.sh
./gettext.sh
./leveldb.sh
if [[ "$OSTYPE" == linux* ]]; then
./luajit.sh
fi
./libjpeg.sh
./libpng.sh
./freetype.sh
./SDL2.sh
./irrlicht.sh
./openal.sh
./openssl.sh
./libcurl.sh
./vorbis.sh

echo "Done building for $ARCH!"
done
Expand Down
4 changes: 2 additions & 2 deletions freetype.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

FREETYPE_VERSION=2.13.3

. sdk.sh
. ./sdk.sh

mkdir -p output/freetype/lib/$TARGET_ABI
mkdir -p deps; cd deps
Expand All @@ -11,7 +11,7 @@ if [ ! -d freetype-src ]; then
if [ ! -f "freetype-$FREETYPE_VERSION.tar.xz" ]; then
wget https://sourceforge.net/projects/freetype/files/freetype2/$FREETYPE_VERSION/freetype-$FREETYPE_VERSION.tar.xz
fi
tar -xzf freetype-$FREETYPE_VERSION.tar.xz
tar -xJf freetype-$FREETYPE_VERSION.tar.xz
mv freetype-$FREETYPE_VERSION freetype-src
mkdir freetype-src/build
fi
Expand Down
4 changes: 2 additions & 2 deletions gettext.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -e

. sdk.sh
. ./sdk.sh
GETTEXT_VERSION=0.23

mkdir -p output/gettext/lib/$TARGET_ABI
Expand All @@ -10,7 +10,7 @@ if [ ! -d gettext-src ]; then
if [ ! -f "gettext-$GETTEXT_VERSION.tar.xz" ]; then
wget https://ftp.gnu.org/pub/gnu/gettext/gettext-$GETTEXT_VERSION.tar.xz
fi
tar -xzf gettext-$GETTEXT_VERSION.tar.xz
tar -xJf gettext-$GETTEXT_VERSION.tar.xz
mv gettext-$GETTEXT_VERSION gettext-src
fi

Expand Down
2 changes: 1 addition & 1 deletion irrlicht.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -e

. sdk.sh
. ./sdk.sh

mkdir -p output/irrlicht/lib/$TARGET_ABI
mkdir -p deps; cd deps
Expand Down
2 changes: 1 addition & 1 deletion leveldb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

LEVELDB_VERSION=1.23

. sdk.sh
. ./sdk.sh

mkdir -p output/leveldb/lib/$TARGET_ABI
mkdir -p deps; cd deps
Expand Down
4 changes: 2 additions & 2 deletions libcurl.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash -e

. sdk.sh
CURL_VERSION=8.11.0
. ./sdk.sh
CURL_VERSION=8.11.1

export ANDR_ROOT=$(pwd)

Expand Down
2 changes: 1 addition & 1 deletion libjpeg.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -e

. sdk.sh
. ./sdk.sh
JPEG_VERSION=3.1.0

mkdir -p output/libjpeg/lib/$TARGET_ABI
Expand Down
2 changes: 1 addition & 1 deletion libpng.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -e

. sdk.sh
. ./sdk.sh
PNG_VERSION=1.6.44

mkdir -p output/libpng/lib/$TARGET_ABI
Expand Down
2 changes: 1 addition & 1 deletion luajit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

LUAJIT_VERSION=2.1

. sdk.sh
. ./sdk.sh

mkdir -p output/luajit/lib/$TARGET_ABI
mkdir -p deps; cd deps
Expand Down
2 changes: 1 addition & 1 deletion mbedtls.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -e

. sdk.sh
. ./sdk.sh
MBEDTLS_VERSION=3.6.1

mkdir -p output/mbedtls/lib/$TARGET_ABI
Expand Down
2 changes: 1 addition & 1 deletion openal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

OPENAL_VERSION=1.22.2

. sdk.sh
. ./sdk.sh

export SDL_PATH="$(pwd)/deps/sdl2-src"

Expand Down
2 changes: 1 addition & 1 deletion openssl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

OPENSSL_VERSION=3.4.0

. sdk.sh
. ./sdk.sh

mkdir -p output/openssl/lib/$TARGET_ABI
mkdir -p deps; cd deps
Expand Down
2 changes: 1 addition & 1 deletion vorbis.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -e

. sdk.sh
. ./sdk.sh

export ANDR_ROOT=$(pwd)

Expand Down

0 comments on commit 3e035e6

Please sign in to comment.