Kiwix & openZIM build engine
Go to file
Matthieu Gautier bef0572db5
Merge pull request #124 from kiwix/travis_tags_fixes
Travis tags fixes
2018-02-23 18:08:58 +01:00
patches Backport icu4c patch to not include `xlocale.h` 2018-01-29 11:15:50 +01:00
templates Run meson test when possible. 2017-10-02 16:05:06 +02:00
travis Do not try to compile kiwix-android if we make a release. 2018-02-23 14:50:48 +01:00
.gitignore Add a lot of common things to ignore to .gitignore 2017-08-14 09:57:00 -04:00
.travis.yml Fixes typos and add download.openzim.org to known hosts. 2018-02-23 14:49:15 +01:00
LICENSE Add a LICENSE file 2017-01-04 23:41:14 +01:00
README.md Improved README #3 2017-07-17 12:42:58 +02:00
build_custom_app.pl Change apk output directory to new location 2017-12-15 11:06:49 +00:00
build_custom_app.py [CUSTOM_APP] Small fixes of help of options. 2017-07-18 15:57:13 +02:00
dependencies.py Update subproject version. 2018-02-01 16:51:22 +01:00
dependency_utils.py Add a `--make-dist` command to kiwix-build. 2017-12-05 09:32:47 +00:00
kiwix-build.py Stop using the deprecated (and broken) `mesontest`. 2017-12-12 11:19:07 +00:00
kiwix-deploy.py Save nightlies at the right place #11 2017-02-26 21:39:58 +01:00
requirements_build_custom_app.txt Add script to build customapp 2017-06-25 15:49:49 +02:00
utils.py Add script to build customapp 2017-06-25 15:49:49 +02:00

README.md

Build status: Build Status

Kiwix is an offline reader for web content. It's especially thought to make Wikipedia available offline. This is done by reading the content of the project stored in a file format ZIM, a high compressed open format with additional meta-data.

This repository contains advanced tools to (cross-)compile easily Kiwix softwares and library and deploy them. They have been tested on Fedora 23 and Ubuntu 16.10.

Prerequesites

You will need a recent version of meson (0.34) and ninja (1.6) If your distribution provides a recent enough versions for them, just install them with your package manager. Continue to read the instructions otherwise.

Before anything else you need to install Python3 related tools. On Debian based systems:

sudo apt-get install python3-pip virtualenv

Then install Meson:

virtualenv -p python3 ./ # Create virtualenv
source bin/activate      # Activate the virtualenv
pip3 install meson       # Install Meson
hash -r                  # Refresh bash paths

Finally we need the Ninja tool (available in the $PATH). Here is a solution to download, build and install it locally:

git clone git://github.com/ninja-build/ninja.git
cd ninja
git checkout release
./configure.py --bootstrap
mkdir ../bin
cp ninja ../bin
cd ..

Compilation

The compilation is handled by kiwix-build.py. It will compile everything. If you are using a supported platform (Redhat or Debian based) it will install missing packages using sudo. You can get kiwix-build.py usage like this:

./kiwix-build.py -h

Target

By default, kiwix-build.py will build kiwix-tools. If you want to compile another target only (let's said kiwixlib), you can specify it:

./kiwix-build Kiwixlib

Target platform

By default, kiwix-build.py will build everything for the current (native) platform using dynamic linkage (hence the native_dyn of the BUILD_native_dyn directory).

But you can select another target platform using the option target-platform. For now, there is ten different supported platforms :

  • native_dyn
  • native_static
  • win32_dyn
  • win32_static
  • android_arm
  • android_arm64
  • android_mips
  • android_mips64
  • android_x86
  • android_x86_64

So, if you want to compile for win32 using static linkage:

./kiwix-build.py --target-platform win32_dyn

Outputs

Kiwix-build.py will create several directories:

  • ARCHIVES: All the downloaded archives go there.
  • SOURCES: All the sources (extracted from archives and patched) go there.
  • BUILD_native_dyn: All the build files go there.
  • BUILD_native_dyn/INSTALL: The installed files go there.
  • BUILD_native_dyn/LOGS: The logs files of the build.

If you want to install all those directories elsewhere, you can pass the --working-dir option to kiwix-build.py: