Skip to content

Compiling on Linux

Chadow edited this page Dec 14, 2023 · 10 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.so and ffi/libgosu-ffi.so to lib64/

Building The Wrapper

Get the source code from releases page and extract it, on the vendor directory, under mruby/ put libmruby.a, and create another directory there named gosu, as you guessed, the .so files we built earlier will go there. then proceed to create the build directory in the source code directory, and cd to it, then do the following:

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 .so files with the binary, so just grab them from the vendor/gosu directory and put them with your binary. Simple as that.

Clone this wiki locally