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

index-en

<center>

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

Ruby Ring [ <a href="http://www.webring.ne.jp/cgi-bin/webring?ring=ruby;id=29;prev">prev</a> ] [ <a href="http://www.webring.ne.jp/cgi-bin/webring?ring=ruby;list">list</a> ] [ <a href="http://www.webring.ne.jp/cgi-bin/webring?ring=ruby;id=29;home">home</a> ] [ <a href="http://www.webring.ne.jp/cgi-bin/webring?ring=ruby;id=29;next">next</a> ]

[[Ruby.home|http://www.ruby-lang.org/ja/]] [[Ruby.get|ftp://ftp.netlab.co.jp/pub/lang/ruby/]]

</center>

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

Dream duet of Delphi and Ruby .

Apollo = Delphi + Ruby

Let's try.

Platform

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.

Download

apollo

<a href="http://www.moriq.com/ruby/archive/ap-636a_vcl60.zip">ap-636a_vcl60.zip</a>

Delphi5 distribution package

You need not any of these packages, if you already installed Delphi5 on your computer.

vcl50.zip 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).

delphi5.zip 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;

apollo

included in the same archive of binary.

spin

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.
Handle
: Handles "ap_set_handle_message" and "ap_set_stdout_proc" were added, in order to connect Phi.
Global variables
: Wrapper function for Delphi DLL.

Install

Expand distributed files. That is all.

Executable files which were contained in Apollo Distribution.

Apollo has some files with .exe extension.

Apollo.exe

A development environment with simple editor.

ruby.exe

A executable environment on DOS console.

Usage

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

  Apollo Main Window
  +-----------------------------------------------------------+
  | ..Apollo                                            _ o x |
  +-----------------------------------------------------------+
  | +---------------------------+ +-----------+ +-----------+ |
  | | foo.rb   (Command Line)   | | Browse..  | | Execute   | |
  | +---------------------------+ +-----------+ +-----------+ |
  | +-----------------------------------------------------+-+ |
  | | require 'Phi'                                       | | |
  | |                                                     | | |
  | | form = Form.new        (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 = Form.new
form.show

And, make a button and its handler for clicks.

btn = Button.new(form, :btn)
def btn.on_click
  print "click!\n"
end

Finally, run a event loop.

Phi.mainloop

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

Mailing list

Project Apollo ML

mailto:ap-list@freeml.com

Last modified:2003/07/14 21:39:22
Keyword(s):
References: