Update README to compile kiwix-lib-app.

This commit is contained in:
Matthieu Gautier 2019-07-24 11:51:42 +02:00 committed by Kelson
parent a82d6430dc
commit d4b2642eed
1 changed files with 18 additions and 12 deletions

View File

@ -69,7 +69,7 @@ By default, `kiwix-build` will build `kiwix-tools` .
If no target platform is specified, a default one will be infered from If no target platform is specified, a default one will be infered from
the specified target : the specified target :
- `kiwix-android` will be build using the platform `android` - `kiwix-lib-app` will be build using the platform `android`
- Other targets will be build using the platform `native_dyn` - Other targets will be build using the platform `native_dyn`
But you can select another target platform using the option But you can select another target platform using the option
@ -93,9 +93,14 @@ kiwix-build --target-platform win32_dyn
## Android ## Android
Android apk (kiwix-android) is a bit a special case. `kiwix-android` (https://github.com/kiwix/kiwix-android) depends of
`kiwix-android` itself is architecture independent (it is written in the `kiwix-lib` project.
java) but it use `kiwix-lib` who is architecture dependent. It uses a special `.aar` file that represent (and embed) the kiwix-lib for
all supported android arch. This is a kind of fat archive we have for MacOs.
The `.aar` file is build using the `kiwix-lib-app` project.
`kiwix-lib-app` itself is architecture independent (it is just a packaging of
other archives) but it use `kiwix-lib` who is architecture dependent.
When building `kiwix-lib`, you should directly use the When building `kiwix-lib`, you should directly use the
target-platform `android_<arch>`: target-platform `android_<arch>`:
@ -103,22 +108,23 @@ target-platform `android_<arch>`:
kiwix-build kiwix-lib --target-platform android_arm kiwix-build kiwix-lib --target-platform android_arm
``` ```
But, `kiwix-android` apk can also be multi arch (ie, it includes But, `kiwix-lib-app` is mainly multi arch.
`kiwix-lib` for several architectures). To do so, you must ask to build To compile `kiwix-lib-app`, you must use the `android` platform:
`kiwix-android` using the `android` platform:
```bash ```bash
kiwix-build --target-platform android kiwix-android $ kiwix-build --target-platform android kiwix-lib-app
kiwix-build kiwix-android # because `android` platform is the default for `kiwix-android` $ kiwix-build kiwix-lib-app # because `android` platform is the default for `kiwix-lib-app`
``` ```
By default, when using platform `android`, `kiwix-lib` will be build for By default, when using platform `android`, `kiwix-lib` will be build for
all architectures. This can be changed by using the option `--android-arch` : all architectures. This can be changed by using the option `--android-arch` :
```bash ```bash
kiwix-build kiwix-android # apk for all architectures $ kiwix-build kiwix-lib-app # aar with all architectures
kiwix-build kiwix-android --android-arch arm # apk for arm architecture $ kiwix-build kiwix-lib-app --android-arch arm # aar with arm architecture
kiwix-build kiwix-anrdoid --android-arch arm --android-arch arm64 # apk for arm and arm64 architectures $ kiwix-build kiwix-lib-app --android-arch arm --android-arch arm64 # aan with arm and arm64 architectures
``` ```
To build `kiwix-android` itself, you should see the documentation of `kiwix-android`.
## IOS ## IOS
When building for ios, we may want to compile a "fat library", a library When building for ios, we may want to compile a "fat library", a library