mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-21 08:28:53 +02:00
Nuke the gsettingsschemadir pc variable
Not really useful, just use $(prefix)/glib-2.0/schemas. We are getting m4 sugar to coat this over, anyway.
This commit is contained in:
@@ -379,21 +379,28 @@ produces a <filename>org.gnome.font-rendering.gschema.xml</filename> file with t
|
|||||||
<para>
|
<para>
|
||||||
The XML source file for your GSettings schema needs to get installed
|
The XML source file for your GSettings schema needs to get installed
|
||||||
into <filename>$datadir/glib-2.0/schemas</filename>, and needs to be
|
into <filename>$datadir/glib-2.0/schemas</filename>, and needs to be
|
||||||
compiled into a binary form by the <link linkend="gschema-compile">gschema-compile</link>
|
compiled into a binary form. At runtime, GSettings looks for compiled
|
||||||
utility. GIO provides variables <literal>gsettingsschemadir</literal>
|
schemas in the <filename>glib-2.0/schemas</filename> subdirectories
|
||||||
and <literal>gsettingsupdateschemacache</literal> for the location
|
of all <envar>XDG_DATA_DIRS</envar> directories, so if you install
|
||||||
and the command, which can be used in <filename>configure.in</filename>
|
your schema in a different location, you need to set the
|
||||||
as follows:
|
<envar>XDG_DATA_DIRS</envar> environment variable appropriately.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Schemas are compiled into binary form by the
|
||||||
|
<link linkend="gschema-compile">gschema-compile</link> utility.
|
||||||
|
GIO provides a <literal>gsettingsupdateschemacache</literal>
|
||||||
|
variable for the schema compiler, which can be used in
|
||||||
|
<filename>configure.in</filename> as follows:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
AC_SUBST(gsettingsschemadir, `pkg-config --variable gsettingsschemadir gio-2.0`)
|
|
||||||
AC_SUBST(gsettingsupdateschemacache, `pkg-config --variable gsettingsupdateschemacache gio-2.0`)
|
AC_SUBST(gsettingsupdateschemacache, `pkg-config --variable gsettingsupdateschemacache gio-2.0`)
|
||||||
</programlisting>
|
</programlisting>
|
||||||
The corresponding <filename>Makefile.am</filename> fragment looks like
|
The corresponding <filename>Makefile.am</filename> fragment looks like
|
||||||
this:
|
this:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
|
gsettingsschemadir = $(prefix)/glib-2.0/schemas
|
||||||
gsettingsschema_DATA = my.app.gschema.xml
|
gsettingsschema_DATA = my.app.gschema.xml
|
||||||
install-data-hook:
|
install-data-hook:
|
||||||
$(gsettingsupdateschemacache) $(gsettingsschemadir)
|
$(gsettingsupdateschemacache) $(DESTDIR)$(gsettingsschemadir)
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@@ -4,7 +4,6 @@ libdir=@libdir@
|
|||||||
includedir=@includedir@
|
includedir=@includedir@
|
||||||
|
|
||||||
giomoduledir=@GIO_MODULE_DIR@
|
giomoduledir=@GIO_MODULE_DIR@
|
||||||
gsettingsschemadir=@datarootdir@/glib-2.0/schemas
|
|
||||||
gsettingsupdateschemacache=@bindir@/gschema-compile
|
gsettingsupdateschemacache=@bindir@/gschema-compile
|
||||||
|
|
||||||
Name: GIO
|
Name: GIO
|
||||||
|
Reference in New Issue
Block a user