Created
July 22, 2016 07:07
-
-
Save xor256/9df71ed00ae2aa448707696fbc2f1a86 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
HO=/home/user | |
#Teraz będziemy starali się skompilować SDL2 | |
PATH="$HO/and/ndk:$PATH" # dla 'ndk-build' | |
PATH="$HO/and/sdk/tools:$PATH" # dla 'android' | |
PATH="$HO/and/sdk/platform-tools:$PATH" # dla 'adb' | |
# Create work directory | |
mkdir build | |
cd build | |
# Get SDL and SDL_image | |
#wget https://www.libsdl.org/release/SDL2-2.0.3.tar.gz | |
tar zxf ../SDL2-2.0.4.tar.gz | |
#wget https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.0.tar.gz | |
tar zxf ../SDL2_image-2.0.1.tar.gz | |
# Create Android project directory | |
cp -a SDL2-2.0.4/android-project . | |
cd $HO/and/build/android-project/jni | |
# Add SDL and SDL_image to Android project directory | |
ln -s ../../SDL2-2.0.4 SDL | |
ln -s ../../SDL2_image-2.0.1 SDL_image | |
# Add your code to Android project directory | |
cd $HO/and/build | |
mkdir src | |
cd src | |
cp $HO/and/main.c $HO/and/build/android-project/jni/src/ | |
# Create assets directory and add your resource to there | |
mkdir $HO/and/build/android-project/assets | |
cp -a $HO/and/*.bmp $HO/and/build/android-project/assets/ | |
cd $HO/and/build/android-project/ | |
android update project -s -t 4 -p . | |
ant debug | |
echo "ant debug install" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment