Tree [404e79] master /

File Date Author Commit
android 10 hours ago Emmanuel Engelhart Emmanuel Engelhart [404e79] New translations
debian 2012-12-01 kelson42 kelson42 [f7b7dc] + update of the control files
desktop 2012-07-06 reg_ reg_ [98e47a] WARN dangerous: removed old autotools scripts.
dvd 2014-05-23 Kelson42 Kelson42 [e332bd] + new version able to deal on Windows with path...
etc 2012-07-06 reg_ reg_ [98e47a] WARN dangerous: removed old autotools scripts.
fedora 2010-04-17 kelson42 kelson42 [655512] unac is not used anymore
installer 2015-04-27 Kelson42 Kelson42 [737670] Fix an URL
ios 2014-07-31 automactic automactic [06a326] KiwixTestApp
kiwix 2015-07-07 Wilfredo Rodriguez Wilfredo Rodriguez [8f654d] Appling Beautify to Javascript source
src 2015-07-03 Wilfredo Rodriguez Wilfredo Rodriguez [5125b5] small fix redundant
static 2015-03-02 renaud gaudin renaud gaudin [4dab53] give some margin (ahah) for the margin to be ea...
.gitignore 2015-06-04 renaud gaudin renaud gaudin [a19cb2] Initial version of CustomApp generator
AUTHORS 2013-12-08 Rashiq Ahmad Rashiq Ahmad [0e60a4] Filewriter integration + finally added my name ...
CHANGELOG 2015-05-29 Emmanuel Engelhart Emmanuel Engelhart [ea311f] Update
COPYING 2009-11-28 kelson42 kelson42 [74e2d8] + small move of info files 2014-08-09 kelson42 kelson42 [01d2cb] + add kiwix-installer to 'distserver' target
README 2 days ago kelson42 kelson42 [ad5bad] Improve README for APKs embeding ZIM files 2014-06-13 Ross Combs Ross Combs [199ab9] Add two override fonts to cover the Gujarati an... 2012-03-02 reg_ reg_ [99825e] updated sugar UI to match OLPC XO 2014-05-30 kelson42 kelson42 [e7d9fc] No ".svn" directory anymore 2015-06-06 renaud gaudin renaud gaudin [1df458] Added convert (imagemagick), python-requests an... 2014-05-20 renaud gaudin renaud gaudin [34ed0f] Removed all remaining warnings from AppStore

Read Me

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.

****************** COMPILATION INSTRUCTIONS *************************

Take care, the paragraphs are about the *target platforms*. If you
want to build Kiwix for Android on a GNU/Linux system, you should
follow the instructions of the "Android" paragraph.

== GNU/Linux ==
Install pre-requisties in your distro, eg, in Debian based:

sudo apt-get install zip pkg-config aptitude
sudo apt-get install libmagic-dev
sudo aptitude install libtool

