HOME - - - - - Delphi Tutorials TOC - - - - - Main ICS tutorial - - - - - - - - - - - - Other material for programmers
    Delicious Bookmark this on Delicious   Recommend to StumbleUpon

Delphi: Installing the Piette ICS so you can using TCP/IP in your applications

This has good information, and a search button at the bottom of the page

Please don't dismiss it because it isn't full of graphics, scripts, cookies, etc!

More information about the source and format of these pages is available.

This document is published in hopes of encouraging and helping you install the Internet Component Suite (ICS) from Francois Piette at Overbyte.be, if you are at least an intermediate level Delphi or C++ programmer, and are wanting to get started writing applications for the internet, or for communicating with TCP/IP services on your LAN.

The ICS makes it as easy as such a thing can be for Delphi and C++ programmers to write applications using TCP/IP protocols, for communications to, from and over the internet.

I tested the following in November 2010, using Delphi 7 (Personal Edition), on a machine running Windows XP. To determine which edition you are using, click Help | About, and see what it says immediately below the large "Borland Delphi".

Beware... some versions of Delphi won't let you install 3rd party components.... which is what the ICS is. I believe this applies to the "Explorer" versions.

If you are on Delphi 7 or higher, at Nov 2010, the ICS download for you was ICS version 7. If you are using an earlier Delphi, you may need one of the older ICS versions.

Where are we going?

The good news, as far as I am concerned, is that you don't "install" the ICS, at least you don't "install" it into Windows. You download a .zip archive, and extract the contents. You must preserve the directory (folder) structure of the archive, but you can put it where you wish to. You don't have to "register" the files you copied... with Windows.

Once the files are in place on your hard drive, you do have to "do things" within Delphi to integrate the ICS with Delphi... but I am satisfied that these things really are necessary.

I'll explain the two steps I've just outlined, and I will take you though "playing with" one of the demo applications which come with the ICS, so you can be sure all is well.

Download the .zip, extract the contents

Go to the OverByte.be website. (That link will open in a new tab or window.)

Don't worry about all the stuff about "You need to use a subversion client such as TortoiseSVN...". I think that's for people who want to be involved in the ongoing development of the ICS, not for mere users of these marvelous, free tools.

The site doesn't support deep links, sorry. Use the menu at the left of the OverByte page to go to the "Products- ICS" page, and click on the "Download ICS-V7 Distribution..." link, unless you need one of the older distributions. (See the text under the different alternatives. As I said, for Windows XP + Delphi 7 at November 2010, I used the ICS-V7 (Oct 2010) distribution. Elect to save the download, not run it.

That should leave you with a large .zip file on your hard drive. (It was 3.6gig in my case, named OverbyteIcsV7.zip)

Prepare a folder for the contents of the folder to live in. I set up....

My Documents\PrgmMgd\D3P\ICS

