This repository has been archived by the owner on Mar 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathbuilding.txt
43 lines (38 loc) · 3.12 KB
/
building.txt
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
needed: python, ndk, android studio (actually, android studio might be optional)
* also needed: java 8 jdk (implied by android build)
* git update submodules (vcmi definitely needed, ffmpeg/x264/iconv only if you want to build them)
* place boost into ./ext/boost/ (so that ./ext/boost/boost_X_YY_Z/b2.exe exists)
* open ./vcmiconf.json and enter the correct paths (paths in "bash" object are needed only for ffmpeg build; on linux they'll probably be the same as normal paths)
* for testing, you might want to set only one abi in "abis" field (builds will be much faster and armeabi should work on most devices)
if you want to build SDL, ffmpeg and iconv manually
{
also needed: bash (I used win10 built-in bash for windows), android ndk for linux
* place core SDL2 sources into ./ext/SDL2 (so that ./ext/SDL2/core/code/configure exists)
* place SDL addons sources into folders in ./ext/SDL2 (so that ./ext/SDL2/SDL2-image/code/configure , ./ext/SDL2/SDL2-mixer/code/configure , ./ext/SDL2/SDL2-ttf/code/configure all exist)
* file ./ext/SDL2/SDL2-mixer/build.mk has hardcoded path to "smpeg2-2.0.0", so if there's some newer version, you might need to change it
* try to enter bash and check if "make" and "yasm" work (install them if not (sudo apt-get install or something like that))
* make sure that bash scripts (eg. ./ext/ff/ffmpeg/configure and ./ext/ff/x264/configure) have unix newlines (lf) otherwise building ffmpeg fails with cryptic errors
* run in main folder: python build.py fixpaths build-optional build-cmake
* if it eventually finishes without errors, there should be libs in ./ext-output/(ARCH)
* ffmpeg is built in all possible configurations; if you don't like that, you can comment the lines in ./ext/ff/all.sh
* all other libs (iconv, SDL+addons, boost, minizip, fuzzylite) are built only in configurations declared in vcmiconf.in
}
else
{
* download binaries from https://dependencies.vcmi.download/android/ext-output.zip and unpack them so that ./ext-output/armeabi-v7a/libavcodec.so exists
* run in main folder: python build.py fixpaths build-cmake
* ("build-cmake" will execute gradle-configured-cmake build for boost libs and "external" vcmi libs of fuzzylite and minizip)
}
if using android studio
{
* start android studio project (in ./project)
* make sure that current flavor (menu Build->Select build variant) is "vcmiOnlyDebug/Release" (it should be the default; other flavors can additionally build boost/fuzzylite/minizip but you already built them from the script)
* try to build/run the project
}
else
{
* alternatively, instead of using android studio, you can try running in main folder (should work but not tested on clean build extensively): python build.py build-app
}
* if boost locale breaks on x64 abis (with iconv errors), you might need to remove/rename this ndk header file: ndk/sources/android/support/include/iconv.h
(looks like android built-in iconv is broken for x64, but still, this is a hack, so it may break some other things in ndk -- https://github.com/android-ndk/ndk/issues/236)
Note that the current build will not work on armeabi (arm relocations overflow);