Stannum

Tutorial

⚠ Work in progress ⚠

This is a short guide for getting started with brix. For a full documentation of brix see the reference manual.

Install brix

Unix

To build from source follow the following steps:

  1. Prerequisites: Brix depends on Lua and SQLite. Make sure that they are already installed on your system. If not, install them using your system's package manager.

  2. Get the source code release from brix-release.7z and extract it.

  3. From the the source code root directory run:

    $ ./bootstrap.sh
  4. Then, as a super-user, run:
    # ./bootstrap.sh install
  5. Verify that brix is installed by running:
    $ brix --version

Windows

Download the binary release from brix-release.exe. Make sure that brix is accessible from the PATH before you proceed.

Simple native project

Custom toolsets

For example, suppose we have a directory of .wav files that we want to transcode to .ogg as part of our build.

bird.wav
click.wav
speech.wav

We create the following brixfile:

return function(p)
	if p == "" then
		target.call("bird.ogg", "click.ogg", "speech.ogg")
	elseif p:ends(".ogg") then
		local out = p:replace_suffix(".ogg", ".wav")
		local in = target.artifact(p)
		os.exec("oggenc", in, "-o", out)
		return { artifacts = out }
	else
		return brix.file(p)
	end
end

Then to encode all the files we would type:

$ brix

To update only click.ogg we would type:

$ brix click.ogg

Note that

$ brix click.wav

will only check the status of click.wav without generating the .ogg.