forked from KDE/kstars
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.android
More file actions
72 lines (44 loc) · 2.47 KB
/
Copy pathREADME.android
File metadata and controls
72 lines (44 loc) · 2.47 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Only Linux cross-compilation to Android is supported.
Prerequisites:
- Install Android NDK (android-ndk-r17c-linux-x86_64.zip) and Android SDK (SDK Tools 25.2.5 and Platform-tools 29.0.2 are known to work)
- Install Qt 5.12+ for Android
- Get KStars source code from Github or KDE
- Some tools are needed for the compilation: sudo apt-get install dos2unix ccache
Set the following environmental variables before building:
export QT_ANDROID=Qt SDK for Android target (e.g. /opt/Qt/5.9.2/android_armv7"}
export CMAKE_ANDROID_NDK=Android NDK path
export ANDROID_SDK_ROOT=Android SDK path
export ANDROID_API_LEVEL=Android API level (currently the minimum is 17)
If you want to generate signed release package set the following variables:
export ANDROID_KEYSTORE=your_keystore_file
export ANDROID_KEYSTORE_ALIAS=your_keystore_alias
export KSTARS_ROOT=KStars Path (e.g. /home/jasem/Projects/kstars)
First build the KF5 dependencies separately:
- Make a build directory in a separate location form source (e.g. /home/jasem/build/kstars-android):
- Run build_kf5.sh and verify that the script builds everything without any problem.
$KSTARS_ROOT/packaging/android/build_kf5.sh
When KF5 are ready, build KStars Lite for Android:
- Install Eigen3, git and other dependencies
- Configure out-of-source build (MinSizeRel build type is recommended for Android):
cmake -B. -H$KSTARS_ROOT -DBUILD_KSTARS_LITE=ON -DCMAKE_TOOLCHAIN_FILE=$CMAKE_ANDROID_NDK/build/cmake/android.toolchain.cmake \
-DEIGEN3_INCLUDE_DIR=/usr/include/eigen3/ -DCMAKE_INSTALL_PREFIX=$(pwd)/android/export -DCMAKE_BUILD_TYPE=MinSizeRel \
-DBUILD_KSTARS_LITE=ON -DECM_DIR=/usr/share/ECM/cmake/ -DCMAKE_PREFIX_PATH=$QT_ANDROID \
-DCMAKE_AR=${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar
- Compile:
make -j4
- Download and convert the translations:
make convert_translations_to_android
- Install:
make -j4 install
- Generate the Android debug package:
make create-apk-debug-kstars
- Install the Android debug package to your phone:
make install-apk-debug-kstars
- Generate the Android release package:
make create-apk-release-kstars
- To sign a release package:
make sign-apk-kstars
- The debug package location: android/kstars_build_apk/bin/QtApp-debug.apk
Manual installation: adb install android/kstars_build_apk/bin/QtApp-debug.apk
- The release package location: android/kstars_build_apk/bin/kstars-release-signed.apk
Manual installation: adb install android/kstars_build_apk/bin/kstars-signed.apk