Commit Graph

1462 Commits

Author SHA1 Message Date
Matthieu Gautier 4047ec20dd Add xapian patch to correctly include sys types. 2018-06-14 18:18:45 +02:00
Matthieu Gautier e441b847b5 Use gcc-4.8 to compile in Docker.
Other travis-CI will use the default gcc version of ubuntu trusty.
We must compile with the same compiler to ensure that we don't break ABI.
2018-06-14 14:53:16 +02:00
Matthieu Gautier 8b8d24d662
Merge pull request #183 from kiwix/no_kiwix-desktop_static
Do not try to compile kiwix-desktop on native_static.
2018-06-13 18:44:14 +02:00
Matthieu Gautier d74cd1d50a Do not try to compile kiwix-desktop on native_static.
QtWebEngine is not compatible with static compilation so we should not
try to compile kiwix-desktop on native_static.
2018-06-13 17:39:06 +02:00
Matthieu Gautier 5ba66db13d
Merge pull request #182 from kiwix/no_gcc
Do not build with gcc-5.
2018-06-13 12:34:49 +02:00
Matthieu Gautier 2a18f74786 Do not build with gcc-5.
We build with gcc-5 because of zimSplit using ofstream.swap method.
Latest version of zimSplit doesn't use it anymore so let's compile
everything with default gcc.

See openzim/zim-tools@a959609839

We also explicitly set the list of package to install per job, so
less packages are installed.
2018-06-13 10:57:32 +02:00
Matthieu Gautier 2f058d239b
Merge pull request #181 from kiwix/no_travis_deploy
Do not deploy on native_dyn linux platform.
2018-06-12 19:19:30 +02:00
Matthieu Gautier 8db9def67d Do not deploy on native_dyn linux platform.
The deployement is already made in the Docker.
"Classic" deploy will fail because there will be no archive to deploy.
2018-06-12 18:03:28 +02:00
Matthieu Gautier 69fce5923a
Merge pull request #176 from kiwix/desktop
Desktop
2018-06-12 18:02:53 +02:00
Matthieu Gautier 269e2b39a6 Build the kiwix-desktop app image in Travis. 2018-06-12 16:31:57 +02:00
Matthieu Gautier 894ab4ba06 Add a script to package kiwix-desktop in a AppImage.
AppImage is a tools to create application running in all linux.
See https://appimage.org/
2018-06-12 16:29:00 +02:00
Matthieu Gautier 8c3a8be65d Build kiwix-desktop in travis. 2018-06-12 16:29:00 +02:00
Matthieu Gautier 398f77f9f3 Add kiwix-desktop dependency. 2018-06-12 16:12:31 +02:00
Matthieu Gautier cf8f303362 Add qt(webengine) dependency.
Add qt dependency and QMakeBuilder.
2018-06-12 16:12:15 +02:00
Matthieu Gautier 63003d5bce Correctly extract platform from the dependency.
If the `dep` is a two char string (as "qt"), the `platform, name = dep`
will split the string and search for 't' dependency in 'q' platform.

So, we have to be sure that the dep is a tuple before splitting it.
2018-06-12 16:12:15 +02:00
Matthieu Gautier fc61fbab3d
Merge pull request #180 from kiwix/icu_namespace
Better compilation of icu4c.
2018-06-11 21:12:13 +02:00
Matthieu Gautier 1109b6b155 Better compilation of icu4c.
- Disable icuio and layoutex.
- Hardcode UTF8 as charset (we always use utf8 and hardcoding him improve
  performances)
- Do not include default utf headers
- Do not use `using namespace icu`

See http://source.icu-project.org/repos/icu/trunk/icu4c/readme.html#RecBuild
for more information about options.

Increment base dependencies version as we are compiling icu differently.
2018-06-11 18:05:10 +02:00
Matthieu Gautier 007e78607e
Merge pull request #177 from kiwix/docker
Docker
2018-06-11 17:54:34 +02:00
Matthieu Gautier ded38889cf Use docker to build native_dyn.
As we want to use qt and packages are available only since ubuntu artful, we
need to use docker because travis-ci is ubuntu trusty.

We could also build qt, but it takes too many time and travis timeout.
2018-06-11 16:50:44 +02:00
Matthieu Gautier 312e734678
Merge pull request #175 from kiwix/multi-arch
Multi arch
2018-06-08 14:33:15 +02:00
Matthieu Gautier 4dea44d305 Fix travis CI 2018-06-08 10:29:26 +02:00
Matthieu Gautier daefadecc9 Better gradle option.
Enable `--no-daemon` : Using the daemon make gradle keep "configuration"
(like plugin path). If gradle installation path change, it will break
kiwix-android build.

Enable `--build-cache` : This is not the case by default :/
This should greatly improve compilation speed.
2018-06-07 10:50:30 +02:00
Matthieu Gautier 369b805e59 Add ios_multi_arch fatlib.
Fix #113
2018-06-06 17:41:12 +02:00
Matthieu Gautier cfdf03c854 Select the default platform depending of the target.
Default platform `android` is better for `kiwix-android`
(because `kiwix-android` can build only on `android` platform).
2018-06-06 17:41:12 +02:00
Matthieu Gautier 5f5fbfe082 Rename `targets` option to `target`. 2018-06-06 17:41:12 +02:00
Matthieu Gautier db82455f03 Be able to build multi-arch android apk.
By building kiwix-android on the `android` platform, we can now build
`kiwix-lib` on all `android_<arch>` platforms, and so have all
architectures in the same apk.

