Build Instructions - michaelbarlow7/dungeon-crawl-android GitHub Wiki

How to build this app.

Introduction

The following are some instructions on how to build the application. It is recommended that you have some experience with Android development, in particular with the Native Development Kit.

This used to use a custom NDK toolchain (CrystaX), but this was changed on 27/4/22 to use the official toolchain (version 25.2.9519653 at the time of writing) since wide characters are now supported. This can be downloaded using the SDK manager.

Steps

  1. Download the Android SDK. You'll need version 10 at least. You'll also want Android Studio. Make sure it's all set up and running.
  2. Clone the repository. The repository contains the actual code for Dungeon Crawl in a submodule, which in turn has submodules, which you'll need to build the code. So, for great justice, clone the code using git clone --recursive [email protected]:michaelbarlow7/dungeon-crawl-android.git . If you've cloned it without the --recursive flag, you'll need to get the submodules by entering the directory you just cloned and typing git submodule update --init --recursive
  3. Once you've done that, cd into android-crawl-console and run setup.sh. This will generate some necessary files and symlinks. In Mac OS X, in order to "make docs" successfully, I needed to modify the Makefile so that any references to "/Developer/SDKs" pointed instead to "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/".
  4. Import the project into Android Studio.
  5. Build and run the project as an Android application. Hopefully, it works!

By reviewing the branch, you should be able to see the modifications I've made to the code. As of April 28, 2023, the following files have been added or modified

  • Android.mk
  • Application.mk
  • main.h
  • libandroid.cc
  • syscalls.cc
  • syscalls.h
  • setup.h