Skip to content

Compiling On MacOS

Chadow edited this page Dec 19, 2023 · 9 revisions

Contents

  1. Building Gosu
  2. Building The Wrapper
  3. Distributing

Building Gosu

Requirements

See.

Building

Get the source code from the releases page then extract it on some place, make sure the directory is named gosu after the extraction. Create a directory named build/, cd to it and:

cmake ..
make

Then move the generated libgosu.dylib and ffi/libgosu-ffi.dylib to lib64/

Building The Wrapper

Get the source code from releases page and extract it, on the vendor directory, create another directory there named gosu, as you guessed, the .dylib files we built earlier will go there. then proceed to build the project as usual.

mkdir build
cd build
cmake ..
make

And that's it!

Distributing

Since we can't expect every person to ever run the compiled binary to have Gosu installed on their system, we'll need to bundle the .dylib files with the binary, using install_name_tool we can tell the executable to look for the dynamic libraries in its directory.

install_name_tool -add_rpath @executable_path/. gosu-mruby

Then, just bundle the .dylibs and you're done.

Clone this wiki locally