Stannum/brix/

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

Building from source:

  1. Prerequisites: Brix requires 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 TBD and extract it.

  3. From the the source code root directory run:

    $ ./bootstrap.sh
    # su
    # ./bootstrap.sh install
  4. Verify that brix is installed by running:
    $ brix --version

Windows

Download the binary release from TBD and run the installer. 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
		return { metadeps = { "bird.ogg", "click.ogg", "speech.ogg" } }
	elseif p:ends(".ogg") then
		local out = p:replace_suffix(".ogg", ".wav")
		local in = target(p).output
		os.exec({ "oggenc", in, "-o", out })
		return { output = out }
	else
		return brix.file(p)
	end
end

Then to encode all the files, run:

$ brix

To update only click.ogg, run:

$ brix build click.ogg

Note that

$ brix build click.wav

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