build: improve further the flatpak README.

- Fix the markdown styling.
- Add commands on how to build GIMP from the local repository instead of a brand
  new clone (otherwise I don't see how one could develop with flatpak). I knew
  it were possible, but until today, I never tried to do this so I had to test
  first.
This commit is contained in:
Jehan 2023-03-23 15:12:12 +01:00
parent 5e1a7b15da
commit 23a0f22614
1 changed files with 62 additions and 53 deletions

View File

@ -1,8 +1,6 @@
GIMP Flatpak HowTo
==================
# GIMP Flatpak HowTo
Stable and Development releases
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
## Stable and Development releases
The Flathub repository hosts our stable and development point releases:
https://github.com/flathub/org.gimp.GIMP
@ -10,10 +8,9 @@ https://github.com/flathub/org.gimp.GIMP
We recommend to look at the `README.md` file in respectively the `master` or
`beta` branches of this repository to know more about release procedures.
Nightly builds
~~~~~~~~~~~~~~
## Nightly builds
Flathub does not host nightly builds, therefore we publish them on the GNOME
Flathub does not host nightly builds, therefore we publish them on GNOME's
Nightly repository. Our "nightlies" are actually "weeklies" through a [Gitlab job
schedule named "Flatpak
nightly"](https://gitlab.gnome.org/GNOME/gimp/-/pipeline_schedules).
@ -43,8 +40,7 @@ Base rule to update the nightly build manifest:
exception in our repository, but only for the `master` branch), so we often
need to publish to `master` after mostly a visual review.
Custom Flatpak builds (for development)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
## Custom Flatpak builds (for development)
Most contributors simply build GIMP the "old-school" way, nevertheless some
projects are starting to use `flatpak` as a development environment. Here is how
@ -113,17 +109,31 @@ export ARCH="x86_64"
export INSTALLDIR="`pwd`/${ARCH}"
```
* Build the flatpak:
* Build the flatpak up to GIMP itself (not included):
```sh
flatpak-builder $BUILD_OPTIONS --arch="$ARCH" \
flatpak-builder $BUILD_OPTIONS --arch="$ARCH" --stop-at=gimp \
"${INSTALLDIR}" org.gimp.GIMP-nightly.json 2>&1 \
| tee gimp-nightly-flatpak-`date --iso-8601=minute`.log
| tee gimp-nightly-flatpak.log
```
The build log will be outputted on `stdout` as well as being stored in a file
`gimp-nightly-flatpak-$DATE.log` (where `$DATE` is replaced with the date in
ISO-8601.
`gimp-nightly-flatpak.log`.
* Now we'll want to build GIMP itself, yet not from a clean repository clone
(which is what the manifest provides) but from your local checkout, so that
you can include any custom code:
```sh
flatpak build "${INSTALLDIR}" meson setup --prefix=/app/ --libdir=/app/lib/ _gimp ../../ 2>&1 | tee -a gimp-nightly-flatpak.log
flatpak build "${INSTALLDIR}" ninja -C _gimp 2>&1 | tee -a gimp-nightly-flatpak.log
flatpak build "${INSTALLDIR}" ninja -C _gimp install 2>&1 | tee -a gimp-nightly-flatpak.log
```
This assumes you are currently within `build/flatpak/`, therefore the
repository source is 2 parent-folders away (`../../`). The build artifacts
will be inside the `_gimp/` subfolders, and finally it will be installed with
the rest of the flatpak inside `$INSTALLDIR`.
* For development purpose, you don't need to export the flatpak to a repository
or even install it. Just run it directly from your build directory:
@ -132,8 +142,7 @@ ISO-8601.
flatpak-builder --run "${INSTALLDIR}" org.gimp.GIMP-nightly.json gimp-2.99
```
Maintaining the manifests
~~~~~~~~~~~~~~~~~~~~~~~~~
## Maintaining the manifests
* GIMP uses Flatpak's [GNOME runtime](http://flatpak.org/runtimes.html), which
contains a base of libraries, some of which are dependencies of GIMP.