Porting to android
Moderators: hgm, Rebel, chrisw
-
- Posts: 620
- Joined: Fri Feb 08, 2008 10:44 am
- Location: Madrid - Spain
Porting to android
What is needed to port an engine to Android plataform under "Android chess"? is needed to port it to java or are there any shortcut?
-
- Posts: 2273
- Joined: Mon Sep 29, 2008 1:50 am
Re: Porting to android
Nothing is needed! Just compile the engine with an ARM toolchain. There are two options.Kempelen wrote:What is needed to port an engine to Android plataform under "Android chess"? is needed to port it to java or are there any shortcut?
(1) Download the CodeSourcery toolchain (eabi-linux) and create a static binary.
(2) Download the Google NDK and use it to create an Android native toolchain (the instructions are in the documentation folder). Now you can create a dynamically linked binary.
Since engines are typically small executables that do not have a large dependence on external libraries I personally think (2) is not worth the extra trouble.
-
- Posts: 820
- Joined: Fri Dec 01, 2006 10:46 pm
- Location: Mountain View, CA, USA
- Full name: Aart Bik
Re: Porting to android
In a nutshell, programmers currently have the following options:
- Download the Android SDK, and develop both the GUI and engine in Java (and only rely on the JIT for a speed boost).
- Download the Android SDK and NDK, and write parts in Java (typically the GUI) and embed natively compiled components (typically the engine), which are called through JNI.
- Use an ARM compiler (as ships with the NDK) to compile an engine into a native binary and "import" the engine into a GUI that supports its chess protocol.