glade-2:安裝經驗

前言:

最近需要修改Gtk程序的界面,界面文件是.ui格式,是glade工具自動生成的。

使用系統自帶的Glade工具,發現工具版本與界面源碼版本不同:
在這裏插入圖片描述

查看Glade版本爲:
在這裏插入圖片描述
使用高版Glade工具修改低版本源碼,會導致很多部件不支持。

所以需要我們安裝低版本的Glade工具。

建議大家使用:

glade-2.5.1glade-2.6.0glade-2.12.2


首先提供Glade-2源碼下載地址:

https://launchpad.net/glade-2/+download

本人下載測試了很多版本:

glade-2.0.2

 glade-2.5.1
 
glade-2.6.0

glade-2.9.0

glade-2.10.0

glade-2.12.2

glade-2.0.2

其中 glade-2.0.2 編譯時報錯:

checking for libxml-2.0 >= 2.4.1 gtk+-2.0 < 2.4.0... Requested 'gtk+-2.0 < 2.4.0' but version of GTK+ is 2.24.32
configure: error: Library requirements (libxml-2.0 >= 2.4.1 gtk+-2.0 < 2.4.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.


要求Gtk版本小於2.4.0, 當前環境大於該版本,沒有處理該問題。更換其他版本的glade


其他版本編譯時報錯:

configure: error: Couldn't find scrollkeeper-config, please install the scrollkeeper package

提示沒有 scrollkeeper庫。

scrollkeeper 下載地址:

https://sourceforge.net/projects/scrollkeeper/files/scrollkeeper/0.3.14/

下載.tar.gz 源碼包,解壓,然後:

 ./configure --prefix=/usr/local --localstatedir=/usr/local/var

make

sudo make install

安裝編譯完scrollkeeper後,繼續編譯glade


運行報錯:

其中glade-2.10.0glade-2.9.0


(glade-2:26386): Gtk-WARNING **: 11:16:47.404: GtkSpinButton: setting an adjustment with non-zero page size is deprecated

(glade-2:26386): Gtk-WARNING **: 11:16:47.405: GtkSpinButton: setting an adjustment with non-zero page size is deprecated

(glade-2:26386): Gtk-WARNING **: 11:16:47.592: Theme directory 16x16@2x/actions of theme ukui-icon-theme has no size field


(glade-2:26386): Gtk-WARNING **: 11:16:47.592: Theme directory 14x14@2x/animations of theme ukui-icon-theme has no size field

double free or corruption (out)
已放棄

沒有再去看軟件源碼,解決該問題。

不建議大家使用上述兩個版本


運行正常版本:

glade-2.5.1glade-2.6.0glade-2.12.2運行無報錯,正常使用。

在這裏插入圖片描述


附錄:

1. scrollkeeper 相關:

https://sourceforge.net/p/scrollkeeper/mailman/scrollkeeper-devel/?viewmonth=200204

2. Glade 2 2.5.0

https://launchpad.net/glade-2/main/2.5.0

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章