=== Static (Probably what you need to do if you don't know) ===

Kiwix uses shared libraries only. A static build of Kiwix is a build
which packages the dependencies. Command line tools (indexer, server,
etc) are compiled statically.

# Run automake

# Run autoconf
./configure --enable-compileall --enable-staticbins --disable-android

# Download all dependencies
cd src/dependencies; make ; cd ../..

# Reconfigure with dependencies (Gecko version)
./configure --enable-compileall --enable-staticbins --disable-android

# Compile

# Creates tarbal suitable for distribution (no deps)
make diststatic

# If you want to be able to run directly from your dev repository copy
# the "xulrunner" directory in the distributation tarball to the
# "kiwix" sub-directory of your developement tree.

# Don't try to install with "make install", if you want to have kiwix
# install on your system just copy the directory in a /usr/local/bin
# directory.

== Dynamic ==

GNU/Linux build uses shared libraries by default. You will need the
following dependencies (also -dev packages) to compile Kiwix for Linux
(this list can vary a little bit depending of the GNU/Linux

* g++
* gcc
* autoconf
* automake
* libtool
* pkg-config
* liblzma
* libicu
* libmicrohttpd
* zlib
* libcrypto++
* cmake
* wget
* aria2
* libuuid
* libssl
* libzim
* libpugixml
* libctpp2
* xulrunner

Debian is the only distribution providing natively all these
packages. Ubuntu provides most of them, excluding xulrunner and
zimlib. You will have to download and install them separatly or run
configure --with-static-dep=SELF. Then run the following commands:

# Run automake

# Configure the compilation
# check --help for options. Most dependencies accept --with-dep=XX and
# with-static-dep=XX.a. Static version of libraries are used for building
# static binaries (server, indexer, etc) Use --with-dep=SELF or
# --with-static-dep=SELF to trigger fetch and build for the dependency.

# Compile

# Optionaly install on the filesystem
sudo make install

== Mac OSX Universal ==

[warning] To build the Mac OS version you will have to install
proprietary software which are free of charge.
You will also need to build on an Apple Mac computer.

* Install OSX 10.6.5+ (proprietary)
* Install XCode 3.2.5+ (proprietary) - (requires registration)
* Install Java
* Install MacPorts -

* Configure Macports

* Install the following tools and libraries

sudo port install autogen +universal pkgconfig +universal wget +universal gmake +universal coreutils +universal libidl +universal autoconf213 +universal icu +universal
./ alt && ./configure --enable-compileall
cd src/dependencies && make
make clean
./ alt && ./configure --enable-compileall --enable-compileall --disable-dependency-tracking --with-target-arch=i386
make distmac
make clean
./ alt && ./configure --enable-compileall --enable-compileall --disable-dependency-tracking --with-target-arch=x86_64
make distmac
make universal

;;Debugging tips:

- components file type can be either Mach-O dynamically linked shared library
  or Mach-O bundle but above instructions will create dynamic libraries.
- Shared Object (.so files on Linux) have .dylib extension on OSX.
- use dtruss to inspect program execution like strace.
- dyldinfo -lazy_bind | dyldinfo -bind components/zimAccessor.dylib |grep zim
- nm -gm components/zimAccessor.dylib | nm -u | nm -g
- otool -L libzim.dylib
- install_name_tool -change @executable_path/../libicuuc.dylib libicuuc.dylib kiwix-serve
- lldb

== Android ==

Android is just an additional target but you can still build for Android only
from a Linux or Mac (it cross-compiles).

* ./

* ./configure --disable-staticbins --disable-manager --disable-server --disable-launcher --disable-indexer --disable-installer --disable-searcher --disable-reader --disable-components --enable-android --enable-compileall

* cd src/dependencies && make android-deps && cd -

* cd android && ./ (If you have problem with aapt on a 64bits Linux, you might have to install 32 libsm on Ubuntu: lib32gcc1, lib32stdc++6, lib32z1)

To install the newly created APK on your device, use the following script:

== Android Custom App ==

Android Custom App are single-content Kiwix-android clones. Those app
are tied to a single content and CAN NOT open other zim file. As well,
bundled zim files are not readable by the regular Kiwix app. Custom
App have specific branding.

Custom App are either compiled as embed (ZIM file is included in APK)
or are accompanied by a ZIM file.

* Embedded versions can be very large (while Play Store have a 50MB
* Non-embedded versions are small (6MB) but require a companion ZIM file
  which can be up to 2GB.
* Companion file is a feature of the Play store.

Steps to build a Custom App:

0. Install following requirements

1. Build your first APK

* Generate your icon using ` logo-file.png lang_code`
* Prepare your JSON file using the sample in the script
* Choose your package name wisely.
** org.kiwix.kiwixcustomXXXXXX
** o not add levels. Do not use dash or underscores !
** Use version_code: 1 at first
* Build your APK with ` my-file.json`

2. Go to the Developer Page on
and create a new Application and give it a name.

3. Fill the Store listing section with decent information
* App Title (30 chars)
* App Short Description (80 chars)
* App Description (4,000 chars)

* Add 2 screenshots
* Add the 512px icon
* Add feature graphic (1024x500)

* Select Application Type (Applications)
* Select Category (Education|Books & Reference|Health & Fitness|...)
* Select Content Rating (High Maturity|Medium Maturity|Low
* Add an email Address
* Check the "Not submitting a privacy policy URL" box

4. Go to Content Rating Tab
* Fill the Questionnaire
** Email address
** Select category
** Check "No" for each question
* Hit Calculate rating
* Hit Apply rating

5. Go to Pricing & Distribution
* Check "Content guidelines"
* Check "US Export laws"

6. Go to APK 
* Go to Alpha Testing
* Manage list of testers (Add
* Upload an APK (Use a proper APK (version 1 usually) with correct
  package name)

7. Build a second APK
* Change version_code in JSON file
* Rebuild

8. Upload your second APK using the upload script:
$python3 ./ my-file.json`

9. [whenever you feel the need to] Update Play Store listing using
play-store script.

To make an APK which embeds a ZIM file:
* In the json file, add:
    "embed_zim": true,
* You might need to set up following env. variable:
    _JAVA_OPTIONS="\"-Xmx4096m\" \"-Xms4096m\" \"-XX:MaxPermSize=4096m\""

== Windows ==

* Install Windows XP SP2+
* Install Visual Studio Express 2010
* Install 7-zip
* Install MozillaBuild 1.6
* Install ActivePerl
* Install Ruby
* Install NSIS 2.46
* Install nsis_locate
* Install nsis_uac
* Replace installed UAC.dll by new one.

* Install all software in default locations.

* Change your Windows PATH environment variable:
  - 7zip
  - NSIS
  - ruby
  - Perl
  - mozilla-build\msys\bin\

* Get shell from c:\mozilla-build\start-msvc10.bat

* mkdir -p /c/slave/windows-32b
  git clone git:// kiwix
  cd kiwix
  ./ alt
  ./configure --disable-indexer --enable-jar
  make win
  make windist
  make wininstaller

*************************** CONTACT *********************************

Email: or
IRC: #kiwix on

You can use IRC web interface on


********************** LEGAL & DISCLAIMER ***************************

Read 'COPYING' file