• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<refentry id="glib-compile-schemas" lang="en">
2
3<refentryinfo>
4  <title>glib-compile-schemas</title>
5  <productname>GIO</productname>
6  <authorgroup>
7    <author>
8      <contrib>Developer</contrib>
9      <firstname>Ryan</firstname>
10      <surname>Lortie</surname>
11    </author>
12  </authorgroup>
13</refentryinfo>
14
15<refmeta>
16  <refentrytitle>glib-compile-schemas</refentrytitle>
17  <manvolnum>1</manvolnum>
18  <refmiscinfo class="manual">User Commands</refmiscinfo>
19</refmeta>
20
21<refnamediv>
22  <refname>glib-compile-schemas</refname>
23  <refpurpose>GSettings schema compiler</refpurpose>
24</refnamediv>
25
26<refsynopsisdiv>
27  <cmdsynopsis>
28    <command>glib-compile-schemas</command>
29    <arg choice="opt" rep="repeat">OPTION</arg>
30    <arg choice="req">DIRECTORY</arg>
31  </cmdsynopsis>
32</refsynopsisdiv>
33
34<refsect1><title>Description</title>
35<para><command>glib-compile-schemas</command> compiles all the GSettings XML
36schema files in <replaceable>DIRECTORY</replaceable> into a binary file
37with the name <filename>gschemas.compiled</filename> that can be used
38by <link linkend="GSettings"><type>GSettings</type></link>. The XML schema
39files must have the filename extension <filename>.gschema.xml</filename>.
40For a detailed description of the XML file format, see the
41<link linkend="GSettings"><type>GSettings</type></link> documentation.
42</para>
43<para>
44At runtime, GSettings looks for schemas in the
45<filename>glib-2.0/schemas</filename> subdirectories of all directories
46specified in the <envar>XDG_DATA_DIRS</envar> environment variable. The
47usual location to install schema files is
48<filename>/usr/share/glib-2.0/schemas</filename>.
49</para>
50<para>
51In addition to schema files, glib-compile-schemas reads 'vendor override'
52files, which are key files that can override default values for keys in
53the schemas. The group names in the key files are the schema id, and the
54values are written in serialized GVariant form.
55Vendor override files must have the filename extension
56<filename>.gschema.override</filename>.
57</para>
58<para>
59By convention, vendor override files begin with <filename>nn_</filename>
60where <filename>nn</filename> is a number from 00 to 99.  Higher
61numbered files have higher priority (eg: if the same override is made in
62a file numbered 10 and then again in a file numbered 20, the override
63from 20 will take precedence).
64</para>
65</refsect1>
66
67<refsect1><title>Options</title>
68<variablelist>
69
70<varlistentry>
71<term><option>-h</option>, <option>--help</option></term>
72<listitem><para>
73Print help and exit
74</para></listitem>
75</varlistentry>
76
77<varlistentry>
78<term><option>--version</option></term>
79<listitem><para>
80Print program version and exit
81</para></listitem>
82</varlistentry>
83
84<varlistentry>
85<term><option>--targetdir=<replaceable>TARGET</replaceable></option></term>
86<listitem><para>
87Store <filename>gschemas.compiled</filename> in the <replaceable>TARGET</replaceable> directory instead of <replaceable>DIRECTORY</replaceable>.
88</para></listitem>
89</varlistentry>
90
91<varlistentry>
92<term><option>--strict</option></term>
93<listitem><para>
94Abort on any errors in schemas. Without this option, faulty schema files are
95simply omitted from the resulting compiled schema.
96</para></listitem>
97</varlistentry>
98
99<varlistentry>
100<term><option>--dry-run</option></term>
101<listitem><para>
102Don't write <filename>gschemas.compiled</filename>. This option can be used
103to check <filename>.gschema.xml</filename> sources for errors.
104</para></listitem>
105</varlistentry>
106
107<varlistentry>
108<term><option>--allow-any-name</option></term>
109<listitem><para>
110Do not enforce restrictions on key names. Note that this option is purely
111to facility the transition from GConf, and will be removed at some time
112in the future.
113</para></listitem>
114</varlistentry>
115
116</variablelist>
117</refsect1>
118</refentry>
119