1.10 |
There are various ways to get started with EGT depending on your requirements. If you are building EGT on a PC, you can start by just fetching the source of the EGT project. If you are developing for and deploying to a target board, the easiest way to work with EGT is part of a buildroot or Yocto Project SDK which already includes a cross compiler and all of the necessary dependencies and tools.
See Eclipse Development Environment Setup for how to setup the Eclipse IDE for host or cross compiling.
If you are planning to work on EGT itself, see the CONTRIBUTING.md file in the root of the EGT repository.
Source code for EGT is available through the git revision control system. You would need it installed on your system:
Fetch the source:
--recursive
option. This option is necessary to initialize any git submodules in the project. If you forget to do this, autogen.sh will do it for you.EGT is tested on Ubuntu 18.04, but is also known to work on Ubuntu 16.04 as well as other distributions like Debian and Fedora. These instructions should be adjusted accordingly.
EGT uses the GNU Autotools, like automake, for building on Linux platforms.
To build for a PC, first install the required dependencies for building EGT:
Optional, but recommended, EGT Dependencies include:
Then, clone the source and initialize Autotools. Typically Autotools only needs to be initialized once and it will automatically pick up most changes. However, when making changes to the configure scripts, the environment, or makefiles re-running autogen.sh, or more simply autoreconf -fvi
, is necessary.
Then, configure and build.
You can also build out of the source tree. This is useful, for example, to use the same code tree with different parameters and environments to configure the build in as many different build directories as you wish. It also avoids polluting the source tree with build artifacts.
Then, run an example.
EGT also supports cross compilation for target systems. If you already have a cross compiler available with dependent libraries available, add it to your PATH and follow the standard instructions.
You can run "./configure --help" to see more options. Some non-standard options are listed here, but not all.
--enable-code-coverage
--enable-sanitize
--enable-debug
--enable-gcov
--enable-profile
--disable-icons
--enable-examples
--disable-virtualkeyboard
--enable-lto
--enable-lua-bindings
--enable-simd
--enable-snippets
EGT is included as a package as part of the buildroot-external-microchip project. Start building a target filesystem for a board, follow the instructions found in that project's README.
See the configs directory in the buildroot-external-microchip project for a graphics defconfig for your processor and board.
Once the target filesystem is done, run
Extract the SDK. Then:
All files necessary for the target (applications, library, includes and shared resources) are installed in path_to_install_folder.
EGT is included as a package as part of the meta-atmel Yocto layer project. To build a complete SDK and target filesystem for a board, follow the instructions found in that project's README.
Run the SDK script to install it. Then:
All files necessary for the target (applications, library, includes and shared resources) are installed in path_to_install_folder.
The EGT examples can be built for 32 bit or 64 bit Windows on Linux using the mxe project.
For example, to build 64 bit static binaries, this can be done with the x86_64-w64-mingw32.static
target.
The examples folder of the EGT project contains various examples. This is the basic example which shows the minimum necessary to create a window with a button on it.
The include file <egt/ui>
contains most basic functionality needed.
If you want to use a UI file instead.
This documentation is also available in the form of a docset that can be read and searched using a tool like Dash (macOS) and Zeal (macOS/Windows/Linux). In turn, the documentation can be integrated into an IDE or tools like Atom/VSCode for an indexed and easily searchable API reference. These tools also provide a method for automatically or manually updating to the latest EGT documentation.
Once you have one of these tools installed, the docset feed URL is located at:
https://linux4sam.github.io/egt-docs/docset/EGT.xml