Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Move from Clipper 5.3 to Harbour

478 views
Skip to first unread message

Scott Coffey

unread,
Apr 12, 2012, 9:36:13 AM4/12/12
to
I need to move a Clipper 5.3 application to Harbour. Are there any
resources available that can help me with this project? At this point
I have a lot more questions than I do answers. My background is *not*
Clipper. I'm an independent RPG programmer on the AS/400 platform. My
main client has a Clipper-based POS application that I have learned
enough about to maintain, but that's about it. I have zero experience
in developing Windows-based applications, so I figure I'm going to
need a lot of hand holding.

- Harbour or xHarbour?
- What tools will I need? If I need a compiler, which one and where
do I get it?

I'm willing to pay for initial support, if there is such a thing.

The only 3rd party libraries I'm using are NANFOR (I'm not even sure
this is considered third party) and the LFN library for long filename
support which was basically needed to retrieve the creation date of a
file. Outside of that, everything is vanilla Clipper. I do make
extensive use of Blinker 7.0's SWPRUNCMD command.

Posted to comp.lang.clipper and comp.lang.xharbour
--
ScottCoffey at Scott dash(-) Coffey dot net

dlzc

unread,
Apr 12, 2012, 10:27:36 AM4/12/12
to
Dear Scott Coffey:

On Thursday, April 12, 2012 6:36:13 AM UTC-7, Scott Coffey wrote:
> I need to move a Clipper 5.3 application to
> Harbour.

What 3rd party libraries are used in the project? Does it use Clipper Tools?

> Are there any resources available that can
> help me with this project?

Really not much more than recompiling, and correcting errors. Errors like missing source files, OBJ modules compiled to 16-bit, and mis-spellings at character 11 or greater.

> At this point I have a lot more questions
> than I do answers.

As in all things, the number of questions is always a multiple of the number of answers obtained.

> My background is *not* Clipper. I'm an
> independent RPG programmer on the AS/400
> platform. My main client has a Clipper-based
> POS application that I have learned enough
> about to maintain, but that's about it.

Welcome.

> I have zero experience in developing Windows-
> based applications, so I figure I'm going to
> need a lot of hand holding.

Using vanilla (x)Harbour, you will end up with a Windows *console* program. You will have to expend extra effort (, time, and / or dollars) to get what looks like a Windows program.

> - Harbour or xHarbour?

At this distance, no difference. If you'd had experience with Visual Basic, then Visual xHarbour would have let you get to Windows appearance faster. But for simple conversion, no such nicety helps you.

> - What tools will I need? If I need a
> compiler, which one and where do I get it?

Comes with the download package from either site, or at least it does with xHarbour.

> I'm willing to pay for initial support, if
> there is such a thing.

Is on xHabour.com, but I was not satisfied with my "free 30 days", as they assumed I was talking about compiler defects, and not "what happens when my program runs into an odd formatted DBF file...?"

> The only 3rd party libraries I'm using are
> NANFOR (I'm not even sure this is considered
> third party) and the LFN library for long
> filename support which was basically needed
> to retrieve the creation date of a file.

OK, so you can either write a wrapper function with those function names, that act like those functions (fastest), or change the root code to use the native functions (longer).

> Outside of that, everything is vanilla Clipper.
> I do make extensive use of Blinker 7.0's
> SWPRUNCMD command.

Ron Pinkas posted a suitable replacement "wrapper" for this, should you search comp.lang.xharbour for it.

People have talked about converting 100,000 lines programs over a dedicated weekend, so you should have few issues.

I chose the cheapest xHarbour.com product, as I hate mucking with "text files" for directives (and I make no money from what I do... long story). But you might choose what you need based on where your customer wants to end up. SQL and central data repository, 1000 terminals rather than 2, things like that.

I have found folks at comp.lang.xharbour to be helpful, and searching there has yielded some answers... if you can guess the right key words... ;>)

David A. Smith

Mel Smith

unread,
Apr 12, 2012, 11:41:08 AM4/12/12
to
Scott said:

> - Harbour or xHarbour?

Either one will do.

> - What tools will I need? If I need a compiler, which one and where
> do I get it?
>

Well, you need a C-Compiler to start with. If you choose xHarbour, I
have on my alternate download site, Borland's BCC 5.5.1 C/C+ Compiler (~ 9
meg). Its available for download, quite far down on the menu, and is easily
installable.

Also, you can download the latest version of xHarbour at my site. Its
at the top of the menu


