Harbour MiniGUI Extended Edition
Download and install
To install and use MiniGUI, you will need:
- MiniGUI source and binaries
- Harbour or xHarbour compiler
- Borland C++ compiler (version 5.5.1), or MinGW (since version 4.4), or Open Watcom (version 1.9), or Pelles C compiler
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 in both of these 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
1. Edit or create
C:\Borland\BCC55\Bin\bcc32.cfg and include
the following lines:
If you are using xHarbour, use the following lines instead:
2. Edit (or create)
include the following line:
If you are using xHarbour, use the following line instead:
3. Set environmental variables in your
If you did not install Borland C++ to
C:\Borland\BCC55, add the line
SET MG_BCC=<location of Borland C++> to your
If you did not install MiniGUI to
C:\MiniGUI, add the line
SET MG_ROOT=<location of MiniGUI>.
Harbour is included in MiniGUI at
%MG_ROOT%\Harbour, which defaults to
C:\MiniGUI\Harbour. To use Harbour in some other location, add the line
SET MG_HRB=<location of Harbour>.
MiniGUI libraries compiled for Harbour are included in MiniGUI at
%MG_ROOT%\Lib, which defaults to
C:\MiniGUI\Lib. To use MiniGUI libraries for Harbour in some other location, add the line
SET MG_LIB=<location of MiniGUI libraries for Harbour>.
If you are using xHarbour:
SET MG_CMP=XHARBOURto your
The default location for xHarbour is
C:\xHarbour. To use xHarbour in a different location, add the line
SET MG_XHRB=<location of xHarbour>.
The default location for MiniGUI libraries compiled for xHarbour is
%MG_ROOT%\xLib, which defaults to
C:\MiniGUI\xLib. To use MiniGUI libraries for xHarbour in some other location, add the line
SET MG_XLIB=<location of MiniGUI libraries for xHarbour>.
Build MiniGUI libraries: Go to the
\SOURCEdirectory within MiniGUI and run
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:
DEFINE WINDOWcommand creates the window.
Win_1is the name of the window.
AT 0,0indicates the window position (row 0, col 0).
WIDTH 400means that the window will be 400 pixels wide.
HEIGHT 200means that the window will be 200 pixels high.
TITLE 'Hello World!'indicates the text in the window title bar.
MAINindicates that we are defining the main application window.
ACTIVATE WINDOW Form_1shows the window and starts the event loop.
To compile and run this program, put it into
use MiniGUI’s standard tool
Compile.bat by typing
Other development tools are described below.
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'
The above hello world program is in the MiniGUI samples at
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/.
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
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
.mpm files with MPM and set the locations of BCC, Harbour, and
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.
For questions or suggestions about MiniGUI or Harbour, see Support.