scummvm/backends/platform/android
Angus Lees 2bf64b1050 ANDROID: Force extra screen update when updating overlay.
This appears to work around a blank screen bug Nexus1.  I never
tracked it down, but as far as I can tell it is triggered by multiple
overlapping updates before flushing the texture to screen.  This
condition only happens in the overlay atm so an extra redraw isn't the
end of the world.

(Also remove an unused _full_screen_dirty property)

svn-id: r53801
2010-10-25 07:27:05 +00:00
..
org/inodes/gus/scummvm Drop direct use of (private) libEGL.so and call EGL functions via Java. 2010-07-05 13:06:58 +00:00
android.cpp ANDROID: Force extra screen update when updating overlay. 2010-10-25 07:27:05 +00:00
android.mk Switch Android toolchain prefix from arm-android-eabi to 2010-07-05 01:00:59 +00:00
asset-archive.cpp Add Android backend from patch #2603856 2010-06-06 09:34:36 +00:00
asset-archive.h Add Android backend from patch #2603856 2010-06-06 09:34:36 +00:00
module.mk BUILD: Unify how MODULE_DIRS is computed for backends 2010-07-29 13:03:21 +00:00
README.build Remove Android themeengine patch - an improved version is now part of 2010-07-27 11:16:44 +00:00
video.cpp Switch Android toolchain prefix from arm-android-eabi to 2010-07-05 01:00:59 +00:00
video.h Add a few files mistakenly left out of initial Android patch :( 2010-06-08 13:15:15 +00:00

Building the ScummVM Android port
=================================

You will need these things to build:
1. Android SDK
2. An arm-oe-linux-androideabi GCC toolchain(*)

In the example commands, we are going to build against the Android 1.5
native ABI (but using the Android 1.6 SDK tools).  Other version
combinations might/should be possible with a bit of tweaking.

(*) Any other sane Android toolchain should be easy to use, but this
is the toolchain prefix that is used by default.  You can trivially
find and modify the single location where it appears in ./configure if
you have some other prefix variation.


In detail:

1. Android SDK

Download the SDK from http://developer.android.com/ and install
somewhere.  You will need both the API level 8 (aka Android 2.2) and
API level 3 (aka Android 1.5) platforms.

2. arm-*-linux-androideabi GCC toolchain

You have several choices for toolchains:

 - Use Google arm-eabi prebuilt toolchain.

This is shipped with both the Android source release and Android NDK.
The problem is that "arm-eabi-gcc" can't actually link anything
successfully without extra command line flags.  To use this with the
ScummVM configure/build environment you will need to create a family
of shell wrapper scripts that convert "arm-oe-linux-androideabi-foo" to
"arm-eabi-foo -mandroid".

For example, I use this script:
 #!/bin/sh
 exec arm-eabi-${0##*-} -mandroid -DANDROID "$@"

... and create a family of symlinks/hardlinks pointing to it called
arm-oe-android-linuxeabi-gcc, arm-oe-android-linuxeabi-g++, etc.  For
tools that don't take a "-mandroid" argument - like arm-eabi-strip - I
bypass the shell wrapper and just create an arm-oe-android-linuxeabi-strip
symlink to the tool directly.

In practice you will probably need significant linker command line
massaging in order to get the crtbegin/end and libraries all linked in
the right way.  It's not hard to do manually, but it is annoying to
script in a general purpose way.

 - Build your own arm-*-linux-androideabi toolchain from GCC source.

This is lots of fun, but will become significantly easier once gcc-4.6
is released.  In the interim, I suggest using my precompiled Android
openembedded-based toolchain:
 wget http://commondatastorage.googleapis.com/anr/sdk/android-2.2-i686-linux-armv5te-linux-androideabi-toolchain-android.tar.bz2
 sudo tar jxf android-2.2-i686-linux-armv5te-linux-androideabi-toolchain-android.tar.bz2 -C /
 . /usr/local/android/arm/environment-setup

Alternatively, do a websearch - there are several other cross-compile
toolchains around.


Building ScummVM
================

(Optionally) compress scummmodern.zip:
(ScummVM usually ships it uncompressed, but Android can read it more
efficiently if it is compressed *before* adding it to the apk)

 ( cd gui/themes/scummmodern && zip -f ../scummmodern.zip )

Then build ScummVM:

 export ANDROID_SDK=<root of Android SDK>

 PATH=$ANDROID_SDK/platforms/android-1.6/tools:$ANDROID_SDK/tools:$PATH
 # You also want to ensure your arm-oe-linux-androideabi toolchain is in $PATH

 export ANDROID_TOP=<root of built Android source>

 ./configure --backend=android --host=android --enable-zlib #and any other flags
 make scummvm.apk

This will build a "monolithic" ScummVM package, with the engines
statically linked in.  If you want to build separate engine packages,
like on the market, add "--enable-plugins --default-dynamic" to
configure and also make scummvm-engine-scumm.apk, etc.