Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Extending Gosu / Deploying RMagick on OS X
- By codekitchen Date 2008-12-10 16:59 Edited 2009-02-10 03:40
The app bundle template that comes with Gosu is a nice touch, it was a cinch to package my game up into an OS X app. However, has anybody ever successfully bundled up a game that uses rmagick? My head swims trying to sort out all the rmagick dependencies and building a self-contained rmagick lib has been an epic fail on my part.

(I've changed the subject so it is easier to find. --jlnr)
- By jlnr (dev) Date 2008-12-10 22:38
In the first RubyWeekend compo, a team did just that on Windows, which kind of worked. The route to go there seems to be to compile an RMagick DLL that doesn't require the registry but just uses its containing directory to look for plugins (duh, why isn't that the default?). But since Windows has a completely different RMagick gem, that's just a side note :)

For OS X, I haven't really experimented so far, but asked the RMagick RubyForge board how one could approach that a while ago: http://rubyforge.org/forum/forum.php?thread_id=26872&forum_id=32

If you give it a try let me know, I probably won't get to it this year, though I'll move it up on my ToDo list since it has been asked a number of times!
- By codekitchen Date 2008-12-11 06:26
Good info in that link. I gave it a shot tonight but didn't have much luck, I spent a couple hours trying to work through cryptic libtool errors before I got burned out. Maybe somebody who understands libtool voodoo better than I might have more luck, here's my automated build script thus far:

http://gist.github.com/34621

Maddeningly, the libtool errors come at the very end, when linking the final ImageMagick binary. "unsupported hardcode properties" whatever that means. Maybe later when I'm not so sick of the idea, I'll try doing an intel-only build and see if that works.
- By codekitchen Date 2008-12-12 23:15
For some reason I just can't let this one go :D

I've updated the script at http://gist.github.com/34621, it now successfully builds a completely static RMagick with zero external dependencies! Intel only though, I just don't understand the errors I get from libtool when trying to do a universal build. Includes the freetype, jpeg and png libraries, wouldn't be too hard to add tiff, etc. It would rock if somebody with better skills than I could get this building universal.

Oh yeah, you might have to add extra --without flags to the configure command for ImageMagick to avoid pulling in shared libs, for instance I have graphviz installed in /usr/local so I had to add --without-gvc to avoid a dependency on that shared library.
- By jlnr (dev) Date 2009-02-11 23:27
I updated the script to use newer versions of all libraries where necessary, some of the links were broken already. http://pastie.org/386550
- By jlnr (dev) Date 2009-02-21 13:39
I have a created a universal bundle with the help of shawn42 (thanks!) that I'll attach to this post. Unfortunately, it still doesn't work on Tiger:


**********

Host Name:      powerbook-g4-12
Date/Time:      2009-02-21 14:32:26.488 +0100
OS Version:     10.4.11 (Build 8S165)
Report Version: 4

Command: RubyGosu Deployment Template
Path:    /Users/x/Desktop/Medal of Anna.app/Contents/MacOS/RubyGosu Deployment Template
Parent:  WindowServer [54]

Version: ??? (1.0)

PID:    204
Thread: Unknown

Link (dyld) error:

Symbol not found: _pread$UNIX2003
  Referenced from: ./RMagick2.bundle
  Expected in: /usr/lib/libSystem.B.dylib

**********


Looks like it should be built using the libs and headers from the MacOS10.4.sdk. I have access to a Tiger Intel machine and will play around with this some more :)
- By philomory Date 2009-02-23 16:26
This is really neat, if you manage to get it working on Tiger too that'd be awesome. I'd try it myself, but I'm still working on that SDL build :-p
Up Topic Gosu / Extending Gosu / Deploying RMagick on OS X

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill