Commit Graph

33 Commits

Author SHA1 Message Date
Matthieu Gautier c0ec9c44b8 Rename option `--target-platform` to `--config`
The target_platform option has always be wrongly named.
This is not the platform we are targeted but how we compile.

This was ok at beginning as specifying how we compile somehow define
for what we compile but this is not a one to one mapping.
2024-02-05 18:03:11 +01:00
Matthieu Gautier 20ca39145d Remove `backend` (internal) option.
This is not used and it is a good things as it is broken..
2024-02-05 11:42:04 +01:00
Matthieu Gautier 5a1175cf2d Format our code with black 2024-02-05 11:41:09 +01: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
ChrisLi 41071d7c9b
use brew list --formula (#468) 2021-01-15 10:07:00 +01:00
Matthieu Gautier 40b5013279 Add some colors in the terminal. 2020-02-25 15:48:20 +01:00
Matthieu Gautier d86bf75315 Add a cause message to the StopBuild exception. 2019-09-04 17:00:29 +02:00
Matthieu Gautier a282bd8ce3 Allow a list of packages to install to be set `True` to skip installation.
This can allow a dependency to be marked as installed even if there is
nothing to install.
2019-04-02 12:05:52 +02:00
Matthieu Gautier 1b2b3efb54 Allow the platform itself to set on which platform we need to build the dep
For some complex build, we may want to build a dependency on another
platform that the target platform.
2019-02-04 17:01:28 +01:00
Matthieu Gautier ecf3b8b1ff Add an option `--asume-packages-installed` to not try to install packages.
This is different than `--dont-install-packages` that will try to
compile the dependencies.

`--asumme-packages-installed` will no try to install packages, but will
not try either to compile dependencies.
2018-11-27 17:22:47 +01:00
birros 8d58d8d7cb First version of a flatpak builder.
This commit add a first version code to build a flatpak of kiwix-desktop.
It is mainly based on the PR #254 of @birros (hence he is the author of this commit)

However there is some differences :
- I (@mgautier) create a new builder to run the flatpak build instead of using a new
  dependency.
- Use the flatpak platform to install org.kde.Platform and org.kde.Sdk

This code version doesn't correctly work but I wanted to commit the birros' code
without too many modification (even if there is a lot).
2018-11-27 09:43:52 +01:00
Matthieu Gautier 81612c2f2c Set the default option in the method parsing arguments, not in the builder. 2018-08-20 11:16:33 +02:00
Matthieu Gautier d5b81294ca [TRAVIS] Fix release dist.
- Correctly make dist.
- zimwriterfs is now using meson, we don't need a special case.
2018-06-19 10:39:07 +02:00
Matthieu Gautier fbb84f8df2 Fix a small typo breaking the release build process. 2018-06-18 14:17:06 +02:00
Matthieu Gautier b3d9ff5a6b Add toolchains steps even if we are building with `--build-nodeps`.
Toolchains are not really a deps, they have to be build everytime.
2018-06-14 22:58:43 +02:00
Matthieu Gautier eed80c1ff9 Correctly associate the source with the builder. 2018-06-14 18:18:45 +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 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 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 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 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 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