Commit Graph

112 Commits

Author SHA1 Message Date
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 c42883753a Add an option to hide intermediate progress information. 2017-05-09 10:24:17 +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 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 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 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 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 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 57ac912824 Add missing installation of packages on debian. 2017-04-12 01:44:34 +02:00
Matthieu Gautier 6a24b38169 Add WIN32 flag definition.
When switching to c++11, the WIN32 flags is no more automatically defined.
So let's define it in the meson crossfile itself.
2017-04-11 16:57:51 +02:00
Julian Harty 103a6aa5db Added the Debian automake package to the dependencies. 2017-04-08 22:44:08 +02:00
Matthieu Gautier bea2d13feb Add a option to compile the dependencies only of a target.
This is useful to generate directory (and archive) of dependencies for
a particular target.
2017-04-08 21:34:25 +02:00
Matthieu Gautier e816979d51 Limit the choice of the targets argument to target we know about.
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.
2017-04-08 18:19:42 +02:00
Matthieu Gautier 308cfa6986 Use dependency names as reference instead of class names.
Class names are implementation names.
Using the dependency names is better as it surprise less the user.
2017-04-08 18:19:17 +02:00
Matthieu Gautier 81796e7125 Add a option to skip the source installation.
It make the kiwix-build.py script run a bit father.
2017-04-08 17:58:26 +02:00
Matthieu Gautier 3d9ab94195 Add Zimwriterfs dependency.
Now kiwix-build.py can compile zimwriterfs.
2017-03-28 10:10:12 +02:00
Matthieu Gautier b62388bae1 Allow a dependency to declare extra_packages to install.
This is different from declaring a dependency as dependency may be build
by kiwix-build.py.
2017-03-28 10:10:12 +02:00
Matthieu Gautier fa17b5e200 Add the lib64 path to LDFLAGS. 2017-03-28 10:10:12 +02:00
Matthieu Gautier 9d45158f42 Add print of current directory for command in the log file. 2017-03-28 10:10:12 +02:00
Matthieu Gautier 411f861b13 Move log dir in a subdir of BUILD_* 2017-03-13 13:18:14 +01:00
Matthieu Gautier 600f1b55aa Add the android ndk toolchains and compile android on travis. 2017-03-13 13:18:14 +01:00
Matthieu Gautier e3c0c5db82 Toolchains now can have a builder and a source. 2017-03-13 13:18:14 +01:00
Matthieu Gautier 940cea290d Use a 'extra_libs' key instead of 'properties'.
'properties' is too close of the meson definition and we need to duplicate
the entries for 'c_link_args' and 'cpp_link_args'.

By using 'extra_libs' we have a more functional definition of what we want.
2017-03-13 13:18:14 +01:00
Matthieu Gautier 29bba313bc [API change] Use just one option to specify the build target.
There is no more option for static or share build. This value is
integrated in the build-target.
2017-03-13 13:18:14 +01:00
Matthieu Gautier c31a29488a [API Change] User can specify the target to build.
This is a API change, the working directory is set using the
--working-dir option, not as an argument.
2017-03-13 13:18:14 +01:00
Matthieu Gautier 6d69f056a4 Rewrite how we set environment. (Simpler way to write the same thing) 2017-03-13 13:18:14 +01:00
Matthieu Gautier 00acba9ee9 Add the notion of toolschain.
- For now, only the win32 is here.
- There no more nativeBuilEnv as the buildEnv can launch command without
  using the toolschain.
2017-03-13 13:18:14 +01:00
Matthieu Gautier 77137e0908 Add lzma dependency. 2017-03-13 13:18:14 +01:00
Matthieu Gautier 843964e55e Check if packages are installed before trying to install them.
This avoid to ask to user its (sudo) password if all packages are already
installed.
2017-03-13 13:18:14 +01:00
Matthieu Gautier 759812c41d Factorize how we create working directories. 2017-03-13 13:18:14 +01:00
Matthieu Gautier ffee068fd0 Split the too long kiwix-build.py file into several smaller ones. 2017-03-13 13:18:14 +01:00
Matthieu Gautier 5b60295fb9 Add installation of `ccache` package 2017-03-13 11:50:02 +01:00
Matthieu Gautier cff9642c23 Use ccache if available.
If ccache is availble, use it. It can improve a lot the compilation time.
We do not change the meson_cross_file.txt as, for now, meson doesn't
support ccache when cross-compiling.
2017-03-13 11:50:02 +01:00
Matthieu Gautier 7b293575de Lower case the distname (only on linux distribution)
Cases are (should be) not important here. Let's lower it.
2017-03-13 11:50:02 +01:00
Chris Li 1364704e1e Support flag --no_cert_check (#13)
Support flag --no_cert_check, with batched download and write file to disk
2017-03-07 16:52:02 -05:00
Matthieu Gautier 2b4a7726ea Update xapian dependency to 1.4.2.
The patch `xapian_no_hardcode_lz.patch` is not necessary anymore.

Fix #15.
2017-03-06 18:29:22 +01:00
Matthieu Gautier bfc08574ce Change the displayed version of e2fsprogs (uuid) also.
Changing the archive to get is nice, it is better to also change the
version.
2017-02-13 17:56:14 +01:00
Matthieu Gautier a7af69de28 Update our e2fsprogs dependency to 1.43.4.
Use the last version is always better.
More over, it should fix compilation on macOS.

Fix #9.
2017-02-13 17:41:29 +01:00
Matthieu Gautier d78bc45be1 Properly fail in travis if sub-script fail.
Make `kiwix-build.py` also fail if sub-command fail instead of just print
an error message and quit.

`kiwix-deploy.py` is far more simple and already fails miserably if a
sub-command fails.
2017-02-13 11:53:40 +01:00
Matthieu Gautier 85db545feb Do not fail if we are running on Darwin platform.
Fixes #7.
2017-02-13 09:55:59 +01:00
Matthieu Gautier f8f9ed5bce We do not use `_targets_env`, remove it. 2017-02-13 09:53:10 +01:00
Matthieu Gautier 5919e28a2f Packages need to be install before we look to binaries installed by them.
In setup_win32, we search where gcc compilers are installed. We need
to have them installed before.
2017-02-07 14:30:53 +01:00
Matthieu Gautier e83d2511d7 Add package list for cross-compilation debian to win32. 2017-02-07 14:29:03 +01:00
Matthieu Gautier d9abbb7fe5 Add zlib package list for debian. 2017-02-07 12:19:18 +01:00