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       --external-data
95           By default code generated by --generate-source embeds the resource
96           data as a string literal. When --external-data is given, the data
97           is only declared in the generated C file, and the data has to be
98           linked externally.
99
100       --dependency-file=FILE
101           Write dependencies in the same style as gcc -M -MF to the given
102           file. If FILE is -, the dependencies are written to the standard
103           output. Unlike --generate-dependencies, this option can be combined
104           with other --generate options to generate dependencies as a
105           side-effect of generating sources.
106
107       --generate-phony-targets
108           When creating a dependency file with --dependency-file include
109           phony targets in the same style as gcc -MP. This would typically be
110           used with make.
111

ENVIRONMENT

113       XMLLINT
114           The full path to the xmllint executable. This is used to preprocess
115           resources with the xml-stripblanks preprocessing option. If this
116           environment variable is not set, xmllint is searched for in the
117           PATH.
118
119       GDK_PIXBUF_PIXDATA
120           Deprecated since gdk-pixbuf 2.32, as GResource supports embedding
121           modern image formats without conversion.
122
123           The full path to the gdk-pixbuf-pixdata executable. This is used to
124           preprocess resources with the to-pixdata preprocessing option. If
125           this environment variable is not set, gdk-pixbuf-pixdata is
126           searched for in the PATH.
127
128       JSON_GLIB_FORMAT
129           The full path to the json-glib-format executable. This is used to
130           preprocess resources with the json-stripblanks preprocessing
131           option. If this environment variable is not set, json-glib-format
132           is searched for in the PATH.
133
134
135
136GIO                                                      GLIB-COMPILE-RESOU(1)
Impressum