Ubuntu下编译MINIGUI

使用的Ubuntu版本是 Ubuntu12 i686 

本流程只为Ubuntu,不包含其他linux发行版。

有很大一部分是摘抄,本文章摘抄的地址为:https://www.cnblogs.com/xuyh/p/3660168.html

编译安装MINIGUI

需要下载的源码:

http://www.minigui.org/en/download/

这三个都下载下来。

Ubuntu下编译MINIGUI

(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

sudo 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

sudo make install

成功以后则在“ls /usr/local/lib”看到minigui的库文件

修改默认库路径

修改你的 /etc/ld.so.conf 文件,在里面最后新加入一行 /usr/local/lib

然后在终端执行

sudo 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

 

到这里以后就开始出问题了。因为我用的linux发型版是Ubuntu12  i686的,这个包是i386的,根本就用不了。

我也搜到了这个包的下载源地址,也没有编译好的i686可以下载。

即使把qt-devel-3.3.8-4.fc7.i386.rpm 转换成dpkg也不行。 

因为对应的lib里面的软连接是错误的,根们就没有合适的libqt-mt.so.3.3.8和libqui.so.1.0.0

Ubuntu下编译MINIGUI

后面的下载资源包中,我提供了rpm和转换好的dpkg下载地址。

最后找了一大圈,只能自己编译了。编译方法见后续。

此时可以看看/usr/share 里面有没有这个文件。 /usr/share/qt3

(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

修改完后再测试

 

安装编译 qt-x11-free-3.3.8.tar.gz

下载地址看文章后面

tar -xvf qt-x11-free-3.3.8.tar.gz

./configure

make

会发现类似错误:

../include/qvaluelist.h:424:13: error: ‘ptrdiff_t’ does not name a type

在对应的头文件中加入:#include  “stddef.h

然后再make。 大概会遇到3~4次同样的错误提示,同样在错误文件中加入头文件 stddef.h

原贴地址:http://www.arm9home.net/read.php?tid-16605.html

编译完成以后在当前目录文件中就可以找到

参考地址:https://www.cnblogs.com/buzzerrookie/archive/2012/11/19/2776819.html

安装qt3.3.8

qt安装的真是麻烦啊,自己记下来以后备用吧。

qt的安装包qt-x11-free-3.3.8.tar.gz(我是在这下载的http://www.linuxfromscratch.org/~manuel/new-xsl/blfs-book/x/qt.html),安装环境Ubuntu12.04.1LTS 32位。

先安装x11proto-xext,然后用新立得安装libx11-dev,libxext-dev,再解压qt-x11-free-3.3.8.tar.gz,照着里面的INSTALL安装就好了,期间有错误是error: ‘ptrdiff_t’ does not name a type,参考这个链接http://qt-project.org/forums/viewthread/16992,在出现错误的文件里加上#include <stddef.h>这句就好了。

为了安装libqt-mt,还需要做下一步,sudo apt-get install libqt3-headers libqt3-mt-dev libqt3-compat-headers libqt3-mt,这样就好了。

用 sudo apt-get install qt3-dev-tools 解决/usr/share/qt3的问题


转了一大圈了。再回去qvfb的目录。使用如下命令。

不知道我中间多走路或者走错路没有。反正就是能编译了。

./configure --with-qt-includes=/usr/share/qt3/include --with-qt-libraries=/usr/share/qt3/lib --with-qt-dir=/usr/share/qt3

make

sudo make install


其他资源地址:

QT3 源码下载地址:http://download.qt.io/archive/qt/3/

部分截图:

Ubuntu下编译MINIGUI

QT 一些补丁文件:http://www.linuxfromscratch.org/patches/downloads/qt/

Ubuntu下编译MINIGUI

qt-x11-free-3.3.8.tar.gz