glib-compile-resources

glib-compile-resources — GLib resource compiler

Synopsis

glib-compile-resources [option...] {file}

Description

glib-compile-resources reads the resource description from file and the files that it references and creates a binary resource bundle that is suitable for use with the GResource API. The resulting bundle is then written out as-is, or as C source for linking into an application.

The XML resource files normally have the filename extension .gresource.xml. For a detailed description of the XML file format, see the GResource documentation.

Options

-h, --help

Print help and exit

--target=TARGETFILE

Store the compiled resources in TARGETFILE. If not specified a filename based on the file basename is used.

--sourcedir

The files references in file are loaded from this directory. If not specified the current directory is used.

--generate-source

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.

--generate-header

Generate a header file for use with C code generated by --generate-source.

--c-name

Specify the prefix used for the C identifiers in the code generated by --generate-source and --generate-headers.

--manual-register

By default code generated by --generate-source 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 --manual-register, which will generate custom register and unregister functions that your code can manually call at initialization and uninitialization time.

See also