Skip to content

BeenaShetty/rugui

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RuGUI

RuGUI is a framework which aims to help building desktop applications. RuGUI was mostly inspired by the *Ruby on Rails* framework, taking most of its features from it.

RuGUI approach is to provide a MVC design for the application, separating business logic from application presentation, making it easy to maintain and evolve the application.

Also, a Observer/Observable pattern is implemented so that you can define observable properties in your model which are observed by controllers that should react to changes in the model. This makes the application code even more clean when dealing with applications that have multiple data entry points. For example, when receiving data from a network one may update a value in a model, and the controller will update all needed widgets (progress bars, labels, status bar, etc).

The initial framework was based on the great Ruby/GTK API, but RuGUI has evolved so that you may use other GUI frameworks with it. Since version 1.1.x it has placed all functionality specific for GTK wrapped in a framework adapter. This has made it possible to write a QT adapter and now it is possible to use all of the RuGUI features together with QT. As the framework evolve other framework adapters may be written, enabling the use of RuGUI with any other GUI frameworks.

A basic support for building Rubygame applications was also added. It is still missing some functionality like signal connections and widget creation but it is usable. By using RuGUI you will gain a template directory structure as well some of the features of RuGUI, like configuration, a shell script for running your game, support for Rspec, etc.

Dependencies

RuGUI depends, of course, on the Ruby binding for the GUI framework that you’ll use. When generating an application you may choose which framework you’ll want to use. By default it will use GTK.

It also requires Ruby >= 1.9.3. When using RVM, you’ll need to add ‘–enable-shared` flag when installing it. Just run:

rvm install 1.9.3 -C --enable-shared

Or, if you already have it installed:

rvm reinstall 1.9.3 -C --enable-shared

Here are the recommended way to install the bindings for each platform:

Mac OS X

We recommend that you use brew:

brew install gtk+         # for GTK
brew install cmake qt     # for Qt4
brew install sdl          # for Rubygame

For Rubygame you may also want to install some other SDL related libraries:

brew install sdl_gfx sdl_image sdl_mixer sdl_net sdl_rtf sdl_sound sdl_ttf

Linux

TODO: Describe linux installation instructions for GTK, Qt4 and Rubygame

Windows

TODO: Describe windows installation instructions for GTK, Qt4 and Rubygame

Installation

Install the gem (still in beta):

gem install rugui -v 2.0.0.beta3

To check if the installation was successful type in a console:

rugui -v

Generating an Application

To generate an application, go to the directory where you want to create the application and type:

rugui <app_name>

For more options type (including changing GUI framework):

rugui -h

Next cd into your application and run:

bundle install

You’ll surely want to use RVM.

After all gems are installed you can run your application by:

rake run

Testing

RuGUI ships with support for RSpec, just add specs to spec/ dir and you’re ready to go!

Contributing

In order to run RuGUI framework specs, you just need to fork the repository, clone it to your machine, then after installing all dependencies, run:

bundle install
rake spec

If all specs pass, then you’re good to go and contribute by sending a pull request!

More info

rugui.org

About

RuGUI is a framework which aims to help building desktop applications.

Resources

License

Stars

Watchers

Forks

Packages

No packages published