Commit Graph

1595 Commits

Author SHA1 Message Date
Matthieu Gautier 71650ffebd Add a option to deactivate APKs upload to android play store.
APKs are pushed to a http accessible address.
This is needed as first association of APKs to an application must be
made manually.
2017-06-25 15:49:49 +02:00
Matthieu Gautier 22fffcee51 Add script to build customapp 2017-06-25 15:49:49 +02:00
Matthieu Gautier 483bef609e Merge pull request #51 from kiwix/fix_android_dir
Set the android_abi variable in the meson_cross_file.txt
2017-06-13 18:44:16 +02:00
Matthieu Gautier 0e01aa0cee Set the android_abi variable in the meson_cross_file.txt
Kiwix-lib need to know want is the android abi to copy the lib in the
right directory.
2017-06-13 17:37:58 +02:00
Matthieu Gautier 844eb9c2ef Merge pull request #50 from kiwix/update_deps
Correctly declare dependencies of kiwix-build and projects we are bui…
2017-06-13 17:37:07 +02:00
Matthieu Gautier d43e6d3c70 Correctly declare dependencies of kiwix-build and projects we are building.
Factorize a bit the code also.

Fixes #49.
2017-06-12 10:42:11 +02:00
Matthieu Gautier cf8b859fb0 Merge pull request #44 from kiwix/icu_custom_data
Icu custom data
2017-05-10 18:26:45 +02:00
Matthieu Gautier 0e5fb294f6 Better argument parse for better help text.
(And one clean line :) )
2017-05-09 14:13:43 +02:00
Matthieu Gautier 317bc207fb Do not force specific arguments when compiling for win32.
Those option should be set by build system, not by kiwix-build.

Moreover, this impact other libraries (as icu) and generate pretty big
library binaries.
2017-05-09 14:02:37 +02:00
Matthieu Gautier cfa7f0cb42 Use ICU data as external archive on android platform.
On android platform, we load the ICU data as external data, not embeded
in the kiwix-lib.

So we need to generate correctly the dat file and use it in kiwix-android.
2017-05-09 14:02:37 +02:00
Matthieu Gautier fbb84e9d27 Patch ICU to remove unwanted data.
We don't need all the ICU data and we need to reduce binaries' size
(Especially for android where we have a limit of 50Mo per APK).

By removing unwanted ICU data, we reduce a lot the data size and so
the final binaries' size.

There is also some "problems" to compile the `ja.txt` collfiles,
the "resource compiler" crashes.
As we don't need it, we also remove it.
2017-05-09 14:02:37 +02:00
Matthieu Gautier e50dc846a5 Get ICU source from SVN instead of Release archive.
ICU doesn't provide data sources in their release archives but directly
pre-compiled data.

