aboutsummaryrefslogtreecommitdiff
path: root/dists/androidsdl/How_to_Build.txt
blob: 0e5afb13ff07bfa926d439cee0628f9dfad42ca6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
1) At first, for building you need (64bit) linux.

2) Install Android SDK and NDK (You can unpack them into ~/Android directory), and download required tools.

	https://developer.android.com/studio/index.html (you can download GUI Android Studio with SDK (which installs
from studio) or download command-line tools)
    
At current moment (01.01.2018) latest NDK version r16b not supported by pelya's liBSDL, so you need to use previous version r15c
    https://developer.android.com/ndk/downloads/older_releases.html

Download this:

	Android SDK Tools
	Android SDK Platform-tools
	Android SDL Build tools
	Android 7.1.1 (API 25) or higher
	SDK Platform (API 25) or higher
	Extras/Android Support Repository

3) Install JDK. You can do it from apt-get tool or download from official site (in this case you must set envirnoment 
value to JDK, see guides "How install JDK and set envirnoment values to JDK).

Command:
	sudo apt-get install openjdk-8-jdk

4) Set envirnoment values to Android's tools. For set android environment I create and use simple script setenv-android.sh.
In this sript you must set your paths and tools versions. If script don't work (see results from command "printenv") - set
this values manually. Warning: values will be setted for one command-line session.

Script:
	#!/bin/sh

	export ANDROID_HOME=~/Android/android-sdk
	export ANDROID_NDK_HOME=~/Android/android-ndk-r15c
    export PATH=$ANDROID_NDK_HOME:$ANDROID_HOME/tools:$PATH

5) Install packages, which needs for build:

Commands:
	sudo apt-get install make
	sudo apt-get install git-core

6) Create and put keystore (You can use debug version) in ~/.android/debug.keystore

8) Now you can build project
	cd scummvm/dists/androidsdl
	./build.sh

Your apk will be stored in this folder