|
2 years ago | |
---|---|---|
include | 2 years ago | |
meson | 2 years ago | |
src | 2 years ago | |
.gitignore | 2 years ago | |
.lvimrc | 2 years ago | |
LICENSE | 4 years ago | |
README.md | 2 years ago | |
build | 2 years ago | |
meson.build | 2 years ago |
Hi. My name is boksi. I am a C89 cross platform library for putting a message box on the screen.
On Windows and OSX, native guis exist that boksi takes advantage of to put a message box on the screen. On other posix operating systems, however, life is more difficult - We don't know if we'll have access to X11, Wayland, GTK, QT, etc. etc. Therefore, on operating systems like bsd and linux, boksi uses libdynload to attempt to find a usable library.
Boksi, by default, will exhaustively try every method it's been compiled with. It will create a message box if one is at all possible.
Putting a message box on-screen can be extremely useful when attempting to communicate some clearly-understood error message to a non-highly-technical user. For example, a game that fails to get a valid rendering context due to lack of a graphics card can pop up an error message explaining this to the user.
#include <boksi.h>
int main()
{
return boksi(BOKSI_INFO, "Here's a fun message to display");
}
For more complex usage, see src/example/complex.c
To build, you will need the following dependencies:
Optionally, you may want some of the following dev packages:
"Dynload" is also required to build, but it is automatically grabbed by the build script and statically compiled in.
By default, boksi will output as a .a file. It's recommended to use this to statically link against boksi for simplicity. Boksi's permissive MIT license should allow that with basically any software.
To build:
./build -r libboksi.a
The output file will be in lib/libboksi.a
To build the examples, just leave off the 'libboksi.a'.
You may want to cross compile for Windows or OSX. Windows cross compilation assumes 'MXE', OSX assumes 'osxcross'.
./build -w libboksi.a
./build -w64 libboksi.a
./build -o libboksi.a
Meson can also generate a .so if you really need one.