2022-02-05 14:28:08 +01:00
|
|
|
[![Publish Docker Image](https://github.com/wiiu-env/libgui/actions/workflows/push_image.yml/badge.svg)](https://github.com/wiiu-env/libgui/actions/workflows/push_image.yml)
|
|
|
|
|
2017-10-29 10:28:14 +01:00
|
|
|
# libgui
|
2018-06-21 20:44:58 +02:00
|
|
|
[![Build Status](https://travis-ci.org/Maschell/libgui.svg?branch=wut)](https://travis-ci.org/Maschell/libgui/tree/wut)
|
2017-10-29 10:28:14 +01:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
Following steps are required for initialization:
|
2018-03-02 01:57:34 +01:00
|
|
|
```C
|
2022-02-05 14:28:08 +01:00
|
|
|
libgui_memoryInitialize(); // Initialize memory management
|
2017-10-29 10:28:14 +01:00
|
|
|
|
|
|
|
//DO GUI STUFF HERE!
|
|
|
|
|
2022-02-05 14:28:08 +01:00
|
|
|
libgui_memoryRelease();
|
2017-10-29 10:28:14 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
Link the application with:
|
2018-03-02 01:57:34 +01:00
|
|
|
```Makefile
|
2019-08-14 23:28:23 +02:00
|
|
|
-lgui -lfreetype -lgd -lpng -ljpeg -lz -lmad -lvorbisidec -logg -lbz2
|
|
|
|
|
2017-10-29 10:28:14 +01:00
|
|
|
```
|
|
|
|
|
2019-08-14 23:28:23 +02:00
|
|
|
You also need to add the freetype2 nclude path to your Makefile. Example:
|
2017-11-11 16:18:13 +01:00
|
|
|
|
2018-03-02 01:57:34 +01:00
|
|
|
```Makefile
|
2019-08-14 23:28:23 +02:00
|
|
|
-I$(PORTLIBS_PATH)/ppc/include/freetype2
|
2017-11-11 16:18:13 +01:00
|
|
|
```
|
|
|
|
|
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:
|
|
|
|
|
2019-08-14 23:28:23 +02:00
|
|
|
- [wut](https://github.com/devkitPro/wut/)
|
2019-05-14 22:26:53 +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
|
|
|
|
2022-02-05 14:28:08 +01:00
|
|
|
## Use this lib in Dockerfiles.
|
|
|
|
A prebuilt version of this lib can found on dockerhub. To use it for your projects, add this to your Dockerfile.
|
|
|
|
```
|
|
|
|
[...]
|
|
|
|
COPY --from=wiiuenv/libgui:[tag] /artifacts $DEVKITPRO
|
|
|
|
[...]
|
|
|
|
```
|
|
|
|
Replace [tag] with a tag you want to use, a list of tags can be found [here](https://hub.docker.com/r/wiiuenv/libgui/tags).
|
|
|
|
It's highly recommended to pin the version to the **latest date** instead of using `latest`.
|
|
|
|
|
|
|
|
## Format the code via docker
|
|
|
|
|
|
|
|
`docker run --rm -v ${PWD}:/src wiiuenv/clang-format:13.0.0-2 -r ./source ./include -i`
|
|
|
|
|
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.
|
2018-03-02 01:57:34 +01:00
|
|
|
- Minor changes by Maschell
|