Site.SideBar
|
AndroidNDKWithSDL13UsingSdltmp
Installation
- Install Ubuntu (new version if you want USB to work)
- Run updates
- ###sudo apt-get install ia32-libs emacs mercurial g++
- apt-get install ant
- install sdk to /opt/android/, add android exe dir to path
- install ndk to /opt/android/, add ndk-build, adb, emulator dirs to path
- Add android exe to path and run it, add platforms (7, newest, plus extras/usbdriver if avl/windows only). It looks like android-12 was used to build this back in the day.
- Something like:
- export PATH=/opt/adt-bundle-linux-x86_64-20131030/sdk/tools/:/opt/adt-bundle-linux-x86_64-20131030/sdk/platform-tools/:/opt/adt-bundle-linux-x86_64-20131030/sdk/platform-tools/:/opt/android-ndk-r9c/:$PATH
- /opt/android-ndk-r9c/toolchains/x86-4.8/prebuilt/linux-x86_64/bin/ # for i686-linux-android-gcc
- android-project:
- http://www.libsdl.org/tmp/ # Download android-project.zip from here
- unzip android-project.zip
- cd android-project
- edit local.properties and cfg location of the android sdk
- android update project --target 1 --path /home/jake/projects/???/android-project
- ndk-build
- assembly error: change "pld" argument enclosure to brackets in "jni/jpeg/jidctfst.S"
- ant debug # or ant debug
- Read README in the android-project dir
- Run "sh data.sh" to copy the data to /sdcard/data/
- sh data.sh; ndk-build; ant debug; (ant release); scp bin/SDLActivity-debug.apk jake@www.ecse.rpi.edu:./public_html/apps/
- Download & install the app. Holy * it works!
- build a c++ project using ndk and sdl:
- (using the ndk/jni project from tmp.sdl as a starting point)
- ./clean.sh # to remove any existing compiled libs/etc
- rename file from .c to .cpp
- android update project --target 1 --path /home/jake/projects/???/android-project # Not sure what this does, but can't hurt!
- Create a 1-line file jni/Application.mk
- jni/src/Android.mk
- ### Change to .cpp file (I also added LOCAL_CPPFLAGS but this was probly not needed)
- ndk-build # from root project dir
- it should rebuild all the sdl stuff, and the .cpp file and work!
|