Users of the VFX Forth Professional and Mission editions have all the source code and tools needed to rebuild the system. VFX Forth Mission includes the source code for the tools as well as the Forth source code.
The source code is found in the Sources directory. Tools are in the Tools directory. The build process is controlled by a set of Linux shell scripts in the Sources directory itself. Some of these scripts may contain hard-coded paths and should be checked and edited before running the scripts. The resulting executables will be placed in the directory Sources\Images.
The full build is performed under Linux by executing
./RebuildLin.sh
from the Sources directory.
The build is performed in three stages:
Short cuts are available through batch files described later.
The core kernel is cross-compiled from the Sources/Kernel folder by executing
./mlinux.sh
which runs the cross compiler twice to produce the Pentium and 386 kernels vfxkern.elf and vfxkern386.elf.
The second part of the build produces the base version of VFX Forth. This part of the build occurs in Sources/VFXBase. Run:
./mlinux.sh
It compiles the second stage builds to produce vfxlin and vfxlin386 in the the Sources/Images directory. This process can also be performed from the Sources directory:
./Stage2Lin.sh
To be defined
The PDF manuals require a LaTeX with TexInfo distribution on a Linux box.
The HTML and PDF manuals are produced by DocGen. Change to the Sources\Manual directory and run
./MakeLinux.sh
The tools source code supplied with the Mission edition will be found in the TOOLS\SRC directory. Each subdirectory will contain a make file MAKEFILE or a shell script MAKExxx.sh. Tools written in C will have been compiled by gcc.
The two shared libraries, libmpeparser.so.0 for INI files and vfxsupp.so.1.0.1 for Linux constants, very rarely need rebuilding.
The INI file support library enables persistent storage of configuration data using Windows-style INI files. The code accesses a derivative of the iniParser v3.0b shared library published by Nicholas Devillard at http://ndevilla.free.fr/iniparser/, where the latest version may be found. Note that the MPE versions differ from this version, but are upward compatible. We have submitted our changes to the author.
The source code for the MPE versions (Linux and Windows) are in Sources/Tools/iniparser3.0b. For the Linux version, use Makefile in the root of the directory. For the Windows version, switch to the src.win folder and run make.bat which is for use with VC6.
The vfxsupp library allows the Forth system to look up Linux constants from header files without applications having to be bloated by a vast number of headers. The number handling mechanism in VFX Forth searches the library if the text cannot converted as a number.
The sources are in Tools/VfxSupport/Lin32. The library is built using Makefile. If you get an error, especially after adding a new header file to headerlist.h, it is nearly always because the constant cannot be correctly evaluated by the Forth application, e.g. because it is a pointer to a text string. In this case, add the item to headerlist.exclude and rebuild. Keep going until there are no more errors.
The essence of the process is that the header files are run through the C pre-processor to produce headerlist.i.orig, filtered by an awk script to produce headerlist.i, and then incorporated into the shared library.
The packaging script was written by Kelly Dunlop and then modified by Vic Watson and Stephen Pelc. Any faults in this script are entirely the responsibility of MPE. Without the support and persistence of Kelly and Vic, the VFX Forth for Linux packages would not exist. If you have the choice, leave maintenance of the packaging scripts to other people.
Compared to packaging Windows programs, packaging Linux applications is a nightmare. Packaging 32 bit applications for general release requires five different releases, depending on the default installer and CPU:
As a result of having three editions of VFX Forth, as of November 2013, only tarballs are supported.
Everything is done by PackageLin32.sh. The script is heavily commented. If you change it, on your own head be it. The RPM builds require the file .rpmmacros in your home directory. You will find a sample rpmmacros.txt in the Scripts directory with default sets of the scripts. See also the directory Scripts/extras.
The Mission edition of VFX Forth contains source code and tools for everything to do with VFX Forth, including the full build, release and packaging scripts used by MPE to issue the software. Assuming that the Mission release is in directory called VfxForth.dev, the complete process is performed by changing to that directory and running:
./MakeLin32.sh
which runs Scripts.Lin32/FullLin32.sh that calls many other scripts, including: