PDA

View Full Version : Install NG on Mac OS X


steve_d555
November 18th, 2005, 06:58 PM
I'm posting the modified SGE and Ruby versions.

For rubyw (the modified Cocoa enabled ruby) do
tar -xzvf ruby-1.8.3-cocoa.tar.gz
cd ruby-1.8.3
autoconf
./configure --prefix=/usr --program-suffix=-1.8.3 --build=powerpc-apple-darwin7.0
make ruby-1.8.3
make rubyw-1.8.3
sudo install rubyw-1.8.3 /usr/bin/


If need be before installing rubyw you should install ruby with

sudo make install

The program-suffix is needed because OS X has an already built (but slightly broken) Ruby binary. Prefix can also be changed.

Now... SGE.

tar -xzvf sge030809-macosx.tar.gz
cd sge030809
make shared
sudo make install


Now you should append the prefix in which you installed SGE (i.e. /usr/lib) to DYLD_LIBRARY_PATH in your .bash_profile or .bashrc.

Like so
echo "export DYLD_LIBRARY_PATH=(path in which installed):$DYLD_LIBRARY_PATH" >> ~/.bash_profile (or ~/.bashrc)


If DYLD_LIBRARY_PATH is unset you can remove ":$DYLD_LIBRARY_PATH" from the command.

After all these you can install Rubysdl according to regular directions.

*Note: SGE and RubySDL need SDL installed (I haven't tried using the Mac OS X package SDL gives or Fink, I have only tried DarwinPorts)

*Files:
Ruby (http://www.steviedizzle.com/osx/ruby-1.8.3-cocoa.tar.gz)
SGE (http://www.steviedizzle.com/osx/sge030809-macosx.tar.gz)

BTW: If you do get this to work please post here with the version of OS X as I only have 10.3.9 and am wondering if it works on others.

UPDATE: Rubyw instructions are outdated please use RSDL (http://www.kumaryu.net/cgi-bin/diary/files/rsdl.tar.gz)

steve_d555
February 3rd, 2006, 09:49 PM
Update for Mac OS X Tiger 10.4.4:

The installations should go fine (haven't tested yet), but executing rubyw-1.8.3 will not execute because of __cg_jpeg_resync_to_restart

If this happens you have to find the libPNG.dylib and libJPEG.dylib that DarwinPorts installed (or Fink) delete them (they are only symbolic links) and do
ln -s /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib libjpeg.dylib
ln -s /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libpng.dylib libpng.dylib


These two commands link the libs to Tiger's preinstalled libs and NG should work again :D

steve_d555
March 1st, 2006, 09:48 PM
Seems some other people have ventured a try at getting Ruby/SDL and Mac OS X playing together and have done slightly better than me.

There are two sets of instructions that are both good, one for darwinports, the other without.

Non-DarwinPorts (http://inquirylabs.com/blog2005/?p=21)
DarwinPorts instructions. (http://www.ralphdouglass.com/static_content/rubysdl_on_osx)

Of course you can still use my instructions and instead of using my modified Ruby-1.8.3 you can install rsdl and it should still work perfectly (working here).