1、配置文件格式讲解
参考glib官网API
https://developer.gnome.org/glib/2.60/glib-Key-value-file-parser.html
GKeyFile允许您解析、编辑或创建包含键值对组的文件,因为缺少更好的名称,我们将其称为“key files”。 现在,一些free desktop.org规范使用key files,例如 Desktop Entry Specification 和 Icon Theme Specification.。
Desktop Entry Specification中详细描述了key files的语法,这里有一个快速摘要:key files由键值对组成,其中包含注释。
例如
# this is just an example
# there can be comments before the first group
[First Group]
Name=Key File Example\tthis value shows\nescaping
# localized strings are stored in multiple key-value pairs
Welcome=Hello
Welcome[de]=Hallo
Welcome[fr_FR]=Bonjour
Welcome[it]=Ciao
Welcome[be@latin]=Hello
[Another Group]
Numbe