To parameterize an SXP product, you must edit both the product archive and the parameter archive.
Edit the Product Archive
If the product you are packaging contains any kind of configuration file, such as *.cnf, that you intend to parameterize, you must edit the files.sxp file after you install the product on the Packaging Computer. In this example, you edit the organization.cnf file in order to parameterize it and adapt it for use at your site.
In the organization.cnf file, replace the keyword, Sales Department, with the parameter, $(Department).
The Installer checks all listed product files for parameters.
Alternatively, after packaging, you can use the CMP Editor to edit the packaged product, whose files are compressed in files.cmp. Using the CMP Editor is the only method to edit the files.cmp file.
Edit the Parameter Archive - General Steps
The following general steps ensure that the parameters you entered can be replaced by real values on the target computers:
Edit the Parameter Archive - Specific Steps for this Example
The following steps are the same as the general steps shown above, except that they have been modified for this example. Follow these steps to ensure that the parameters you entered can be replaced by real values on the target computers:
During installation on the target computer, the Installer resolves the parameter Department in the organization.cnf file. For all target computers in the dep-h-resources group, the parameters are replaced with the value human-resources. For all target computers in the dep-financials group, the parameters are replaced with the value financials.
Organization.cnf File before Installation
The contents of organization.cnf file after installation follows. The contents vary according to the group to which the target computer was assigned:
Product file on the Target Computer Assigned to Department: $(Department) (Files.sxp File:)
#Sign# ArchiveName=ReplPar Release=1000 SXP=1.0
#ReplaceParams# $(SxpRootDir1)\Organization.cnf #CmpArchives# files.cmp
#FilesInArchives# $(SxpRootDir1)\Organization.cnf
Organization.cnf File after Installation
For PCs that are assigned to the dep-h-resources group:
Product file on the target computer assigned to department: human-resources
For PCs that are assigned to the dep-financials group:
Product file on the target computer assigned to department: financials.
| Copyright © 2014 CA Technologies. All rights reserved. |
|