Commit Graph

708 Commits

Author SHA1 Message Date
Matthieu Gautier 9a73c5796e [CTPP2] Always depend on ctpp2c.
Even on android we are compiling the resources. So we need ctpp2c all the
time.
2017-07-17 11:05:53 +02:00
Matthieu Gautier 5972b0b2b0 [CTPP2] CMake should not install ctpp2c.
As we are compiling `ctpp2c` in static native and install it with a simple
`cp`, the default compilation of ctpp2 library should not install ctpp2c.

Else we would have a wrong `ctpp2c` in the path and later compilation will
fail.
2017-07-17 10:34:17 +02:00
Matthieu Gautier ad0ba8e230 Merge pull request #63 from kiwix/ctpp2_utils
Install ctpp2-utils to have ctpp2 compiler installed.
2017-07-12 15:38:30 +02:00
Matthieu Gautier 0671712753 Install ctpp2-utils to have ctpp2 compiler installed.
ctpp2c is available in debian, so no need to compile it.
2017-07-12 14:51:00 +02:00
Matthieu Gautier 1fda646708 Always build ctpp2c for the host and static.
We are using `ctpp2c` when building kiwix-lib to compile embedded resources.

As `ctpp2c` will be used in the host machine, it always need to be
compiled for the host (native).
But we still want tho ctpp2 library compiled for the target platform.
As we don't want handle the conflict between two dynamic lib with the same
name but for two different platforms, we build ctpp2c statically.
2017-07-12 14:31:37 +02:00
Matthieu Gautier bebec0702c CMakeBuilder and MesonBuilder respect the force_native_build flag.
We must not use crossfile if we are building a native dependency.
2017-07-12 14:31:37 +02:00
Matthieu Gautier f620d36b28 Merge pull request #57 from kiwix/fix_env_var
Fix env var
2017-06-26 15:19:57 +02:00
Matthieu Gautier e27f170472 Fix package name for pkg-config on Fedora. 2017-06-26 14:32:04 +02:00
Matthieu Gautier bf0bc08b6e Remove -fPIE option.
"PIE" option is for executable and we don't build a executable.
Using a combination of "pie", "pic", shared and static libraries makes the
compilation of `kiwix-lib` fails with a "undefined symbol main".

Removing the pie option solve the problem.
2017-06-26 14:32:04 +02:00
Matthieu Gautier 4f0b2ec376 Set the right env variable when necessary.
The `cross_path_only` option used in `cmake` and `meson` builder where
mainly here to avoid kiwix-build to set the env with `CC` and `CXX`
variable set.
This is needed as `cmake` and `meson` will find the correct compiler
from the cross-config file.

However, even for them, we need to set some environment variables
(especially PKG_CONFIG_LIBDIR)

So we need another level a configuration to be able to set a cross_env
without setting the compiler's env variables.
2017-06-26 14:32:04 +02:00
Matthieu Gautier 6026daf3dd Merge pull request #47 from kiwix/custom_app
Add script to build customapp
2017-06-25 16:43:49 +02:00
Matthieu Gautier e57c0fccaa Use the real key to sign apk. 2017-06-25 15:49:49 +02:00
Matthieu Gautier b83efb7d7f Make the `--zim-url` option ... optional.
If not given, the zim_url is get from the `info.json`To revert
2017-06-25 15:49:49 +02:00
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