Re: [harbour-users] Using Harbour to compile sw written in Clipper 5 to run i...

409 views
Skip to first unread message

G3...@aol.com

unread,
Dec 28, 2015, 9:20:04 AM12/28/15
to harbou...@googlegroups.com
Hi Siggi
 
I can answer a part of your question but I do not know the Raspberry Pi very well.
 
I have managed to compile Clipper source code using Harbour Mini Gui to run as a console application under Windows XP 32bit and Windows 7 64bit with very few changes to the source code.
 
No doubt someone else can advise if there is a version of Wine that would allow Windows applications to run under Linux on the Pi or if there is a Linux based Clipper source code compiler. I have run my own compiled Windows applications under Wine on Ubuntu Linux.
 
Regards

Bob

Bob F Burns G3OOU, G-QRP 6907, @BobFBurns
Crystal Palace Radio & Electronics Club: www.g3oou.co.uk
Technical web site: www.qsl.net/g3oou
 
In a message dated 28/12/2015 11:40:50 GMT Standard Time, siggi....@gmail.com writes:

Hi all and a Merry Christmas,

I have also posted this in the Developers section.

I’m new to this, so apology if this is not the correct place to ask this question.

I look after the IT side of things for a gliding club which is based on the south coast or England called PNGC. One of our members has written a program called LogStar which is used in the gliding club for all gliding activities ranging from club membership to logging all the flights for each club member.

He created the program in Clipper 5 and then compiles it to run in DOS on a Windows PC. The problem is that DOS is slowly dying, so we are looking at alternatives to run this program. One thought is to recompile the program, so that it can run on the raspberry pi raspbian OS which is linux based. If this is possible then we could continue to use the LogStar program on a basic raspberry pi box instead of a PC.

The basic requirements for running LogStar is to have it in a full screen, be able to print reports like the flying list order and to be able to back up the data files via a USB stick connected to the raspberry pi.

The question is – does anyone know if it might be possible to compile Clipper 5 created code in Harbour to run on the raspberry pi?

 Thanks in advance for any feedback.

Siggi

--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
harbour-user...@googlegroups.com.
For more options, visit
https://groups.google.com/d/optout.

Francesco Perillo

unread,
Dec 28, 2015, 9:41:27 AM12/28/15
to harbou...@googlegroups.com
On Mon, Dec 28, 2015 at 3:19 PM, G3OOU via Harbour Users <harbou...@googlegroups.com> wrote:
No doubt someone else can advise if there is a version of Wine that would allow Windows applications to run under Linux on the Pi

No, it is not possible to have wine run on an arm-based computer... well, strictly tecnically speaking, it may be possible, but performance would be.

 
or if there is a Linux based Clipper source code compiler.

Yes, there is, it's called Harbour :-))))
 
I have run my own compiled Windows applications under Wine on Ubuntu Linux.

If you are using the app in text mode only (no GUI) you should probably try to use linux natively...



Siggi Ingason

unread,
Dec 28, 2015, 11:27:22 AM12/28/15
to Harbour Users
Thanks to those that replied in the developer section (and here as well).

This all looks very promising, in that I can probably use the Harbour compiler to create the Linux (Raspberry Pi) version of the DOS program.
LogStar is purely a text program with no fancy graphics, so once I understand how to compile the Clipper code, hopefully it will work on the Pi when it's compiled for Linux.

Just for info, as there was a comment about running the DOS program on the Pi, Yep, I now it won't run on the Pi, unless I run it in DosBox, which works, but I need printer support and I would really like to have it running in the native raspion OS.  

The developer of the LogStart program has sent me the modules which all have a .prg extension. I now need to find a "Dummies guide" on how to use the Harbour compiler, so that I can progress this project.

Any advice gratefully received.

Francesco Perillo

unread,
Dec 28, 2015, 11:32:06 AM12/28/15
to harbou...@googlegroups.com
did he provide a .lnk file ? or .rmk file? or one or more .bat files with the settings to compile? The former files are instructions on how to link the compiled .prg files into an executable and it would be clear if there is some external library involved.

