Building The Ming Ruby Extension

I've been trying out Ming SWF output library in PHP for a few days and I thought I would give the Ruby extension a try to see how well it worked. It turns out that it is kind of old and busted but it is fixable.

First you need to download Ming version 0.3.0 and build it.

Once you have the Ming libraries installed you will want to download the Ming/Ruby source from rubyforge. If you try to build the source from the instructions you will get a couple errors because the latest version of the Ruby extension was made for a beta version of Ming and is no longer compatible. Luckily there isn't too much wrong and someone has already figured out how to fix what is wrong. To save you the hop here it is again:

Edit swfmovie.c under the ext/ming/mingc/ directory with the following:

 len = SWFMovie_output(m->this, simpleOutputMethod, NULL, level);

on line 231 should be replaced with:

 len = SWFMovie_output(m->this, simpleOutputMethod, NULL);


 count = SWFMovie_save(m->this, STR2CSTR(s), level);

on line 252 should be replaced with

 count = SWFMovie_save(m->this, STR2CSTR(s));

After making these two changes you should be able to follow the normal installation instructions and run the examples included in the source distribution.

Tags: ,

Leave a Reply

Your email address will not be published.