> I'm willing to pay for initial support, if there is such a thing.
>
In this ng, we do things for free. If you want me to start the
conversion for you, I'd be glad to help -- pro bono.

But I would advise moving to a console version of your program first,
then investigating the many ways of GUIizing your app later.

> The only 3rd party libraries I'm using are NANFOR (I'm not even sure
> this is considered third party) and the LFN library for long filename
> support which was basically needed to retrieve the creation date of a
> file. Outside of that, everything is vanilla Clipper. I do make
> extensive use of Blinker 7.0's SWPRUNCMD command.
>

The same things are easily accomplished in xHarbour.

I used Blinker for years too. The transition to Harbour/xHarbour was
reasonably easy for me (and I'm no brainiac).

If I can help, send me an email.

-Mel Smith


Otto Haldi

unread,
Apr 12, 2012, 1:24:23 PM4/12/12
to
On Thu, 12 Apr 2012 09:36:13 -0400, Scott Coffey <no...@noemail.com.invalid> wrote:

Hello
If you like to try xHarbour, a good solution is to download xHarbour from
http://free.xharbour.com/.

Simple to install. Then you can use xBuildW.exe to compile your .PRG into a .OBJ file
and further link all necessary LIB files to be able to build a real 32 bits windows application.

Regards
Otto

Klas Engwall

unread,
Apr 12, 2012, 6:52:13 PM4/12/12
to
Hi Scott,

> I need to move a Clipper 5.3 application to Harbour. Are there any
> resources available that can help me with this project? At this point
> I have a lot more questions than I do answers. My background is *not*
> Clipper. I'm an independent RPG programmer on the AS/400 platform. My
> main client has a Clipper-based POS application that I have learned
> enough about to maintain, but that's about it. I have zero experience
> in developing Windows-based applications, so I figure I'm going to
> need a lot of hand holding.
>
> - Harbour or xHarbour?

Harbour users will say Harbour. xHarbour users will say xHarbour. Of
course :-). I will say that I used xHarbour for a pretty long time and
moved to Harbour two years ago, Generally, that seems to be the
direction people migrate these days. Harbour has a file that explains
the main differences between the design philosophies and the internals
of the two projects:

http://harbour-project.svn.sourceforge.net/viewvc/harbour-project/trunk/harbour/doc/xhb-diff.txt

If you want your project to still be a console application, both camps
have gtwin (the default) and gtwvt font ends. Gtwin looks and feels just
like Clipper but is Win32, definitely not DOS. Gtwvt looks and feels
almost like Clipper too but is really GUI with controls that emulate the
console look and feel. Gtwvt and GUI can be combined, so that can be a
good start if you want to move on to Windows GUI in a second step. And I
believe it could be a good idea to start by converting what you already
have as "straight" as possible and then move on to whatever you really
want to do after the first step works.

If you want to switch to Windows GUI entirely, xHarbour has the
commercial fork (xharbour.com) and Harbour has HBQT, which is a wrapper
package for Trolltech/Nokia's QT. Other GUIs exist too.

You have already found the xHarbour newsgrop (but I am not cross posting
this reply there due to limitations in the news server I use). Harbour's
peer support group is at http://groups.google.com/group/harbour-users
but newsgroup messages can be redirected to email if you prefer that.
xHarbour.com has as closed newsgroup for paying customers.

> - What tools will I need? If I need a compiler, which one and where
> do I get it?

You will need a C compiler. xHarbour.com has one included (XCC), Harbour
has one included too (MinGw). The complete Harbour package can be found
at www.harbour-project.org, both the stable 3.0 version and the nightly,
which of course is not entirely stable every single day. xHarbour for
some reason still recommends BCC, which is old. I am not sure if Mel
includes it in his "private" distro or not. Some other C compilers can
be used as well.

GIUs other than the one included in xHarbour.com will have to be
downloaded and installed separately.

Harbour is under development just about every day, so if you want to use
the nightly you should watch very closely what happens in the developer
newsgroup from day to day and pick the version(s) you use very
carefully. xHarbour.org has stagnated, and what happens there these days
is mostly bug fixes. xHarbour.com is built on top of the xHarbour org
core. Other than that, I know very little about it.

You can use Pritpal Bedi's HBIDE for editing your source code and
building your app, or you can use any editor you like and invoke the
compiler from the commandline, or, depending on the editor, from "Run
external application" or similar. xHarbour.org has the hbmake project
manager (build tool). Harbour has hbmk2, which is a complete rewrite
from scratch and is being improved continuously for use on many
different platforms. xHarbour.com has everything included, as I
understand it.

Not about tools ... but if you use any characters other than 7-bit US
ASCII then you need to consider which codepage to use internally in the
application (and in the front end) and which codepage to use in your dbf
files and make sure you do not corrupt your data by using a codepage
that does not match the data you already have. Especially if you run
your new (x)Harbour app and the old Clipper app in parallell using the
same data files.

> I'm willing to pay for initial support, if there is such a thing.

xHarbour.com offers paid support with a few months of free support
included in your purchase. Other than that, there are lots of friendly
people in the newsgroups of both open source projects who will try to
help as best they/we can. xHarbour.com has a reference manual, which is
excellent according to those who have seen it. And a "getting started"
too for the .com version, I believe. The reference manual can be
purchased by anyone who needs it, not just .com users. On the Harbour
side there is less documentation. The Clipper docs still apply, of
course. And there is a tutorial for HBQT. And most of xHarbour.com's
reference manual can be used too.

> The only 3rd party libraries I'm using are NANFOR (I'm not even sure
> this is considered third party) and the LFN library for long filename
> support which was basically needed to retrieve the creation date of a
> file. Outside of that, everything is vanilla Clipper. I do make
> extensive use of Blinker 7.0's SWPRUNCMD command.

Most of Nanfor is supported in both camps. Some parts of it do not apply
at all when you leave DOS behind. The LFN library was written by yours
truly to overcome some of the limits of the NTVDM. It does not apply at
all in your new environment, and you will have to replace all LFN calls
with standard Clipper/(x)Harbour calls. Harbour has a Blinker lib that
emulates the most important Blinker features, including SwpRunCmd(). I
believe someone said that xHarbour also has SwpRunCmd(). Or, if that is
the only Blinker function you use, you can use RUN instead. There is no
need to swap out the application any more to free memory.

Regards,
Klas

Velimira

unread,
Apr 14, 2012, 2:41:42 AM4/14/12
to
Hi Scott,

I ported a few old Clipper 5.3 applications (One huge one with
zillions of lines of code) with xHarbour. For me this worked fine.
With Xailer I made them even with a GUI interface. I think that
Harbour as well as xHarbour will do the job perfectly. Just keep on
working until all the bugs and unresolved externals are gone.

If you need help please let me know.

Lars

Derek Bogard

unread,
Apr 15, 2012, 1:46:10 PM4/15/12
to
> My main client has a Clipper-based POS application that I have learned
> enough about to maintain, but that's about it. <

There are two things you must do to get behind Clipper 5.3b:

First, you must familiarize yourself with the debugger. The debugger
is added to your .exe by adding CLD.lib to the FILE statement - not
the LIB statement - in your link script. E.g., FILE YourApp.prg,
CLD.lib. Run the debugger by pressing Alt-D.

Second, you must refer to the Norton Guide as a language reference.
To get NG to work, add the line Switches=/k to C:\Windows
\System32\Config.nt

Derek

Scott Coffey

unread,
Apr 16, 2012, 3:31:49 PM4/16/12
to
Thanks for the excellent (as always) responses. The offers for
assistance are truly appreciated.

I think I'm going to go with what is offered at xHarbour.com. If I
want to badger someone or need answers quicker, I'd feel better doing
that there than here. :)

All I'm really after at this point is to convert the existing
application to 32 bits... IOW I'm not interested in making it more
"Windows like".


************************************************************************

On Thu, 12 Apr 2012 07:27:36 -0700 (PDT), dlzc <dl...@cox.net> wrote:

>Using vanilla (x)Harbour, you will end up with a Windows *console* program.

************************************************************************

On Fri, 13 Apr 2012 00:52:13 +0200, Klas Engwall
<klas.e...@nospam.please> wrote:

>If you want your project to still be a console application...
************************************************************************

Hi David and Klas. And thanks for all the help both of you have given
me in the past. Could either of you expand on what you mean by
"console"? If it means "it will still look like your old Clipper app"
(fonts, etc), then I have no problem with that.

One of the things that has gotten me off the sidelines is the fact
that the existing application will not run full screen on Windows 7.
Will moving this to xHarbour remove this restriction?

Thanks again,
Scott

dlzc

unread,
Apr 16, 2012, 7:36:26 PM4/16/12
to
Dear Scott Coffey:

On Monday, April 16, 2012 12:31:49 PM UTC-7, Scott Coffey wrote:
> Thanks for the excellent (as always) responses.
> The offers for assistance are truly appreciated.
>
> I think I'm going to go with what is offered at
> xHarbour.com. If I want to badger someone or
> need answers quicker, I'd feel better doing
> that there than here. :)

