From 16914b797405a255ebc72ab06a4e66c36396ce54 Mon Sep 17 00:00:00 2001 From: John Grub Date: Tue, 10 Jun 2014 12:45:25 -0700 Subject: [PATCH] update build instructions --- Compilation-guide-(android-from-windows).md | 46 +++++++++++---------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/Compilation-guide-(android-from-windows).md b/Compilation-guide-(android-from-windows).md index 1bfc790..a210a8e 100644 --- a/Compilation-guide-(android-from-windows).md +++ b/Compilation-guide-(android-from-windows).md @@ -8,32 +8,36 @@ You need a complete android development environment ready to develop native apps Use Google to figure out how to install all that. Everything in this page happens in a Cygwin shell and in Eclipse. Make sure you set NDK_ROOT to the path to your NDK and add that to your PATH in the Cygwin shell. For example, edit your .bashrc to add these lines: - - export NDK_ROOT=/cygdrive/d/Dev/Libs/Android/android-ndk-r8e - export PATH=$NDK_ROOT:$PATH +```bash +export NDK_ROOT=/cygdrive/d/Dev/Libs/Android/android-ndk-r8e +export PATH=$NDK_ROOT:$PATH +``` ### Building libretro cores - - git clone https://github.com/libretro/libretro-super.git - cd libretro-super - ./libretro-fetch.sh # can fail on fork() calls, repeat until all are up to date - ./libretro-build-android-mk.sh # some cores may fail to compile (g++ "Argument list too long" error) - # see https://github.com/libretro/libretro-super/issues/10 +```bash +git clone https://github.com/libretro/libretro-super.git +cd libretro-super +./libretro-fetch.sh # can fail on fork() calls, repeat until all are up to date +./libretro-build-android-mk.sh # some cores may fail to compile (g++ "Argument list too long" error) + # see https://github.com/libretro/libretro-super/issues/10 +``` ### Building RetroArch +The RetroArch repo is fetched into the libretro-super folder as retroarch by `./libretro-fetch.sh` above. +```bash +cd retroarch/android/native +ndk-build clean APP_ABI="armeabi-v7a mips x86" +ndk-build APP_ABI="armeabi-v7a mips x86" APP_PLATFORM=android-17 # build native libs +cd ../phoenix +cp -R ../native/libs/* libs # copy native libs +cp -R ../../../dist/android/* libs # copy libretro cores +``` - git clone https://github.com/libretro/RetroArch.git - cd RetroArch/android/native - ndk-build clean; ndk-build # build native libs - cd ../phoenix - mkdir libs - cp -R ../native/libs/* libs # copy native libs - cp -R ../../../libretro-super/dist/android/* libs # copy libretro cores - cp -R ../../media/overlays/ assets/ # copy overlays - -When you need to rebuild the native code, run this from RetroArch/android/native: - - ndk-build; /bin/cp -R -f libs/* ../phoenix/libs +When you need to rebuild the native code, run this from retroarch/android/native: +```bash +ndk-build APP_ABI="armeabi-v7a mips x86" APP_PLATFORM=android-17 +cp -R -f libs/* ../phoenix/libs +``` 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.