In this chapter:
Aubit 4gl compiler distributions include simple Interactive Development Environment (IDE).
FIXME: why not use CodeCrusader etc...?
This code was released to Aubit 4gl project under GNU license by kind permission of author, Jonathan Leffler [jleffler@informix.com] on Sat 16/06/2001. Thank you, Jonathan.
Overview
The D4GL Programming Environment is a program which provides a programmer with an environment analogous to the i4gl and r4gl programmers environments provided with INFORMIX-4GL (I4GL) and INFORMIX-4GL Rapid Development System (I4GL-RDS). It expects to work with a Makefile. It can be used to compile programs with either Informix Dynamic 4GL (D4GL) or I4GL or I4GL-RDS. When the program is being run, you can edit, compile and correct either source files or form files, and you can run builds of an entire program, or you can test the program you have built.
The D4GL Programming Environment that can be compiled with Aubit 4gl, D4GL, I4GL or I4GL-RDS. It uses one C function, so it is necessary to have a C development system available. It creates the custom p-code runners when necessary.
Compiling
Using Aubit 4gl compiler, you should be able to type:
make a4gl
Also on Unix, you should be able to type:
make d4gl-pcode
This should compile the Informix Dynamic 4GL p-code version of the program. You could create the D4GL c-code version by making d4gl-ccode, the I4GL p-code version by making i4gl-pcode, and the I4GL c-code version by making i4gl-ccode. You could create all of these by typing:
make all
If you plan to install the program in somewhere other than $FGLDIR, then you should add D4GL_DIR=/where/you/plan/to/put/it to the command lines.
Testing
You can test the program by running one of the following commands:
./d4gl -- Aubit 4gl
./fglrun d4gl -- D4GL p-code
./d4gl.42e -- D4GL c-code
./fglgo d4gl -- I4GL p-code
./d4gl.4ge -- I4GL c-code
Do not use the d4gl cover script as it will not work on the p-code files until they have been installed (or given execute permission).
Installing
By default, the software will be installed under $FGLDIR. If you plan to install the D4GL environment in some other directory, then you should have specified D4GL_DIR=/where/you/plan/to/put/it when you compiled the program. If you forgot, simply remove the d4gl script before doing the install.
To install the D4GL p-code version in the default directory, use:
make install.d4gl-pcode
To install a different product, change the version code accordingly. To install in a different directory, ensure that you have write permissions on
the directory, and decide whether you need to remove the d4gl script before
proceeding, and then type:
make D4GL_DIR=/where/you/want/to/put/it install.d4gl-pcode
By default, the programs will be installed owned by user informix and belonging to group informix. You can override these defaults by specifying:
make D4GL_USR=me D4GL_GRP=us D4GL_DIR=/some/where install.d4gl-pcode
Note that the install process assumes you have a BSD-compatible install script. If you do not have one, the install will probably fail. There are public domain versions of the BSD install script readily available.
Cleaning
After the product is successfully installed, you can clean up the build area with:
make clean
This removes all the generated files, leaving you with just the original source code and any ad hoc files you have created.
Limitations
This is tested code on Unix. It is only barely tested on NT. There will be problems on NT with the use of sed (unless you have a Unix-workalike toolkit such as CygWin, MKS or Thompson on your NT machine). There will be problems with running processes in xterm unless you have an xterm on your NT machine. Ideas for how to correct these deficiencies will be gratefully received.
Bug Reporting
Aubit 4gl team will extend and maintain original version of this code. Therefore, we suggest that you report problems to Aubit 4gl mailing list, if you obtained it from Aubit 4gl project. But you also might consider authors original note:
If you find a problem, please report it via the IDN web site:
Optionally, you may also report it to Jonathan Leffler (jleffler@informix.com), but please use the web site too.
FIXME: describe menu option, and typical cycle in editing, compiling, fixing errors and linking...
Our aim is to provide full GNU/GPL alternative, not only to commercial x4gl compilers and database, but also for general development environment like ODBC configuration tools, IDE (Interactive development environment) for code and project manipulation, down to version control and database management tools.
Here, you will find some examples of this kind of environments that will enhance your productivity, and at the same time maintain team-oriented development environment in the manageable fashion.
You can, of course, be completely happy with just the compiler, database and vi editor, but we believe this will leave you in the dark. Providing productive compiler and language is just one of the components of productive development environment.
This chapter is very much only a draft
Please also see related project at www.falout.com
Full GNU base framework:
PostgreSQL database and ODBC driver, platform and OS independent
iODBC manager platform and OS independent (needed on UNIX only) (unixODBC would extend or replace iODBC functionality with it's own ODBC set of drivers and GUI ODBC setup and maintenance tools)
Aubit 4GL platform OS and database independent
Full GNU, additional tools:
Code Crusader with 4gl extensions and syntax highlighting, platform and OS independent
Paccess management for PostgreSQL (very nice, TCL/TK) platform and OS independent
B&J WTK for Aubit GUI front-end, (TCL/TK) platform and OS independent
CVS Concurrent Version Control framework
jCVS CVS access client written in Java
Keystone
Phorum
PHP
And then, add bunch of GNU 4gl application, including our Maximise (I hope..)
Commercial:
GWD shareware text editor with many 4gl related, IDE-like functionality
FIXME: GWD using Wine, import GWD::4gl files to CVS
Informix IDS database engine
From temp documents:
NOTE: this is a temporary document, which will be removed once it's included in Aubit 4gl manual. Please look for updates in manual.
most x4GL compilers don't have a standard development environment distributed with them, that is analogous to the Informix i4gl and r4gl programmer's environments distributed with Classic I4GL and I4GL-RDS. However, it is not very hard to create one using 4GL programming language, and the source code for one such environment is available through IDN, and included in Aubit CVS and distributions with authors permission.
aIDE assumes that you are working with MAKE rather than trying to use the program database used by i4gl and r4gl. The source code requires two C functions and the corresponding fglext.c file to be linked into the custom runner, if compiling with Informix or 4Js p-code compilers.
One of those functions, file_access(), is called by the aIDE code. It allows an 4GL program to determine whether a file exists and is readable, writable or executable. It uses the Unix/POSIX system call access(2), so it can produce odd results if the program is running SUID.
The other function is a C support function, popstring(), that has been included in the Classic I4GL library since release 4.12/6.00 but is not in the D4GL library. This is a variant on popquote() which removes all trailing blanks from the variable. It behaves differently from both popquote() and popvchar().
All the other code is relatively straight-forward I4GL code. The program has been enhanced to work with the D4GL/BDL environment. It can run in character mode or GUI mode, and can be compiled with all compilers supported by "amake", including Aubit 4gl, Classic I4GL (p-code or c-code) or with D4GL (p-code or c-code).
There is a Makefile included which works with amake, using GNU MAKE. The Makefile is a reasonable example of how to design Makefiles for use with amake while remaining compatible with other 4gl compilers when using C functions. Because program uses C functions, special case of amake footer file, footer-c.mki is used.
Prepared by: mailto:jleffler@informix.com
Last Updated: 1999-10-06
Modified by: mailto:afalout@ihug.co.nz
Last Modified: 2001-09-23