Fix #108
2018-06-06 17:41:12 +02:00
Matthieu Gautier 9b85791705 Gradle is a dependency of the android platform, not of other dependencies. 2018-06-06 17:41:11 +02:00
Matthieu Gautier 6de2cc80b6 Add an android metaPlatformInfo to build all android architecture. 2018-05-31 11:30:26 +02:00
Matthieu Gautier 74ba5885a0 Add a MetaPlatformInfo.
A metaplatform allow to regroup sereval platform together.
When a target is added to the platform, the target is dispatched/add to
all sub platforms.

As the step (metaplatformName, target) is not really added, we have to
track which steps are really added, so `add_targets` need to return the
list of added targets.
2018-05-31 11:30:26 +02:00
Matthieu Gautier 3eae47240b Make the platform responsible to add the targets. 2018-05-31 11:30:26 +02:00
Matthieu Gautier c8c0192675 Simplify cross-compilation
Now we can make reference to build step in another target platform, we can
simplify cross-compilation fo libmagic and icu4c.
2018-05-31 11:30:26 +02:00
Matthieu Gautier a87ba06bf3 Do not infinit loop when ordering steps 2018-05-31 11:30:26 +02:00
Matthieu Gautier 7e8ed1a623 Correctly install packages. 2018-05-31 11:30:26 +02:00
Matthieu Gautier 4d6b6994bc Merge toolchain and dependencies.
Toolchain now became "simple" dependencies.
They are referenced by Platform.

Platform are now created at demande and a neutralPlatform now exists.
2018-05-31 11:30:25 +02:00
Matthieu Gautier 9496ffb86c Clean android_ndk 2018-05-31 11:25:59 +02:00
Matthieu Gautier 211c0f9651 buildEnv doesn't need to know about toolchains.
Having access to the platform is enough.
2018-05-31 11:25:59 +02:00
Matthieu Gautier 41d23b6249 Create the associated platform at demand. 2018-05-31 11:25:59 +02:00
Matthieu Gautier daad1c98c6 Make the options global. 2018-05-31 11:25:59 +02:00
Matthieu Gautier 041826d0e8 Move from target logic to steps logic.
This is the big change !!!!

Instead of handling target as primary object and prepare/build targets,
we are handling build steps.

A build step may be a source (preparation) or a build (of the source).
Actualy, a step is a tuple (context, Builder or Source).

The context define the context of the step. It can be :
- 'source', for a Source step
- 'neutral' or the name of a platform for Build step.

Target becomes a "Class only" class.
2018-05-31 11:25:59 +02:00
Matthieu Gautier 754df8df1d Make the platform responsible to create the buildenv.
It is now the platform who is responsible to:
- correctly add the toolchains as needed
- setup the cross environment
- create the cross files.
2018-05-31 11:25:54 +02:00
Matthieu Gautier 115fbfa147 Move dependencies declaration of a target into the builder.
This is the builder that depends on other target, not the target itself.
2018-05-31 11:14:31 +02:00
Matthieu Gautier 7e0b403ccc Move `run_command` method out of buildEnv class. 2018-05-31 11:14:31 +02:00
Matthieu Gautier 816e06a512 Make the neutralEnv global.
No need to pass the neutralEnv from instance to instance.
2018-05-31 10:42:37 +02:00
Matthieu Gautier f44042f910
Merge pull request #174 from kiwix/split_files
Split files
2018-05-22 19:14:27 +02:00
Matthieu Gautier a413c5f064 Fix root_path lookup in cmake_cross_file generation.
Sometime the root_path is dependent of the target platform and sometime
not. But sometime dependent of the build arch :/

[TODO] We should move the cross_file generation to the PlatformInfo class.
2018-05-22 17:47:21 +02:00
Matthieu Gautier 98ebba65f6 fix imports 2018-05-22 16:58:40 +02:00
Matthieu Gautier b950feb893 Move Builder and BuildEnv in specific module.
Introduce also a "NeutralEnv", a build environment independent of the
targeted platform. All `Source` now build using the neutralEnv.

Most of toolchains are also using neutralEnv except android_ndk who is
specific to a platform.

As toolchain are neutral, platform specific environment variables are now
set by the platformInfo directly instead of the toolchain.
2018-05-22 16:58:39 +02:00
Matthieu Gautier ac83dec674 Move ios sdk in toolchains module. 2018-05-22 16:58:06 +02:00
Matthieu Gautier 363bdf74ed Move target informations into a platforms module.
`TargetInfo`s are information about the target platform.
Let's rename them into PlatformInfo and move them in a specific module.
2018-05-22 16:58:02 +02:00
Matthieu Gautier f1d1fc654c Better MakeBuilder configure system.
`all_configure_option` should be ALL configure option.
2018-05-22 16:43:37 +02:00