Configure GUIslice for RPi & LINUX - ImpulseAdventure/GUIslice GitHub Wiki
Overview > Configuring GUIslice >
Configuring GUIslice for Raspberry Pi & LINUX
The following are the basic steps necessary to configure GUIslice to run on a RPi or LINUX environment.
- In this particular version of the guide, an RPi with PiTFT display has been selected, using SDL1.2 as the display driver and tslib as the touch driver.
- NOTE: This page is under development, so please check back again for updates.
Step 1: Installing Prerequisites
Ensure SDL1.2 and tslib are installed (see Installing GUIslice)
Step 2: Select display and touch driver for your display
- For the moment, let's assume we want the RPi running SDL1.2 using tslib for touch handling:
- Edit
/src/GUIslice_config.h
and uncomment the following line in the Raspberry Pi / LINUX section: #include "../configs/rpi-sdl1-default-tslib.h"
Step 3: Test basic SDL operation
cd examples/linux
make test_sdl1
sudo ./test_sdl1
If all works well, this should produce a color gradient on the display and then automatically exit after 2 seconds. Note that this test is using a simple example of SDL drawing without using the GUIslice library. If this example doesn't work, then GUIslice won't work, so it is important that we first ensure the basic SDL graphics library is operational.
Step 4: Test basic GUIslice operation
Build the first GUIslice example:
- This will default to SDL1.2 and tslib
- To select alternate build options, please see Compiling under LINUX
make ex01_lnx_basic
sudo ./ex01_lnx_basic
- If all works well, this should produce a grey background, white-framed black box that automatically exits after 2 seconds.
Step 5: Test basic GUIslice touch operation
Now we are ready to test touch support:
- Build and run
ex02_lnx_btn_txt
- If all works well, you will see a similar screen but with a blue button. Pressing the blue button should highlight it and then exit the program.
Step 6: Test other GUIslice features
Finally, we can run many of the other GUIslice examples: eg. ex07_lnx_slider