Thursday, April 9, 2009

Using Harbour+WVG +xMate - Part I

Using Harbour+HMG or HMG Extended is great but I still needed to provide a solution to quite a number of my existing users who prefer to use our apps in text mode but yet Win32 ready.These users just love to use the keyboard and loathe to use the mouse :-)

I did consider using WVW but since Budyanto does not have time to update his great GUI library, I decided to take a serious look at Harbour + WVG.

After playing with the xMate that came with Pritpal Bedi's Ready to use Harbour Distro, I finally managed to compile and build a Harbour+WVG version of FAS4DOS codenamed FAS4WVG. This is what I have done :-

1. Installed Pritpal's Ready to Use Harbour which resulted in a folder being created ie
c:\harbour_dev with the following sub-folders
dev_exes
dev_libs
dev_projects
dev_sources
harbour
mingw
xmate

2. I then copied the previously converted FAS4DOS codes (from 5.2e to xHarbour) into a new folder FAS4WVG under the dev_projects folder. I did this in order to save time as all UNRESOLVED EXTERNALS had already been dealt with as per my previous articles "Migrating from CA-Clipper 5.2e to xHarbour Part I, II & III "

Please note that there is also a default demowvg folder already there for your reference.

3. Moving to the xMate Directory, I launched xMate and created a new Project


4. What is important here is to choose
a) Project Type, default Executable
b) Environment (wvgMINGW, wvgBCC, wvgMSC, wvgWATCOM)
Nb. Only MINGW comes with this Pritpal's Distro
c) You may also choose to Import based on a Clipper Blinker/Exospace link script

5. Click OK and
a) Input Project name, in my case FAS4WVG
b) Input HOME Folder (where your project files reside)
c) Add Project Files


c) Save and both the XMate Editor and Project Manager are launched


6. Under the xMate Project Manager, you can choose to :-
a) Build Project
b) Build and Launch Project
c) Rebuild Project
d) Rebuild and Launch Project
e) Launch Project
f) Compile single source
g) Compile all sources

7. I then clicked (b) and starting getting errors mainly due to ambiguous references relating to getlists which I resolved by adding LOCAL getlist:={}

8. Then, I got the 'FATAL : Unknown Error - Check Output Console'

9. I then clicked the icon that had a ? over it and saw that I had a few errors such as
a) Unresolved external references
b) Duplicate decalarations

By checking to my original Blinker Link Script, I realised that I had inadvertently left out a prg whilst including a couple of redundant prgs.

10. Once resolved , bingo, FAS4WVG was finally built and launched


Next to add GUI features ...

3 comments:

  1. Hi CCH,

    This will be extremely helpful to all clipper programmers (like myself)! I downloaded Pritpal's WVG and installed it.
    I already used xMate and I like it very much. Now, from Pritpal's setup I got the .env files. Only problem is that black background color!!!! Frankly speaking I don't like it. So I have to customize it.

    Regards.

    Sudip

    ReplyDelete
  2. I'm really eagger to see more of your work. I have the same type of clients that hate mouse work, and I'm really looking for a solution for providing graphic interface without windows dependency...
    I don't know if I should loose hope on the future release of LLIBG xHarbour port...
    Maybe this is a good alternative.
    Good job

    ReplyDelete
  3. Hi CCH
    I want to develop a Harbour WVT application with similar look to FAS4WVG. I'm new to Harbour/GT and need real application source code to study. Could you please provide my the source code for FAS.
    Thank you and best regards
    Lorenz

    ReplyDelete