Kiwix & openZIM build engine
Go to file
Matthieu Gautier 2e14765a38 Update ctpp2 patches to handle mingw32 compilation with meson 0.40.0
It seems that last meson version (0.40.0) do not pass cross compilation
extra_args to compiler when checking for headers.
Thus, the kiwix-lib check for ctpp2 headers fails because the WIN32
define is not present. So kiwix-lib is compiled without CTPP2 but
kiwix-tool compile as if kiwix-lib where compile with CTPP2 and fails.

By making CTPP2 headers check for `__WINGW32__` we workaround this problem.

I don't know if this is a bug in meson, ctpp2 or kiwix-lib but this small
fix allow to compile correctly with last meson version.
2017-04-24 11:12:17 +02:00
patches Update ctpp2 patches to handle mingw32 compilation with meson 0.40.0 2017-04-24 11:12:17 +02:00
templates Add WIN32 flag definition. 2017-04-11 16:57:51 +02:00
travis Use absolute path to reference ssh key. 2017-04-18 18:35:05 +02:00
.gitignore add .gitignore 2017-02-06 18:28:22 +01:00
.travis.yml Cron job now publish dependencies archives for other travis projects. 2017-04-08 21:34:25 +02:00
LICENSE Add a LICENSE file 2017-01-04 23:41:14 +01:00
README.md Fix few typos in the README. 2017-03-13 14:47:05 +01:00
dependencies.py pdate dependencies tree. 2017-04-10 09:46:38 +02:00
dependency_utils.py Use dependency names as reference instead of class names. 2017-04-08 18:19:17 +02:00
kiwix-build.py Use the `urllib.request.urlopen`'s `context` argument only if available. 2017-04-17 12:09:10 +02:00
kiwix-deploy.py Save nightlies at the right place #11 2017-02-26 21:39:58 +01:00
utils.py extract_archive can now extract zip format. 2017-03-13 13:18:14 +01: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 a set of tools to help development or usage of kiwix.

COMPILATION INSTRUCTIONS

Most of the compilation steps are handled by the kiwix-build.py script.

This script has been tested of Fedora 23 and Ubuntu 16.10

If you want to cross-compile for other platforms as windows or android, you should read the "Other target platform" section.

Preparing environment

You will need a recent version of meson (0.34) and ninja (1.6) If your distribution provide a recent enough versions for them, just install them with your package manager.

Else you can install them manually

Meson

pip install meson --user # Install Meson

(You may want to install meson in a virtualenv if you prefer)

ninja

git clone git://github.com/ninja-build/ninja.git
cd ninja
git checkout release
./configure.py --bootstrap
cp ninja <a_directory_in_your_path>

Buildings

This is the simple one.

./kiwix-build.py

It will compile everything. If you are using a supported platform (redhad or debian based) it will install missing packages using sudo. If you don't want to trust kiwix-build.py and give it the root right, just launch yourself the the printed command.

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.

ARCHIVES and SOURCES are independent of the build type you choose.

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

./kiwix-build.py --working-dir <a_directory_somewhere>

Other target

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

./kiwix-build Kiwixlib

Other target platform.

By default, kiwix-build 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

As said before, the ARCHIVES and SOURCES directories are common to all target platforms. So, if you always work in the same working directory the sources will not be downloaded and prepared again.

On android* platforms, only kiwixlib is supported. So you must ask to kiwix-build to compile only kiwixlib:

./kiwix-build.py --target-platform android_arm Kiwixlib

Know bugs

  • The script has not been tested on Mac OSX.
  • Cross-compilation to arm (raspberry-PI) is missing.

Help is welcome on those parts.

CONTACT

IRC: #kiwix on irc.freenode.net
(I'm hidding myself under the starmad pseudo)

You can use IRC web interface on http://chat.kiwix.org/

More... http://www.kiwix.org/wiki/Communication

LEGAL & DISCLAIMER

Read 'COPYING' file