Fix the bgcolor formspec element (#8716)
[oweals/minetest.git] / doc / README.android
1 Minetest Android port
2 =====================
3 Date: 2014 06 28
4
5 Controls
6 --------
7 The Android port doesn't support everything you can do on PC due to the
8 limited capabilities of common devices. What can be done is described
9 below:
10
11 While you're playing the game normally (that is, no menu or inventory is
12 shown), the following controls are available:
13 * Look around: touch screen and slide finger
14 * double tap: place a node or use selected item
15 * long tap: dig node
16 * touch shown buttons: press button
17 * Buttons:
18 ** left upper corner: chat
19 ** right lower corner: jump
20 ** right lower corner: crouch
21 ** left lower corner: walk/step...
22    left up right
23        down
24 ** left lower corner: display inventory
25
26 When a menu or inventory is displayed:
27 * double tap outside menu area: close menu
28 * tap on an item stack: select that stack
29 * tap on an empty slot: if you selected a stack already, that stack is placed here
30 * drag and drop: touch stack and hold finger down, move the stack to another
31   slot, tap another finger while keeping first finger on screen
32   --> places a single item from dragged stack into current (first touched) slot
33
34 Special settings
35 ----------------
36 There are some settings especially useful for Android users. Minetest's config
37 file can usually be found at /mnt/sdcard/Minetest.
38
39 * gui_scaling: this is a user-specified scaling factor for the GUI- In case
40                main menu is too big or small on your device, try changing this
41                value.
42
43 Known issues
44 ------------
45 Not all issues are fixed by now:
46
47 * Unable to exit from volume menu -- don't use the volume menu, use Android's
48   volume controls instead.
49 * 512 MB RAM seems to be inadequate -- this depends on the server you join.
50   Try to play on more lightweight servers.
51
52 Versioning
53 ----------
54 Android version numbers are 4 digits instead of Minetest's 3 digits.  The last
55 number of Android's version represents the Android internal version code. This
56 version code is strictly incremental. It's incremented for each official
57 Minetest Android build.
58
59 E.g. prerelease Minetest Android builds have been 0.4.9.3, while the first
60 official version most likely will be 0.4.10.4
61
62 Requirements
63 ------------
64
65 In order to build, your PC has to be set up to build Minetest in the usual
66 manner (see the regular Minetest documentation for how to get this done).
67 In addition to what is required for Minetest in general, you will need the
68 following software packages. The version number in parenthesis denotes the
69 version that was tested at the time this README was drafted; newer/older
70 versions may or may not work.
71
72 * android SDK (api-26)
73 * android NDK (r17c)
74 * wget (1.13.4)
75
76 Additionally, you'll need to have an Internet connection available on the
77 build system, as the Android build will download some source packages.
78
79 Build
80 -----
81
82 Debug build:
83 * Enter "build/android" subdirectory
84 * Execute "make"
85 * Answer the questions about where SDK and NDK are located on your filesystem
86 * Wait for build to finish
87
88 After the build is finished, the resulting apk can be fond in
89 build/android/bin/. It will be called Minetest-debug.apk
90
91 Release build:
92
93 * In order to make a release build you'll have to have a keystore setup to sign
94   the resulting apk package. How this is done is not part of this README. There
95   are different tutorials on the web explaining how to do it
96   - choose one yourself.
97
98 * Once your keystore is setup, enter build/android subdirectory and create a new
99   file "ant.properties" there. Add following lines to that file:
100   
101   > key.store=<path to your keystore>
102   > key.alias=Minetest
103
104 * Execute "make release"
105 * Enter your keystore as well as your Mintest key password once asked. Be
106   careful it's shown on console in clear text!
107 * The result can be found at "bin/Minetest-release.apk"
108
109 Other things that may be nice to know
110 ------------
111 * The environment for Android development tools is saved within Android build
112   build folder. If you want direct access to it do:
113   
114   > make envpaths
115   > . and_env
116   
117   After you've done this you'll have your path and path variables set correct
118   to use adb and all other Android development tools
119
120 * You can build a single dependency by calling make and the dependency's name,
121   e.g.:
122
123   > make irrlicht
124
125 * You can completely cleanup a dependency by calling make and the "clean" target,
126   e.g.:
127
128   > make clean_irrlicht