Cmake use the 'Windows' name to detect we are building to Windows but
meson use the lowered 'windows' string.
So we need to lower the system declared in the cross-env when generating
the meson cross_file.
The target (`platform_info.build`) is not enough to get a correct
cross_env. For android apk, the target is always "android" but we want
different cross_env depending of the target arch.
The `platform_info` already know for which arch we are building so
let's make platform_info generate the cross_env directly.
Travis fails if we try to build a lot of targets in the same job because
of quota limit. By removing intermediate build files, we limit our disk
usage.
Previous script (from kiwix repository) created a APK with all architecture embeded.
Now, we generated a APK per architecture. It simplify the build process and
generate smaller APKs.
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.
We may end in a deadlock if we publish dependencies archives at the end
of the compilation and if all compilation succeed.
For example project B may depend on project A.
If we change the project A API and the project B code to reflect the API
change and merge A' API in master and create a PR for B, the PR for B
will need a new archive with new project A' API.
However, as B' master fails with new A, the whole compilation fails and
nothing is publish. So B'PR is never compiled successfully.
By publish the archives as soons as generated, the A' new API will be
published and B'PR will compile correctly, even if master fails.
Will be able to merge B'PR without bypassing travisCI.
Those dependencies will be used by travis CI in other projects.
We want to avoid other project to need a ssh key to get them :
- To avoid spread(and maintenance) of ssh key.
- For PR coming from another repositories, ssh key is not available.
By making those dependencies available by http, we simplify the process.
Fix partially #34.
Archives download need to be updated in client projects.
Update dependencies tree.
This PR fails on travis but it is because of fix waiting to be merged in libzim.
But for the libzim PR to be validated by travis, we need to generate the libzim's dependencies archives here. But as master is broken, we do not generate the dependencies..
I've tested the two fixes together and it is working. So I merge this PR to solve this deadlock
If we want to build other projects (kiwix-lib, kiwix-tools) with travis,
it is better to have all dependencies already compiled.
kiwix-build project now compiles them and publishes the dependencies
archive at the right place where other projects can use them.
The dependencies of libzim were missing.
If we run a single run to compile everything everything run correctly
as zlib and lzma will be installed because of kiwix-lib (and other)
dependencies.
By limiting the choices in the argument parser, we catch argument error
at parsing and we can provide useful output (the names of dependencies
we can handle) to user in the help or in the error message.
The OpenZim source contains the zimlib source but also the zimwriterfs
source.
There is no zimwriterfs dependency for now but it is better to separate
source from the dependency for latter commit.