Blame docs/reference/gio/glib-compile-schemas.xml

Packit ae235b
<refentry id="glib-compile-schemas" lang="en">
Packit ae235b
Packit ae235b
<refentryinfo>
Packit ae235b
  <title>glib-compile-schemas</title>
Packit ae235b
  <productname>GIO</productname>
Packit ae235b
  <authorgroup>
Packit ae235b
    <author>
Packit ae235b
      <contrib>Developer</contrib>
Packit ae235b
      <firstname>Ryan</firstname>
Packit ae235b
      <surname>Lortie</surname>
Packit ae235b
    </author>
Packit ae235b
  </authorgroup>
Packit ae235b
</refentryinfo>
Packit ae235b
Packit ae235b
<refmeta>
Packit ae235b
  <refentrytitle>glib-compile-schemas</refentrytitle>
Packit ae235b
  <manvolnum>1</manvolnum>
Packit ae235b
  <refmiscinfo class="manual">User Commands</refmiscinfo>
Packit ae235b
</refmeta>
Packit ae235b
Packit ae235b
<refnamediv>
Packit ae235b
  <refname>glib-compile-schemas</refname>
Packit ae235b
  <refpurpose>GSettings schema compiler</refpurpose>
Packit ae235b
</refnamediv>
Packit ae235b
Packit ae235b
<refsynopsisdiv>
Packit ae235b
  <cmdsynopsis>
Packit ae235b
    <command>glib-compile-schemas</command>
Packit ae235b
    <arg choice="opt" rep="repeat">OPTION</arg>
Packit ae235b
    <arg choice="req">DIRECTORY</arg>
Packit ae235b
  </cmdsynopsis>
Packit ae235b
</refsynopsisdiv>
Packit ae235b
Packit ae235b
<refsect1><title>Description</title>
Packit ae235b
<para><command>glib-compile-schemas</command> compiles all the GSettings XML
Packit ae235b
schema files in <replaceable>DIRECTORY</replaceable> into a binary file
Packit ae235b
with the name <filename>gschemas.compiled</filename> that can be used
Packit ae235b
by <link linkend="GSettings"><type>GSettings</type></link>. The XML schema
Packit ae235b
files must have the filename extension <filename>.gschema.xml</filename>.
Packit ae235b
For a detailed description of the XML file format, see the
Packit ae235b
<link linkend="GSettings"><type>GSettings</type></link> documentation.
Packit ae235b
</para>
Packit ae235b
<para>
Packit ae235b
At runtime, GSettings looks for schemas in the
Packit ae235b
<filename>glib-2.0/schemas</filename> subdirectories of all directories
Packit ae235b
specified in the <envar>XDG_DATA_DIRS</envar> environment variable. The
Packit ae235b
usual location to install schema files is
Packit ae235b
<filename>/usr/share/glib-2.0/schemas</filename>.
Packit ae235b
</para>
Packit ae235b
<para>
Packit ae235b
In addition to schema files, glib-compile-schemas reads 'vendor override'
Packit ae235b
files, which are key files that can override default values for keys in
Packit ae235b
the schemas. The group names in the key files are the schema id, and the
Packit ae235b
values are written in serialized GVariant form.
Packit ae235b
Vendor override files must have the filename extension
Packit ae235b
<filename>.gschema.override</filename>.
Packit ae235b
</para>
Packit ae235b
<para>
Packit ae235b
By convention, vendor override files begin with <filename>nn_</filename>
Packit ae235b
where <filename>nn</filename> is a number from 00 to 99.  Higher
Packit ae235b
numbered files have higher priority (eg: if the same override is made in
Packit ae235b
a file numbered 10 and then again in a file numbered 20, the override
Packit ae235b
from 20 will take precedence).
Packit ae235b
</para>
Packit ae235b
</refsect1>
Packit ae235b
Packit ae235b
<refsect1><title>Options</title>
Packit ae235b
<variablelist>
Packit ae235b
Packit ae235b
<varlistentry>
Packit ae235b
<term><option>-h</option>, <option>--help</option></term>
Packit ae235b
<listitem><para>
Packit ae235b
Print help and exit
Packit ae235b
</para></listitem>
Packit ae235b
</varlistentry>
Packit ae235b
Packit ae235b
<varlistentry>
Packit ae235b
<term><option>--version</option></term>
Packit ae235b
<listitem><para>
Packit ae235b
Print program version and exit
Packit ae235b
</para></listitem>
Packit ae235b
</varlistentry>
Packit ae235b
Packit ae235b
<varlistentry>
Packit ae235b
<term><option>--targetdir=<replaceable>TARGET</replaceable></option></term>
Packit ae235b
<listitem><para>
Packit ae235b
Store <filename>gschemas.compiled</filename> in the <replaceable>TARGET</replaceable> directory instead of <replaceable>DIRECTORY</replaceable>.
Packit ae235b
</para></listitem>
Packit ae235b
</varlistentry>
Packit ae235b
Packit ae235b
<varlistentry>
Packit ae235b
<term><option>--strict</option></term>
Packit ae235b
<listitem><para>
Packit ae235b
Abort on any errors in schemas. Without this option, faulty schema files are
Packit ae235b
simply omitted from the resulting compiled schema.
Packit ae235b
</para></listitem>
Packit ae235b
</varlistentry>
Packit ae235b
Packit ae235b
<varlistentry>
Packit ae235b
<term><option>--dry-run</option></term>
Packit ae235b
<listitem><para>
Packit ae235b
Don't write <filename>gschemas.compiled</filename>. This option can be used
Packit ae235b
to check <filename>.gschema.xml</filename> sources for errors.
Packit ae235b
</para></listitem>
Packit ae235b
</varlistentry>
Packit ae235b
Packit ae235b
<varlistentry>
Packit ae235b
<term><option>--allow-any-name</option></term>
Packit ae235b
<listitem><para>
Packit ae235b
Do not enforce restrictions on key names. Note that this option is purely
Packit ae235b
to facility the transition from GConf, and will be removed at some time
Packit ae235b
in the future.
Packit ae235b
</para></listitem>
Packit ae235b
</varlistentry>
Packit ae235b
Packit ae235b
</variablelist>
Packit ae235b
</refsect1>
Packit ae235b
</refentry>