mirror of
https://github.com/AngelAuraMC/angelauramc-openjdk-build.git
synced 2025-08-03 07:35:59 -04:00
[FIX] Allow usage of a different NDK location for JDK 8
This allows users to not need to download the NDK multiple times if they already have it installed. TODO: Rewrite literally all of these scripts and rebranch.
This commit is contained in:
parent
bba4fdbd01
commit
a23217a8f3
@ -5,8 +5,12 @@ set -e
|
||||
export JDK_DEBUG_LEVEL=release
|
||||
|
||||
if [[ "$BUILD_IOS" != "1" ]]; then
|
||||
wget -nc -nv -O android-ndk-$NDK_VERSION-linux-x86_64.zip "https://dl.google.com/android/repository/android-ndk-$NDK_VERSION-linux-x86_64.zip"
|
||||
./extractndk.sh
|
||||
if [[ -d $NDK ]]; then
|
||||
echo "NDK already installed."
|
||||
else
|
||||
wget -nc -nv -O android-ndk-$NDK_VERSION-linux-x86_64.zip "https://dl.google.com/android/repository/android-ndk-$NDK_VERSION-linux-x86_64.zip"
|
||||
./extractndk.sh
|
||||
fi
|
||||
./maketoolchain.sh
|
||||
else
|
||||
chmod +x ios-arm64-clang
|
||||
|
@ -2,9 +2,13 @@
|
||||
set -e
|
||||
|
||||
. setdevkitpath.sh
|
||||
|
||||
$NDK/build/tools/make-standalone-toolchain.sh \
|
||||
--arch=${TARGET_SHORT} \
|
||||
--platform=android-21 \
|
||||
--install-dir=$NDK/generated-toolchains/android-${TARGET_SHORT}-toolchain
|
||||
|
||||
if [[ ! -f $NDK/generated-toolchains/android-${TARGET_SHORT}-toolchain/devkit.info.${TARGET_SHORT} ]]; then
|
||||
$NDK/build/tools/make-standalone-toolchain.sh \
|
||||
--arch=${TARGET_SHORT} \
|
||||
--platform=android-21 \
|
||||
--install-dir=$NDK/generated-toolchains/android-${TARGET_SHORT}-toolchain
|
||||
cp devkit.info.${TARGET_SHORT} $NDK/generated-toolchains/android-${TARGET_SHORT}-toolchain/
|
||||
else
|
||||
echo "NDK already has android-${TARGET_SHORT}-toolchain."
|
||||
fi
|
@ -55,7 +55,9 @@ else
|
||||
export JVM_PLATFORM=linux
|
||||
# Set NDK
|
||||
export API=21
|
||||
export NDK=`pwd`/android-ndk-$NDK_VERSION
|
||||
if [[ -z "$NDK" ]]; then
|
||||
export NDK=`pwd`/android-ndk-$NDK_VERSION
|
||||
fi
|
||||
export ANDROID_NDK_ROOT=$NDK
|
||||
export TOOLCHAIN=$NDK/generated-toolchains/android-${TARGET_SHORT}-toolchain
|
||||
# export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/linux-x86_64
|
||||
|
Loading…
x
Reference in New Issue
Block a user