In my online guide you will find all the infos needed but I wonder if it is your first programming experience...

Siggi Ingason

unread,
Dec 28, 2015, 11:33:25 AM12/28/15
to Harbour Users
Hi Bob and thanks for the feedback

DosBox works on the PI and runs the LogStar program, but it's a bit slow and there is no direct support for printing from the DosBox environment. The ideal solution is to compile the modules to a Linus base, so that it can run within the native Pi OS

Regards
Siggi G5ECO based near Southampton


On Monday, 28 December 2015 14:20:04 UTC, Bob wrote:
Hi Siggi
 
I can answer a part of your question but I do not know the Raspberry Pi very well.
 
I have managed to compile Clipper source code using Harbour Mini Gui to run as a console application under Windows XP 32bit and Windows 7 64bit with very few changes to the source code.
 
No doubt someone else can advise if there is a version of Wine that would allow Windows applications to run under Linux on the Pi or if there is a Linux based Clipper source code compiler. I have run my own compiled Windows applications under Wine on Ubuntu Linux.
 
Regards

Bob

Bob F Burns G3OOU, G-QRP 6907, @BobFBurns
Crystal Palace Radio & Electronics Club: www.g3oou.co.uk
Technical web site: www.qsl.net/g3oou
 
In a message dated 28/12/2015 11:40:50 GMT Standard Time, siggi....@gmail.com writes:

Hi all and a Merry Christmas,

I have also posted this in the Developers section.

I’m new to this, so apology if this is not the correct place to ask this question.

I look after the IT side of things for a gliding club which is based on the south coast or England called PNGC. One of our members has written a program called LogStar which is used in the gliding club for all gliding activities ranging from club membership to logging all the flights for each club member.

He created the program in Clipper 5 and then compiles it to run in DOS on a Windows PC. The problem is that DOS is slowly dying, so we are looking at alternatives to run this program. One thought is to recompile the program, so that it can run on the raspberry pi raspbian OS which is linux based. If this is possible then we could continue to use the LogStar program on a basic raspberry pi box instead of a PC.

The basic requirements for running LogStar is to have it in a full screen, be able to print reports like the flying list order and to be able to back up the data files via a USB stick connected to the raspberry pi.

The question is – does anyone know if it might be possible to compile Clipper 5 created code in Harbour to run on the raspberry pi?

 Thanks in advance for any feedback.

Siggi

--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-users+unsubscribe@googlegroups.com

Siggi Ingason

unread,
Dec 28, 2015, 11:43:01 AM12/28/15
to Harbour Users


On Monday, 28 December 2015 16:32:06 UTC, fperillo wrote:
did he provide a .lnk file ? or .rmk file? or one or more .bat files with the settings to compile? The former files are instructions on how to link the compiled .prg files into an executable and it would be clear if there is some external library involved.

In my online guide you will find all the infos needed but I wonder if it is your first programming experience...

Most of the files are .prg files, plus two .OBJ and one .RMK  file. I would say my programming skills are now limited! I used to program in REXX and even APL (both old IBM programming language) but that was about 25+ years ago   :-)

Where can I find you programming guide? 

Alain Aupeix

unread,
Dec 28, 2015, 11:43:09 AM12/28/15
to harbou...@googlegroups.com
Le 28/12/2015 17:27, Siggi Ingason a écrit :
> Just for info, as there was a comment about running the DOS program on
> the Pi, Yep, I now it won't run on the Pi, unless I run it in DosBox,
> which works, but I need printer support and I would really like to
> have it running in the native raspion O
I suppose you're talking about the dos version.

If you compile using harbour under linux, you won't have to use dosbox,
it will be a native linux program.

The simplest way to try it, ids first to use a vmware ou Virtualbox
image of linux, to install harbour in it, and compile. After, when you
will try on raspberry, it ought to work. To avoid having to install
harbour on raspberry, compile using static flag.

I haven't you rapberry, but I know it's possible to install Linux on
raspberry... under linux, no problem for print support.

A+
--
------------------------------------------------------------------------
Alain Aupeix
http://jujuland.pagesperso-orange.fr/
http://pissobi-lacassagne.pagesperso-orange.fr/
------------------------------------------------------------------------
U.buntu 12.04 | G.ramps 3.4.9-1 | H.arbour 3.2.0dev (2015-12-16 18:09) |
HbIDE (Rev.316) | Five.Linux (r143) | Hw.Gui (2510)
------------------------------------------------------------------------

Siggi Ingason

unread,
Dec 28, 2015, 11:51:46 AM12/28/15
to Harbour Users
Hi Alain,

As I'm new to this, is it not possible to run the Harbour compiler on a Windows machine, but compile the Clipper 5 modules to produce a Linux program (on the windows pc) which can then be transferred to the 
Pi without actually running the Harbour software on the Pi or do I need to do the lot on the Pi?

Francesco Perillo

unread,
Dec 28, 2015, 11:53:32 AM12/28/15
to harbou...@googlegroups.com
On Mon, Dec 28, 2015 at 5:43 PM, Siggi Ingason <siggi....@gmail.com> wrote:

Most of the files are .prg files, plus two .OBJ and one .RMK  file.

The .rmk is the file used to give instructions to rmake, the system that helps create the exe. Harbour has its own system, hbmk2.
 
 I would say my programming skills are now limited! I used to program in REXX and even APL (both old IBM programming language) but that was about 25+ years ago   :-)

Where can I find you programming guide? 

It's not a programming guide, really, but the history of a conversion from clipper 87 to harbour. I posted the link to the site earlier.

Francesco Perillo

unread,
Dec 28, 2015, 12:17:46 PM12/28/15
to harbou...@googlegroups.com
Yes, it is possible, it is called cross-compiling. And it is a bit more complicated...
Infact you need all the standard windows tools + a cross-compiler for Raspberry target hosted on windows and you will use this to build a harbour "toolchain"...

Harbour reads clipper code and emits intermediate c code. It then calls the proper c compiler to translate c code into assembly language depending on the target cpu. hbmk2 helps a lot, but there are steps involved, first of all finding the correct cross-compiler.

I did it in the past three times, one for a linux running on a Hauppauge MediaMVP set-top-box, one for running Harbour under blackberry os10 (with hbQt) and one for running Harbour under android (with hbQt).
The last two were quite easy because there is an official supported toolchain available for windows, while for the first, I had to do it under linux and compile the cross-compiler myself.

Anyway, we are going off-topic in this mailing list. You can find some more info on cross-compiling for Raspberry here:https://www.raspberrypi.org/documentation/linux/kernel/building.md  and they suggest to use linux as host operating system. Google for "raspberry pi cross compiling windows" for windows solutions but most of them use CygWin...





--

Siggi Ingason

unread,
Dec 28, 2015, 1:03:42 PM12/28/15
to Harbour Users
Thanks for the info,
                                I like to keep things simple, so it sounds like I should compile the code on the Pi. I guess the first stage is to install Harbour on the Pi and install all the files from the developer onto the pi, which is easy to do, all
I need to do is copy them from the PC onto a memory stick and load them onto the Pi. After that, that's when the fun starts.
 
Then I need to stick my head into the guide to see what I do next :-)

I need to read through the various points again, but if I remember correctly, I need to run the Harbour compiler on the Pi in the DosBox type environment. 


I appreciate all the support I am getting - it shows that Forums do work and that there are people out there like you and the others, that help people like me with limited experience :-)


Gale Ford

unread,
Dec 28, 2015, 1:39:46 PM12/28/15
to Harbour Users
You can always install Harbour and the program on your Windows programming computer. Then once you get comfortable with Harbour and the conversion is running to your satisfaction you can install Harbour and converted program on Pi machine to compile it for Linux.


On Monday, December 28, 2015 at 8:20:04 AM UTC-6, Bob wrote:
Hi Siggi
 
I can answer a part of your question but I do not know the Raspberry Pi very well.
 
I have managed to compile Clipper source code using Harbour Mini Gui to run as a console application under Windows XP 32bit and Windows 7 64bit with very few changes to the source code.
 
