Create  Edit  Diff  Phillro Industries  Index  Search  Changes  History  Source  RSS  Note  wikifarm  Login



<img src="pa0.gif" alt="Project Apollo">

Ruby Ring [ <a href=";id=29;prev">prev</a> ] [ <a href=";list">list</a> ] [ <a href=";id=29;home">home</a> ] [ <a href=";id=29;next">next</a> ]

[[Ruby.home|]] [[Ruby.get|]]


[ Japanese? ] / [ English? ] Hello, another way.

Dream duet of Delphi and Ruby .

Apollo = Delphi + Ruby

Let's try.


Apollo runs on the environment on which Delphi can run. At present, it runs on MS-Windows 95/98/NT4.0 or later.

I expect that Apollo will run on Unix, when Borland would release Kylix.



<a href=""></a>

Delphi5 distribution package

You need not any of these packages, if you already installed Delphi5 on your computer. This contains "vcl50.bpl" and "vcl50.jpn". It is enough for you to try basic system of Apollo.

"vcl50.jpn" is Japanese patches for Delphi Visual Component Library(VCL). This contains full distributable package of Delphi5 professional. You need this package, if you want to use RDB or TEE.

Source files of Apollo are as follows;


included in the same archive of binary.


ruby_spin-1.6.4.patch A patch of ruby-1.6.4.tar.gz

Spin was made with a little modification of the source of Ruby. Modifications are as follows;

Input and Output
: The code which use "stdout" or "stderr" directly was modified to use io_write.
: Handles "ap_set_handle_message" and "ap_set_stdout_proc" were added, in order to connect Phi.
Global variables
: Wrapper function for Delphi DLL.


Expand distributed files. That is all.

Executable files which were contained in Apollo Distribution.

Apollo has some files with .exe extension.


A development environment with simple editor.


A executable environment on DOS console.


If you could not run Apollo, your computer may not have VCL50, and please install or other proper VCL library.

  Apollo Main Window
  | ..Apollo                                            _ o x |
  | +---------------------------+ +-----------+ +-----------+ |
  | | foo.rb   (Command Line)   | | Browse..  | | Execute   | |
  | +---------------------------+ +-----------+ +-----------+ |
  | +-----------------------------------------------------+-+ |
  | | require 'Phi'                                       | | |
  | |                                                     | | |
  | | form =        (Memo Window)                | | |
  | |                                                     | | |
  | | .......                                             | | |
  | |                                                     | | |
  | |                                                     | | |
  | +-----------------------------------------------------+-+ |
  | Ready                    (Status Line)                    |

At start time, "Command Line" is "foo.rb", and Apollo trys to read foo.rb on the current directory. And Apollo shows foo.rb in the Memo Window if it exist. Otherwise, the Memo is empty.

You can input Ruby script file and its option on the Command Line.

foo.rb foo.txt

You can click "Execute" button and run the script which was written on the Command Line.

When you click "Browse" button, you will see a "Open File" dialog.

"Execute" button will be replaced by "Terminate" button, when the script was running. And you can terminate the execution of the script by pushing "Terminate" button.

"Execute" button or "Terminate" button is replaced by "Save" button, when you changed the script in the Memo Window. And you can save your change to the file which was described in Command Line window.

What is Apollo?

I call Apollo as a whole system which connect Ruby and Delphi.

Apollo is under experiment and not fixed. Design may be changed.

What is Phi?

Phi is Ruby extension library to use Delphi's Visual Component Library(VCL). Usage is as same as other Ruby extension library. That is;

require 'phi'

Then you can use a module of VCL. At first, try to make a form.

form =

And, make a button and its handler for clicks.

btn =, :btn)
def btn.on_click
  print "click!\n"

Finally, run a event loop.


I hope you will enjoy powerfull Delphi's VCL with simple Ruby script.

Mailing list

Project Apollo ML

Last modified:2003/07/14 21:39:22