Dependencies
-
ruby 1.8 or greater
-
cmake 2.4.6 or greater
-
Qt 4.0 or greater
Configure flags needed
In order to build just qtruby:
Copy the CMakeLists.txt.qtruby file to QCMakeLists.txt, and follow the instructions in the file.
Optionally give cmake and install prefix like this: cmake -DCMAKE_INSTALL_PREFIX=/opt/kde4
Then type 'make'
Building on Mac OS X
Ryutaro Amano wrote this about creating a double clickable bundle:
“Thanks all, I have succeeded make rubyw. sample script is launched in foreground. And I have known the following steps to launch qt-ruby script by double clicking from Finder.
As an example, I take qtruby-1.0.11/qtruby/rubylib/tutorial/t14
cd qtruby-1.0.11/qtruby/rubylib/tutorial/t14 chmod 755 t14.rb replace first line of t14.rb with “#!/usr/local/bin/rubyw” mkdir -p Shoot.app/Contents/MacOS mv t14.rb Shoot.app/Contents/MacOS/Shoot cp {cannon.rb,gamebrd.rb,lcdrange.rb} Shoot.app/Contents/MacOS cp Info.plist Shoot.app/Contents
Info.plist is
<?xml version=“1.0” encoding=“UTF-8”?> <!DOCTYPE plist SYSTEM “file://localhost/System/Library/DTDs/PropertyList.dtd”> <plist version=“0.9”> <dict>
<key>CFBundleExecutable</key> <string>Shoot</string> <key>CFBundleIdentifier</key> <string>jp.co.ryutaro.qtquit</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleSignature</key> <string>????</string>
</dict> </plist>
echo -n “APPL????” > Shoot.app/Contents/PkgInfo
Double click Shoot.app, Qt-Window appears in foreground.“
QScintilla text editing widget support
QScintilla is a text editing widget with syntax highlighting for a number of languages including ruby. It can be downloaded from here:
www.riverbankcomputing.co.uk/qscintilla/download.php
If the scintilla library is found by the cmake configuration, QtRuby will be built with QScintilla support. The classes in a 'Qext::' module, with names such as Qext::Scintilla.
Qwt scientific plotting library support
If the Qwt library is found by the cmake configuration, QtRuby will be built with Qwt support. The classes in a 'Qwt::' module, with names such as Qext::Plot.