First, you need to download the MiniGUI package: idea
First, you need to download the MiniGUI package:
Http://www.minigui.com/download/libminigui-1.3.3.tar.gz
Http://www.minigui.com/download/minigui-res-1.3.3.tar.gz
You have registered the two packages on www.minigui.com before you can download them. You can register them for free.
Http://www.minigui.com/downloads/minigui13/mde-1.3.0.tar.gzgraphic interface program
Small Example of http://www.minigui.com/downloads/minigui13/mg-samples-1.3.0.tar.gz
Create a new working directory under/home/
[User] # mkdir-p/home/minigui
Unlock libminigui-1.3.3.tar.gz
[User] # tar zxf libminigui-1.3.3.tar.gz
[User] # tar zxf minigui-res-1.3.3.tar.gz
Compile libminigui. This is the library file necessary for minigui to run and must be compiled successfully.
[User] # cd libminigui-1.3.3
[User] #. /configure // The simplest compilation method, which can be configured by itself. The default Thread mode instead of Lite mode is used here, because this method is most convenient to use on PC machines, move the back to the board and change it to Lite mode.
Pay attention to the output on the screen, especially the following
Checking for FrameBuffer console support... yes
Checking for pthread library... yes
Checking for TT_FreeType_Version in-lttf... yes
Checking for T1_InitLib in-lt1. .. no
Checking for every _std_error in-ljpeg... yes
Checking for png_check_sig in-lpng... yes
Among them,-lttf-lpng must be yes, otherwise your program will be faulty. If it is not yes, it may be that the corresponding library is not installed.
Note: If the library is correctly installed, it is still displayed as no, for example, checking for png_check_sig in-lpng... no
Solution: Use vi to access the configure file, find the png file, and modify it in the following bold area.
If test "x $ build_png_support "! = "Xno"; then
Echo "$ as_me: $ LINENO: checking for png_check_sig in-lpng"> & 5
Echo $ ECHO_N "checking for png_check_sig in-lpng... $ ECHO_C"> & 6
If test "$ {ac_cv_lib_png_png_check_sig + set}" = set; then
Echo $ ECHO_N "(cached) $ ECHO_C"> & 6
Else
Ac_check_lib_save_LIBS = $ LIBS
# I modified the below line
# LIBS = "-lpng-lm $ LIBS"
LIBS = "-lpng-lm-lz $ LIBS"
Among them, the ttf Library supports TrueType fonts, the png Library supports png images, and the jpeg Library supports jpeng graphics, both of which are required in MiniGui, these two are also required for cross-compiling at the end of the Board. Otherwise, your program cannot run.
If yes is passed in the./configure result, the following command is compiled and executed.
# Make
# Make install
If no is displayed in the./configure result, you need to manually add these libraries:
Install zlib library
The zlib library is the basis for compiling later libraries. First install this library.
Package: zlib-1.2.3.tar.gz
# Tar zxf zlib-1.2.3.tar.gz
# Cd zlib-1.2.3
#./Configure
# Make
# Make install
Install freetype Library
The decompression steps are the same.
The following errors may occur during make:
1. Error 1:
X11/Xlib. h: No such file or directory
Solution:
Sudo apt-get install libx11-dev
2. Error 2:
Ftdump. c: 172: 1: pasting "." and "glyph_object" does not give a valid preprocessing token
Ftdump. c: 182: 1: pasting "." and "first_instance" does not give a valid preprocessing token
Ftdump. c: 191: 1: pasting "." and "second_instance" does not give a valid preprocessing token
Ftdump. c: 201: 1: pasting "." and "face_object" does not give a valid preprocessing token
Ftdump. c: 202: 1: pasting "." and "glyph_object" does not give a valid preprocessing token
Ftdump. c: 203: 1: pasting "." and "second_instance" does not give a valid preprocessing token
Ftdump. c: 863: 1: pasting "." and "initial_overhead" does not give a valid preprocessing token
Ftdump. c: 882: 1: pasting "." and "face_object" does not give a valid preprocessing token
Make [1]: *** [ftdump. o] Error 1
Make [1]: Leaving directory/software/freetype-1.3.1/Test'
Make: *** [tttest] Error 2
Solution:
Modify Makefile:
1. Remove tttest FROM all: ttlib tttest ttpo.
2. Delete
Install:
Cd $ (FTLIBDIR); $ (MAKE)-f $ (MAKEFILE) install
Cd $ (FTTESTDIR); $ (MAKE)-f $ (MAKEFILE) install
Cd $ (FTPODIR); $ (MAKE) uninstall
Cd $ (FTTESTDIR); $ (MAKE)-f $ (MAKEFILE) install
Install png Library
Package: libpng-1.0.10rc1.tar.gz
Libpng does not provide a valid configure script, so you have to change the Makefile file by yourself.
# Cp scripts/makefile. linux Makefile // copy a makefile under Scripts and change it by yourself. In Ubuntu, you do not need to modify the [Linux community http://www.linuxidc.com]
# Make
# Make install
Install jpeg Library
Installation Package: jpegsrc.v6b.tar.gz
# Cd jpeg-6b
#./Configure-perfix =/usr/local-enable-shared
# Make
# Make install
Reinstall libminigui
After all the supported libraries are installed, enter the libminigui folder again. After running the configure command, yes is displayed for the supported libraries installed.
#./Configure
Checking for FrameBuffer console support... yes
Checking for pthread library... yes
Checking for TT_FreeType_Version in-lttf... yes
Checking for T1_InitLib in-lt1. .. no
Checking for every _std_error in-ljpeg... yes
Checking for png_check_sig in-lpng... yes
# Make
The following errors may occur during compilation:
......
Freetype. c: 47: 41: freetype1/freetype. h: No such file or directory
Freetype. c: 48: 40: freetype1/freetype/ftxkern. h: No such file or directory
Freetype. c: 49: 41: freetype1/freetype/ftnameid. h: No such file or directory
Freetype. c: 50: 40: freetype1/freetype/ftxcmap. h: No such file or directory
Freetype. c: 51: 41: freetype1/freetype/ftxwidth. h: No such file or directory
......
Make [3]: *** [freetype. lo] Error 1
Make [3]: Leaving directory '/root/Minigui/libminigui-1.3.3/src/font'
Make [2]: *** [install-recursive] Error 1
Make [2]: Leaving directory '/root/Minigui/libminigui-1.3.3/src/font'
Make [1]: *** [install-recursive] Error 1
Make [1]: Leaving directory '/root/Minigui/libminigui-1.3.3/src'
Make: *** [install-recursive] Error 1