Commit Graph

50 Commits

Author SHA1 Message Date
Matthieu Gautier 8cf6c39d11 Extend `ReleaseDownload` source to be composed of several archives. 2023-11-02 11:13:29 +01:00
Matthieu Gautier b57f83ed25 Move all toolchain installation in TOOLCHAIN directory.
This is a clearer install and it simplify the base_deps archive creation.
2023-10-24 10:53:31 +02:00
Matthieu Gautier 1f8ccde487 "main" is now our default branch for all our projects. 2023-01-03 10:19:52 +01:00
Matthieu Gautier d76819390e Do not always fallback to master. 2022-12-22 14:31:20 +01:00
Matthieu Gautier 180fb249f6 Add a support to compile libzim for wasm.
`icu4c_wasm.patch` is build by :
 - Copying config.sub from liblzma source as new version of config.sub there
   knows about wasm architecture.
 - Copying `mh-linux` on `mh-unknown` as specified in (origin) `mh-unknown`.
   This is because icu4c configure doesn't detect `emscripten` platform and
   "fallback" to `mh-unknown`.
2022-11-16 16:37:05 +01:00
Matthieu Gautier b8c120b179 Pass the path of the patch in the command line instead of as stdin.
This way, we can see the applied patch in the log.
2022-11-16 10:46:06 +01:00
Matthieu Gautier ce82860b85 Introduce configure and make wrapper.
This way, we can use small wrapper tools from sdk to run configure and
make.
2022-11-16 10:45:57 +01:00
Matthieu Gautier 72c271a74c Remove LibkiwixApp
The project was used to assemble all android compilation in one
multiplatform java archive.

This allow use to remove android_sdk and Gradle builder
2022-06-09 10:28:59 +02:00
Matthieu Gautier c7ea2a31cb Correctly detect qmake command.
qmake may be named qmake-qt5 on some distribution.
2021-07-02 11:14:13 +02:00
Matthieu Gautier afd17b2986 Make kiwix-desktop flatpak use last version of Qt (5.15).
Adapt flatpack_builder to generate the same manifest than PR
flathub/org.kiwix.desktop#6
2021-06-23 17:59:25 +02:00
Matthieu Gautier 11a7ec4020 Use the full_name as for the skip file marker.
This way we are sure to download the last archive all the time.
2021-04-28 16:26:43 +02:00
Matthieu Gautier dca64eb5d5 Allow builder to set a build environment for projects using it. 2021-04-12 18:14:23 +02:00
Matthieu Gautier b286be1207 Introduce new method `get_env` to create the env. 2021-04-12 18:11:05 +02:00
Matthieu Gautier 76aa746f84 Add the `dont_skip` attribute on dependency.
Instead of explicitly add the target associated to the toolchain
if we use `build_nodeps` option let add an attribute base ourself on it
to know if we need to add it or not.

This way, we may have other dependency we must not skip.
2021-04-12 18:09:52 +02:00
MiguelRocha e72589a850 Added a flag to force kiwix build to not do fast_clone
- Docopt cannot do fast_clone cause it is getting a
    specific commit id. This will be changed when a new
    release is available.
2020-05-25 10:57:22 +02:00
Matthieu Gautier 99226e0c6a Build zstd in flatpak.
Revert 10c767e8ce
2020-04-20 15:14:31 +02:00
Matthieu Gautier ffdee634f4 Do not force a reconfigure of meson projects.
If meson.build changes, the ninja command will rebuild it.
And its avoid us to delete the build directory.
2020-04-10 00:38:47 +02:00
Matthieu Gautier fb07b58812 Fix recompilation of the CI of meson project.
We were assuming that meson project correspond to our projects and so we
were always building them, even if they were already compiled.
(This way, a simple `kiwix-build` is enough to recompile the WIP code of
our project).

However, on the CI, we do not archive the source code/build directory in
the base deps archive. So when we try to compile, the compile step of
meson projects fails because the source are not here.
We have a small workaround for pugixml but as zstd is also meson, it is
time to do something correct.

By default, all projects now try to skip if a build is already present.
Our projects are marked as `force_build` and so, they do not try to skip.
2020-04-06 19:15:40 +02:00
Matthieu Gautier 4fa5f34125 Build all make based dependency using -O3 option.
This will build all Make, CMake, QMake dependency being build with -O3.
So all our dependencies will be build with -O3.

Our project (meson) are already build in release when needed.
kiwix-desktop should be build optimized in case of release but we need
to handle it correctly. At least not build in O3 per default as it may
break debug.
2020-03-24 16:50:38 +01:00
Matthieu Gautier 40b5013279 Add some colors in the terminal. 2020-02-25 15:48:20 +01:00
Matthieu Gautier f504cf54e1 Do not reset the source directory if there is modification.
We simply do a `git merge --ff-only` instead of a `git reset`. This way:

