- Mention kiwix-build to build kiwix-lib.
- Separate the real dependencies from the package to install.
- Mention the (standard meson) --default-library option.
If there are several uses of the compile_resource script it will have
several definition of getResource function.
So, define a custum getResource function per resources "pack" and add
a define to have a nice API.
A developer must take care of not include two generated .h in the same
compilation unit as there will be a redefine error.
The best way to avoid this is to always include the generated .h in the
c(pp) file and never in a header.
If a compilation unit need to use two pack at the same time, we have to
undef 'getResource' and use the real getResource_* methods.
- No more dependency to reswrap binary (everything is done in python)
- Resource strings can be directly accessed.
As side effect, it add a check at compilation if the resource is
declared and compiled in the binary.
- The resource content can be overwritten at runtime with a env variable.
There is also few clean in the static as some files shoul be in the tools
directory.
The compile_resource script is install to let other project use it.
There is no more integrated build of dependencies in the build system.
Dependencies are discovered using pkg-config except for ctpp2 where there
is no pkg-config file.
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.
The fulltext index in the zim is at the url /Z/fulltextIndex/xapian.
We do not need to specifie the Z in the url as this is automatically add with the namespace.
The XapianSearcher creation must fail with a exception if we cannot open
the xapian database.
So, if we try to open a zim and there is no embedded index, we must fail.
We raise the custom exception NoXapianIndexInZim in this case.
- 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.