Skip to content

carobim/carob-testing

Repository files navigation

Carob Testing

MIT Licensed Build Status LoC

A tech demo world for Carob.

Setup

Cloning

git clone --recurse-submodules https://github.com/carobim/carob-testing.git
cd carob-testing

Acquiring Autumn_Forest.oga

From the root directory:

Method 1: Use yt-dlp and ffmpeg

# macOS
brew install yt-dlp
brew install ffmpeg
cd data/music
yt-dlp -x -f 22 -o Autumn_Forest.mp4 'https://www.youtube.com/watch?v=v2qOllkxwiw'
ffmpeg -i Autumn_Forest.m4a -c:a libvorbis Autumn_Forest.oga
cd ../..

Method 2: Download from pdm.me

# macOS
cd data/music
curl -O https://pdm.me/Autumn_Forest.oga
cd ../..
# Ubuntu
cd data/music
wget https://pdm.me/Autumn_Forest.oga
cd ../..

Installing build and runtime dependencies

# macOS
brew install sdl2 sdl2_image sdl2_mixer
# Ubuntu
sudo apt-get install cmake g++ make pkg-config libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev

Building

From the root directory:

Compile:

# macOS
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DAV_SDL2=On
make
cd ..
# Ubuntu
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DAV_SDL2=On
make
cd ..

Build the resources:

carob/scripts/build-config.sh
carob/scripts/build-world.sh

Build the application bundle/install to bin:

# macOS
carob/scripts/build-bundle-debug.sh
# Ubuntu
cp build-debug/carob bin/

Running

Using a GUI file manager

On macOS, open Carob.app in Finder.

On Ubuntu, open bin/carob in Files.

Using a terminal

# macOS
Carob.app/Contents/MacOS/Carob
# Ubuntu
cd bin
./carob

Debugging

From the root directory:

# macOS
lldb Carob.app/Contents/MacOS/Carob
# Ubuntu
cd bin
gdb ./carob

TODO

  • Windows instructions

About

Sample world for Carob

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published