libgui/README.md

59 lines
2.0 KiB
Markdown
Raw Normal View History

2017-10-29 10:28:14 +01:00
# libgui
2017-11-19 11:13:38 +01:00
[![Build Status](https://travis-ci.org/Maschell/libgui.svg?branch=master)](https://travis-ci.org/Maschell/libgui)
2017-10-29 10:28:14 +01:00
## Usage
Following steps are required for initialization:
```C
2017-10-29 10:28:14 +01:00
InitOSFunctionPointers(); // Load OS functions
InitPadScoreFunctionPointers();
InitVPadFunctionPointers(); // Input functions for GUI control
InitFSFunctionPointers(); // To load file from the SD Card
InitGX2FunctionPointers(); // For rendering
InitAXFunctionPointers(); // For sound
mount_sd_fat("sd"); // Mounting the SD Card
memoryInitialize(); // Initialize memory management
//DO GUI STUFF HERE!
memoryRelease();
unmount_sd_fat("sd");
```
Link the application with:
```Makefile
2019-05-14 22:01:01 +02:00
-lgui -lutils -ldynamiclibs -lfreetype -lgd -lpng -ljpeg -lz -lmad -lvorbisidec -logg -lbz2
2017-10-29 10:28:14 +01:00
```
2017-11-11 16:18:13 +01:00
You also need to add the include path to your Makefile. Example:
```Makefile
2017-11-11 16:18:13 +01:00
export INCLUDE := [...] -I$(PORTLIBS)/include/freetype2 \
-I$(PORTLIBS)/include/libgui \
-I$(PORTLIBS)/include
```
2017-10-29 10:28:14 +01:00
TODO: provide more information
## Dependencies
To be able to use libgui, you need to install the following dependencies:
- Application needs to be loaded from the [homebrew_launcher](https://github.com/dimok789/homebrew_launcher)
- [libutils](https://github.com/Maschell/libutils) for common functions.
- [dynamic_libs](https://github.com/Maschell/dynamic_libs/tree/lib) for access to the functions.
2019-05-14 22:01:01 +02:00
- Install the required portlibs via `(dkp) pacman -Syu ppc-zlib ppc-libmad ppc-libogg ppc-libgd ppc-freetype ppc-libjpeg-turbo ppc-libpng ppc-libvorbisidec ppc-glm ppc-bzip2`
2017-10-29 10:28:14 +01:00
2018-09-22 17:44:39 +02:00
# Use the prebuilt files from a Docker image.
The image `wiiulegacy/libgui` on [Docker Hub](https://hub.docker.com/r/wiiulegacy/libgui/) provides a prebuilt library in the `/artifacts` directory. Copy it into your DevkitPPC portlibs folder.
Example:
```
COPY --from=wiiulegacy/libgui:0.1 /artifacts $DEVKITPRO/portlibs
```
2017-10-29 10:28:14 +01:00
# Credits
- Orignally based on https://github.com/dborth/libwiigui
- Wii U port / modification / new functions / sound / much more by dimok.
- Minor changes by Maschell