(未完成,待修改)
$ wget http://sourceforge.net/projects/minigui/files/minigui/GPL-V1.6.10/libminigui-1.6.10.tar.gz
$ wget http://sourceforge.net/projects/minigui/files/minigui/GPL-V1.6.10/minigui-res-1.6.10.tar.gz
$ wget http://sourceforge.net/projects/minigui/files/minigui/GPL-V1.6.10/mg-samples-1.6.10.tar.gz
$ mkdir minigui
$ cp libminigui-1.6.10.tar.gz minigui
$ cp minigui-res-1.6.10.tar.gz minigui
$ cp mg-samples-1.6.10.tar.gz minigui
$ cd minigui
$ tar xzvf libminigui-1.6.10.tar.gz minigui
$ cd libminigui-1.6.10/
$ ./configure
$ make
$ sudo make install
$ cd ..
$ tar xzvf mg-samples-1.6.10.tar.gz
$ cd mg-samples-1.6.10/
$ make
$ cd src
$ ./simplekey
./simplekey: error while loading shared libraries: libminigui-1.6.so.10: cannot open shared object file: No such file or directory
(原因是:ld.so.conf没有加入 /usr/local/lib;或者没有运行ldconfig更新库的链接。see http://blog.csdn.net/huangsihua/archive/2009/03/09/3974358.aspx)
$ LD_LIBRARY_PATH=/usr/local/lib ./simplekey
NEWGAL:Does not find matched engine: qvfb.
InitGUI: Can not get graphics engine information!
(原因是:没有装qvfb)
$ sudo apt-get install qt3-dev-tools-embedded
$ qvfb --help
$ qvfb &
Using display 0
(此时弹出另一个叫"Virtual framebuffer"的窗口)
$ LD_LIBRARY_PATH=/usr/local/lib ./simplekey
NEWGAL: Video mode smaller than requested
NEWGAL: Set video mode failure.
InitGUI: Can not initialize graphics engine!
(意思是,图像抽象层即输出层认为qvfb虚拟的界面太小)
(解决办法,qvfb->菜单->File->Configure...->Size选择640*480 "VGA")
$ LD_LIBRARY_PATH=/usr/local/lib ./simplekey
GDI: Error in loading raw bitmap fonts
GDI: Can not initialize raw bitmap fonts
InitGUI: Initialization of GDI failure!
InitGUI failure when using /usr/local/etc/MiniGUI.cfg as cfg file.
(意思是,找不到资源图片,因为还没有装minigui-res资源包)
$ cd ../..
$ tar xzvf minigui-res-1.6.10.tar.gz
$ cd minigui-res-1.6.10/
$ sudo make install
(默认安装在/usr/local/lib/minigui/res,可以用cat README查看)
$ cd ..
$ cd mg-samples-1.6.10/src
$ LD_LIBRARY_PATH=/usr/local/lib ./simplekey
(此时qvfb中显示窗口demo of using key)
(在上面敲键盘,控制台输出类似信息:
MGS_KEYDOWN: key 29
MGS_KEYUP: key 29
)
(按Ctrl+C退出控制台程序,qvfb界面输出内容会被冻结,
但内容不会刷掉,等待下一次启动)
参考资料:
1. MiniGUI官方网站
2. ubuntu上minigui调试环境的建立
http://blogold.chinaunix.net/u1/38038/showart_1329854.html
3. MINIGUI常见错误集及解决方法
http://blog.csdn.net/huangsihua/archive/2009/03/09/3974358.aspx