This first post will demonstrate how to install everything for local development on macOS (intel) and Linux (Ubuntu 64bit) and how to run an application.

macOS prerequisites

You need to install CMAKE and ninja. But first things first, install brew if you don’t have it yet:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Then:

brew install cmake
brew install ninja

Linux prerequisites

sudo apt-get install git
sudo apt-get install g++
sudo apt-get install cmake ninja-build
sudo apt-get install libboost-system-dev libboost-filesystem-dev
sudo apt-get install xorg-dev

For both platforms

Now you’re ready to clone the repository:

git clone --recurse-submodules https://github.com/arielm/chronotext-cross

To be done each time a terminal is started (will set the CROSS_PATH variable):

cd path/to/chronotext-cross
source setup.sh

Finally, it’s time to build the chronotext-cross library. It must be done the first time you clone the repository, or when you pull from the repository, or after you make your own changes.

For macOS:

cd $CROSS_PATH/core/src
./build.osx.release.sh

For Linux:

cd $CROSS_PATH/core/src
./build.linux.sh

The resulting files will be written into the tree submodule folder.

TL;DR

That’s it, pick an application from the tests folder, e.g.

cd $CROSS_PATH/tests/TestingTriangle

And, for macOS:

RUN_TEST -DPLATFORM=osx

For Linux:

RUN_TEST -DPLATFORM=linux

You should see a nice colored triangle! To leave, close the window or press escape.

The resulting executable files will be respectively in build/osx or build/linux.