Android port

From Ultronomicon
Revision as of 18:33, 26 August 2018 by Johncinema (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Project page: http://www.anddev.org/code-snippets-for-android-f33/sdl-port-for-android-sdk-ndk-1-6-t9218.html

Project GIT tree: http://github.com/pelya/commandergenius (extensive readme provided there, here are short instructions on compilation and publishing)

Compiling

  • Clone GIT tree (or download the snapshot using Github web interface)
  • Install the Android SDK and NDK as described in readme file in GIT.
  • Point <GIT>/project/jni/application/src symlink to the "sc2" directory.
  • From the root of GIT tree run script ChangeAppSettings.sh, it will ask many questions, just hit Enter.
  • Run command "android update project -p ." from the <GIT>/project dir (the "android" utility comes with SDK)
  • Run "ndk-build" from the <GIT>/project dir,i (the "ndk-build" utility comes with NDK) - it should compile several .so files in project/libs/armeabi
  • Run "ant debug" from the <GIT>/project dir - it will create .apk file in <GIT>/project/bin dir which you can install on the device using "adb install" command (the "adb" utility comes with SDK)
  • After you've tested it and satisfied with result, run "ant release", then sign your .apk file with your key (tutorial here: http://developer.android.com/guide/publishing/app-signing.html)

Publishing

  • The application data is not included in .apk file - it is downloaded from internet on first run and unzipped to application dir, if you don't like the data I've packaged at my Google Sites page put your own version to some public server and re-run ChangeAppSettings.sh to change download URL (then repeat all the steps above)
  • From now on you'll need to register an Android Developer account, that costs $25: http://market.android.com/publish Alternatively you can release your app on some 3rd-party Android market, like http://slideme.org/
  • Upload your .apk file. upload screenshots and description, click "Publish" and enjoy comments of stupid users complaining just about everything. Also you may boast on anddev.org that you've made a better port then mine.
  • If you don't want to spend $25 for nothing you can give me your .apk file, I'll publish it from my account if it will work on my phone.
  • Also you can ask for review on technology blogs such as https://techshali.com/