Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Extending Gosu / Mac App Store / gosu and Macruby
- - By jontebol Date 2011-01-25 22:27
Am I the only one who thinks the Mac App Store would be an awesome way of distributing gosu games? :)

And am I incorrect in thinking that if we could only get gosu working with MacRuby, that shouldn't be so difficult?

Anyways, I thought I'd just try it and see if it worked, so I downloaded the latest version of MacRuby, and did a "macgem install gosu". So far so good.

But then it looks for a "gosu.bundle" which it couldn't find, so I got a LoadError... So I just tried putting a symlink there to the "gosu.for_1_9.bundle" bundle... since MacRuby is based on Ruby 1.9.

What I got was this:

dlopen(/Library/Frameworks/MacRuby.framework/Versions/0.8/usr/lib/ruby/Gems/1.9.2/gems/gosu-0.7.26.1-universal-darwin/lib/gosu.bundle, 9): no suitable image found.  Did find:
  /Library/Frameworks/MacRuby.framework/Versions/0.8/usr/lib/ruby/Gems/1.9.2/gems/gosu-0.7.26.1-universal-darwin/lib/gosu.bundle: GC capability mismatch - /Library/Frameworks/MacRuby.framework/Versions/0.8/usr/lib/ruby/Gems/1.9.2/gems/gosu-0.7.26.1-universal-darwin/lib/gosu.bundle (LoadError)

Ok, so that bundle obviously wasn't prepared for MacRuby... The question is, how difficult would it be to make one?
Parent - By jlnr (dev) Date 2011-01-26 06:54
I don't think it'd be very hard, and I agree that MacRuby would be a good match.

Right now, Gosu uses a "standard" extconf.rb file on Linux, and a binary bundle precompiled from an Xcode project on OS X.

I think the easiest way would be to change the extconf.rb so that it will still build all the X11/Linux files on Linux, but the Mac files on OS X. So basically just a "if RUBY_PLATFORM ~= /Darwin/ ..." around the file list, and then using the files from the Xcode project on OS X. Then you can build the gem with "rake linux:gem" and install it locally. All Ruby implementations that can handle binary C extensions should be able to install this gem, so Rubinius users would be happy too.

Just outlining this because I am busy with other tasks for the next week(s), if anyone wants to give it a try I'd gladly accept a patch after some quick testing :)
- By RavensKrag Date 2011-03-02 11:17
Has there been any progress with this?
Up Topic Gosu / Extending Gosu / Mac App Store / gosu and Macruby

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill