small-tech / watson

Watson is a best-practices application template for elementary OS 6 (Odin).
GNU General Public License v3.0
46 stars 3 forks source link

Meson requires reconfiguration after running a flatpak build #6

Closed aral closed 2 years ago

aral commented 3 years ago

Once task/package has been implemented, ensure that the task/build script runs meson build --prefix=/usr again if necessary as, otherwise, you get the following error if you run task/build after task/package:

~/Projects/elementary/comet/build ~/Projects/elementary/comet
ninja: error: loading 'build.ninja': No such file or directory

So check for this in the task/run and task/build scripts and reconfigure meson if you detect that the build.ninja file doesn’t exist. e.g.,

# The ninja build file may be missing if the
# person ran a flatpak build before running this script.
# If so, reconfigure meson.
if [[ ! -f build/build.ninja ]]; then
  meson build --prefix=/usr
fi
aral commented 2 years ago

This has been handled in Comet so backport the changes.