|
How to use PALCMD.EXE |
Top Previous Next |
|
The standalone command-line version PALCMD.EXE is useful when you want to automate the process of creating reports. PALCMD.EXE uses the same engine as the GUI version PAL.EXE and produces the same output.
Run PALCMD.EXE from the command prompt using the following syntax:
PALCMD projectpath|sourcepath [options]
Options are read from the project file. Some of the settings may be overridden by options on the command-line (see above).
The command-line version can, in contrast to the GUI version, also analyze source code without first creating a project. Just supply a source code path on the command-line instead of a project path. PALCMD will then use the settings according to the template which is used for new projects. These settings are in PAL.INI which is located in C:\Documents and Settings\<acc>\Application Data\Peganza\Pascal Analyzer.
The PAL.INI file is specially handled by PALCMD. If a PAL.INI file exists in the same folder as the program file itself, it will read the PAL.INI file from that location, otherwise it will read it from the same folder as the GUI program does. The GUI program will read the PAL.INI file from the special folder under "C:\Documents and Settings". In this way, if you keep the PALCMD.EXE in a special folder, you can make sure that it always uses the correct default options, by copying the PAL.INI file to that folder. This PAL.INI file will then not be affected of any changes that you happen to make while running the GUI program.
If an error occurs when PALCMD is run, the application terminates with exit code 99.
Example:
PALCMD
Shows help info and stops
PALCMD C:\projects\MyProj.pap
Runs PALCMD and analyses c:\projects\MyProj.pap
PALCMD "C:\My Units\MyUnits.pas" /F- /CBP
Runs PALCMD and analyses C:\My Units\MyUnits.pas with defaults as set in PAL.INI, but specifies that only the main file should be parsed, and that the compiler target is Borland Pascal 7.
PALCMD "C:\My Units\MyUnits.pas" /L=C:\PALCMD\Limits.txt
/F specifies the report format (text, HTML, XML)
This setting overrides the setting in the PAL.INI file or the project file.
/L specifies the path to a text file with limit info, in this case C:\PALCMD\Limits.txt.
For example, if the file contains this line:
WARN1=5
.. "WARN1" is the abbreviation for the section "'Interfaced identifiers that are used, but not outside of unit" in the Warnings Report. If then the number of warnings in a particular run of PALCMD.EXE exceeds 5, PALCMD.EXE will write out an error, and halt with an exit code of 99.
You can add how many lines as you wish to the limit file. Each line will be checked against the specified section and report. This feature is not available in PAL.EXE (GUI program).
/R specifies the report root folder
This setting overrides the setting in the PAL.INI file or the project file.
/S specifies search folders, separated with a semicolon
This setting overrides the setting in the PAL.INI file or the project file.
/T specifies the number of report threads to use
This setting overrides the setting in the PAL.INI file
See also:
|