diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 90825e2392b2d70e43c7a25b8a3752299a933894 (patch) | |
tree | e33aa27f02b74604afbfd0ea4f1cfca8833d882a /qtruby/INSTALL | |
download | tdebindings-90825e2392b2d70e43c7a25b8a3752299a933894.tar.gz tdebindings-90825e2392b2d70e43c7a25b8a3752299a933894.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'qtruby/INSTALL')
-rw-r--r-- | qtruby/INSTALL | 144 |
1 files changed, 144 insertions, 0 deletions
diff --git a/qtruby/INSTALL b/qtruby/INSTALL new file mode 100644 index 00000000..86e05d3d --- /dev/null +++ b/qtruby/INSTALL @@ -0,0 +1,144 @@ +Dependencies +------------ + +- ruby 1.8 or greater +- automake 1.7 or greater +- Qt 3.1 or greater +- KDE 3.1 or greater (for korundum) + +CVS Snapshot +------------ + +If building from a CVS snapshot, this initial make command in needed: + +$ make -f Makefile.cvs + +Configure flags needed +---------------------- + +In order to build korundum: (this is the default in fact, so you can just use ./configure) + ./configure --with-smoke="qt kde" +in order to build just qtruby: + ./configure --with-smoke="qt" + +Building the Qt extension without KDE build process +--------------------------------------------------- + +To build the Qt.so extension, provide 'extconf.rb' with the directories where +the Qt and Smoke libraries are installed: + +$ cd qtruby/rubylib/qtruby +$ ruby extconf.rb --with-smoke-dir=/opt/kde3 \ + --with-qt-dir=/home/duke/src/kde/HEAD/qt-copy +$ make +$ make install + +Building on Mac OS X +-------------------- + +Automake/autoconf don't work very well on Mac OS X, and so qmake and +exconf.rb must be used instead. You can use the native Aqua/Quartz Qt/Mac +version of Qt - QtRuby doesn't require X11. + +Build Qt/Mac and install in /Developer/qt. These configure flags work well: + +./configure -system-zlib -qt-gif -plugin-imgfmt-mng -thread -no-stl +-no-exceptions -fast + +Configure QtRuby and build the Smoke library: +$ ./configure '--with-qt-dir=/Developer/qt' '--enable-mac' +$ cd smoke/qt +# Generate the Smoke library sources: +$ perl generate.pl +# Overwrite the automake generated Makefile: +$ qmake -makefile +# Build the Smoke library and install into /usr/lib +$ sudo make +... + +# Build the 'Qt' extension: +$ cd qtruby/rubylib/qtruby +$ ruby extconf.rb --with-qt-dir=/Developer/qt --with-smoke-dir=/usr \ + --with-smoke-include=../../../smoke +$ make +$ sudo make install +... + +# Build the rbuic tool and install into /usr/bin +$ cd qtruby/rubylib/designer/rbuic +$ qmake -makefile +$ sudo make +... + +# Build the 'qui' QWidgetFactory extension +$ cd qtruby/rubylib/designer/uilib +$ ruby extconf.rb --with-qtruby-include=../../qtruby --with-qt-dir=/Developer/qt +$ make +$ sudo make install + +To get Mac menus to appear, when a QtRuby program is run from the command line, +link ruby against the carbon resource lib and call it 'rubyw', see: + +http://www.rubygarden.org/ruby?RubyTkOnOSX + +"Create rubyw executable for MacOS?: the Win32 distribution of ruby includes a +'rubyw.exe' so I decided to attempt creating a 'rubyw' executable: + +On my machine, ruby is installed at /usr/local/bin/ruby, so I did sudo +cp /usr/local/bin/ruby /usr/local/bin/rubyw +Using the suggestion directly above (on this page), I then ran +sudo /Developer/Tools/Rez -t APPL Carbon.r -o rubyw +I was then able to successfully run an example RubyTk app by +running /usr/local/bin/rubyw ruby-1.8.0/ext/tk/sample/tkmenubutton.rb +Everything worked as expected, and I was able to interact with the UI without +any SetFrontProcess errors. " + +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: + +http://www.riverbankcomputing.co.uk/qscintilla/download.php + +Use the '--enable-qscintilla=yes' configure option to build QtRuby with +QScintilla support. The classes in a 'Qext::' module, with names such as +Qext::Scintilla. |