occasionally useful ruby, ubuntu, etc

28Jun/085

Partial success!

For a good chunk of yesterday, I was trying to ""port"" my exceedlingly simple Ruby application to Windows. The hitch? It uses Gosu (game engine), Chipmunk (physics engine), ImageMagick (popular graphics tool), and RMagick (wrapper for ImageMagick in Ruby). With the help of RubyScript2Exe it almost, almost worked. Gosu and Chipmunk had no problem, as they had no-strings-attached .so files and apparently were programmed well. ImageMagick, despite trying to be a pain in the ass by making me include an extra dozen DLLs in my project folder, actually did end up working. But RMagick...when moving the generated app to a new computer that didn't have ImageMagick installed freaked out with a weird "address not accessible" error or something. After some fiddling I gave it up as a lost cause and dropped support for ImageMagick+RMagick. The only reason they were there in the first place is because I wanted to load SVG files whenever possible, and possibly have some dynamic graphic generation, but...the former isn't that great anyway, and the latter will have to be done other ways, if at all.

So, yes, Ruby+Gosu+Chipmunk play just fine with RubyScript2Exe on both Windows and Linux.

Comments (5) Trackbacks (0)
  1. Hello,
    I’m pounding my head on the wall with the same situation, I’m using rmagick to process images in my wxRuby application, after used tar2rubyscript and rubyscript2exe it worked well on my machine, but when move to another machine, it throw out some exception like ‘stack over flow’ with rmagick.
    Any suggestion on that case since your last post? please help. I’m desperating on finding solution for that stuff.
    Thanks,
    Du Huynh

  2. Unfortunately, I never did revisit this in an attempt to get this to work. I wouldn’t give up hope, though, as there are RMagick and ImageMagick gems/libraries built specifically for Windows. If you could code your script so that it loads a different gem based on your platform, you may end up with a working solution. Just a thought. Sorry I can’t be of more help, but I am curious if that works out for you.

    http://rubyforge.org/projects/rmagick/ has the win32 gem
    http://www.imagemagick.org/script/binary-releases.php#windows has the windows imagemagick binary

    Good luck!

  3. oh, thanks for your quick response.
    i will give it a try to my stuff.

  4. Solved.
    Change to another solution :install image_science with FreeImage required. Its functions look fit to my requirement. Now i can port to another machine.
    Thanks
    Du

  5. Not familiar with that tool, but I’ll have to check it out. Thanks for following up!


Leave a comment


No trackbacks yet.