The 'DarkENGINEER PreProcesser Tool-Chain Manager' simply provides a means to manage and apply multiple pre-processors to your source code prior to compilation. This tool is the first in a planned suite of applications and utilities designed to enable the use of industry-standard software engineering techniques in the development of DBP tools and games.
This release is designed for the default IDE, but there is no reason why it can't be setup for use in others.
The manager consists of two applications; a configuration utility and a runtime. The configuration utility is used to setup and manage a tool-chain. The runtime is what the IDE calls (in-place of the DBP Compiler) to apply the tool-chain and invoke compilation.
Functionality:
- Add/remove pre-processors and change their order in the tool-chain
- Enable/disable individual pre-processers or the entire tool-chain
- Supply additional command-line arguments to individual pre-processors
- Individually Suppress pre-processor application windows (useful for hiding ugly console windows etc.)
The tool operates by simply executing each pre-processor in turn before finally invoking the DBP compiler. Each pre-processer is passed the command line arguments provided by the IDE, as well as any additional arguments specified in the configuration utility. Execution of the tool-chain can be canceled at any time.
The tool-chain runtime does not require pre-processor developers to do anything special with their executables. However, the tool-chain runtime does interpret the exit codes returned by pre-processors.
If a pre-processor application returns zero, the runtime assumes that the application finished successfully and so continues on down the chain. If an application returns non-zero, the runtime assumes that the application finished unsuccessfully. When this happens, the runtime will cease processing the tool-chain. The error code and the name of the offending pre-processor are reported back to the user.
The beta can be downloaded from:
[href]http://www.dark-developer.co.uk/DE PTC BETA Download.zip[/href]
(edit: requires the .NET 2.0 framework)
This is a fully functional release of the manager. It does require a bit of manual installation which is documented in the readme. Bug reports, comments and feature requests are welcome and appreciated
To make this release more useful, I've included a simple pre-processor that adds conditional-compilation functionality. The pre-processor adds the #define, #undef, #ifdef, #ifndef, #else and #endif directives, allowing you to do stuff like this:
#define Test1
#define Test2
#ifdef test0
print "Can't see this."
#ifdef test2
print "Can't see this."
#else
print "Can't see this."
#endif
#endif
#ifdef test1
print "Can see this! (1)"
#undef test2
#ifdeF teSt2
print "Can't see this."
print "Can't see this."
#else
print "Can see this! (2)"
#ifndef test3
print "Can see this! (3)"
#else
print "Can't see this."
#ifdef test1
#else
#endif
#ifdef test2
print "Can't see this."
#else
print "Can't see this."
#endif
#endif
#endif
print "Can see this! (4)"
#ifndef TesT1
print "Can't see this."
#endif
#endif
print "Press any key to exit"
suspend for key
Danny Gregory BSc