Skip to content

Instantly share code, notes, and snippets.

@miketweaver

miketweaver/build.sh

Last active Feb 2, 2019
Embed
What would you like to do?
building EmptyEpsilon for Android - NOT WORKING YET
## This is meant to be run manually, not as a script
sudo apt update
sudo apt dist-upgrade
sudo reboot
sudo apt install unzip openjdk-8-jdk cmake
mkdir android && cd android
wget https://dl.google.com/android/repository/android-ndk-r18b-linux-x86_64.zip
unzip android-ndk-*-linux-x86_64.zip
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
mkdir android-sdk-linux
unzip sdk-tools-linux-*.zip -d android-sdk-linux/
wget https://www.sfml-dev.org/files/SFML-2.5.1-sources.zip
unzip SFML-*-sources.zip
wget https://services.gradle.org/distributions/gradle-5.1.1-bin.zip
unzip gradle-*-bin.zip
git clone https://github.com/BashNinja/EmptyEpsilon.git
git clone https://github.com/daid/SeriousProton.git
nano loadsource.sh
```
NDKVERSION="android-ndk-r18b"
GRADLEVERSION="gradle-5.1.1"
export GRADLE_HOME=$HOME/android/$GRADLEVERSION
export ANDROID_NDK=$HOME/android/$NDKVERSION
export ANDROID_SDK=$HOME/android/android-sdk-linux
export NDK_MODULE_PATH=$ANDROID_NDK/sources/third_party
export PATH=${ANT_HOME}/bin:${PATH}
export PATH=$PATH:$ANDROID_SDK/tools:$HOME/android/android-sdk-linux/platform-tools:$ANDROID_NDK:$GRADLE_HOME/bin
```
source loadsource.sh
cd SFML-*/
mkdir build && cd build
mkdir armeabi-v7a && cd armeabi-v7a
cmake -DCMAKE_SYSTEM_NAME=Android -DCMAKE_ANDROID_NDK=$ANDROID_NDK -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a -DCMAKE_ANDROID_API=26 -DCMAKE_ANDROID_STL_TYPE=c++_shared -DCMAKE_BUILD_TYPE=Debug -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang ../..
make -j 4
make install
cd ../../../EmptyEpsilon/android/
echo "sdk.dir=$ANDROID_SDK" >> local.properties
echo "ndk.dir=$ANDROID_NDK" >> local.properties
$ANDROID_SDK/tools/bin/sdkmanager --licenses
#copy assets
rm -rf app/src/main/assets/*
cp ../resources app/src/main/assets/resources/ -a
cp ../scripts app/src/main/assets/resources/ -a
#remove all music and 3d models to save space
rm -rf app/src/main/assets/resources/music
rm -rf app/src/main/assets/resources/*.obj
rm -rf app/src/main/assets/resources/ammo_box*
rm -rf app/src/main/assets/resources/*_texture*
rm -rf app/src/main/assets/resources/fire_ring.png
rm -rf app/src/main/assets/resources/shield_hit_effect.png
gradle build
@LHolst

This comment has been minimized.

Copy link

@LHolst LHolst commented Jan 17, 2019

@miketweaver great work! hoping to see EE on android again 😍

@miketweaver

This comment has been minimized.

Copy link
Owner Author

@miketweaver miketweaver commented Jan 17, 2019

@LHolst I am working on it! I'm not an android dev, so I'd love some guidance from anyone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.