'\" t .\" Title: glib-compile-resources .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.77.1 .\" Date: 07/14/2012 .\" Manual: User Commands .\" Source: User Commands .\" Language: English .\" .TH "GLIB\-COMPILE\-RESOU" "1" "07/14/2012" "User Commands" "User Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" glib-compile-resources \- GLib resource compiler .SH "SYNOPSIS" .HP \w'\fBglib\-compile\-resources\fR\ 'u \fBglib\-compile\-resources\fR [option...] {file} .SH "DESCRIPTION" .PP \fBglib\-compile\-resources\fR reads the resource description from \fIfile\fR and the files that it references and creates a binary resource bundle that is suitable for use with the \fBGResource\fR API\&. The resulting bundle is then written out as\-is, or as C source for linking into an application\&. .PP The XML resource files normally have the filename extension \&.gresource\&.xml\&. For a detailed description of the XML file format, see the \fBGResource\fR documentation\&. .SS "Options" .PP \fB\-h\fR, \fB\-\-help\fR .RS 4 Print help and exit .RE .PP \fB\-\-target=\fR\fB\fITARGETFILE\fR\fR .RS 4 Store the compiled resources in \fITARGETFILE\fR\&. If not specified a filename based on the \fIfile\fR basename is used\&. .RE .PP \fB\-\-sourcedir\fR .RS 4 The files references in \fIfile\fR are loaded from this directory\&. If not specified the current directory is used\&. .RE .PP \fB\-\-generate\fR .RS 4 Write the output file in the format selected for by its filename extension: .PP \&.c .RS 4 C source .RE .PP \&.h .RS 4 C header .RE .PP \&.gresource .RS 4 resource bundle .RE .sp .RE .PP \fB\-\-generate\-source\fR .RS 4 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\&. .RE .PP \fB\-\-generate\-header\fR .RS 4 Generate a header file for use with C code generated by \fB\-\-generate\-source\fR\&. .RE .PP \fB\-\-generate\-dependencies\fR .RS 4 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 \fItest\&.gresource\fR as depending on all the files that \fItest\&.gresource\&.xml\fR includes, so that is is automatically rebuilt if any of them change: .sp .if n \{\ .RS 4 .\} .nf test\&.gresource: test\&.gresource\&.xml $(shell $(GLIB_COMPILE_RESOURCES) \-\-generate\-dependencies test\&.gresource\&.xml) .fi .if n \{\ .RE .\} .sp Note that this may or may not be portable to non\-GNU \fBmake\fR\&. .RE .PP \fB\-\-c\-name\fR .RS 4 Specify the prefix used for the C identifiers in the code generated by \fB\-\-generate\-source\fR and \fB\-\-generate\-headers\fR\&. .RE .PP \fB\-\-manual\-register\fR .RS 4 By default code generated by \fB\-\-generate\-source\fR 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 \fB\-\-manual\-register\fR, which will generate custom register and unregister functions that your code can manually call at initialization and uninitialization time\&. .RE .SS "Environment Variables" .PP \fBXMLLINT\fR .RS 4 The full path to the xmllint executable\&. This is used to preprocess resources with the xml\-stripblanks preprocessing option\&. If this environment variable is not set, xmllint is searched in the \fBPATH\fR\&. .RE .PP \fBGDK_PIXBUF_PIXDATA\fR .RS 4 The full path to the gdk\-pixbuf\-pixdata executable\&. This is used to preprocess resources with the to\-pixdata preprocessing option\&. If this environment variable is not set, gdk\-pixbuf\-pixdata is searched in the \fBPATH\fR\&. .RE .SH "SEE ALSO"