Home

Awesome

Building MiniGUI 5.0

This repo contains some scripts to fetch and build MiniGUI 5.0.x

This instruction assumes that you are using Ubuntu Linux 18.04/20.04/22.04 LTS.

Current Status

Currently, the latest official release of MiniGUI is version 5.0.12.

Main enhancements of MiniGUI Core and its components are as follow:

For more information, please refer to the release notes:

Changes in Version 5.0.x

  1. Version 5.0.12 (2023-05-10)
    • MiniGUI Core:
      • Implement new APIs: GetACharsExtentPointEx(), GetTabbedACharsExtent(), GetTabbedACharsExtentPoint(), and GetTabbedACharsExtentPointEx().
      • Enhance GetTextExtentPoint() and GetTabbedTextExtentPoint() to support BIDI charsets.
      • Tune management of tick count.
      • Fix a typo: Achar2UChar() to AChar2UChar().
    • mGPlus: Tune code for C++ 17.
    • mGEff: Fix missing headers in Makefile.am.
  2. Version 5.0.11 (2022-12-31)
    • MiniGUI Core:
      • Fix some bugs.
  3. Version 5.0.10 (2022-09-30)
    • MiniGUI Core:
      • Enhance fbcon engine to use double buffering and SyncUpdate method.
      • Cleanup and enhance shadow engine to use SyncUpdate method.
      • Fix some bugs for Threads mode and virtual window.
      • Fix some compilation warnings/errors against GCC 12.
    • mg-tests:
      • Add the run-auto-tests.sh script to run some tests automatically.
      • Add new test programs in api/ directory.
  4. Version 5.0.9 (2022-01-14)
    • MiniGUI Core:
      • Fix a crash bug in InitSubDC().
    • mgncs4touch: remove settingtableview sample.
  5. Version 5.0.8
    • MiniGUI Core:
      • Support for WebP image format based on libwebp.
      • Support for two ARM64-based hardware platforms: PX30 and R818.
      • New surface pixel format for main window: ST_PIXEL_XRGB565 under compositing schema.
      • Some optimizations and tunnings.
    • minigui-test: new test program for loading various images.
  6. Version 5.0.6
    • MiniGUI Core: Enhancement and optimize FillBox, BitBlt, and StretchBlt by using Pixman.
    • MiniGUI Core: Animations when switching layers for the compositing schema.
    • minigui-res: add fine-tuned Chinese font from iekie.
  7. Version 5.0.5
    • MiniGUI Core: Adjust values of WS_XXX to avoid conflict.
  8. Version 5.0.4
    • MiniGUI Core: Fixed a few minor bugs and add a new IAL engine for single touch screen.
  9. Version 5.0.3
    • MiniGUI Core: Fixed a few minor bugs and made some enhancements.
    • mg-tests: Merge comm-engines-freertos from @ehello for FreeRTOS.
    • mg-demos: Merge softkbd2 from @Iorest to use RIME input engine.

Known issues

The following known issues all about hardware cursor of DRM engine:

Upcoming features

We plan to develop the following features in the subsequent releases:

Building MiniGUI

Prerequisites

You should run apt install <package_name> to install the following packages on your Ubuntu Linux.

You can run the following commands to install all above software packages on Ubuntu 18.04/20.04/22.04:

$ sudo apt install git g++ binutils autoconf automake libtool make cmake pkg-config
$ sudo apt install libgtk2.0-dev
$ sudo apt install libjpeg-dev libpng-dev libwebp-dev libfreetype-dev libharfbuzz-dev
$ sudo apt install libinput-dev libdrm-dev libsqlite3-dev libxml2-dev libssl-dev

On Fedora use

$ sudo dnf install git gcc-c++ binutils autoconf automake libtool make cmake pkgconf
$ sudo dnf install gtk2-devel
$ sudo dnf install libjpeg-devel libpng-devel libwebp-devel freetype-devel harfbuzz-devel
$ sudo dnf install libinput-devel libdrm-devel sqlite-devel libxml2-devel openssl-devel

Note that the gtk2 package is used by the virtual frame buffer program gvfb.

Building steps

Please make sure that you can visit GitHub and you can do sudo on your Linux box.

  1. Clone this repo from GitHub:
