简体   繁体   English

如何解决错误“ GLib-GIO-ERROR **:系统上未安装GSettings模式”?

[英]How to fix error “GLib-GIO-ERROR**: No GSettings schemas are installed on the system”?

I have to create a one-file (.exe) program with InstallShield2015LimitedEdition that works with GTK3.4.2 and OpenCV 3.0.0 in Windows 7 x64 . 我必须使用InstallShield2015LimitedEdition创建一个可与GTK3.4.2Windows 7 x64 OpenCV 3.0.0一起使用的单文件(.exe)程序。 In this program the user can choose a directory from their computer. 在此程序中,用户可以从计算机中选择目录。 But when I invoke FileChooser (click on executable) I get this error: 但是,当我调用FileChooser(单击可执行文件)时,出现此错误:

GLib-GIO-ERROR**: No GSettings schemas are installed on the system

在此处输入图片说明

and the program terminates. 程序终止。

I visited these pages: 我访问了以下页面:

Glib-GIO-ERROR when opening an file chooser dialog 打开文件选择器对话框时出现Glib-GIO-ERROR

GLib-GIO-ERROR**: No GSettings schemas are installed on the system GLib-GIO-ERROR **:系统上未安装GSettings模式

How deal with FileChooser in GTK with static compilation 如何通过静态编译处理GTK中的FileChooser

But I never understood exactly how to fix this error. 但是我从来不完全了解如何解决此错误。 It is related to org.gtk.Settings.FileChooser.gschema.xml file in this path: ...\\share\\glib-2.0\\schemas . 它与org.gtk.Settings.FileChooser.gschema.xml文件的路径有关: ...\\share\\glib-2.0\\schemas

Is it related to system environment variable ? system environment variable吗? What things should I add to it? 我应该添加些什么?

在此处输入图片说明

Add to system variable or User variable ? 添加到system variable还是User variable What is name and path ? namepath什么?

For example. 例如。 I added GSETTINGS_SCHEMA_DIR as variable name and E:\\Works for Gov Project\\Help\\Source codes for GTK+\\gtk+-bundle_3.4.2-20130513_win64\\share\\glib-2.0\\schemas as path for both of system variable and User variable . 我添加了GSETTINGS_SCHEMA_DIR作为variable name并将E:\\Works for Gov Project\\Help\\Source codes for GTK+\\gtk+-bundle_3.4.2-20130513_win64\\share\\glib-2.0\\schemas作为system variableUser variable path

Is this correct? 这个对吗?

I solved it: 我解决了:

First: add GSETTINGS_SCHEMA_DIR as variable name and E:\\Works for Gov Project\\Help\\Source codes for GTK+\\gtk+-bundle_3.4.2-20130513_win64\\share\\glib-2.0\\schemas as path for User variable . 首先:添加GSETTINGS_SCHEMA_DIR作为variable name并将E:\\Works for Gov Project\\Help\\Source codes for GTK+\\gtk+-bundle_3.4.2-20130513_win64\\share\\glib-2.0\\schemas作为User variable path

Then, in system variable ---> path add E:\\Works for Gov Project\\Help\\Source codes for GTK+\\gtk+-bundle_3.4.2-20130513_win64\\share\\glib-2.0\\schemas with ; 然后,在system variable ---> path E:\\Works for Gov Project\\Help\\Source codes for GTK+\\gtk+-bundle_3.4.2-20130513_win64\\share\\glib-2.0\\schemas添加E:\\Works for Gov Project\\Help\\Source codes for GTK+\\gtk+-bundle_3.4.2-20130513_win64\\share\\glib-2.0\\schemas ; in first it, eg ;E:\\Works for Gov Project\\Help\\Source codes for GTK+\\gtk+-bundle_3.4.2-20130513_win64\\share\\glib-2.0\\schemas 首先,例如;E:\\Works for Gov Project\\Help\\Source codes for GTK+\\gtk+-bundle_3.4.2-20130513_win64\\share\\glib-2.0\\schemas

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM