To use CSPack in production mode, you'll need to customize its behavior by creating a PFF file. You can then use the PFF file as a command line parameter for CSPack.exe (the associated filename of this utility). For example, if you name your PFF file "MyPack.pff", you can run CSPack by invoking:
C:\Program Files\CSPro 8.0\CSPack.exe MyPack.pff
This assumes CSPro was installed in the default directory. Your PFF file must have a ".pff" extension.
The PFF file is a text file so you can create and modify it using any text editor (such as Notepad or Wordpad). Any combination of upper and lower case text may be used. Or, you can run CSPack once, and a PFF file will be automatically created for you. You can also manipulate PFF files in logic by using the
Pff object. The following is an example of a CSPack PFF file.
[Run Information]
Version=CSPro 8.0
AppType=Pack
[Files]
Application=.\Census.ent
ZipFile=.\Census.zip
ExtraFile=
Listing=.\CSPack.lst
[Parameters]
ViewListing=Always
The [Run Information] block is required and must appear exactly as shown in the example above
The [Files] block is required and defines all files that could be used by CSPack. Only Application is required.
- Application= the name of the application to be zipped. It must have an extension .cspack, .ent, .bch, or .xtb.
- ZipFile= the name of the ZIP file that will be produced by CSPack. If using a .cspack specification file, this entry is not required, and if present it will override the name of the ZIP file specified in the specification file.
- ExtraFile= the name of an additional file to include in the ZIP file. You can specify more than extra file.
- Listing= the name of the listing file that will be created.
The [Parameters] block is optional.
- ViewListing= determines whether or not the CSPack report is displayed with Text Viewer at the end of the run. If ViewListing=Never, then the report is not displayed. If ViewListing=OnError, then you will only see the report if any error occurred during ZIP operation. If ViewListing=Always, then the results will always be shown. If the line is missing the results will be displayed by default.
To create a ZIP file from a .cspack specification file without a corresponding PFF file, you can use the /pack argument:
"C:\Program Files (x86)\CSPro 8.0\CSPack.exe" /pack MyPack.cspack
You can also pack an application without the need for a .cspack specification file:
"C:\Program Files (x86)\CSPro 8.0\CSPack.exe" /pack Census.ent
In this instance, the name of the ZIP file created will be the name of the application with its extension replaced with .zip (e.g., Census.zip).
The CSPack tool was redesigned for CSPro 8.0. If running a PFF created up to CSPro 7.7:
- Silent= determines whether or not to run CSPack interactively, and can be "Yes" or "No." If running silently, the main CSPack dialog box will not display and the pack operation will take place without user intervention. If Silent="Yes", the PFF file must contain Application and ZipFile entries in the [Files] section.
- PackInclude= specifies whether to include any extra files in the ZIP file. Options, which can be separated by commas, include:
- InputFile: includes the application's input data file.
- ExternalFiles: includes any data files associated with the application's external dictionaries.
- UserFiles: includes any files associated with the application as user files (generated in logic).
- VSImages: includes any value set images associated with the application's dictionaries.
- Resources: includes any files in the application's resource folders.
These PFF flags are not used in CSPro 8.0+ and support for them will eventually be removed.