These classes are designed to be used to control the execution of child console application processes. There are two classes: a class named TPJCustomConsoleApp that is provided a base class for user-defined sub-classes, and TPJConsoleApp that is used to provide a general way to run and manipulate console applications. Both classes are provided in a single unit, PJConsoleApp.
The classes enable the console application's standard input, standard output and standard error to be redirected to and from files or pipes. The classes can also time-slice the running of the console application to enable the calling application to continue processing and to enable redirected piped output to be processed.
For full details please see the online documentation.
The classes require Delphi 7 and later.
PJConsoleApp is suitable for compilation with both the 32 bit and 64 bit Delphi compilers (Delphi XE2 and later). However, the unit uses the Windows API so is not suitable for compilation for OSX.
The classes can be used with both the VCL and FireMonkey frameworks.
The Console Application Runner Classes and associated documentation and demo program source files are supplied in a zip file. Before installing, or using, you need to extract all the files from the zip file, preserving the directory structure. The following files will be extracted:
PJConsoleApp.pas – The source code of
the console application runner classes.
Docs\ChangeLog.txt – The project's change log.
Docs\Documentation.URL – Short-cut to the project's
online documentation.
Docs\MPL-2.0.txt – Mozilla Public License v2.0.
Docs\ReadMe.htm – The project's read-me file.
In addition to the above files you will find numerous demo projects in the
Demos sub-directory.
There are three possible ways to use the units.
PJConsoleApp.pas to your projects as
and when you need it.
The source code for numerous demo projects is included in the download. All
the demos and supporting files are stored in sub-folders of the
Demos directory.
Please note that some of the demos use units and classes from the
DelphiDabbler IO Utility Classes project. Before attempting to compile the affected
demos you need to download this project and copy the required units to the
Demos\IOUtils directory. Users of Delphi XE5 and later must
use IO Utility Classes v1.0.1 or later.
For more information see the file README.txt in the
Demos directory.
The demo programs are described in the Examples section of the online documentation.
A complete change log is provided in a text file that is included in the download.
The Console Application Runner Classes are released under the terms of the Mozilla Public License, v2.0.
Bugs can be reported or new features requested via the Issue Tracker.
If no similar report or request has been recorded already, use the New
Issue link to add a new issue. Please select the most appropriate
template from the Templates drop down list and apply the
Project-consoleapp label. If there is already a similar issue
please add a comment to it if there's anything you can add.
I'm Peter Johnson – a hobbyist programmer living in Ceredigion in West Wales, UK, writing write mainly in Delphi. My programs are available for download from http://www.delphidabbler.com/.