Files
tldr/pages.zh/common/glib-compile-resources.md

21 lines
834 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# glib-compile-resources
> 将资源文件(例如图像)编译成二进制资源包。
> 这些可以通过 GResource API 链接到 GTK 应用程序中。
> 更多信息:<https://manned.org/glib-compile-resources>。
-`file.gresource.xml` 中引用的资源编译为 .gresource 二进制文件:
`glib-compile-resources {{file.gresource.xml}}`
-`file.gresource.xml` 中引用的资源编译为 C 源文件:
`glib-compile-resources --generate-source {{file.gresource.xml}}`
-`file.gresource.xml` 中的资源编译到指定的目标文件,扩展名可以是 .c、.h 或 .gresource
`glib-compile-resources --generate --target={{file.ext}} {{file.gresource.xml}}`
- 打印 `file.gresource.xml` 中引用的资源文件列表:
`glib-compile-resources --generate-dependencies {{file.gresource.xml}}`