| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- 1. Start from readme.txt
- step by step video tutorial:
- http://www.youtube.com/watch?v=d8eHHr_KHgQ
- 2a. Examples folder have configured android project
- =================================================================================================
- How to build. Steps:
- - Install "java development kit" JDK 8 (or older)
- - Install Android NDK (https://developer.android.com/ndk/downloads/index.html) and set it up
- - Install Android SDK "Command line tools" (https://developer.android.com/studio/index.html, scroll to bottom),
- Launch SDK Manager and install Android SDK v16
- - Configure environment variables properly:
- NDK_ROOT points to root NDK folder
- example: d:\android\android-ndk-r13b\
- ANDROID_HOME points to root Android SDK folder
- example: d:/android/android-sdk/
- JAVA_HOME points to JDK
- example: c:\Program Files\Java\jdk1.8.0_101\
- - Add necessary paths to environment variable PATH:
- JDK
- example: "c:\Program Files\Java\jdk1.8.0_101\bin\"
- NDK tools
- example: d:\android\android-ndk-r13b\
- Android SDK tools and platform-tools
- example: d:\android\android-sdk\platform-tools\
- example: d:\android\android-sdk\tools\)
- - Copy latest source code (and don't forget to update it if you updated SDL)
- from SDL/android-project/src/
- to oxygine-framework/oxygine/SDL/android/lib/src/
- - Go to oxygine-framework\examples and choose any of them. For example "Demo"
- - Try to build and run it using shell/batch scripts located in proj.android folder*:
- - build-run.bat
- * or ./build-run.sh for unix
- build-run.bat includes 4 steps:
- 1. build C++ code using android-ndk:
- ndk-build NDK_MODULE_PATH=../../../../
- 2. build android aplication using gradle and android-sdk:
- gradlew assembleDebug
- 3. intall android application to connected android device:
- adb install -r build/outputs/apk/proj.android-debug.apk
- 4. run installed application on android:
- adb shell am start -n org.oxygine.Demo/org.oxygine.Demo.MainActivity
- * if you have any problems with build check each step manually
-
- !!!note!!!:
- Folder containing oxygine-framework should have the exact name 'oxygine-framework'
- not 'oxygine-framework-master' not 'oxygine-framework.git' etc.
- otherwise you would see error:
- > Android NDK: jni/src/Android.mk: Cannot find module with tag 'oxygine-framework'
- 2b. You could generate your own android build config.
- =================================================================================================
- - You need installed Python 2.7
- - You need to run this script
- oxygine-framework\tools\gen_template.py
- example:
- python gen_template.py MyProject -t android -d path/to/MyProject/
|