Login
Building Benben
Login

Building Benben

Requirements

Benben has been developed with Crystal 1.8.x and later in mind. Previous versions will likely work, but may require a bit of tweaking.

Regardless of your Crystal version, you will need an updated version of the Shards command that has Fossil support built into it. Support was introduced in Shards 0.17.1. If you have problems, you can always use my personal fork of Shards as a temporary measure.

Fossil is required as some of Benben's dependencies are in Fossil repositories.

These libraries will need to be installed as well:

Note: only Linux is officially supported at the moment. Other platforms may build successfully, but you may need to change some of the source files in either Benben, or its dependencies.

Tips for Building On a BSD System

The ZStandard bindings require some Bash scripts to run in order to be built, and thus Bash needs to be installed. These scripts are also written to expect Bash to be located at /bin/bash, so you will either need to ensure Bash is there (or symlinked there), or modify lib/zstd/build/*.sh accordingly.

Benben has been successfully built and used on Dragonfly BSD v6.4 using Crystal v1.5.1, and by disabling PulseAudio support by invoking the build process using rake benben[speed,pulseaudio]. Other BSD systems may also work but are not tested.

Getting the sources

$ fossil clone https://chiselapp.com/user/MistressRemilia/repository/benben/
$ cd benben

Building with Rake

Using Rake is the easier way to build Benben. For a default build, you can just run rake from the root repository directory. The binary will be in the bin/ directory.

The default target is benben, and it has it two options. The first option can be one of four values:

The second option can be used to disable certain audio drivers. At least one audio driver must be enabled. The default will include all supported audio drivers. Multiple drivers can be separated with a colon.

Examples of setting these:

There are also a few other targets:

Example Commands

# Build a release version of Benben.
$ rake

# Release build without PulseAudio support
$ rake benben[speed,pulseaudio]

# Debug build
$ rake benben[debug]

# List all of the targets
$ rake -T

Building manually with Shards

You can forego using Rake if you choose and just use Shards directly. When doing this, it's important to be aware of a few compiler flags:

Examples:

$ shards build --release --no-debug -p -Dpreview_mt -Dyunosynth_wd40

$ shards build -p -Dpreview_mt -Dbenben_no_pulse_audio -Dremisound_no_pulseaudio

$ shards build -p -Dpreview_mt -Dyunosynth_debug