No doubt someone else can advise if there is a version of Wine that would allow Windows applications to run under Linux on the Pi or if there is a Linux based Clipper source code compiler. I have run my own compiled Windows applications under Wine on Ubuntu Linux.
 
Regards

Bob

Bob F Burns G3OOU, G-QRP 6907, @BobFBurns
Crystal Palace Radio & Electronics Club: www.g3oou.co.uk
Technical web site: www.qsl.net/g3oou
 
In a message dated 28/12/2015 11:40:50 GMT Standard Time, siggi....@gmail.com writes:

Hi all and a Merry Christmas,

I have also posted this in the Developers section.

I’m new to this, so apology if this is not the correct place to ask this question.

I look after the IT side of things for a gliding club which is based on the south coast or England called PNGC. One of our members has written a program called LogStar which is used in the gliding club for all gliding activities ranging from club membership to logging all the flights for each club member.

He created the program in Clipper 5 and then compiles it to run in DOS on a Windows PC. The problem is that DOS is slowly dying, so we are looking at alternatives to run this program. One thought is to recompile the program, so that it can run on the raspberry pi raspbian OS which is linux based. If this is possible then we could continue to use the LogStar program on a basic raspberry pi box instead of a PC.

The basic requirements for running LogStar is to have it in a full screen, be able to print reports like the flying list order and to be able to back up the data files via a USB stick connected to the raspberry pi.

The question is – does anyone know if it might be possible to compile Clipper 5 created code in Harbour to run on the raspberry pi?

 Thanks in advance for any feedback.

Siggi

--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-users+unsubscribe@googlegroups.com

Francesco Perillo

unread,
Dec 29, 2015, 3:06:49 AM12/29/15
to harbou...@googlegroups.com
Hi Siggi,
I think the first step is to install harbour on your windows machine.
You can build it yourself or download it from here: http://sourceforge.net/projects/harbour-project/files/binaries-windows/nightly/

Once it is installed properly, you should check that you have all the source code and prepare the build file, starting from the .rmk file you already have.

Harbour is able to compile clipper source code but there my be edge cases to be handled. You must also be sure that your program doesn't use external libraries not yet available for harbour.

Until this point you should not care about Raspberry. Forget about it.

When your program is up and running under windows, you may start to think about a linux port. I was able to port a harbour GUI app (using hbQt) to Mac in a few hours....

Francesco Perillo

unread,
Dec 29, 2015, 4:05:46 AM12/29/15
to harbou...@googlegroups.com
Sorry, I forgot:  I strongly suggest to use a system to keep track of source code changes, something like git or mercurial, so that you can roll back to previous versions of the source code. I use mercurial.

Massimo Belgrano

unread,
Dec 29, 2015, 4:45:34 AM12/29/15
to harbou...@googlegroups.com
Harbour itself use git

2015-12-29 10:05 GMT+01:00 Francesco Perillo <fper...@gmail.com>:
Sorry, I forgot:  I strongly suggest to use a system to keep track of source code changes, something like git or mercurial, so that you can roll back to previous versions of the source code. I use mercurial.

--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Massimo Belgrano
Delta Informatica S.r.l. (Cliccami per scoprire 

Siggi Ingason

unread,
Dec 29, 2015, 6:29:33 AM12/29/15
to Harbour Users
Good advice, I think you are correct.

I will download and install the software on my PC and see what happens. At least this will prove if Harbour can create the dos version of the LogStart program as is before trying to create the Pi version.  

Massimo Belgrano

unread,
Dec 29, 2015, 6:41:30 AM12/29/15
to harbou...@googlegroups.com

--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Siggi Ingason

unread,
Dec 31, 2015, 5:10:26 AM12/31/15
to Harbour Users
Thanks for the link. I have now printed these and am currently going through the process.

I plan to compile the modules for windows first and then compare the final product with the current compiled version which we are currently using. If all goes well, I will then try and compile the modules for the Pi version. I'm not sure if I should do this from the windows pc but I will work that one out once I have mastered how to compile the modules for windows.

I really appreciate everyone's help as I would not be able to do this without all of the support I am getting.     

Siggi
Reply all
Reply to author
Forward
0 new messages