mruby wrapper around Gosu
Status:
- Compatible with Gosu 1.4.4
- An updated version of Jahmaican's original jCaster fully works.
Usage
Add this mruby gem to your build_config.rb
conf.gem github: "cyberarm/mruby-gosu"
Development
Unix
- Install Gosu as a system library, see wiki.
(Note: may need to edit
gosu/build/cmake_install.cmaketo changeset(CMAKE_INSTALL_PREFIX "/usr/local")toset(CMAKE_INSTALL_PREFIX "/usr")before runningsudo make install)
Sample MRuby Build Configuration
MRuby::Build.new do |conf| conf.toolchain # include the default GEMs conf.gembox "default" conf.gem github: "cyberarm/mruby-gosu" conf.gem github: "mattn/mruby-require" # C compiler settings conf.cc.defines = %w(MRB_USE_DEBUG_HOOK MRB_INT64) conf.enable_debug conf.enable_cxx_abi conf.enable_test end
Windows
- Clone Gosu
- Build Gosu as a
Releaseforx86orx64with Visual Studio 19 or 22 - Copy the built
gosu-ffi.libfile into to the/gosu/lib/directory or/gosu/lib64/forx64 - Visual Studio should have placed
Gosu.libinto the same directory - Open a MSYS2 console or use
$env:Path += ";PATH_TO_UCRT_BIN"in PowerShell - Build MRuby e.g.
rake MRUBY_CONFIG=gosu --verbose - Copy
gosu-ffi.dllandSDL2.dllinto/mruby/bin/
MSYS2 UCRT
Sample MRuby Build configuration
MRuby::Build.new do |conf| conf.toolchain :gcc # include the default GEMs conf.gembox "default" conf.gem github: "cyberarm/mruby-gosu" conf.gem github: "mattn/mruby-require" # C compiler settings conf.cc.defines << "MRB_INT64" conf.cc.flags << "-fpermissive" # Needed for mruby-require conf.enable_cxx_abi conf.enable_debug end
Visual C++
No instructions available yet.
MSYS2 UCRT's instructions might work with MSVC 140 sans :gcc (I had 143 installed)