1. 需要下载的组件
首先需要这些安装包,这些安装包可以在MiniGUI官网上下载。
libminigui-gpl-3_0_12.tar.gz
mg-samples-3_0_12.tar.gz
freetype-1_3_1.tar.gz
jpegsrc_v7.tar.gz
libpng-1_2_37.tar.gz
minigui-res-be-3_0_12.tar.gz
zlib-1_2_2.tar.gz
qvfb2-2.0
libmgplus-1.2.4
2.安装各组件
<1>libminigui-gpl-3_0_12.tar.gz(库)
./configure --prefix=/usr/local --enable-qvfbial --disable-splash --disable-screensaver
sudo make
sudo make install
<2>minigui-res-be-3_0_12.tar.gz(资源包)
./configure --prefix=/usr/local
sudo make
sudo make install
<3>freetype-1_3_1.tar.gz
./configure --prefix=/usr/local
sudo make
sudo make install
<4>安装PNG库
./configure --prefix=/usr/local
sudo make
sudo make install
<5>安装JPEG库
./configure --prefix=/usr/local --enable-shared
sudo make
sudo make install
<6>安装zlib库
./configure --prefix=/usr/local
sudo make
sudo make install
<7>libmgplus-1.2.4
./configure --prefix=/usr/local
sudo make
sudo make install
将/usr/local/lib加入到.bashrc中
<8>安装qvfb2
(因为需要qt-3.3作支持,所以需要先安libqt3-mt,libqt3-mt-dev,下载qt-devel-3.3.8-4.fc7.i386.rpm,然后用alien转为deb,再用dpkg -i --force-overwrite 来安装此包)
sudo apt-get install libqt3-mt
sudo apt-get install libqt3-mt-dev
sudo apt-get install alien
sudo alien qt-devel-3.3.8-4.fc7.i386.rpm
dpkg -i --force-overwrite qt-devel-3.3.8-4.fc7.i386.deb
(开始安qvfb)
cd qvfb2-2.0
./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
sudo make
sudo make install
进入目录,配置
./configure
出现如下错误
checking for Qt... configure: error: Qt (>= Qt 3.0.3) (headers and libraries) not found. Please check your installation!
For more details about this problem, look at the end of config.log.
Qvfb2需要qt3支持,需要安装libqt3-mt-dev libqt3-mt
安装libqt3-mt-dev libqt3-mt
#sudo apt-get install libqt3-mt-dev libqt3-mt
重新配置
./configure
同样出现上面的错误,后查资料发现需要制定qt3 include目录和lib目录.
更改成如下配置命令
./configure --with-qt-includes=/usr/share/qt3/include/ --with-qt-libraries=/usr/share/qt3/lib
配置通过
#make
#make install
在 MiniGUI 应用程序启动时,MiniGUI 优先查找当前目录下的 MiniGUI.cfg 文件、
用户主目录下的 .MiniGUI.cfg 文件,其次是 /usr/local/etc/MiniGUI.cfg,
最后是 /etc/MiniGUI.cfg 文件。如果用户没有在当前目录及自己的主目录下建立
对应的 MiniGUI.cfg 文件,则通常情况下,/usr/local/etc/MiniGUI.cfg 文件就是
MiniGUI 所使用的默认运行时配置文件
[system]
# GAL engine and default options
gal_engine=pc_xvfb
defaultmode=800x600-16bpp
# IAL engine
ial_engine=pc_xvfb
mdev=/dev/input/mice
mtype=IMPS2
[fbcon]
defaultmode=1024x768-16bpp
[qvfb]
defaultmode=640x480-16bpp
display=0
#{{ifdef _MGGAL_PCXVFB
[pc_xvfb]
defaultmode=800x600-16bpp
window_caption=XVFB-for-MiniGUI-3.0-(Gtk-Version)
exec_file=/usr/local/bin/qvfb2 //修改这里,指向qvfb2的路径
#}}
2.运行demo程序
./same
start-qvfb :/usr/local/bin/qvfb2 pcxvfb 13997 XVFB-for-MiniGUI-3.0-(Gtk-Version) 800x600-16bpp
成功