1GLIB-COMPILE-RESOU(1)            User Commands           GLIB-COMPILE-RESOU(1)
2
3
4

NAME

6       glib-compile-resources - GLib resource compiler
7

SYNOPSIS

9       glib-compile-resources [OPTION...] {FILE}
10

DESCRIPTION

12       glib-compile-resources reads the resource description from FILE and the
13       files that it references and creates a binary resource bundle that is
14       suitable for use with the GResource API. The resulting bundle is then
15       written out as-is, or as C source for linking into an application.
16
17       The XML resource files normally have the filename extension
18       .gresource.xml. For a detailed description of the XML file format, see
19       the GResource documentation.
20

OPTIONS

22       -h, --help
23           Print help and exit
24
25       --version
26           Print program version and exit
27
28       --target=TARGET
29           Store the compiled resources in the file TARGET. If not specified a
30           filename based on the FILE basename is used.
31
32       --sourcedir=DIRECTORY
33           The files referenced in FILE are loaded from this directory. If not
34           specified, the current directory is used.
35
36       --generate
37           Write the output file in the format selected for by its filename
38           extension:
39
40           .c
41               C source
42
43           .h
44               C header
45
46           .gresource
47               resource bundle
48
49
50       --generate-source
51           Instead of a writing the resource bundle in binary form create a C
52           source file that contains the resource bundle. This can then be
53           compiled into an application for easy access.
54
55       --generate-header
56           Generate a header file for use with C code generated by
57           --generate-source.
58
59       --generate-dependencies
60           Prints the list of files that the resource bundle references to
61           standard output. This can be used to track dependencies in the
62           build system. For example, the following make rule would mark
63           test.gresource as depending on all the files that
64           test.gresource.xml includes, so that is is automatically rebuilt if
65           any of them change:
66
67               test.gresource: test.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies test.gresource.xml)
68
69           Note that this may or may not be portable to non-GNU make.
70
71           Also see --dependency-file.
72
73       --c-name
74           Specify the prefix used for the C identifiers in the code generated
75           by --generate-source and --generate-header.
76
77       --manual-register
78           By default code generated by --generate-source uses automatic
79           initialization of the resource. This works on most systems by using
80           the compiler support for constructors. However, some (uncommon)
81           compilers may not support this, you can then specify
82           --manual-register, which will generate custom register and
83           unregister functions that your code can manually call at
84           initialization and uninitialization time.
85
86       --internal
87           By default code generated by --generate-source declares all
88           initialization functions as extern. So they are exported unless
89           this is prevented by a link script or other means. Since libraries
90           usually want to use the functions only internally it can be more
91           useful to declare them as G_GNUC_INTERNAL which is what --internal
92           does.
93
94       --dependency-file=FILE
95           Write dependencies in the same style as gcc -M -MF to the given
96           file. If FILE is -, the dependencies are written to the standard
97           output. Unlike --generate-dependencies, this option can be combined
98           with other --generate options to generate dependencies as a
99           side-effect of generating sources.
100
101       --generate-phony-targets
102           When creating a dependency file with --dependency-file include
103           phony targets in the same style as gcc -MP. This would typically be
104           used with make.
105

ENVIRONMENT

107       XMLLINT
108           The full path to the xmllint executable. This is used to preprocess
109           resources with the xml-stripblanks preprocessing option. If this
110           environment variable is not set, xmllint is searched in the PATH.
111
112       GDK_PIXBUF_PIXDATA
113           The full path to the gdk-pixbuf-pixdata executable. This is used to
114           preprocess resources with the to-pixdata preprocessing option. If
115           this environment variable is not set, gdk-pixbuf-pixdata is
116           searched in the PATH.
117
118
119
120GIO                                                      GLIB-COMPILE-RESOU(1)
Impressum