Bogue
is a GUI library for the programming language ocaml
.
You can install it easily with
opam install bogue
To discover how to use Bogue, read the introduction, the documentation (API), or a simple example.
The library is constantly evolving. If you want to use the latest development version, it’s quite easy, read below. The source code is hosted in github.
Bogue uses the cross-platform library SDL, so in principle it can be used everywhere SDL and ocaml can be installed: Linux, Mac OS, Windows… However, it has only be tested for Linux, and a few tweaks will certainly be necessary to port it to other platforms. Any help on this matter will be greatly appreciated.
You need a working ocaml
installation with opam
, see the ocaml doc. Then, make sure you have dune
, tsdl
, tsdl-image
and tsdl-ttf
:
opam install dune tsdl tsdl-image tsdl-ttf
Download the latest git archive, unzip it, cd into the bogue-master
dir, and then:
dune build
opam install .
See this for old instructions that should probably be updated…
The default version of SDL2 shipped by this system is too old to run Bogue
. You should install a more recent version from https://github.com/libsdl-org/SDL/releases/tag/release-2.26.1, for instance this one
An easy way is to first try
opam install bogue
This will eventually fail, but in the meantime it will install the dev packages required to compile SDL2. Then unpack the downloaded SDL2 archive, cd
into it, and
./configure; make; sudo make install
After this you should be able to:
opam install bogue
successfully.
When running in a VirtualBox environment, sometimes SDL fails with Couldn't find matching GLX visual
It can usually be solved with
export SDL_VIDEO_X11_VISUALID=
If everything looks too small, it means that your screen DPI was not correctly detected. Just create a bogue.conf
file with the following content:
### BOGUE version SOMEVERSION
SCALE = 2.5
(the SOMEVERSION
can be anything. Of course, you can adjust the “2.5” to whatever scale you need.)