$ git clone https://github.com/VincentWei/build-minigui-5.0.git
$ cd build-minigui-5.0/
  1. Copy config.sh to myconfig.sh and edit myconfig.sh to match your needs:
$ cp config.sh myconfig.sh

Note that we found the mirrors from our GitLab repositories to GitHub were often broken due to the well known fire wall. So you can change your myconfig.sh file to use our GitLab site directly:

# Use this if you want to use our GitLab site via HTTPS
REPO_URL=https://gitlab.fmsoft.cn/VincentWei
  1. Run fetch-all.sh to fetch all source from GitHub:
$ ./fetch-all.sh
  1. Run build-deps.sh to build and install gvfb, chipmunk:
$ ./build-deps.sh
  1. Run build-minigui.sh to build MiniGUI 5.0:
$ ./build-minigui.sh
  1. Run mguxdemo:
$ cd cell-phone-ux-demo/
$ ./mginit

When there were some updates in the remote repos, you can run update-all.sh to update them. You can run clean-all.sh to uninstall and clean them.

Note that you might need to run ldconfig to refresh the shared libraries cache before running mguxdemo or other MiniGUI applications.

Options for build-minigui.sh script

You can pass some options to build-minigui.sh script to specify the compile-time configuration options of MiniGUI Core.

If you did not specify the options, it will use the following default options:

procs compositing virtualwindow

The options above have the following meanings:

The script uses a simple method for the traditional autoconf options:

For example, if you want to build MiniGUI as standalone runtime mode and without support for cursor, you can use the following command:

$ ./build-minigui.sh sa -cursor

Notes for demos

For the sample of compositing schema, please refer to mg-tests:

$ cd mg-tests/compositing/
$ ./mginit trackbar

Welcome to MiniGUI 5.0

or

$ cd mg-tests/compositing/
$ ./mginit auto

Dynamic Wallpaper

You can also run other samples, demos, or test programs in mg-samples, mg-demos or mg-tests.

Note that if you configured MiniGUI as a runtime mode other than MiniGUI-Processes, please use the following commands to run mguxdemo

$ cd cell-phone-ux-demo/
$ ./mguxdemo

Also note that if you choose a different location to install gvfb, be sure to update exec_file in MiniGUI.cfg.

Commands to build dependencies

The following steps are those ones in build-deps.sh. We list them here just for your information:

  1. Make and install gvfb:
$ cd gvfb
$ cmake .
$ make; sudo make install
$ cd ..
  1. Make and install chipmunk library (DO NOT use the chipmunk-dev package which is provided by Ubuntu):
$ cd 3rd-party/chipmunk
$ cmake .
$ make; sudo make install
$ cd ../..

Cross Building

MiniGUI 5.0.x can run on lots of CPUs with different architectures, such as ARM, MIPS and so on, after cross compiled. There is a directory named cross-build/, in which there are some scripts for cross building.

As an example, there is a directory name arm-r16-linux, which means: This directory is for ARM-based SoC r16, and the operating system is Linux. In this directory, there are two scripts for download packages, and build MiniGUI 5.0.x for ARM version. You can read the README.md in this directory for details:

Of course you can build your own directory for your CPU and OS.

Change Log

Currently, this repo just includes some scripts to build MiniGUI 5.0.x core, components, and demonstration apps.

Copying

Copyright (C) 2018 ~ 2022 Beijing FMSoft Technologies Co., Ltd.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Special Statement

The above open source or free software license does not apply to any entity in the Exception List published by Beijing FMSoft Technologies Co., Ltd.

If you are or the entity you represent is listed in the Exception List, the above open source or free software license does not apply to you or the entity you represent. Regardless of the purpose, you should not use the software in any way whatsoever, including but not limited to downloading, viewing, copying, distributing, compiling, and running. If you have already downloaded it, you MUST destroy all of its copies.

The Exception List is published by FMSoft and may be updated from time to time. For more information, please see https://www.fmsoft.cn/exception-list.

Other Notes

Also note that the software in 3rd-party/ may use different licenses. Please refer to the LICENSE or COPYING files in the source trees for more information.

Note that the software fetched from remote repositories may use different licenses. Please refer to the LICENSE or COPYING files in the source trees for more information.