A Kylix 2 Open Edition Primer for Windows Delphi Programmers

by James G. Owen

I am far from being a UNIX guru, but I've flirted with Linux over the years. When a Windows computer recently exploded (as they do periodically), I decided I'd try installing Mandrake 8.1 and Kylix 2 Open Edition on a partition. Like many programmers, I've used Borland's Delphi Windows IDE extensively, and I can report that I found it feasible, even entertaining, to install the *free* Kylix Open Edition Version 2 on Mandrake 8.1. I even used it to write a program that does something--if only copying to the clipboard the serial numbers needed to start Kylix and/or Borland's Jbuilder Linux Java IDE. I can even click the icon that I put on the Mandrake KDE desktop to run the whole thing.

Getting Kylix

Kylix 2 is available as a download from www.borland.com, but because I only have access to low-rent telephone modems and a mortal life-span, I used the version I found on a DVD that came with an English magazine. Since then I think I've seen Kylix 2 on another English CD, and someone at Borland said it was available in the SuSE distribution.

Installation was reasonably easy. A setup.sh script is in the root directory, and I clicked on it using the handy File Manager (Super User) entry I found in the Mandrake (KDE) menu system. After Kylix installed, there was a handy /usr/local/kylix2/uninstall script, which I wound up using a few times.

Registering Kylix: Making it Work

The registering part of the installation and set-up process could be more fun. The magazine I got the Kylix DVD from sent me to www.borland.com/delphi/personal/del6personal_keyonly_steps.html in order to register my version of Kylix 2. I assume the downloads and other installation methods provide comparable guidance. My recollection is that it was not difficult to get serial numbers and authorization keys from Borland, but the installation wants you to register completely. The simple answer to this is no. So far I have been able to avoid completely registering Kylix (or Linux Jbuilder 6 Personal Edition for that matter), but it still works. Here's what I did:

1. Install Kylix 2 Open Edition as root.

2. Run it as a normal user.

3. When it asks for registration give it the serial number (looks like 1234-5s?ab-cde78) and authorization key (looks like ab1-cde); as noted, these values weren't hard to obtain from Borland via the Web and e-mail.

4. Do not complete the registration; instead, choose Defer Registration. Kylix will then start flawlessly, without complaint.

Since this initial deferment, Kylix has started successfully numerous times. I suspect, however, that on some kind of phase-of-moon basis or with every 27th reboot, it will once again ask you to register, whereupon you should go back to step 3. Should that not work, exit, delete ~/.borland/registry.bin and go back to step 2.

The tilda (~) is UNIXese, of course, for your home directory. I eventually found a note in which Borland advised deleting the entire ~/.borland directory, which erases your environment settings, including my precious IDE Classic WordStar keys. And note also the uninstall script does not uninstall ~/.borland. All of this is relevant because once I started to register, Kylix's installation seemed like it wouldn't give up, sort of a pit bull effect, until I offed the registry.bin file or directory.

So far, this just-don't-register strategy also seems to work with the Linux Jbuilder 6 Personal Edition (available for $20 or so on Borland.com; the CD includes both the Linux and Windows versions). That is, you will need to enter the serial number and the authorization key and agree to the license, but when it asks How to Register?, click cancel and, after a while to be sure, Jbuilder will appear.

Jbuilder 6 is more annoying than Kylix 2 in that it asks for registration every time, and that, plus my three or four fruitless Kylix installation attempts, suggested to me that it would be fun to have a program enter these silly codes. And so, in a fit of truly offensive recursion, I wrote ClipGUI in Kylix. In fact, I used it just now to get into Jbuilder at least twice.

ClipGUI, The Program

There's hardly anything simpler than this ClipGUI program. Here is a zip file of the ClipGUI project and source code. ClipGUI is written in standard Delphi and has four buttons and four text edits that I preloaded with my serial numbers and authorization keys in the object browser. It looks like the beautiful picture shown below.

A Kylix 2 Open Edition Primer for Windows Delphi Programmers

Once I had ClipGUI installed, I right-clicked the Create New --> Link To Application option from the KDE desktop pop-up menu and set up my very own icon. (Actually, it's their icon until I figure out how to change it.) Eventually I wound up starting my ClipGUI with a script I named runclip:

  #!/bin/bash
  export LD_LIBRARY_PATH=/usr/local/kylix2/bin
  /home/gregor/save/Kylix/ClipGUI/ClipGUI &

Note LD_LIBRARY_PATH; cosmic matters above my pay-grade dictate I must do this explicitly whenever I want to run one of these Kylix programs outside the IDE. Also, unlike MS-DOS batch files, UNIX environment variables set in the procedure will not persist when the procedure is done. Therefore, to run my programs in a terminal window I made up a procedure called kylixpath, which I put in my ~/bin directory:

  #!/bin/bash
  export LD_LIBRARY_PATH=/usr/local/kylix2/bin
  bash

Note the "bash" on the last line. That starts another shell that will know the LD_LIBRARY_PATH variable, and it doesn't seem to hurt anything much.

Kylix Yet To Come

Maybe someday a Kylix program of mine will run on a different Linux distribution. Heck, some day I might give a different user access to it; I think that's simply a matter of putting the stuff in /usr/sbin or something. But I still have no idea how to make a nice desktop icon appear automatically; but then again, apparently neither does Jbuilder.

But I would not sit in the scorner's seat, never. I'm very proud of my little Kylix/Linux program, and I'm pleased with the state of Linux, at least as it looks in Mandrake 8.1.

Load Disqus comments

Firstwave Cloud