最近一直在搭建minigui开发环境,今天早上终于出来了,写个博客纪念下。
搭建这个环境需要至少需要以下三个文件(前提是安装了其他必须的编译环境,qt-dev-tools):
libminigui-gpl-3.0.12.tar.gz
minigui-res-be-3.0.12.tar.gz
mg-samples-3.0.12.tar.gz
这个博客是值得参考的:https://www.cnblogs.com/xuyh/p/3660168.html
记住第三个文件不要去官网下载。我的就是在官网下载的,但是一直出错,其他的错误一般百度都能找到。
(1)安装 libminigui-gpl-3.0.12.tar.gz
tar zxvf libminigui-gpl-3.0.12.tar.gz
cd libminigui-gpl-3.0.12
./configure
{报错:
Going to generate license pictures ...
./configure: line 15530: ./runme.sh: No such file or directory
WARNING: failed to generate license pictures.
(无视之)}
make
make install
(2) 安装minigui-res-be-3.0.12.tar.gz
tar zxvf minigui-res-be-3.0.12.tar.gz
cd minigui-res-be-3.0.12
./configure
make
make install
成功以后则在“ls /usr/local/lib”看到minigui的库文件
修改默认库路径
修改你的 /etc/ld.so.conf 文件,在里面最后新加入一行 /usr/local/lib
然后在终端执行ldconfig
(3)安装mg-samples-3.0.12.tar.gz
tar zxf mg-samples-1.3.0.tar.gz
cd mg-samples-3.0.12
Make
{报错:
checking pkg-config is at least version 0.9.0... yes
checking for MINIGUI... configure: error: Package requirements (minigui >= 3.0.10) were not met:
No package 'minigui' found
}
解决方法:export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
./configure
Make
{报错:
dlgdemo.c:40:27: 错误:mgplus/mgplus.h:没有那个文件或目录
make[2]: *** [dlgdemo.o] 错误 1
make[2]: Leaving directory `/mnt/hgfs/F/mg-samples-3.0.12/ctrl_dlg'
make[1]: *** [all-recursive] 错误 1
make[1]: Leaving directory `/mnt/hgfs/F/mg-samples-3.0.12/ctrl_dlg'
make: *** [all-recursive] 错误 1
}
解决办法:vim ctrl_dlg/dlgdemo.c ,注释掉mgplus/mgplus.h
make
make install
(4)安装 qvfb2-2.0.tar.gz
tar zxvf qvfb2-2.0.tar.gz
cd qvfb2-2.0
./configure
{报错:
checking for Qt... configure: error: Qt (>= Qt 3.0.3) (headers and libraries) not found. Please check your installation!
}
解决办法:需要首先安装一个qt-devel-3.3.8-4.fc7.i386.rpm
rpm -iv qt-devel-3.3.8-4.fc7.i386.rpm --force --nodeps
rm /usr/lib/qt-3.3/lib/libqt-mt.so
ln -s /usr/lib/qt-3.3/lib/libqt-mt.so.3.3.6 /usr/lib/qt-3.3/lib/libqt-mt.so
ls -l /usr/lib/qt-3.3/lib/
./configure --with-qt-includes=/usr/lib/qt-3.3/include --with-qt-libraries=/usr/lib/qt-3.3/lib --with-qt-dir=/usr/lib/qt-3.3
这个时候就不会有错误了
make
make install
(5)运行mg-samples-3.0.12里面的housekepper可执行程序测试之:
{
报错:
start-qvfb :/usr/local/bin/gvfb2 pcxvfb 4194 XVFB-for-MiniGUI-3.0-(Gtk-Version) 800x600-16bpp
execlp error!!
execl: No such file or directory
NEWGAL>PCXVFB: Wait too long for CLIENT.
NEWGAL: Does not find matched engine: pc_xvfb.
KERNEL>InitGUI: Can not get graphics engine information!
}
解决办法:vim /usr/local/etc/MiniGUI.cfg ,
其中一句话修改成exec_file = /usr/local/bin/qvfb2
6).libminigui-gpl-3.0.12.tar.gz配置
#./configure --prefix=/home/colin/minigui/lib_x86/ --enable-procs --enable-videoqvfb --enable-qvfbial --disable-splash --disable-screensaver./configure --prefix=/home/colin/minigui/lib_x86/ --with-osname=linux --with-targetname=qvfb --enable-qvfbial=yes --enable-autoial=yes --enable-videofbcon=yes --enable-videoqvfb=yes --enable-debug=yes --enable-pcxvfb=no --enable-static=yes
make
make install