... for the purpose. I already had the "PrgmMgd" ("Program Managed") sub-folder in my My docs folder, and added the "D3P" sub-sub-folder for "Delphi- 3rd Party components". (It doesn't pay to let paths get too long, and leaving spaces and things other than letters and digits out of the names can help in some instances.)

Right-click on the archive, and elect to Explore it. Press ctrl-A to select everything, and drag it from the archive into the folder you created for the ICS elements. (I had 10 files and 4 folders... some of which had sub-folders).

At first, I was getting a "refusal" from my machine. When I finally noticed the "are you sure?" dialog from my anti-virus suite, and said yes, the file/folder copy went without further problems. (The "are you sure" failed to pop up on top of the other things on my screen at the time.)

That's it! What you need is now on your machine!

Next you have to get Delphi aware of what you added. Delphi has built in tools for that.

Tell Delphi about your ICS tools

This next bit of information is in the ReadMe file that you should have in your folder. Read it! But, if things haven't changed, the heart of what you need is as follows...

There are several options. I went for the SSL packages in addition to the "basics". Also, I didn't use the "Alternate installation using the Package Project Files" method for installing.

Start up your Delphi 7, then... (the following is adapted from something in the ReadMe7 text file....)

For each Delphi and C++ Builder version one project group is provided in the "install" directory...

Delphi 7         :  D7Install.bpg
Delphi 2006      :  D2006Install.bdsgroup
C++ Builder 2010 :  CB2010Install.groupproj
C++ Builder XE   :  CBXeInstall.groupproj

1 - Do a File/Open Project, navigate to the Install directory, select the correct file and open it. The project manager view (Click on menu's "View", then "Project Manager") should now display two package projects: one run-time and one design-time package. The run-time package name ends with "Run". The design-time package name ends with "Design".

2 - Select and Build the run-time package. (Right click, "Build")(Do not "Install").

3 - Select and Install the design-time package. (Right click, "Install")

After a few seconds, you should have a dialog box telling you the package has been installed. You should see that you have a bunch of new components available from the Tool Palette, within the new "Overbyte ICS" and "Overbyte ICS SSL" tabs.

You're not quite done....

To finish this (penultimate) stage off: Do a "File|Save All" and a "File|Close All".

(End quote)... and it really isn't as bad as it might seem, reading all that. It is worth the trouble!

At this point, just to be on the safe side, I closed my Delphi, and re-opened it.

You now almost have a "working" Delphi, with the ICS components available to your work. There's just one last thing to do....

(Begin (edited) quote from ReadMe7.txt)...

DELPHI 2006/WIN32, 2007/WIN32, 2009/WIN32, 2010/WIN32 and XE/WIN32:

Having installed the package, see if the VC32 directory has been added to the Win32 Library Path.

If not, add it manually. It is not mandatory to add vc32 to the global Delphi path, but it will be much easier for you because otherwise you'll have to add it to each project.

===(End quote from ReadMe7.txt)

Readme7.txt says you do that with...

(Tools / Options / Delphi Options / Library - Win32 / Library Path).

In my Delphi7, that didn't seem right. I used...

Tools/ Environment Options/ Library

Then I clicked on the ellipsis (...) to the right of the current "Directories/ Library Path" edit box.

"Add" was grayed out!! Panic! Despair! Was my edition of Delphi not able to accept 3rd party components, as is the case with some editions??

I'm probably dumb, but here's (nearly) how I added the new path to the list already present. I can't get the procedure quite right, to write it up for you... but rest assured: You CAN add a folder to the library paths list, even if your "Add" is grayed out!

In the window I had up, at the top there was as memo labeled "Ordered list of library paths" Beneath that, an edit box, and to the right of it, another ellipsis. I clicked in the edit box, and added ";xx" to the end of the string already there. Pressed the Enter key. A new library, invalid, appeared in the list, already selected. Deleted the contents of the edit box, but did NOT, yet, press enter. Clicked the ellipsis. Drilled down to the right folder. Clicked okay. Somehow or other along these lines, I got the new path into the list. I then selected any "scraps" (e.g. the invalid "xx" folder), and deleted them.

(My "VC32 directory" was at...


... because of my choice of path to the ICS files.)

As mentioned earlier, you should by now have two new tabs on your Delphi component bar: "Overbyte ICS" and "OverByte ICS SSL".

Take ICS for a spin....

Don't worry! You aren't on your own, getting started with ICS and TCP/IP. There are demos, which were put onto your system along with the components.

BE CAREFUL about playing with demos... don't corrupt your "original" copy. It would be best, using the ordinary Windows tools, to make copies of the demos to a "scratch" folder, and work with the copies. It would also be an idea to make your "main" copy of the demos read only.

Most (all?) of the demos, you need several files. I would suggest that you start with the "OverByteHttpTst" demo, for which you need the four files (different extensions) named thus, plus the two named "OverByteHttpTst1".

On my system, the demos were in the "Internet" folder in the "Delphi" folder in the ICS folder that I installed in MyDocs\PrgmMgd\d3p.

Do File|Open, and navigate to...

OH MY GOD! Which one!!! Fear not, there's a catalog of what the different demos illustrate at....

http://www.overbyte.be/frame_index.html Navigate: ICS/ ICS Sample applications (A link on the ICS page)

As I said, to get started, try OverByteICShttpTst.


I got and ignored a message saying "Error reading ICSlogger1.LogFileEncoding does not exist..."

A form came up. It looked bit like an FTP client (probably nothing like, and certainly(?) NOT doing FTP... but that's what it reminded me of!

The "URL" edit box held "http://www.overbyte.be"

Clicked the "Get" button. The lower pane filled with raw HTML!!! :-)

(At 30 Nov 2010, it gave....

	<TITLE>OverByte - HomePage</TITLE>

<!-- START: Meta -->
	<META HTTP-EQUIV="content-type" CONTENT="text/html">
	<META NAME="Generator" CONTENT="EditPlus 1.2">
	<META NAME="OWNER" CONTENT="Francois Piette">
	<META NAME="DESCRIPTION" CONTENT="Freeware internet component suite - ICS - for Delphi, full source code">
<!-- END: Meta -->

	<META HTTP-EQUIV="Refresh" CONTENT="0;URL=frame_index.html">
<DIV ALIGN="center">
If you are not redirected automatically....

Of course, my firewall was having conniptions... happily, my setting of "ask me" seemed to be holding, and I repeatedly said "Allow", and got through to where I wanted to be.

Two asides... a "gotcha" and a mystery....

"Gotcha": When you run OverByteICSHttpTst, it will write a little file to your disk about things like what site you last visited. Each time you run the application, that file is used to set those things back to what you set them to previously. The file is buried at...

"C:\Documents and Settings\{your user's folder}\Local Settings\Application Data\ICS

(Just delete it (while the application isn't running) to go back to the application's default values)

(Change the line that says....

FIniFileName := GetIcsIniFileName;

... to ....

FIniFileName := 'HttpTstIni.txt';

... to knobble the (admittedly clever and elegant, but potentially customer infuriating) "feature", and cause the application to store its settings in the file of the name given, which will be in the same folder as the application's .exe file. (If it doesn't exist when the application is run, default values are used, and the file is created (or over-written) when the application closes.)

"Mystery": You don't need to worry as much as I do... but if you look in OverByteICSHttpTst's .dpr file, you will find....

{$R '..\Vc32\OverbyteIcsXpManifest.res' '..\Vc32\OverbyteIcsXpManifest.rc'}
{$R '..\Vc32\OverbyteIcsCommonVersion.res' '..\Vc32\OverbyteIcsCommonVersion.rc'}

I don't know what these are for, but I wonder if the compiler is finding them on my machine, because of when I installed the ICS files. The "..\" says, "go up one level from where you are now, and then go down...". This is all well and good, if the compiler is in the right place before the above begins. The good news is: Neither leaving things as they were, not remming out the lines seemed to have any effect! ".res" files are usually concerned with icons, and the ".rc" element is to do with editing them... and I didn't want to do that! :-)


Other tests you can run, once you have OverByteHttpTst up and running....

I have a web server on my LAN. When I put the server's URL (something like into the box on HttpTst, I was rewarded with the right stuff from the local web server, which was a bunch of HTML, displayed in the lower memo box... as text, not as rendered HTML, which is all OverByteHttpTst claims to do. It won't render the HTML the way, say, Firefox does.

I tried JUST "bbc.co.uk" (no "http://"), and HttpTst served up the raw HTML from the BBC site. Hurrah! I had the ICS installed, and a basic "Hello World" demo available to pick apart, and adapt to my needs!!! (It will do the same thing with the "http://" part, by the way.)

Wrapping up...

Ha! Working through the above... before I started writing this page for you... only took me three hours! But I had the advantage of having done all this before... on a machine that crashed and took that work with it.

Don't let the above moaning put you off. You have the advantage of this guide! ICS **is** worth it. In particular, it has a very active discussion group online...


... and ANY work with TCP/IP is GOING to be somewhat complex... but it will be a lot LESS complex if you avail yourself of the excellent ICS!!!

So! Your Delphi now has the ICS (Internet Component Suite) installed, and you've played with one of the demos... "All" you need to do now is learn how to use the components. If, like me, you are starting with almost no understanding of TCP/Ip... good luck to you! But it can be done. Before the old computer crashed, I had built an application that looks at pages created by my FarWatch application. The ICS based app was a "FarWatch Watcher"! FarWatch puts up a web-page that anyone can access which, among other things, reports the temperature at a monitored premise. FarWatchWatcher ran in a different PC, at a different location, and checked the temperature at the monitored premises, and started beeping if the temperature was lower than it should have been. (It has now been rebuilt. Visit FarWatchWatcher's page if you're feeling kind!

Having rebuilt my Delphi+ICS development system, I went on to rebuild FarWatchWatcher. Sigh. I'll try to do notes for you one day. If I get to it, they will become available from my Delphi tutorials table of contents.


P.S.: I spent two days rebuilding FarWatchWatcher. Once it was working, albeit with rough edges, I went searching in my web pages. I half remembered a promise somewhere to try to make a FarWatchWatcher available. It was then that I discovered that my old FarWatchWatcher had been available online all along, and that from what was online, I could even find the sourcecode, which was only misplaced, not permanently lost! ARGHHH! At least the new version of FarWatchWatcher is better than the old one. Some consolation for the time spent. Sigh.

To block, or not to block, that is the Windows question...

It is possible with ICS to build non-blocking TCP/IP applications. It is a little more trouble, in the short term, but in the long term, well worth making the effort.

Starting with OverByteICSHttpTst it is (relatively) easy to set up a non-blocking app to periodically access a web page.

The choice between blocking and non-blocking is fundamental to your TCP/IP work, which is why I make such a fuss about it here, on the "installing ICS" page.

I've done a separate page about blocking/ non-blocking programming. The issue is tightly related to the issue of whether your code works synchronously or asynchronously with the remote server.

In the abstract, you may find it hard to grasp. My page about going into the demo "OverbyteICSHttpTst" may help you strengthen your understanding of the issues.

Sorry to "dump" you there. I hope there were useful bits in the above?

            powered by FreeFind
  Site search Web search
Site Map    What's New    Search This search merely looks for the words you enter. It won't answer "Where can I download InpOut32?"

Click here if you're feeling kind! (Promotes my site via "Top100Borland")

If you visit 1&1's site from here, it helps me. They host my website, and I wouldn't put this link up for them if I wasn't happy with their service. They offer things for the beginner and the corporation.www.1and1.com icon

Ad from page's editor: Yes.. I do enjoy compiling these things for you. I hope they are helpful. However... this doesn't pay my bills!!! Sheepdog Software (tm) is supposed to help do that, so if you found this stuff useful, (and you run a Windows or MS-DOS PC) please visit my freeware and shareware page, download something, and circulate it for me? Links on your page to this page would also be appreciated!
Click here to visit editor's freeware, shareware page.

Link to Tutorials main page
How to email or write this page's editor, Tom Boyd

Valid HTML 4.01 Transitional Page tested for compliance with INDUSTRY (not MS-only) standards, using the free, publicly accessible validator at validator.w3.org

If this page causes a script to run, why? Because of things like Google panels, and the code for the search button. Why do I mention scripts? Be sure you know all you need to about spyware.

....... P a g e . . . E n d s .....