OXCE for Android is, as the name suggests, a port of OXCE to the Android platform. In order to achieve this, it uses SDL2 set of libraries, and a portion of Java code for some convenient features like auto-updating files after installing new version.
This project contains parts of the Boost library required to build yaml-cpp library. Note: The dependency on Boost will be removed later, as it is no longer necessary with newer versions of yaml-cpp.
Uses afiledialog library.
In order to build OXCE for Android, you'll need:
- A current Android SDK, and
- A current Android NDK (tested with r14b).
Additionally, you'll need Java development kit and Java runtime environment version 1.7 or higher (Oracle Java SE 7 or OpenJDK 7), which is required for building Android applications.
This project uses git submodules, so in order to get the code, you'll have to do the following:
-
Clone this project:
$ git clone https://github.com/MeridianOXC/openxcom-android.git $ cd openxcom-android $ git checkout oxce-plus-proto
-
Get submodules
$ git submodule init $ git sibmodule update
-
Since this project uses Android NDK (currently built with r14b), you'll need to provide path to it. Additionally, you'll have to provide path to Android SDK as well. These paths should be in the local.properties file in the project root. The file should contain the following lines:
sdk.dir=/path/to/Android/sdk ndk.dir=/path/to/Android/ndk
with your own actual paths substituted instead of these placeholders.
At this point you may just run the Gradle wrapper with the assemble
or assembleRelease
task:
$ ./gradlew assembleRelease
The resulting .apk will be in app/build/outputs/apk
folder.
You might also include some additional data in the apk itself. Everything you put in app/src/main /jni/OpenXcom/bin
subdirectories will be packed as assets, so you might include some mods that will be
automatically installed or even the game data that won't require to go through the data copying
process. Note that redistribution of such builds might be illegal in some countries, and as
such they should be only used for debugging purposes.
Since most of the code was not touched in SDL1.2 to SDL2 transition, most mods should work out-of-box.
This is a fork of sfalexrog's repository of OpenXcom for Android and most of the actual work has been done by him.
I (Meridian) have only copied and customized his work on this build system.
This project uses ndk-build system, which is marked as "deprecated" by Google (even though there's no alternative as of time of me writing this). Still, expect changes to the build system.
I'm no expert in Gradle build system, so most of the code is not very good. Anyway, it seems to work, and I'm not touching it anytime soon.
This project is basically my "hello world", and it started at the time when I didn't really know what Java was. Expect bad code and inefficient solutions. Better yet, send me a P/R to fix something :-)