Giter VIP home page Giter VIP logo

mruby-gosu's Introduction

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)

mruby-gosu's People

Contributors

cyberarm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

chadowo

mruby-gosu's Issues

Add a License

Currently, there's no license present in this mgem, it would be nice if you could choose one for it (that's it, if you intend for the mgem to be open to use).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.