Skip to content

cyberarm/mruby-gosu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mruby-gosu

mruby wrapper around Gosu

Status:

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.cmake to change set(CMAKE_INSTALL_PREFIX "/usr/local") to set(CMAKE_INSTALL_PREFIX "/usr") before running sudo 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 Release for x86 or x64 with Visual Studio 19 or 22
  • Copy the built gosu-ffi.lib file into to the /gosu/lib/ directory or /gosu/lib64/ for x64
  • Visual Studio should have placed Gosu.lib into 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.dll and SDL2.dll into /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)

About

mruby wrapper around Gosu

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published