zimlib doesn't use github but gerrit to handle changes.
As this patches to review, there is no meson branche for now.
Use a personal fork for now. As soon as the meson scripts have been
integrated in openzim repository, we should revert this commit.
Ubuntu on 64 bits install lib in lib/x86_64-linux-gnu and meson correctly
detect this.
Thus it install libs (zimlib, kiwix) in this directory. However we
look for pkgconfig files in $INTALL_DIR/lib64. And so, the lib is not
found.
We could force meson to install in $INSTALL_DIR/lib64 all the time but
it is just better to follow the correct convention on Ubuntu.
Reuse the algorithm used in meson to correctly detect the libprefix,
use it and force all build script (autotools, cmake, meson) to install there.
In the same way, ninja may be called ninja-build depending of the distribution.
Or depending of how meson is installed, we may have to launch meson or meson.py.
So we detect the command to launch to try to be as most as possible portable.
This script download and compile all depedencies and subproject for
kiwix-tools.
Ideally it should be as simple as run the script with the install dir as
argument.
This script compile a dynamic or a static build of kiwix-tools (kiwix-serve)
This as been tested on Fedora.
Binary content do not need to be modified, so we don't need to copy it.
We can directly serve it from the internal zim (cluster) buffer.
The handle_content function now getArticleObjectByDecodedUrl instead of
getContentByDecodedUrl.
This is to get the mimetype of the article and copy the content only when
needed (getContentByDecodedUrl always copy the content).
Thus, handle_content is a bit more complex as it need to do some
manipulation previously made in getContentByDecodedUrl.
The main change is that if the content is binary, we serve the content
with a callback response who will get the content chunks directly from
the blob buffer.
Instead of having a big callback function doing almost everything to
handle a request, we split the code into several functions.
There are two new helper functions :
- build_response that create a response object with correct headers set.
- compress_content who compress the content if necessary.
All the different cases are handle by different functions :
- handle_suggest
- handle_skin
- handle_search
- handle_random
- handle_content
- handle_default
accesHandlerCallback now handle common stuff, delegate to the handle_*
functions everything else.
There is no special optimization made here. Only splitting code.
- kiwix-search will try the embedded ft-index if no indexPath is specified
in the library.xml or command argument.
- kiwix-search also uses xapianSearcher and xapianSearcher needs zimlib,
so add zimlib in compilation flag for searcher.
- kiwix-serve already depends on zimlib.
* origin/master:
Reformat project
Remove html-inverting js
Organize files in packages
The actionbar title is now clickable
Added persistent fullscreen
Added persistent fullscreen
Add 'sc' and 'lki' UI languages
Update of the UI translations
Update meta data of custom Android apps
Add VAR HTTP-HEADER if necessary
Make the app movable to the sd card
Update UI translations
Windows FSJ-Lite ZIM file splitter is not available anymore, replace it in the help with 'JS-SplitD'
Beautify bookmark XML file
Fix selection color problem with library buttons
Revised the instructions for OS X
Bump up Android version