2 .\" Title: glib-compile-resources
3 .\" Author: Alexander Larsson
4 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
6 .\" Manual: User Commands
10 .TH "GLIB\-COMPILE\-RESOU" "1" "" "GIO" "User Commands"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 glib-compile-resources \- GLib resource compiler
33 .HP \w'\fBglib\-compile\-resources\fR\ 'u
34 \fBglib\-compile\-resources\fR [OPTION...] {FILE}
37 \fBglib\-compile\-resources\fR
38 reads the resource description from
40 and the files that it references and creates a binary resource bundle that is suitable for use with the
42 API\&. The resulting bundle is then written out as\-is, or as C source for linking into an application\&.
44 The XML resource files normally have the filename extension
45 \&.gresource\&.xml\&. For a detailed description of the XML file format, see the
50 \fB\-h\fR, \fB\-\-help\fR
57 Print program version and exit
60 \fB\-\-target=\fR\fB\fITARGET\fR\fR
62 Store the compiled resources in the file
63 \fITARGET\fR\&. If not specified a filename based on the
68 \fB\-\-sourcedir=\fR\fB\fIDIRECTORY\fR\fR
70 The files referenced in
72 are loaded from this directory\&. If not specified, the current directory is used\&.
77 Write the output file in the format selected for by its filename extension:
96 \fB\-\-generate\-source\fR
98 Instead of a writing the resource bundle in binary form create a C source file that contains the resource bundle\&. This can then be compiled into an application for easy access\&.
101 \fB\-\-generate\-header\fR
103 Generate a header file for use with C code generated by
104 \fB\-\-generate\-source\fR\&.
107 \fB\-\-generate\-dependencies\fR
109 Prints the list of files that the resource bundle references to standard output\&. This can be used to track dependencies in the build system\&. For example, the following make rule would mark
110 \fItest\&.gresource\fR
111 as depending on all the files that
112 \fItest\&.gresource\&.xml\fR
113 includes, so that is is automatically rebuilt if any of them change:
119 test\&.gresource: test\&.gresource\&.xml $(shell $(GLIB_COMPILE_RESOURCES) \-\-generate\-dependencies test\&.gresource\&.xml)
125 Note that this may or may not be portable to non\-GNU
129 \fB\-\-dependency\-file\fR\&.
134 Specify the prefix used for the C identifiers in the code generated by
135 \fB\-\-generate\-source\fR
137 \fB\-\-generate\-header\fR\&.
140 \fB\-\-manual\-register\fR
142 By default code generated by
143 \fB\-\-generate\-source\fR
144 uses automatic initialization of the resource\&. This works on most systems by using the compiler support for constructors\&. However, some (uncommon) compilers may not support this, you can then specify
145 \fB\-\-manual\-register\fR, which will generate custom register and unregister functions that your code can manually call at initialization and uninitialization time\&.
150 By default code generated by
151 \fB\-\-generate\-source\fR
152 declares all initialization functions as
153 \fBextern\fR\&. So they are exported unless this is prevented by a link script or other means\&. Since libraries usually want to use the functions only internally it can be more useful to declare them as
160 \fB\-\-dependency\-file=\fR\fB\fIFILE\fR\fR
162 Write dependencies in the same style as gcc \-M \-MF to the given file\&. If
164 is \-, the dependencies are written to the standard output\&. Unlike
165 \fB\-\-generate\-dependencies\fR, this option can be combined with other
167 options to generate dependencies as a side\-effect of generating sources\&.
173 The full path to the xmllint executable\&. This is used to preprocess resources with the
175 preprocessing option\&. If this environment variable is not set, xmllint is searched in the
179 \fBGDK_PIXBUF_PIXDATA\fR
181 The full path to the gdk\-pixbuf\-pixdata executable\&. This is used to preprocess resources with the
183 preprocessing option\&. If this environment variable is not set, gdk\-pixbuf\-pixdata is searched in the