#19 Android Build

closed
Jaka Kranjc
None
5
2013-01-05
2013-01-02
Trasd
No

Hi,

I noticed 0.7.2 of GemRB has been released (for awhile) for all but Android; may I ask why? Is Android development going to continue?

I am getting so desperate, I even tried to compile the apk myself - no luck.

I love playing BG on my tablet and purchased BG1 and BG2 just for this purpose, but there are a few annoying bugs that greatly limit my enjoyability.

Do you have a beta or personal build you could send me (with the accompanying scripts and overrides)?

Any help would be greatly appreciated. As far as compiling, I have used Borland for more years than I care to recount and have no access to MSVC, which it looks like the package is compiled with.

Thank you, and please don't give up on this project. If the reviews by people who cannot figure out how to make it work are discouraging you, I'd be happy to write a how-to manual - if that's what it takes to get you back on the project.

Discussion

<< < 1 2 (Page 2 of 2)
  • Trasd
    Trasd
    2013-01-05

    I have been in contact with Alex and he graciously provided me with the basics on building an APK.

    It is a bit convoluted and, as I thought, it will take awhile for me to figure it all out. He does not recommend starting with trying to build GemRB on a Windows system, but unless I use C4Droid for the main build, to include its custom SDL (at least to begin with), I have no choice but to use Windows. I have a machine I set aside for Linux, but in the three years since I downloaded and created a Linux CD to install, I haven't had the time to get it up and running.

    Thanks for all the help and I will get back to you when I can. As I stated, though, it may be awhile. When you start seeing me on GemRB's IRC alot, you know I have gotten around to devoting time to the project. I will pick at it in the meantime.

     
  • Trasd
    Trasd
    2013-01-05

    • status: open --> closed
     
  • Jaka Kranjc
    Jaka Kranjc
    2013-01-18

    Can you post the instructions here? There has been renewed interest from others to help as well.

     
  • Trasd
    Trasd
    2013-01-18

    Sure, that shouldn't be a problem, but as it's Alex's work (the instructions), I want to check with him first.

    I do have one problem though, there are a couple of files included with the instructions and I have no idea where I can put them for public access. Will the "Attached File" option work?

    To be honest, I've turned my computer on only once since I got the instructions so, I am relieved that others are interested. Hopefully someone with a better understanding can make an updated apk.

     
  • Jaka Kranjc
    Jaka Kranjc
    2013-01-18

    Try it, otherwise use something like http://filebin.ca .

     
  • Trasd
    Trasd
    2013-01-21

    Hey,

    I have decided to reproduce Alex's directions verbatim rather than try to translate them and possibly mess something up. Please be aware there are two different sets of instructions that accomplish the same task: the one he sent me; another older set he sent someone else awhile back (posted somewhere on the from gibberlings3 forums.

    Directions to build a GemRB Android APK Alex sent me:

    I'm writing instructions without much description, feel free to ask any questions. I'm using linux, mac os x should work as well. Windows is supported for building, but I never tried it and won't recommend it for the first builds.

    Prerequisites:
    - git http://git-scm.com/

    - JDK http://www.oracle.com/technetwork/java/javase/downloads/index.html

    - Ant http://ant.apache.org/

    - Android SDK (only SDK itself, eclipse and its plugins are not needed) http://developer.android.com/sdk/index.html

    - old modified version of android NDK http://www.crystax.net/en/android/ndk/4

    (latest official version should be used for latest builds http://developer.android.com/tools/sdk/ndk/index.html
    but I haven't tried it)

    1) build simple android application using the same environment, as used with gemrb
    - clone this project https://github.com/pelya/commandergenius
    , it will be used as build-factory for other android projects
    - checkout it to ac1f2e9 revision
    - change project/jni/application/src symlink to ballfield application
    - run: ./ChangeApplicationSettings.sh -a (answer "no" if needed)
    - run: android update project -p project -t android-17
    - add NDK directory to $PATH
    - run: ./build.sh - ballfield project should be built into ./bin/MainActivity-debug.apk
    - install it on android device and check it works (shows flying balls)

    2) build old version of gemrb
    - change project/jni/application/src symlink to gemrb application
    - cd into it and clone git://gemrb.git.sourceforge.net/gitroot/gemrb/gemrb
    into gemrb (it will be application/gemrb/gemrb/gemrb/GemRB.cpp)
    - checkout b15159f revision (of gemrb submodule, not commandergenius)
    - apply patch from attachment (it's also exist here https://gist.github.com/2016179
    but I had problems with its format)
    - update .zip files in application/gemrb/AndroidData with override and GUISripts folders contents from b15159f of gemrb
    - run: ./ChangeApplicationSettings.sh -a (answer "no" if needed)
    - run: android update project -p project -t android-17
    - run: ./build.sh if everything is all right, it should fail with "undefined reference to `PyCallable_Check'" - it doesn't matter
    - run ./build.sh second time - it should succeed
    - install MainActivity-debug.apk (it should be like one I 've just built and attached to this mail) and check revision number in main menu

    3) build up to date version of gemrb (not tested, only my thoughts)
    - use latest official NDK (r8d)
    - use HEAD revision of commandergenius
    - use HEAD revision of gemrb (patch must be changed)

    Directions to build a GemRB Android APK Alex originally posted on the gibberlings3 forums:

    I've also checked my personal messenger on gibberlings3 forums (whole site was down when I wrote last time) and retrieved old instruction about android build I wrote to someone on forums. Copying here, it may be out of date:

    1) android SDK
    - download android sdk from here http://developer.android.com/sdk/index.html

    - run 'android' and install packages:
    a. Android SDK Tools, revision 12
    b. Android SDK Platform-tools, revision 6
    c. SDK Platform Android 3.2, AP 13, revision 1

    2) android NDK
    Download NDK r4-crystax from here - http://www.crystax.net/en/android/ndk/4

    (building also should work with any crystax ndk r4+ and with any official ndk r5+, but I had problems with that versions)

    3) download apache ant from here http://ant.apache.org/bindownload.cgi
    and setup it

    4) pelya's project
    - clone this project https://github.com/pelya/commandergenius
    . There are many projects inside, gemrb is one of them.
    - projects lies in project/jni/application/ folder. There are also a symlink src, that points to project that will be used in builing. Make new folder like gemrb-git and set up src symlink to it.
    - you also should add your NDK location to build.sh file

    5) gemrb
    - version should be adjusted in gemrb/includes/globals.h line 37
    - in file gemrb/GemRB.cpp on line 46 (it seems line number changes in latest versions) change audio.h to Audio.h (it seem's, beholder is using windows)
    - copy files from gemrb project git (additional symlink may not work during the build) to project/jni/application/gemrb-git according to current gemrb layout in pelya's project (not all files needed, and GUIScripts and override must be packaged to ZIP archives). Copy additional files from pelya's gemrb

    6) build (all commands from pelya's project root)
    - run ./ChangeApplicationSettings.sh -a
    - run android update project -p project -t android-13
    - if you want a completely clean build, run rm -rf project/object/local
    - run ./build.sh
    - if compilation fails with "cannot find Py_Something...", rerun build.sh (I think there is a problem with libraries build order)
    - if everything is ok, APK file will be in project/bin/DemoActivity-debug.apk
    - I'm not using adb and android emulator, but think, that it may take hours to load gemrb saved game in emulator - it's extremely slow

    I hope someone can build a newer version (hopefully using pelya's SDL), if not I will work on it when I can.

     
  • Trasd
    Trasd
    2013-01-21

    lynxlupodian, I tried to email you the two files Alex attached to the instructions - I also sent you an email via sourceforge with my email address.

    Let me know if there are any problems. With Admin rights, I'm hoping you can attach the files - if not, set the status back to Open and I will see if I can upload them.

     
<< < 1 2 (Page 2 of 2)