2018-06-17 15:19:51 +02:00
|
|
|
# libutils for WiiU homebrew. (WUT edition)
|
|
|
|
[![Build Status](https://travis-ci.org/Maschell/libutils.svg?branch=wut)](https://travis-ci.org/Maschell/libutils)
|
2017-11-18 13:23:06 +01:00
|
|
|
|
2017-10-29 09:24:06 +01:00
|
|
|
This is a library for common functions.
|
|
|
|
|
|
|
|
## Features
|
|
|
|
|
|
|
|
- FS utility functions
|
|
|
|
- Multiple language support via gettext
|
|
|
|
- Common system functions (Exception handler, memory functions, Thread wrapper etc.)
|
|
|
|
- String tools
|
|
|
|
|
|
|
|
## Logging usage
|
|
|
|
To able to use the logging, you need to compile the target application with follow C/C++ flag:
|
|
|
|
```
|
|
|
|
-D__LOGGING__
|
|
|
|
```
|
|
|
|
|
|
|
|
Usage in the application:
|
|
|
|
```
|
2018-06-17 15:19:51 +02:00
|
|
|
socket_lib_init();
|
2017-10-29 09:24:06 +01:00
|
|
|
log_init(); // Enables broadcast logging.
|
2018-08-01 20:47:39 +02:00
|
|
|
log_printf("Just prints this text\n");
|
2017-10-29 09:24:06 +01:00
|
|
|
DEBUG_FUNCTION_LINE("This prints my current function, file and line\n");
|
|
|
|
```
|
|
|
|
|
|
|
|
Read the logs via the [udp_debug_reader](https://github.com/dimok789/loadiine_gx2/tree/master/udp_debug_reader).
|
|
|
|
|
|
|
|
## Usage (TODO)
|
|
|
|
|
2017-10-29 10:25:54 +01:00
|
|
|
Link the application with
|
|
|
|
|
|
|
|
```
|
2018-06-17 15:19:51 +02:00
|
|
|
-lutilswut
|
2017-10-29 10:25:54 +01:00
|
|
|
```
|
|
|
|
|
2017-11-11 16:18:37 +01:00
|
|
|
You also need to add the include path to your Makefile. Example:
|
|
|
|
|
|
|
|
```
|
2018-06-17 15:19:51 +02:00
|
|
|
export INCLUDE := [...] -I$(WUT_ROOT)/include/libutils
|
2017-11-11 16:18:37 +01:00
|
|
|
```
|
|
|
|
|
2017-10-29 09:24:06 +01:00
|
|
|
Check out the header for more information.
|
|
|
|
|
|
|
|
## Compiling
|
|
|
|
|
2018-06-17 15:19:51 +02:00
|
|
|
For compiling and using this lib, you need the [wut](https://github.com/decaf-emu/wut) installed.
|
2017-10-29 09:24:06 +01:00
|
|
|
|
2018-06-17 15:19:51 +02:00
|
|
|
Install this static library into your wut folder via:
|
2017-10-29 09:24:06 +01:00
|
|
|
|
|
|
|
```
|
2018-06-17 15:19:51 +02:00
|
|
|
mkdir build && cd build
|
|
|
|
cmake -DCMAKE_TOOLCHAIN_FILE=$WUT_ROOT/share/wut.toolchain.cmake -DCMAKE_INSTALL_PREFIX=$WUT_ROOT ../
|
|
|
|
make install
|
2017-10-29 09:24:06 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## Dependencies
|
|
|
|
|
2018-06-17 15:19:51 +02:00
|
|
|
- [wut](https://github.com/decaf-emu/wut)
|
2017-10-29 09:24:06 +01:00
|
|
|
|
|
|
|
# Credits (TODO)
|
|
|
|
|
|
|
|
- Serveral users
|