=== gtkmm-documentation/examples/book/buildapp/step[1-9] ===

== Building the examples ==

The examples in this directory are built with 'ninja examples' or 'ninja test'
alongside the rest of the examples in gtkmm-documentation.

The examples in the step[1-9] directories can also be built separately.
You can then choose to build with meson and ninja or with make.

  $ cd step1  # or step2, step3, etc.
  $ meson build  # or another name for the build directory
  $ cd build
  $ ninja
or
  $ cd step1  # or step2, step3, etc.
  $ make -f Makefile.example

To make gnome-shell use the desktop file and icon for one of the examples
while running it uninstalled, do the following:

  $ cd step1/build  # or step2/build, step3/build, etc.
  $ ninja install-desktop-file
or
  $ cd step1  # or step2, step3, etc.
  $ make -f Makefile.example install-desktop-file

To make Gio::Settings find the preferences in step[5-9], they must be stored
where they can be found via one of the environment variables XDG_DATA_DIRS,
XDG_DATA_HOME or GSETTINGS_SCHEMA_DIR. One way to achieve this is:

  $ cd step5/build  # or step6/build, step7/build, etc.
  $ export GSETTINGS_SCHEMA_DIR=.
or
  $ cd step5  # or step6, step7, etc.
  $ export GSETTINGS_SCHEMA_DIR=.

But then the program can only be run from that directory. Alternatively,
set GSETTINGS_SCHEMA_DIR to an absolute path, such as

  $ export GSETTINGS_SCHEMA_DIR=~/.local/share/glib-2.0/schemas

and do the following:

  $ cd step5/build  # or step6/build, step7/build, etc.
  $ ninja install-gschema-file
or
  $ cd step5  # or step6, step7, etc.
  $ make -f Makefile.example install-gschema-file