Well, Klas did provide a link to a discussion group similar to these, only for Harbour. Presumably there is a "quick draw artist" (me) and at least one steady marksman (Klas) there as well...

> All I'm really after at this point is to convert
> the existing application to 32 bits... IOW I'm
> not interested in making it more "Windows like".

Excellent. I mean you do get some (possible) Windoze features, like printer dialogs, and file save dialogs. You don't have to work too hard to trigger those... And you can trigger M$Excel, M$Word, or M$IE to act as your front end or print preview engine. And you have (more) seamless access to the clipboard.

Each has its code penalties, of course...


> **********************************************
>
> On Thu, 12 Apr 2012 07:27:36 -0700 (PDT), dlzc <dl***@cox.net> wrote:
>
> > Using vanilla (x)Harbour, you will end up with
> > a Windows *console* program.
>
> **********************************************
>
> On Fri, 13 Apr 2012 00:52:13 +0200, Klas Engwall
> <klas.engw***@nospam.please> wrote:
>
> >If you want your project to still be a console
> application...
> **********************************************
>
> Hi David and Klas. And thanks for all the help
> both of you have given me in the past.

Just paying it forward...

> Could either of you expand on what you mean by
> "console"? If it means "it will still look
> like your old Clipper app" (fonts, etc), then I
> have no problem with that.

That is exactly what it means. But you also have the control over the application window size, that you lost with Windows NT/XP/Vi$ta/7.

> One of the things that has gotten me off the
> sidelines is the fact that the existing
> application will not run full screen on Windows
> 7. Will moving this to xHarbour remove this
> restriction?

Either selecting a suitably-sized font, or <Alt>+<Enter> should do it for (x)Harbour.

David A. Smith

Otto Haldi

unread,
Apr 17, 2012, 6:58:14 AM4/17/12
to
On Mon, 16 Apr 2012 15:31:49 -0400, Scott Coffey <no...@noemail.com.invalid> wrote:

Hello Scott,


>Thanks for the excellent (as always) responses. The offers for
>assistance are truly appreciated.
>
>I think I'm going to go with what is offered at xHarbour.com. If I
>want to badger someone or need answers quicker, I'd feel better doing
>that there than here. :)
>
>All I'm really after at this point is to convert the existing
>application to 32 bits... IOW I'm not interested in making it more
>"Windows like".
>
>
>************************************************************************
>
>On Thu, 12 Apr 2012 07:27:36 -0700 (PDT), dlzc <dl...@cox.net> wrote:
>
>>Using vanilla (x)Harbour, you will end up with a Windows *console* program.
>
>************************************************************************
>
>On Fri, 13 Apr 2012 00:52:13 +0200, Klas Engwall
><klas.e...@nospam.please> wrote:
>
>>If you want your project to still be a console application...
>************************************************************************
>
>Hi David and Klas. And thanks for all the help both of you have given
>me in the past. Could either of you expand on what you mean by
>"console"?
> If it means "it will still look like your old Clipper app"
>(fonts, etc), then I have no problem with that.
>
I moved my own clipper application for about 2 years to xHarbour. I'm still using the console mode.
I used the lib GTWVW for some basic options. Very help full if you have a lot of sub windows.
Windows can be moved any where on the desktop. For the outputs, I bought Printing libraries PageScript.
That toke me some work to get nice prints!
Generated exe are still small and fast.

Regards
Otto

>One of the things that has gotten me off the sidelines is the fact
>that the existing application will not run full screen on Windows 7.
>Will moving this to xHarbour remove this restriction?
>
I tried to resolve this problem with GTWVW (bigger font, etc.), but without success!

Regards
Otto

Scott Coffey

unread,
Apr 17, 2012, 10:28:51 AM4/17/12
to
On Tue, 17 Apr 2012 12:58:14 +0200, Otto Haldi <oha...@chateau.ch>
wrote:

>>Hi David and Klas. And thanks for all the help both of you have given
>>me in the past. Could either of you expand on what you mean by
>>"console"?
>> If it means "it will still look like your old Clipper app"
>>(fonts, etc), then I have no problem with that.
>>
>I moved my own clipper application for about 2 years to xHarbour. I'm still using the console mode.
>I used the lib GTWVW for some basic options. Very help full if you have a lot of sub windows.
>Windows can be moved any where on the desktop. For the outputs, I bought Printing libraries PageScript.
>That toke me some work to get nice prints!
>Generated exe are still small and fast.
>
>Regards
>Otto
>
>>One of the things that has gotten me off the sidelines is the fact
>>that the existing application will not run full screen on Windows 7.
>>Will moving this to xHarbour remove this restriction?
>>
>I tried to resolve this problem with GTWVW (bigger font, etc.), but without success!

