gio: New API for GFile from remote commandline arg
[platform/upstream/glib.git] / docs / reference / gio / glib-compile-schemas.xml
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
36 schema files in <replaceable>DIRECTORY</replaceable> into a binary file
37 with the name <filename>gschemas.compiled</filename> that can be used
38 by <link linkend="GSettings"><type>GSettings</type></link>. The XML schema
39 files must have the filename extension <filename>.gschema.xml</filename>.
40 For a detailed description of the XML file format, see the
41 <link linkend="GSettings"><type>GSettings</type></link> documentation.
42 </para>
43 <para>
44 At runtime, GSettings looks for schemas in the
45 <filename>glib-2.0/schemas</filename> subdirectories of all directories
46 specified in the <envar>XDG_DATA_DIRS</envar> environment variable. The
47 usual location to install schema files is
48 <filename>/usr/share/glib-2.0/schemas</filename>.
49 </para>
50 <para>
51 In addition to schema files, glib-compile-schemas reads 'vendor override'
52 files, which are key files that can override default values for keys in
53 the schemas. The group names in the key files are the schema id, and the
54 values are written in serialized GVariant form.
55 Vendor override files must have the filename extension
56 <filename>.gschema.override</filename>.
57 </para>
58 <para>
59 By convention, vendor override files begin with <filename>nn_</filename>
60 where <filename>nn</filename> is a number from 00 to 99.  Higher
61 numbered files have higher priority (eg: if the same override is made in
62 a file numbered 10 and then again in a file numbered 20, the override
63 from 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>
73 Print help and exit
74 </para></listitem>
75 </varlistentry>
76
77 <varlistentry>
78 <term><option>--targetdir=<replaceable>TARGET</replaceable></option></term>
79 <listitem><para>
80 Store <filename>gschemas.compiled</filename> in the <replaceable>TARGET</replaceable> directory instead of <replaceable>DIRECTORY</replaceable>.
81 </para></listitem>
82 </varlistentry>
83
84 <varlistentry>
85 <term><option>--dry-run</option></term>
86 <listitem><para>
87 Don't write <filename>gschemas.compiled</filename>. This option can be used
88 to check <filename>.gschema.xml</filename> sources for errors.
89 </para></listitem>
90 </varlistentry>
91
92 <varlistentry>
93 <term><option>--allow-any-name</option></term>
94 <listitem><para>
95 Do not enforce restrictions on key names. Note that this option is purely
96 to facility the transition from GConf, and will be removed at some time
97 in the future.
98 </para></listitem>
99 </varlistentry>
100
101 </variablelist>
102 </refsect1>
103 </refentry>