- No change on the local repository
    => update to `remote/master`
- If you switch branch and local branch is behind `remote/master`
    => fast forward to `remote/master`
- If you switch branch and branches diverge
    => No update of the directory
- On branch master (or a branch behind `origin/master`) with compatible
  change in the working tree.
    =>  update of the directory
- On branch master (or a branch behind `origin/master`) but incompatible
  change in the working tree.
    =>  No update.

This way, sources are keep up-to-date as far as possible.
2020-02-25 15:46:09 +01:00
Matthieu Gautier 94c98261c7 Fix compilation on different platform in the same time.
If we modify the dependency's configure_env, we may change
the dictionary with value of the first platform. Then, when
we use it for the second platform, the previous values are used.

Do not modify the dep_conf_env dictionary and then we are good.
2020-02-24 18:24:07 +01:00
Matthieu Gautier 32e3b5b5c4 Fix compilation of kiwix-lib-app.
- We should not try to set the cross compilation flags when we use
  gradle.
- Fix anyway the setting of tho cross compilation flags for android sdk
  platform (the default implementation use the `static` attributes that
  doesn't exist for android)
2020-02-24 15:30:31 +01:00
Matthieu Gautier 7b6c79482a Make the dependency responsible to set the compilation env.
Instead of having the run_command function setting the
env from the buildEnv, this is the dependency that create the
env and then pass it to the run_command function.

This way, each dependency will be able to set a specific env.
2020-02-21 16:29:23 +01:00
Matthieu Gautier 7d742f807f Fix setting of environment using env from dependency.
If `self.configure_env` is a (computed) property, the previous code
never format the value of the env.
2020-02-21 15:12:17 +01:00
renaud gaudin 5af0a8bfe7 fixed crash in xapian-core configure
use a copy of configure_env to prevent edits on what's being iterated
2020-02-11 13:10:21 +00:00
Matthieu Gautier b6bbf9b098 Do not install gradle. Use gradlew script. 2019-12-05 12:30:10 +01:00
Matthieu Gautier f2369c6819 Build project in debug by default instead of debugoptimized. 2019-09-04 17:10:44 +02:00
Matthieu Gautier 9bbc3930ae Print the duration of each steps. 2019-07-24 10:25:52 +02:00
Matthieu Gautier 505961be4c Build in release mode.
- Dependency are installed "striped".
- Our project are build "debugoptimized" by default and "release" when
  building release instead of "debug"

We need to update the `base_deps_meta_version` as we are changing how
dependencies are compiled.
2019-02-19 17:23:14 +01:00
Matthieu Gautier 466dc8b64a Fix `-fPIC` CXXFLAGS. 2019-02-04 17:01:28 +01:00
Matthieu Gautier c4a3da03c3 Correctly install mustache in flatpak.
We need a simple buildsystem to "build" mustache" as we simply need to
copy the header.
2019-01-15 14:44:02 +01:00
Matthieu Gautier 961076bb87 [ANDROID] Build only the apk, not everything.
It seems that build everything on android side is a bit too expensive.
Let's do as is done on android CI, build only the apk.
2019-01-15 11:26:11 +01:00
Matthieu Gautier 1569068332 Do not set version for main project if we are not making release. 2018-09-06 16:10:43 +02:00
Matthieu Gautier ecc6927de8 Use git archive to create dist source archive.
qmake seems to generate wrong "dist" rules for "make".
It try to copy the translation files as if it was in current directory
instead of looking the source dir.

dist archive is usefull with autotools where we want to run autogen before.
Or with meson when meson run tests before making the archive.

With qmake, it seems useless, let's simply archive what is git.
2018-09-05 19:38:58 +02:00
Matthieu Gautier df0b684869 Correctly find the version of a dependency.
We have separated the version in two separated dicts since a long time :/
2018-09-05 19:31:38 +02:00
Emmanuel Engelhart 79a08e001b Use faster svn export instead of svn checkout 2018-07-16 10:15:28 +02:00
Matthieu Gautier 8506cdeffd Correctly pass CMAKE_* to qmake.
qmake doesn't use the env variables, we must pass the variables in the
command line.
2018-06-14 18:18:45 +02:00
Matthieu Gautier cf8f303362 Add qt(webengine) dependency.
Add qt dependency and QMakeBuilder.
2018-06-12 16:12:15 +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 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 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 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 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 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 f1d1fc654c Better MakeBuilder configure system.
`all_configure_option` should be ALL configure option.
2018-05-22 16:43:37 +02:00
Matthieu Gautier 53585b838a Split the dependencies.py file into several parts. 2018-05-22 16:43:37 +02:00