As we need to compile ourselves our data to remove unwanted data, we need
to get the sources directly from the SVN.
2017-05-09 14:02:37 +02:00
Matthieu Gautier c2ad927f80 Add a `SvnSource`.
This is needed to get source from svn.
2017-05-09 14:02:37 +02:00
Matthieu Gautier f942c5951f Move `_patch` method in `Source` class.
The patch method is not specific to a `RealeaseDownload` source.
2017-05-09 14:02:37 +02:00
Matthieu Gautier 5bf04936d9 Merge pull request #45 from kiwix/hide_progress
Hide progress
2017-05-09 14:01:42 +02:00
Matthieu Gautier 5cc3ede3e3 Hide the progress information in TravisCI.
With progress information shown, the android build logs are bigger than
4Mo and travisBuild fails. So we have to hide them in travis.
2017-05-09 10:28:05 +02:00
Matthieu Gautier c42883753a Add an option to hide intermediate progress information. 2017-05-09 10:24:17 +02:00
Matthieu Gautier 4a980a3192 Merge pull request #43 from kiwix/android_custom_apk
Android custom apk
2017-05-03 19:28:31 +02:00
Matthieu Gautier f044fd15bf Add support to build kiwix android custom app.
The custom app to build must be specified as an option when running
kiwix-build.
In the same way, the zim file to download must be specified in the
`info.json` (`zim_url` key) or given as option.
2017-05-02 17:30:07 +02:00
Matthieu Gautier a86d0b143b Do not fail if the `kiwixlib/src/main` doesn't exist when deleting him.
When deleting the directory, this is not a problem if the directory
doesn't exist.
2017-05-02 17:30:07 +02:00
Matthieu Gautier 39c2e67b80 Make GradleBuilder configurable.
A dependency (future kiwix-android-custom app) may want to use the gradle
builder for something else than `build` with the default options.
2017-05-02 17:30:07 +02:00
Matthieu Gautier c8f5acb41f Add better progress information output for long operation.
Checking sha256sum and downloading file can be pretty long.
Let's print few information to the user.
2017-05-02 17:30:07 +02:00
Matthieu Gautier 7d62d16154 Merge pull request #30 from kiwix/arm
Arm
2017-04-28 18:15:16 +02:00
Matthieu Gautier 07c3dbe8b9 Compile and publish armhf architecture using travis CI. 2017-04-28 17:22:25 +02:00
Matthieu Gautier 570170a92a Add armhf cross-compilation support.
We directly use the cross-compilator provided by the raspberrypi project at
https://github.com/raspberrypi/tools
2017-04-28 17:22:25 +02:00
Matthieu Gautier 5957720a7d Rename cross_env to cross_config.
The dictionary is no more a environment. It is a full configuration
dict. Rename it accordingly.
2017-04-28 11:41:59 +02:00
Matthieu Gautier 71c52d9ee4 Use the system declared in the cross-env in the cmake_cross_file template.
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.
2017-04-28 11:37:26 +02:00
Matthieu Gautier d8473e6a9a Merge pull request #41 from kiwix/android_arch
Remove CROSS_ENV global variable (and fix android compilation).
2017-04-28 11:23:20 +02:00
Matthieu Gautier f26c2274b4 Remove CROSS_ENV global variable (and fix android compilation).
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.
2017-04-28 10:40:31 +02:00
Matthieu Gautier 2f1a7bff77 Merge pull request #20 from kiwix/android_apk
Android apk
2017-04-25 10:04:28 +02:00
Matthieu Gautier c15ddde6eb Make travisCI publish nightly kiwix-android APKs. 2017-04-24 18:21:25 +02:00
Matthieu Gautier 3beb6d81f2 Add a option to kiwix-build.py to clean intermediate directories.
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.
2017-04-24 15:29:52 +02:00
Matthieu Gautier 86c1547f88 Allow kiwix-build to build android APK.
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.
2017-04-24 15:26:51 +02:00
Matthieu Gautier 56862b09d6 Add (and use) the utility function `add_execution_right`. 2017-04-24 14:53:50 +02:00
Matthieu Gautier a49fb15964 BuildEnv.run_command now take a str as input instead of a file object.
We can get a str from a file object. The contrary is more difficult.
2017-04-24 14:53:50 +02:00
Matthieu Gautier ff97a67844 Merge pull request #37 from kiwix/better_git
Better git
2017-04-24 14:53:22 +02:00
Matthieu Gautier 0199092f62 Clone git repository with a depth of one.
This avoid downloading all the history.

With recent git, a `git fetch --unshallow` allow a user to get all
the history if needed.
2017-04-24 14:13:01 +02:00
Matthieu Gautier 6d13ee8a4e Use the git_dir to clone the repository in the right directory. 2017-04-24 14:13:01 +02:00
Kelson 311af61de3 Merge pull request #40 from kiwix/ctpp2_patche_mingw32
Update ctpp2 patches to handle mingw32 compilation with meson 0.40.0
2017-04-24 13:57:17 +02:00
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
Matthieu Gautier db9f277188 Merge pull request #38 from kiwix/travis_ssh_key
Use absolute path to reference ssh key.
2017-04-19 17:11:11 +02:00
Matthieu Gautier b8f242c504 Use absolute path to reference ssh key.
Relative path is a bad idea, it fails if we change the current directory.
(And it actually fails with the scp)
2017-04-18 18:35:05 +02:00
Matthieu Gautier e7377e2e86 Merge pull request #36 from kiwix/deps_through_http
Deps through http
2017-04-18 13:29:46 +02:00
Matthieu Gautier 254d036c42 Publish the dependencies archives as soon as they are generated.
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.
2017-04-18 11:58:51 +02:00
Matthieu Gautier 2290d0a135 Add a manifest describing the archive in the archive.
This is not especially necessary but it may help for future debugging.
2017-04-18 11:09:14 +02:00
Matthieu Gautier cab89b38c0 Publish intermediate dependencies in a http accessible directory.
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.
2017-04-18 11:07:46 +02:00
Matthieu Gautier a66dfecc31 Merge pull request #35 from kiwix/no_context_old_python
Use the `urllib.request.urlopen`'s `context` argument only if available.
2017-04-18 10:31:16 +02:00
Matthieu Gautier 73669f59c8 Use the `urllib.request.urlopen`'s `context` argument only if available.
The `context` argument has been added to python 3.4.3 version.
We must not use it for older version.

Fix #31
2017-04-17 12:09:10 +02:00
Matthieu Gautier 21abfd97de Merge pull request #24 from kiwix/search_in_libzim
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
2017-04-12 02:24:28 +02:00
Matthieu Gautier 57ac912824 Add missing installation of packages on debian. 2017-04-12 01:44:34 +02:00