Oolite build system
Here is the result of this forum thread: gitversion.sh / meson.build changes
| Build Step | Description | Requires | Provides |
|---|---|---|---|
| Example | Example | Example | Example |
- makepkg starts
- install prerequisites like clang, meson, jq, ...
- checkout project
- run prepare() function
- calculate official version number (semver via gitversion)
- run build() function
- meson setup
- meson compile
- run check() function
- meson test
- run package() function
- meson install
- Place custom icon, desktop item for use in menus, custom launcher etc at correct places
- create archlinux package
- makepkg exits
- runtime tests
- publish on AUR
- pre-build
- Iniialise a clean minimal build enviornmnet
Many issues during or after build are due to having uncessary things being present. Whether this is done through a clean chroot, docker container, VPS, github/gitlab workflow, Virtual machine etc is an implementation detail.
- download sourcecode
This should include oolite sourcecode as well as the code needed for external dependencies.
- install required dependencies
The baseline discussed at viewtopic.php?p=304440 should make this part a lot easier./p>
It includes building external deps that are not available in the build environment. Targets that use 'modern builds' for example require gnustep objc2.
objc2 can only be built by clang, requires gnustep base and make to be built with clang. Also no released versions of gnustep tools support latest clang release (fixes are avaiiable). Targets that use the gcc provided libobjc don't have this need.
- changes to sourcecode to allow succesfull builds
example : 1.92-maintenance has 2 files that screw up things at runtime for some targets. Deleting those files is the only option. Although since we updated the dependencies this example should be outdated.
- set/update values that can not be determined before build time.
This includes things like sourcecode url, build environment, git commit hash.
These values shall be passed in a JSON file inside the build directory. An example build file can look like this:
- Iniialise a clean minimal build enviornmnet
{
"title": "Oolite core",
"identifier": "org.oolite.oolite",
"required_oolite_version": "1.93",
"license": "GPL 2+ / CC-BY-NC-SA 3.0 - see LICENSE.md for details",
"author": "Giles Williams, Jens Ayton and contributors",
"information_url": "https://oolite.space/",
"expansion_catalog": "https://addons.oolite.space/api/1.0/overview/"
}
- build
- setup/configure
- compile
- test unpackaged
- install <-- why is this here?
- post-build
- packaging
- testing package