zoukankan      html  css  js  c++  java
  • Linux下MiniGUI库的安装

    Linux下MiniGUI库的安装

    今天试了下安装MiniGUI的库

    先仿照官网的教程安装

    传送门:MiniGUI官网

    一、配置依赖环境

    安装构建工具

    apt install binutils autoconf automake libtool make cmake pkg-config
    #注意这里的apt我配置了alias,alias apt="sudo apt",以下用到apt均是,不再说明
    

    安装依赖库

    这里的安装,还有个libpng12-dev (libpng-dev on Ubuntu 18.04 instead),但是我用的是WSL(Windows Subsystem Linux)的Ubuntu 18.04,安装的时候说没有这个库

    apt install libgtk2.0-dev libjpeg-dev libpng12-dev libpng-dev libfreetype6-dev libinput-dev libdrm-dev libsqlite3-dev libxml2-dev libssl1.0-dev electric-fence
    

    二、安装MiniGUI

    克隆源码

    git clone git@github.com:VincentWei/build-minigui-4.0.git
    

    但是在我电脑上没试成功,后面我在github找到了它的源码

    传送门:项目目录

    然后克隆下载

    编译安装

    这里因为是从github上面的,所以就不按照官网的教程来了。按照Github上面项目的README

    ./autogen.sh
    
    ./configure; make; sudo make install
    #这里需要注意,我这里这个用户是没有根目录的权限的。所以使用sudo make install
    

    三、配置

    以上的安装环境是看官方的说明完成的,基本上没有什么问题吧。

    下面的配置是我看了这篇文章写的

    安装qvfb

    apt install qt4-dev-tools
    

    修改配置文件

    cd minigui
    cp etc/MiniGUI.cfg /etc/
    
    ...
    [system]
     # GAL engine and default options
     # The equivalent environment variable: MG_GAL_ENGINE
     # gal_engine=pc_xvfb
     gal_engine=qvfb
     # The equivalent environment variable: MG_DEFAULTMODE
     defaultmode=800x600-16bpp
    
     # IAL engine
     # The equivalent environment variable: MG_IAL_ENGINE
     # ial_engine=pc_xvfb
     ial_engine=qvfb
     mdev=/dev/input/mice
     mtype=IMPS2
    ...
    

    四、运行编译运行例程

    先下载官方的示例代码

    mg-samples-5.0.0.tar.gz

    这个页面的这个东西MiniGUI 5.0.3->MiniGUI Samples (V5.0.0)这里

    然后解压

    tar -zxf mg-samples-5.0.0.tar.gz
    cd mg-samples-5.0.0
    

    就可以了

    configure 和 make

    按照上面的文章说明,这样配置一下

    ./configure --prefix=/home/username/install PKG_CONFIG_PATH=/home/username/install/minigui/lib/pkgconfig CPPFLAGS=-l/usr/local/include/minigui
    

    然后就报错了,如下

    kevin@ubuntu:~/Application/mg-samples-5.0.0 $ ./configure --prefix=/home/kevin/install PKG_CONFIG_PATH=/home/kevin/install/minigui/lib/pkgconfig CPPFLAGS=-l/usr/local/include/minigui
    checking build system type... x86_64-pc-linux-gnu
    checking host system type... x86_64-pc-linux-gnu
    checking target system type... x86_64-pc-linux-gnu
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    checking whether make sets $(MAKE)... (cached) yes
    checking for gcc... gcc
    checking whether the C compiler works... no
    configure: error: in `/home/kevin/Application/mg-samples-5.0.0':
    configure: error: C compiler cannot create executables
    See `config.log' for more details
    kevin@ubuntu:~/Application/mg-samples-5.0.0 $
    

    五、总结

    那么今天的MiniGUI的学习就到此为止了,虽然最后没有跑起一个例程。但是还是挺有意思的,可以学习一下一个普通的GUI库的安装和编译,也是挺好的。

  • 相关阅读:
    每日日报2020.9.30 1905
    每日日报2020.10.7 1905
    每日日报2020.10.2 1905
    每日日报2020.9.28 1905
    程序员修炼之道:从小工到专家 九月读书心得 1905
    每日日报2020.9.27 1905
    每日日报2020.9.29 1905
    每日日报2020.10.6 1905
    每日日报2020.10.5 1905
    每日总结2
  • 原文地址:https://www.cnblogs.com/nbtech/p/Linux_MiniGUI_Install.html
Copyright © 2011-2022 走看看