A Kylix 2 Open Edition Primer for Windows Delphi Programmers

Bringing Kylix 2 to the attention of the great masses of Delphi developers.

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.

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.

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: A Kylix 2 Open Edition Primer for Windows Delphi Programmers

Anonymous's picture

I dont have any thing against register my self at Borland. I think we should support Borland as much we can, so they continues to provide the "open edition" for free.
If borland doesn't get any users to the Kylix open edition (That they know about) they probably will stop develop Kylix.
/Jimmy, Sweden

Re: A Kylix 2 Open Edition Primer for Windows Delphi Programmers

Anonymous's picture

I don't think Borland's registration is paranoid.
And I don't think of Kylix beeing an hacked delphi version to work with WINE.

The only thing I don't like at Kylix is the font system used there. The fonts in my IDE are very small. And if I would not know it from Delphi, I had to use an "zoom glass" (I don't really know how it is called *g*).

And I think also that Borland could stop developing Kylix if there are too less users using it.

Re: A Kylix 2 Open Edition Primer for Windows Delphi Programmers

Anonymous's picture

I agree with you Jimmy... btw, from sweden 2 ;)

Re: A Kylix 2 Open Edition Primer for Windows Delphi Programmers

Anonymous's picture

After reading this I decided to download Kylix and give it a shot. I'm currently downloading, and I don't see the point in circumventing the registration process of the application, as Borland just collected all the information they could ever want just to let me download the tarball.

imoz

Re: A Kylix 2 Open Edition Primer for Windows Delphi Programmers

Anonymous's picture

I agree with Jimmy. It doesn't hurt to register. Also, Delphi and Kylix are nice non-Microsoft applications.

Kylix 2 elven apps?

Anonymous's picture

Anyone Seen ANY app built with kylix out on the net??!! That would be cool to see what you can accomplish with that tool.

Re: Kylix 2 elven apps?

Anonymous's picture

Don't know about public domain, but we use Kylix for a number of projects at this moment. Our company is investigating alternatives to M$, and it seems Kylix has opened the door to port many of our custom Windows apps to Linux. So, it is happening, although you might not see an imediate boom in Kylix based apps.

Re: A Kylix 2 Open Edition Primer for Windows Delphi Programmers

Anonymous's picture

I do not wish to sound negative, but I think Borland could do better than this "paranoid" approach to registering their software. It is their right, of course, to make the registration as "paranoid" as they want, but at least they could bother to test it enough so that it works without resorting to the "doggie biscuit" trick described in this article. The instructions given in this article remind me of articles in magazines for computer amateurs on how to tweak the registry to get some animation effect out of your Windows Start menu.

Overall, Kylix OE feels like a quick hack rather than a mature product (IRC comes to mind). I will look at Kylix and Borland with more respect when Kylix will grow out of the "version of Delphi that has been hacked to work with WINE" stage.

Do not get me wrong, I have been a long time fan of Borland and their excellent line of development products, but frankly Kylix has been somewhat of a disappointment to me. I expected more from Borland, than an XP styled mandatory "activation/registration" wizard which does not even work.

They also need more download mirrors. It's virtually impossible to download Kylix now.

Re: A Kylix 2 Open Edition Primer for Windows Delphi Programmers

Anonymous's picture

The reason why you have to make the links is because Kylix may use different versions of the QT libraries than your OS. If you put it in your config files (like I did) you will not be able to start Mandrake 8.1 up again. You will have to reinstall the operating system. That is the reason why you have to make links, to prevent Linux from confusing the libraries.

Re: A Kylix 2 Open Edition Primer for Windows Delphi Programmers

Anonymous's picture

>>I will look at Kylix and Borland with more respect when Kylix will grow out of the "version of Delphi that has been hacked to work with WINE" stage. >>

Only the IDE uses elements of Wine. The compiler itself is a pure Linux executable and produces ELF files that are small and extremely fast.

I've found it to be extremely handy from the command prompt. Using your favorite text editor and dcc (the command line pascal compiler) you can avoid the IDE altogether, if you choose.

Re: A Kylix 2 Open Edition Primer for Windows Delphi Programmers

Anonymous's picture

Bullshi**H^H^H^H^H^H^H Don't bother - it works, sort of, but like a dog walking on 2 legs it's not really practical.

I've been a fan of Borland since Turbo C (the original), but in the last 5-8 years, their products, marketing, etc. have turned to crap. I kept it on my hard disk for a few days, then removed it, because there are so many tools available that work natively, why bother with a bastardized product.

Re: A Kylix 2 Open Edition Primer for Windows Delphi Programmers

Anonymous's picture

I just downloaded it and installed it with no problems whatsoever. Perhaps it's something on your end.

Check with your ISP.

Regards,

Rob

Re: A Kylix 2 Open Edition Primer for Windows Delphi Programmers

Anonymous's picture

Regarding LD_LIBRARY_PATH, there are two things you can do:

1) as root, add the line '/usr/local/kylix2/bin' to /etc/ld.so.cache, and run ldconfig. This sets up your machine to also search the /usr/local/kylix2/bin directory for shared libraries.

2) add the line 'export LD_LIBRARY_PATH=/usr/local/kylix2/bin' to your ~/.bashrc file. From then on, any bash shell started will have that environment variable set automatically.

Re: A Kylix 2 Open Edition Primer for Windows Delphi Programmers

Anonymous's picture

I tried #2, and for some reason Mandrake didn't seem to like it; that user's shell would never start, the little wait icon would just churn away.... --

jgowen

Re: A Kylix 2 Open Edition Primer for Windows Delphi Programmers

Anonymous's picture

Concerning point nr.2 I can suggest you also add it to the /etc/skeleton files. Every new user will then get the rc file already set-up.

Re: A Kylix 2 Open Edition Primer for Windows Delphi Programmers

Anonymous's picture

'1) as root, add the line '/usr/local/kylix2/bin' to /etc/ld.so.cache, and run ldconfig. This sets up your machine to also search the /usr/local/kylix2/bin directory for shared libraries.'

- Wrong. Don't edit /etc/ld.so.cache directly, it should only be written to by the 'ldconfig' tool - the file you wnt to edit is /etc/ld.so.conf

Re: A Kylix 2 Open Edition Primer for Windows Delphi Programmers

Anonymous's picture

I had the same problem. My program would run in the

IDE but not from an Icon on KDE desktop. It would not

do anything just die.

You would think Borland would put some GOOD help files

so we would think Kylix is cool and but the real version.

Dudes, give Borland a chance!

Romulus007's picture

Dudes,

I have, in fact, forwarded the main message from this thread to every email address listed on Borland's "Contact Us" page so that they can quickly correct your issues.

Remember, they were the only IDE company to create a viable alternative (and numerous opportunities) for creating truly cross-platform, native apps. I predict a lot of disgruntled VB coders will adopt Delphi-Kylix simply because it makes excellent business sense. After all, why restrict your app to one platform when the same source code can be compiled to run on Linux (and therefore FreeBSD, NetBSD, OpenBSD, etc.).

So...please, let's give the terrific folks at Borland a chance to get things straight. It's too bad Philippe Khan, their legendary founder, is not part of this new era though. I think the company has done a remarkable job by remaining "neutral" to platforms and just providing developers with the means to have an "outrageous" advantage over other not-too-well-informed coders. :-)

L8tr dudes,

Romulus.

========

PS---> I'd love to see a Kylix port to the BSDs.