================================
  Basic4GL source distribution
================================
v2.2.6
Copyright (C) Tom Mulgrew, 2004 (tmulgrew@slingshot.co.nz)
Last updated 16-Dec-2004
www.basic4gl.net


LICENSING
=========

This source code (and all supporting files) is distributed under the Basic4GL open-source license agreement, as stated in license.txt (included in the distribution).


REQUIREMENTS
============

Basic4GL is a Windows application written in C++.
The official released version is built with Borland C++ Builder v6.
Other versions have also been successfully built with Borland C++ 5.5 (free version) and Microsoft Visual C++ 6 (these are command line versions with no user interface).

There is one stripped down build of Basic4GL that contains only the language itself (compiler and virtual machine) and a simple "print" function that writes to cout.
There is no Windows or OpenGL specific code in this version, so it should *theoretically* be compatible with any C++ compiler on any platform.

IMPORTANT:
All other versions require an up to date glext.h header file (...\include\gl\glext.h), defining:
	PFNGLMULTITEXCOORD2FARBPROC
	PFNGLMULTITEXCOORD2DARBPROC
	PFNGLACTIVETEXTUREARBPROC

If you cannot compile glWindow.h, then you will need to obtain a new version:
http://www.opengl.org/resources/faq/technical/extensions.htm
(Scroll to the bottom.)

PROJECTS
========

There are 4 different ways to build Basic4GL.

1. Standard build. 
This builds Basic4GL the same way as it is built for official Basic4GL releases.
Requires:
* Windows 98 or later
* Borland C++ Builder 6
* The TMemoEx component (Free 3rd party control available from www.TMemoEx.com)

Project file:
Basic4GL\Basic4GL.bpr


2. Standalone exe build
This builds the stub.bin file, which is used by Basic4GL to create standalone exes.
Standalone exes are built with a simple technique commonly used for scripting languages called "binding".
A "stub" executable is created containing the Basic4GL compiler, virtual machine and support libraries. Basic4GL creates and exe by copying this file and inserting the Basic4GL program text into a reserved area in the file.
Thus when the exe runs, it finds the Basic4GL program, and compiles and runs it.

Requires:
* Windows 98 or later
* Microsoft Visual C++ v6
(This is because MSVC has a command for reserving a section in an executable file, which makes patching it MUCH easier. I couldn't find the equivalent in Borland C++/C++ Builder.)

Project file:
Standalone\Standalone.dsw


3. Command line build
This builds Basic4GL as a command line compiler/executer. There is no user interface, it simply runs the Basic4GL program stated on the command line.
This should be able to run Basic4GL program that the official released version of Basic4GL can run.

Requires:
* Windows 98 or later
* Microsoft Visual C++ v6 OR Borland C++ v5.5 (eg free version)
(Or Borland C++ Builder v6, but I haven't created a project file for this yet.)

Project file:
CommandLineCompiler\Compiler.dsw	(For Microsoft Visual C++ v6)
CommandLineCompiler\makefile		(For Borland C++ v5.5)


4. Simplified build
This builds a cut down version of Basic4GL, containing the just language and 2 simple functions.
All the OpenGL code and other libraries have been removed as well as the user interface. There should be little (if any) Windows specific code.

This should be a good starting point for:
* Porting Basic4GL to other platforms or operating systems. Get the cut down compiler running first, then build up the supporting libraries and user interface.
* Building other versions of Basic4GL using the Basic4GL language, but other technology (perhaps a DirectX version perhaps?)
* Using Basic4GL as a scripting language within another application?

Requires (to build the existing project files):
* Windows 98 or later
* Microsoft Visual C++ v6 OR Borland C++ Builder v6 OR Borland C++ v5.5

Project file:
SimpleCompiler\SimpleCompiler.dsw	(For Microsoft Visual C++ v6)
SimpleCompiler\SimpleCompiler.bpr	(For Borland C++ Builder v6)
SimpleCompiler\Makefile			(For Borland C++ v5.5)