adding ant build instructions
parent
16914b7974
commit
464ad0e4cc
|
@ -1,4 +1,4 @@
|
||||||
### Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
You need a complete android development environment ready to develop native apps. That means:
|
You need a complete android development environment ready to develop native apps. That means:
|
||||||
* Cygwin
|
* Cygwin
|
||||||
|
@ -13,7 +13,7 @@ export NDK_ROOT=/cygdrive/d/Dev/Libs/Android/android-ndk-r8e
|
||||||
export PATH=$NDK_ROOT:$PATH
|
export PATH=$NDK_ROOT:$PATH
|
||||||
```
|
```
|
||||||
|
|
||||||
### Building libretro cores
|
## Building libretro cores
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/libretro/libretro-super.git
|
git clone https://github.com/libretro/libretro-super.git
|
||||||
cd libretro-super
|
cd libretro-super
|
||||||
|
@ -22,7 +22,7 @@ cd libretro-super
|
||||||
# see https://github.com/libretro/libretro-super/issues/10
|
# see https://github.com/libretro/libretro-super/issues/10
|
||||||
```
|
```
|
||||||
|
|
||||||
### Building RetroArch
|
## Building RetroArch
|
||||||
The RetroArch repo is fetched into the libretro-super folder as retroarch by `./libretro-fetch.sh` above.
|
The RetroArch repo is fetched into the libretro-super folder as retroarch by `./libretro-fetch.sh` above.
|
||||||
```bash
|
```bash
|
||||||
cd retroarch/android/native
|
cd retroarch/android/native
|
||||||
|
@ -32,13 +32,31 @@ cd ../phoenix
|
||||||
cp -R ../native/libs/* libs # copy native libs
|
cp -R ../native/libs/* libs # copy native libs
|
||||||
cp -R ../../../dist/android/* libs # copy libretro cores
|
cp -R ../../../dist/android/* libs # copy libretro cores
|
||||||
```
|
```
|
||||||
|
|
||||||
When you need to rebuild the native code, run this from retroarch/android/native:
|
When you need to rebuild the native code, run this from retroarch/android/native:
|
||||||
```bash
|
```bash
|
||||||
ndk-build APP_ABI="armeabi-v7a mips x86" APP_PLATFORM=android-17
|
ndk-build APP_ABI="armeabi-v7a mips x86" APP_PLATFORM=android-17
|
||||||
cp -R -f libs/* ../phoenix/libs
|
cp -R -f libs/* ../phoenix/libs
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Building the .apk
|
||||||
|
You can choose to use the Eclipse gui or the command line tool `ant`
|
||||||
|
### Building with ant
|
||||||
|
From the android/phoenix directory in the RetroArch repo:
|
||||||
|
```bash
|
||||||
|
android update project --path libs/googleplay/
|
||||||
|
android update project --path libs/appcompat/
|
||||||
|
```
|
||||||
|
Now edit local.properties to point to the location of your ndk directory by adding a line like this: `ndk.dir=/complete/path/to/android-ndk-r9d`
|
||||||
|
```bash
|
||||||
|
ant clean
|
||||||
|
ant debug
|
||||||
|
```
|
||||||
|
If all goes well this will spit out an .apk, `bin/retroarch-debug.apk`. Put it on your device with
|
||||||
|
```bash
|
||||||
|
adb -d install bin/retroarch-debug.apk
|
||||||
|
```
|
||||||
|
|
||||||
|
### Building with eclipse
|
||||||
In Eclipse, set your workspace root to .../RetroArch/android. Then do "Import... - General - Existing Projects into Workspace" to get the native and phoenix projects in your workspace. I also copied the project.properties from phoenix to native, and created a src directory in native, to stop Eclipse from complaining, but that may just be because I'm using a really old version.
|
In Eclipse, set your workspace root to .../RetroArch/android. Then do "Import... - General - Existing Projects into Workspace" to get the native and phoenix projects in your workspace. I also copied the project.properties from phoenix to native, and created a src directory in native, to stop Eclipse from complaining, but that may just be because I'm using a really old version.
|
||||||
|
|
||||||
Then, when you want to deploy to your device (make sure USB debugging is enabled) right-click on the phoenix project and select "Run As - Android Application" or use Debug to attach the debugger. When the native libs change I will tend to Clean before doing Run, to make sure the libs were repackaged in the apk. Google for more info about running and debugging Android apps in Eclipse.
|
Then, when you want to deploy to your device (make sure USB debugging is enabled) right-click on the phoenix project and select "Run As - Android Application" or use Debug to attach the debugger. When the native libs change I will tend to Clean before doing Run, to make sure the libs were repackaged in the apk. Google for more info about running and debugging Android apps in Eclipse.
|
Loading…
Reference in New Issue