Merge remote branch 'gvdb/master'
[platform/upstream/glib.git] / docs / reference / gio / glib-compile-schemas.xml
1 <refentry id="glib-compile-schemas" lang="en">
2
3 <refmeta>
4   <refentrytitle>glib-compile-schemas</refentrytitle>
5   <manvolnum>1</manvolnum>
6   <refmiscinfo class="manual">User Commands</refmiscinfo>
7 </refmeta>
8
9 <refnamediv>
10   <refname>glib-compile-schemas</refname>
11   <refpurpose>GSettings schema compiler</refpurpose>
12 </refnamediv>
13
14 <refsynopsisdiv>
15   <cmdsynopsis>
16     <command>glib-compile-schemas</command>
17     <arg choice="opt" rep="repeat">option</arg>
18     <arg choice="req">directory</arg>
19   </cmdsynopsis>
20 </refsynopsisdiv>
21
22 <refsect1><title>Description</title>
23 <para><command>glib-compile-schemas</command> compiles all the GSettings XML
24 schema files in <replaceable>directory</replaceable> into a binary file
25 with the name <filename>gschemas.compiled</filename> that can be used
26 by <link linkend="GSettings"><type>GSettings</type></link>. The XML schema
27 files must have the filename extension <filename>.gschema.xml</filename>.
28 For a detailed description of the XML file format, see the
29 <link linkend="GSettings"><type>GSettings</type></link> documentation.
30 </para>
31 <para>
32 At runtime, GSettings looks for schemas in the
33 <filename>glib-2.0/schemas</filename> subdirectories of all directories
34 specified in the <envar>XDG_DATA_DIRS</envar> environment variable. The
35 usual location to install schema files is
36 <filename>/usr/share/glib-2.0/schemas</filename>.
37 </para>
38
39 <refsect2><title>Options</title>
40 <variablelist>
41
42 <varlistentry>
43 <term><option>-h</option>, <option>--help</option></term>
44 <listitem><para>
45 Print help and exit
46 </para></listitem>
47 </varlistentry>
48
49 <varlistentry>
50 <term><option>--targetdir=<replaceable>TARGETDIR</replaceable></option></term>
51 <listitem><para>
52 Store <filename>gschemas.compiled</filename> in <replaceable>TARGETDIR</replaceable> instead of <replaceable>directory</replaceable>.
53 </para></listitem>
54 </varlistentry>
55
56 <varlistentry>
57 <term><option>--dry-run</option></term>
58 <listitem><para>
59 Don't write <filename>gschemas.compiled</filename>. This option can be used
60 to check <filename>.gschema.xml</filename> sources for errors.
61 </para></listitem>
62 </varlistentry>
63
64 <varlistentry>
65 <term><option>--allow-any-name</option></term>
66 <listitem><para>
67 Do not enforce restrictions on key names. Note that this option is purely
68 to facility the transition from GConf, and will be removed at some time
69 in the future.
70 </para></listitem>
71 </varlistentry>
72
73 </variablelist>
74 </refsect2>
75 </refsect1>
76 <refsect1><title>See also</title>
77 <para>
78 <citerefentry>
79   <refentrytitle>gsettings-schema-convert</refentrytitle>
80   <manvolnum>1</manvolnum>
81 </citerefentry> is a utility to convert GConf schemas into GSettings schemas.
82 </para>
83 </refsect1>
84 </refentry>
85