Harbour MiniGUI Extended Edition

Getting Started

Download and install

To install and use MiniGUI, you will need:

MiniGUI uses Harbour and Borland C++ by default. To use MiniGUI with Harbour and Borland C++, go to the Download page and download the first two files. Harbour binaries are included in the first file. Run the installation of both files.

The first installation file installs MiniGUI and Harbour, and the second installation file installs Borland C++. The default location for MiniGUI is C:\MiniGUI, and for Borland C++ it is C:\Borland\BCC55. The configuration directions below assume you have installed to these locations. Be sure to adjust your configuration to reflect your installation.

You may also use xHarbour instead of Harbour. While Harbour binaries are included in MiniGUI, xHarbour binaries are not. If you use xHarbour, you must download and install it separately. You must also build MiniGUI’s libraries with xHarbour, as explained below. The configuration directions below assume you install it to the default location of C:\xHarbour.

Configure

1. Edit or create C:\Borland\BCC55\Bin\bcc32.cfg and include the following lines:


    -I"c:\Borland\Bcc55\include"
    -L"c:\Borland\Bcc55\lib;c:\Borland\Bcc55\lib\psdk"

If you are using xHarbour, use the following lines instead:


    -I"c:\Borland\Bcc55\include;c:\xharbour\include"
    -L"c:\Borland\Bcc55\lib;c:\Borland\Bcc55\lib\psdk;c:\xharbour\lib"

2. Edit (or create) C:\Borland\BCC55\Bin\ilink32.cfg and include the following line:


    -L"c:\Borland\Bcc55\lib;c:\Borland\Bcc55\lib\psdk"

If you are using xHarbour, use the following line instead:


    -L"c:\Borland\Bcc55\lib;c:\Borland\Bcc55\lib\psdk;c:\xharbour\lib"

3. Set environmental variables in your AUTOEXEC.NT:

If you are using xHarbour:

Your First MiniGUI Program

At this point, you should be ready for your first MiniGUI program. We will start with a program, hello.prg, that displays a “Hello World” window.


    #include "minigui.ch"

    PROCEDURE Main

      DEFINE WINDOW Win_1 ;
        AT 0,0 ;
        WIDTH 400 ;
        HEIGHT 200 ;
        TITLE 'Hello World!' ;
        MAIN 
      END WINDOW

      ACTIVATE WINDOW Win_1

      RETURN

In the above code:

To compile and run this program, put it into hello.prg and use MiniGUI’s standard tool Compile.bat by typing


    c:\minigui\batch\compile.bat hello

Other development tools are described below.

Semi-OOP syntax

In the example above, to retrieve the window title, use the command:


    cVar := Win_1.Title

and to change the window title, use the following:


    Win_1.Title := 'New Title'

More samples

The above 'Hello World' program is in the MiniGUI samples at \SAMPLES\BASIC\HELLO_WORLD. The \SAMPLES directory contains hundreds of other working MiniGUI applications.

Many more samples, documents, libraries, utilities, and tools are in the MiniGUI user group upload center at http://groups.yahoo.com/group/harbourminigui/files/.

Development tools

MiniGUI includes the following development tools.

Compile.bat, located in \BATCH and briefly mentioned above, is a command line tool for building an executable from one or more source files. Type compile.bat /? for help text.

MPM (MiniGUI Project Manager), located in \UTILS\MPM, is a GUI tool for building an executable from one or more source files. MPM stores the specs for each executable in a project file with an .mpm extension. Before using MPM, use the Compile.bat in the MPM directory to build the MPM executable. Within MPM, use Tools | Environment to associate .prg and .mpm files with MPM and set the locations of BCC, Harbour, and MiniGUI.

The MiniGUI IDE (integrated development environment), located in \IDE, is a GUI tool for visual form editing and application building. Within the IDE, use Tools | Preferences to set the locations of BCC, Harbour, and MiniGUI and make other settings.

Support

For questions or suggestions about MiniGUI or Harbour, see Support.