This is the Ruby bindings of the SFML library developed and maintained by Groogy
I hope you enjoy using rbSFML. If you make anything in it then we are very interested in hearing about it. We can always be reached at http://www.sfml-dev.org/forum for support, ideas or just have a nice chat.
If you have questions or need help then please post it on the forum or write us an email. The issue tracker is for bugs and suggestions only please. If you are uncertain then write it on the forum instead.
Dependencies
Of course this means this library depends on SFML so you'll have to install SFML2 on your development machine in order to compile rbSFML.
Recommended is this setup: (lowers or highers versions might work too)
Installation
Windows
-
Install Ruby. The simple Ruby Installer works fine.
-
Open
cmd
and navigate to a folder where you want to install rbSFML source files. -
Clone this repository with
git clone git@github.com:Groogy/rbSFML.git
. -
Ensure that your C++ compiler's location is in your PATH environment variable. Run
rake verbose
to see what compiler Ruby thinks you have. If the SFML headers and libraries are not in your compiler's default search paths, set theSFML_INCLUDE
andSFML_LIB
environment variables to their locations. You might have to do this as ell for GLEW if it as well is not in the search path. -
Run one of the following commands in your terminal:
-
rake
- Build all SFML as shared libraries (need DLLs) - recommended. -
rake static
- Build all SFML as static libraries (don't need DLLs).
-
If you built SFML as a shared library, you will need the SFML DLLs in your PATH in order to
require
any of the rbSFML files (this can be accomplished by copying them to the directory where rbSFML is beingrequire
d). -
Run
rake test
to ensure everything is working and thenrake install
to put the generated files somewhere Ruby can find it.
Linux
-
Install Ruby. If your flavor of Linux does not provide a package for this (which is unlikely), you can compile Ruby from source and follow its instructions for installation.
-
You must have a recent build of SFML installed. If your flavor of Linux does not provide a package for this (which is likely), you will need to compile SFML from source and follow its instructions for installation.
-
Ensure that the SFML headers and libraries are in your C++ compiler's search paths. The easiest way is to try compiling and running a simple SFML app.
-
Navigate to a folder where you want to install rbSFML source files.
-
Clone this repository with
git clone git@github.com:Groogy/rbSFML.git
. -
From the rbSFML directory, run one of the following commands in your terminal:
-
rake
- Build all SFML as shared libraries.
-
Run
rake test
to ensure everything is working and thenrake install
to put the generated files somewhere Ruby can find it. -
You can build the documentation (at doc/frames.html) with
rake doc
and run the samples withrake samples
.
Questions?
Contact
Groogy: