.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "GLIB-COMPILE-RESOURCES" "" "" .SH NAME glib-compile-resources \- GLib resource compiler .\" This has to be duplicated from above to make it machine-readable by `reuse`: .\" SPDX-FileCopyrightText: 2012, 2016 Red Hat, Inc. .\" SPDX-FileCopyrightText: 2012 Christian Persch .\" SPDX-FileCopyrightText: 2016 Sam Thursfield .\" SPDX-FileCopyrightText: 2016 Patrick Griffis .\" SPDX-FileCopyrightText: 2018 Ninja-Koala .\" SPDX-FileCopyrightText: 2018, 2021 Emmanuele Bassi .\" SPDX-FileCopyrightText: 2020 Endless OS Foundation, LLC .\" SPDX-License-Identifier: LGPL-2.1-or-later . .SH SYNOPSIS .nf \fBglib\-compile\-resources\fP [\fIOPTION\fP…] \fIFILE\fP .fi .sp .SH DESCRIPTION .sp \fBglib\-compile\-resources\fP reads the resource description from \fBFILE\fP and the files that it references and creates a binary resource bundle that is suitable for use with the \fBGResource\fP API. The resulting bundle is then written out as\-is, or as C source for linking into an application. .sp The XML resource files normally have the filename extension \fB\&.gresource.xml\fP\&. For a detailed description of the XML file format, see the \fBGResource\fP \fI\%documentation\fP\&. .SH OPTIONS .sp \fB\-h\fP, \fB\-\-help\fP .INDENT 0.0 .INDENT 3.5 Print help and exit. .UNINDENT .UNINDENT .sp \fB\-\-version\fP .INDENT 0.0 .INDENT 3.5 Print program version and exit. .UNINDENT .UNINDENT .sp \fB\-\-target \fP .INDENT 0.0 .INDENT 3.5 Store the compiled resources in the file \fBTARGET\fP\&. If not specified a filename based on the \fBFILE\fP basename is used. .UNINDENT .UNINDENT .sp \fB\-\-sourcedir \fP .INDENT 0.0 .INDENT 3.5 The files referenced in \fBFILE\fP are loaded from this directory. If not specified, the current directory is used. .UNINDENT .UNINDENT .sp \fB\-\-generate\fP .INDENT 0.0 .INDENT 3.5 Write the output file in the format selected for by its filename extension: .sp \fB\&.c\fP .INDENT 0.0 .INDENT 3.5 C source .UNINDENT .UNINDENT .sp \fB\&.h\fP .INDENT 0.0 .INDENT 3.5 C header .UNINDENT .UNINDENT .sp \fB\&.gresource\fP .INDENT 0.0 .INDENT 3.5 resource bundle .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fB\-\-generate\-source\fP .INDENT 0.0 .INDENT 3.5 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. .UNINDENT .UNINDENT .sp \fB\-\-generate\-header\fP .INDENT 0.0 .INDENT 3.5 Generate a header file for use with C code generated by \fB\-\-generate\-source\fP\&. .UNINDENT .UNINDENT .sp \fB\-\-generate\-dependencies\fP .INDENT 0.0 .INDENT 3.5 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 \fBtest.gresource\fP as depending on all the files that \fBtest.gresource.xml\fP includes, so that it is automatically rebuilt if any of them change: .INDENT 0.0 .INDENT 3.5 .sp .EX test.gresource: test.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) \-\-generate\-dependencies test.gresource.xml) .EE .UNINDENT .UNINDENT .sp Note that this may or may not be portable to non\-GNU \fBmake\fP\&. .sp Also see \fB\-\-dependency\-file\fP\&. .UNINDENT .UNINDENT .sp \fB\-\-c\-name\fP .INDENT 0.0 .INDENT 3.5 Specify the prefix used for the C identifiers in the code generated by \fB\-\-generate\-source\fP and \fB\-\-generate\-header\fP\&. .UNINDENT .UNINDENT .sp \fB\-\-manual\-register\fP .INDENT 0.0 .INDENT 3.5 By default, code generated by \fB\-\-generate\-source\fP 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\fP, which will generate custom register and unregister functions that your code can manually call at initialization and uninitialization time. .UNINDENT .UNINDENT .sp \fB\-\-internal\fP .INDENT 0.0 .INDENT 3.5 By default, code generated by \fB\-\-generate\-source\fP declares all initialization functions as \fBextern\fP\&. 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 \fBG_GNUC_INTERNAL\fP which is what \fB\-\-internal\fP does. .UNINDENT .UNINDENT .sp \fB\-\-external\-data\fP .INDENT 0.0 .INDENT 3.5 By default, code generated by \fB\-\-generate\-source\fP embeds the resource data as a string literal. When \fB\-\-external\-data\fP is given, the data is only declared in the generated C file, and the data has to be linked externally. .UNINDENT .UNINDENT .sp \fB\-\-dependency\-file \fP .INDENT 0.0 .INDENT 3.5 Write dependencies in the same style as \fBgcc \-M \-MF\fP to the given file. If \fBFILE\fP is \fB\-\fP, the dependencies are written to the standard output. Unlike \fB\-\-generate\-dependencies\fP, this option can be combined with other \fB\-\-generate\fP options to generate dependencies as a side\-effect of generating sources. .UNINDENT .UNINDENT .sp \fB\-\-generate\-phony\-targets\fP .INDENT 0.0 .INDENT 3.5 When creating a dependency file with \fB\-\-dependency\-file\fP include phony targets in the same style as \fBgcc \-MP\fP\&. This would typically be used with \fBmake\fP\&. .UNINDENT .UNINDENT .sp \fB\-\-compiler \fP .INDENT 0.0 .INDENT 3.5 Generate code that is going to target the given compiler \fBNAME\fP\&. The current two compiler modes are \fBgcc\fP, for all GCC\-compatible toolchains; and \fBmsvc\fP, for the Microsoft Visual C Compiler. If this option isn’t set, then the default will be taken from the \fBCC\fP environment variable. .UNINDENT .UNINDENT .SH ENVIRONMENT .sp \fBXMLLINT\fP .INDENT 0.0 .INDENT 3.5 The full path to the \fBxmllint\fP executable. This is used to preprocess resources with the \fBxml\-stripblanks\fP preprocessing option. If this environment variable is not set, \fBxmllint\fP is searched for in the \fBPATH\fP\&. .UNINDENT .UNINDENT .sp \fBGDK_PIXBUF_PIXDATA\fP .INDENT 0.0 .INDENT 3.5 Deprecated since gdk\-pixbuf 2.32, as \fBGResource\fP supports embedding modern image formats without conversion. .sp The full path to the \fBgdk\-pixbuf\-pixdata\fP executable. This is used to preprocess resources with the \fBto\-pixdata\fP preprocessing option. If this environment variable is not set, \fBgdk\-pixbuf\-pixdata\fP is searched for in the \fBPATH\fP\&. .UNINDENT .UNINDENT .sp \fBJSON_GLIB_FORMAT\fP .INDENT 0.0 .INDENT 3.5 The full path to the \fBjson\-glib\-format\fP executable. This is used to preprocess resources with the \fBjson\-stripblanks\fP preprocessing option. If this environment variable is not set, \fBjson\-glib\-format\fP is searched for in the \fBPATH\fP\&. .UNINDENT .UNINDENT .\" Generated by docutils manpage writer. .