diff options
| author | realtradam <[email protected]> | 2022-01-06 12:11:52 -0500 |
|---|---|---|
| committer | realtradam <[email protected]> | 2022-01-06 12:11:52 -0500 |
| commit | 3a5b8018c4db077ef65f9c55aa5293a014e93e45 (patch) | |
| tree | 8eea34afbff0839a1cb58ff6f5ea22f5f0b66b81 | |
| parent | 1370defaec04fe085fd4d6f56ca10725649ff6ee (diff) | |
| download | sample-mruby-gem-3a5b8018c4db077ef65f9c55aa5293a014e93e45.tar.gz sample-mruby-gem-3a5b8018c4db077ef65f9c55aa5293a014e93e45.zip | |
.
| -rw-r--r-- | README.mdown | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/README.mdown b/README.mdown index 423ecc6..2c9a382 100644 --- a/README.mdown +++ b/README.mdown @@ -4,6 +4,12 @@ Making this gem was a part of the process of figuring out how to make my own dis Special thanks to [Arnold](https://github.com/arngo) and [Egg](https://github.com/jali-clarke) for helping with this. +## Step 0: Compile Raylib + +Ignore this step if you arent using using raylib for your C library. + +Build and install raylib using [these instructions](https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux). Make sure to install the "Dynamic shared version". + ## Step 1: Making the gem Make the mruby gem following the instructions from [here](https://github.com/mruby/mruby/blob/master/doc/guides/mrbgems.md) and you can use the examples from [here](https://github.com/mruby/mruby/tree/master/examples/mrbgems) for help. First I made the gem with just ruby and get that to compile(will explain later), then make the gem with C and get that to compile, and finally make the gem with C calling functions from the raylib library. @@ -14,25 +20,25 @@ Clone the [mruby](https://github.com/mruby/mruby) repo. Inside here we will need ```ruby MRuby::Build.new do |conf| - # load specific toolchain settings - conf.toolchain - - # Use mrbgems - disable_lock # disables being stuck on a single commit - conf.gem :core => 'mruby-bin-mirb' - conf.gem :git => '[email protected]:realtradam/sample-mruby-gem.git', :branch => 'test', :options => '-v' - - # include the GEM box - conf.gembox 'default' - - # Linker settings - conf.linker do |linker| - linker.command = ENV['LD'] || 'gcc' - linker.flags = ['-lraylib -lGL -lm -lpthread -ldl -lrt -lX11'] - end - - conf.enable_bintest - conf.enable_test +# load specific toolchain settings +conf.toolchain + +# Use mrbgems +disable_lock # disables being stuck on a single commit +conf.gem :core => 'mruby-bin-mirb' +conf.gem :git => '[email protected]:realtradam/sample-mruby-gem.git', :branch => 'test', :options => '-v' + +# include the GEM box +conf.gembox 'default' + +# Linker settings +conf.linker do |linker| +linker.command = ENV['LD'] || 'gcc' +linker.flags = ['-lraylib -lGL -lm -lpthread -ldl -lrt -lX11'] +end + +conf.enable_bintest +conf.enable_test end ``` |
