Howto install QT 4.2 and QtRuby 1.4.6 on Mac OS X Tiger
I had some (minor?) trouble to get QtRuby 1.4.6 and QT 4.2 running on my Mac (PowerPC, 10.4.8). However, with some help from Richard Dale (thank you!) and the Korundum forum I got it working.
Install QT 4.2
First, download QT 4.2 for your Mac. Unpack it and configure it with at least the “-no-framework” option, the remaining parameters are as far as I know up to you. And DON’T use the -prefix option (some people recommended this to put it in /Developer/qt), otherwise QtRuby 1.4.6 won’t find the QT stuff (Default installation path of QT is currently /usr/local/Trolltech/Qt-4.2.0).
> ./configure -no-framework -system-zlib -qt-gif -qt-libpng -no-debug \ -no-stl -no-exceptions -fast > make > sudo make install > export QTDIR=/usr/local/Trolltech/Qt-4.2.0 > export PATH=$QTDIR/bin:$PATH</code>
Install QtRuby
Note: This is only to get version <=1.4.6 to work !!!
- Fix missing headers – don’t link them, copy them (otherwise the build script will fail!)
> sudo cp /usr/lib/ruby/1.8/universal-darwin8.0/*.h /usr/lib/ruby/1.8/powerpc-darwin8.0
- Check out some updates of kalyptus we need to add to QtRuby Release 1.4.6
svn co -r 588725 svn://anonsvn.kde.org/home/kde/trunk/KDE/kdebindings/kalyptus/
- Download qt4-qtruby 1.4.6 and unpack
- Copy from the previous svn checkout the files “kalyptus” and “kalyptusCxxToSmoke.pm” into the kalyptus folder of qtruby
- According to this article we need to comment out the main() function of qtruby/bin/qtrubyinit.cpp
- In the root of qt4-qtruby you run:
> ./configure --with-smoke="qt" --enable-mac --with-qt-dir=/usr/local/Trolltech/Qt-4.2.0 > make > make install > cd /ruby/lib/ruby/site_ruby/1.8/powerpc-darwin8.0 > sudo mv qtruby.so qtruby.bundle
- Test your Qt installation:
> irb irb(main):001:0> require 'Qt' a = Qt::Application.new(ARGV) hello = Qt::PushButton.new("Hello World!", nil) hello.resize(150, 50) hello.show() a.exec()
Enjoy playing with QtRuby ;)
Thanks to all developers making this possible and thanks for the support!