Ouch. My initial test seems to back this up... I created a "hello
world" program and pressing alt-enter on my XP machine takes it full
screen but does nothing on a Windows 7 box. This was one of the main
reasons for making the switch and now I find out it doesn't address
the problem. This is not good. :(

Scott Coffey

unread,
Apr 17, 2012, 10:29:41 AM4/17/12
to
On Mon, 16 Apr 2012 16:36:26 -0700 (PDT), dlzc <dl...@cox.net> wrote:


>> One of the things that has gotten me off the
>> sidelines is the fact that the existing
>> application will not run full screen on Windows
>> 7. Will moving this to xHarbour remove this
>> restriction?
>
>Either selecting a suitably-sized font, or <Alt>+<Enter> should do it for (x)Harbour.

I wish it were true. See my reply to Otto.

cal

unread,
Apr 17, 2012, 11:23:23 AM4/17/12
to
On Tue, 17 Apr 2012 10:28:51 -0400, Scott Coffey
<no...@noemail.com.invalid> wrote:


>>I tried to resolve this problem with GTWVW (bigger font, etc.), but without success!
>
>Ouch. My initial test seems to back this up... I created a "hello
>world" program and pressing alt-enter on my XP machine takes it full
>screen but does nothing on a Windows 7 box. This was one of the main
>reasons for making the switch and now I find out it doesn't address
>the problem. This is not good. :(

I don't know that this will help you, Scott, but...

I am converting a large legacy app from Clipper5.2e to xHarbour.com
Professional. In function main() I use setmode(46,132) to make the
console "screen area" larger than the 25 x 80 in the original app. My
client is delighted with extra screen "real estate". Selecting the
right parameters in the properties dialog, cna be used to mnake this
screen quite large, though not full screen.

Cal

dlzc

unread,
Apr 17, 2012, 3:20:45 PM4/17/12
to
Dear Scott Coffey:

On Tuesday, April 17, 2012 7:29:41 AM UTC-7, Scott Coffey wrote:
> On Mon, 16 Apr 2012 16:36:26 -0700 (PDT), dlzc <dl***@cox.net> wrote:
>
>
> >> One of the things that has gotten me off the
> >> sidelines is the fact that the existing
> >> application will not run full screen on Windows
> >> 7. Will moving this to xHarbour remove this
> >> restriction?
> >
> > Either selecting a suitably-sized font, or
> > <Alt>+<Enter> should do it for (x)Harbour.
>
> I wish it were true. See my reply to Otto.

It is, or can be:
http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/8118eb46-290c-4690-bb96-b5e77b4e80da/

I personally prefer to have large windows (cal's method), but windows still. It eases task switching.

David A. Smith

Klas Engwall

unread,
Apr 17, 2012, 5:02:12 PM4/17/12
to
Hi Cal, Scott and all,
GTWVT (at least in Harbour, I don't know if xHarbour has been updated)
also allows scaling of the window. That is, whether you set the window
to 46x32 or 80x25 or anything else, then you can drag the corner of the
(emulated console) window to any size you want, and everything inside it
is resized automatically. So you can make the window tiny and put it in
a corner of the screen while you do something else, and you can drag it
to fill the entire screen when you work with it. The first time you see
it is a true wow moment, and it is extremely useful if your eyesight is
not what it used to be (like in my case).

So Scott, before deciding anything, download Mel's xHarbour.org distro
and the stable 3.0 version from harbour-project.org, and spend a few
hours making some simple tests with GTWIN and GTWVT to see what the four
variants can do for you.

Regards,
Klas

Scott Coffey

unread,
Apr 18, 2012, 7:58:51 AM4/18/12
to
I prefer that too David, but this is a POS application where the thing
should look like an appliance and not a Windows computer.

Scott Coffey

unread,
Apr 18, 2012, 7:59:37 AM4/18/12
to
Oh... forgot to say thanks for the link. I don't understand any of it
but at least I know that full screen is possible. :)

Scott Coffey

unread,
Apr 18, 2012, 8:01:09 AM4/18/12
to
Thanks for the info cal and Klas. I'll play around with this and see
if it works with the client, but the ideal solution is full screen
mode as I described to David above.
0 new messages