Qt4-QtRuby installer for Microsoft Windows

From MMVLWiki
(Difference between revisions)
Jump to: navigation, search
m
m
 
(48 intermediate revisions by one user not shown)
Line 1: Line 1:
 
{|align="right"
 
{|align="right"
 
|-
 
|-
|[[Image:Qt logo.png|100px]]
+
|[[Image:Rbuic.png|320px|thumb|Developing GUI applications with the Ruby programming language]]
 
|-
 
|-
|[[Image:Ruby.png|100px]]
+
|[[Image:Vision_GUI4.png|320px|thumb|Example of an application developed using Ruby and Qt4-QtRuby (shown running under GNU/Linux)]]
 
|-
 
|-
 
|}
 
|}
 
This is an '''installer''' for installing '''Qt4-QtRuby''' (including Ruby user interface compiler and resource compiler) under
 
This is an '''installer''' for installing '''Qt4-QtRuby''' (including Ruby user interface compiler and resource compiler) under
 
'''Microsoft Windows'''. [http://rubyforge.org/projects/korundum/ Qt4-QtRuby] (developed by Richard Dale and
 
'''Microsoft Windows'''. [http://rubyforge.org/projects/korundum/ Qt4-QtRuby] (developed by Richard Dale and
others) is a very useful extension allowing you to use [http://trolltech.com/products/qt/ Qt] from within the
+
others) is a very useful extension allowing you to use [[Image:Qt4.png|30px]] [http://trolltech.com/products/qt/ Qt4] from within the
[http://www.ruby-lang.org/ Ruby] programming language.
+
[[Image:Ruby.png|30px]] [http://www.ruby-lang.org/ Ruby] programming language (under GNU/Linux, Microsoft Windows, and MacOS).
The installer requires [http://ftp.ntua.gr/pub/X11/Qt/qt/source/qt-win-opensource-4.3.0-mingw.exe Qt-4.3.0 Open Source Edition] for Microsoft
+
Note that there is a Microsoft Windows32 Gem for installing Qt4-QtRuby on the [http://rubyforge.org/projects/korundum/ Korundum]
Windows to be installed first. The source code of the installer is currently included in the
+
project page. You don't need this installer if the Gem works for you.
[http://rubyforge.org/projects/hornetseye/ HornetsEye] package. The installer was developed using [http://nsis.sourceforge.net/ NSIS] and
+
[http://rubyforge.org/projects/rubygems/ RubyGems]. Please [[User:Engjw|contact me]] if you
+
encounter problems using the installer.
+
  
==Download==
+
The new installer (as of January 28th 2009) now requires [http://ftp.ntua.gr/pub/X11/Qt/qt/source/qt-win-opensource-4.3.4-mingw.exe Qt-4.3.4 Open Source Edition]
You can download the Qt4-QtRuby installer for Microsoft Windows here:
+
([http://vision.eng.shu.ac.uk/jan/hornetseye-system/qt-win-opensource-4.3.4-mingw.exe mirror]) and
'''[http://vision.eng.shu.ac.uk/jan/qtruby4installer.exe qtruby4installer.exe]'''
+
[http://rubyforge.org/frs/download.php/18566/ruby186-25.exe Ruby 1.8.6-25]
 +
([http://vision.eng.shu.ac.uk/jan/hornetseye-system/ruby186-25.exe mirror]) for Microsoft Windows to be installed first.
 +
'''Make sure you are using exactly this versions of Ruby and Qt4, because otherwise the Qt4-QtRuby binaries will be incompatible.'''
  
==Troubleshooting==
+
The installer '''does not provide [http://kde.org/ KDE4] bindings''' (korundum4).
Unfortunately the Qt4-QtRuby installer currently cannot detect failure of installing the gem. Open a command-line and enter the following
+
command
+
  
gem list qtruby4
+
The source code of the installer is currently included in the [http://rubyforge.org/projects/hornetseye/ HornetsEye] package (see [http://bazaar.launchpad.net/~wedesoft/hornetseye/trunk/files/head:/nsis/ Bazaar repository on Launchpad]). The installer was developed using [[Image:Nsis.gif|30px]] [http://nsis.sourceforge.net/ NSIS]. The main file is '''qtruby4.nsi'''.
  
If qtruby4 is not listed, the gem failed to install. You can find the gem in the temporary directory after running the installer. The gem can
+
Please [[User:Engjw|contact me]] if you encounter problems using the installer.
be installed manually using the command line.
+
  
C:
+
=Installation=
cd %TEMP%
+
==Download==
gem install qtruby4-*.gem
+
You can download the Qt4-QtRuby installer for Microsoft Windows here:
 +
'''[http://vision.eng.shu.ac.uk/jan/hornetseye-system/qtruby4installer.exe qtruby4installer.exe]'''
  
If this fails, the error message may give you an additional clue on what is wrong.
+
==Testing==
 +
Launch '''irb''' (interactive ruby bash) on the command line and type in the following commands (no need to type in the lines preceeded with '''#'''). By the time you have entered ''app.exec'' you should see a small window with a button opening. Clicking the button should close the window.
 +
require 'Qt4'
 +
# true
 +
app = Qt::Application.new ARGV
 +
# #<Qt::Application:0xb7ad3394 objectName="irb">
 +
button = Qt::PushButton.new '&Close Me'
 +
# #<Qt::PushButton:0xb7acf668 objectName="", x=0, y=0, width=640, height=480>
 +
Qt::Object.connect button, SIGNAL('clicked()'), button, SLOT('close()')
 +
# true
 +
button.show
 +
# nil
 +
app.exec
 +
# true
 +
quit
 +
 
 +
The installer also installs '''rbuic4''' (Ruby user interface compiler) and '''rbrcc''' (Ruby resource compiler). These two tools
 +
are the Ruby equivalents of '''uic4''' and '''rcc'''. I.e. rbuic4 and rbrcc are used to generate Ruby code from *.ui files
 +
(user interface files) created with [http://doc.trolltech.com/4.3/designer-manual.html Qt-designer]. Note that you need to recompile
 +
all your user-interface- and resource-files whenever you upgrade to a new version of Qt.
 +
 
 +
=Newer Versions of Qt4-QtRuby=
 +
I am aware of the fact that Qt-4.3 is not the most recent version of Qt4 any more. I also know that the most recent version of Ruby is 1.9. Unfortunately I currently don't have time to build an up-to-date installer.
  
 
=See Also=
 
=See Also=
Line 40: Line 59:
 
=External Links=
 
=External Links=
 
* [http://rubyforge.org/projects/korundum/ Qt4-QtRuby and Korundum]
 
* [http://rubyforge.org/projects/korundum/ Qt4-QtRuby and Korundum]
** [http://rubyforge.org/forum/forum.php?thread_id=16885&forum_id=723 Thread about this installer at Rubyforge forum]
+
** [http://rubyforge.org/forum/forum.php?thread_id=16885&forum_id=723 Thread about installer for Qt-4.3.0 at Rubyforge forum]
 +
** [http://rubyforge.org/forum/forum.php?thread_id=31155&forum_id=723 Thread about installer for Qt-4.3.4 at Rubyforge forum]
 +
** [http://www.darshancomputing.com/qt4-qtruby-tutorial/ Qt4 tutorial for Ruby]
 
* [http://www.ruby-lang.org/ Ruby]
 
* [http://www.ruby-lang.org/ Ruby]
* [http://trolltech.com/products/qt/ Qt]
+
* [http://trolltech.com/products/qt/ Qt4]
 +
** [http://doc.trolltech.com/4.3/ Qt 4.3 reference]
 +
* [http://tom.paschenda.org/blog/?p=38 Blog post: Getting Qt and Ruby(=QtRuby) running on Windows XP]
 +
* [http://blog.paulbetts.org/index.php/2007/07/22/cross-platform-ui-with-qt4-and-ruby-maclinux-howto/ Blog post: Cross-platform UI with Qt4 and Ruby - Mac/Linux HOWTO]
 +
 
 +
{{Addthis}}
  
 
[[Category:Projects]]
 
[[Category:Projects]]
 
[[Category:Nanorobotics]]
 
[[Category:Nanorobotics]]

Latest revision as of 23:00, 8 June 2011

Developing GUI applications with the Ruby programming language
Example of an application developed using Ruby and Qt4-QtRuby (shown running under GNU/Linux)

This is an installer for installing Qt4-QtRuby (including Ruby user interface compiler and resource compiler) under Microsoft Windows. Qt4-QtRuby (developed by Richard Dale and others) is a very useful extension allowing you to use Qt4.png Qt4 from within the Ruby.png Ruby programming language (under GNU/Linux, Microsoft Windows, and MacOS). Note that there is a Microsoft Windows32 Gem for installing Qt4-QtRuby on the Korundum project page. You don't need this installer if the Gem works for you.

The new installer (as of January 28th 2009) now requires Qt-4.3.4 Open Source Edition (mirror) and Ruby 1.8.6-25 (mirror) for Microsoft Windows to be installed first. Make sure you are using exactly this versions of Ruby and Qt4, because otherwise the Qt4-QtRuby binaries will be incompatible.

The installer does not provide KDE4 bindings (korundum4).

The source code of the installer is currently included in the HornetsEye package (see Bazaar repository on Launchpad). The installer was developed using Nsis.gif NSIS. The main file is qtruby4.nsi.

Please contact me if you encounter problems using the installer.

Contents

[edit] Installation

[edit] Download

You can download the Qt4-QtRuby installer for Microsoft Windows here: qtruby4installer.exe

[edit] Testing

Launch irb (interactive ruby bash) on the command line and type in the following commands (no need to type in the lines preceeded with #). By the time you have entered app.exec you should see a small window with a button opening. Clicking the button should close the window.

require 'Qt4'
# true
app = Qt::Application.new ARGV
# #<Qt::Application:0xb7ad3394 objectName="irb">
button = Qt::PushButton.new '&Close Me'
# #<Qt::PushButton:0xb7acf668 objectName="", x=0, y=0, width=640, height=480>
Qt::Object.connect button, SIGNAL('clicked()'), button, SLOT('close()')
# true
button.show
# nil
app.exec
# true
quit

The installer also installs rbuic4 (Ruby user interface compiler) and rbrcc (Ruby resource compiler). These two tools are the Ruby equivalents of uic4 and rcc. I.e. rbuic4 and rbrcc are used to generate Ruby code from *.ui files (user interface files) created with Qt-designer. Note that you need to recompile all your user-interface- and resource-files whenever you upgrade to a new version of Qt.

[edit] Newer Versions of Qt4-QtRuby

I am aware of the fact that Qt-4.3 is not the most recent version of Qt4 any more. I also know that the most recent version of Ruby is 1.9. Unfortunately I currently don't have time to build an up-to-date installer.

[edit] See Also

[edit] External Links

Bookmark and Share

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox