All files that make up the final PIF product are defined in component sections in the prototype file. For the PIF product MERCHANT, add the following section to the prototype file MERCHANT.Any.@prm:
@COMPONENT: #chead: component1 ; #dir: bin , root , sys , drwxrwxrwx ; #file: bin/merchant.jar , /myhomepath/src/merchant.jar, root , sys , -r—r—r-- , 1 ; #file: bin/run_merchant.sh , /myhomepath/scripts/run_merchant.sh, root , sys , -r-xr-xr-x , 1 ; #slink: /usr/bin/run_merchant.sh , bin/run_merchant.sh ; @ENDCOMP:
The product information section defines the following product properties:
Defines the unique name of a component of the PIF product MERCHANT, in this case, component1.
Adds the bin directory to the PIF product MERCHANT. The user root is the owner of this directory, which is assigned to the group sys. Permissions are “read-write-execute” (rwx) for everybody.
Defines the product files of the PIF product MERCHANT. The first property value is the target name of the file. Directory structures have to be added to the target name, too. In this case, each file will be installed in the bin directory. The next property specifies the source file name. This is the path, where the files are located when the PIF product is built. The target’s owner, group, and access permissions follow it. The last property value (1) specifies the file type standard file.
Note: If the target file names are entered without a leading slash, the files are installed relative to the base directory of the product; otherwise, the files are installed using the absolute path name.
Creates a symbolic link in the /usr/bin directory. The second parameter is the path name of the source file.
Specifying files for the PIF product can be automated using the pifproto command from the command line. Additionally to creating the prototype file and the product information section, the pifproto command adds the paths and properties of all files stored in the product directory to the prototype file.
To specify files through the command line
pifproto -n MERCHANT -v 2.1.0.0 -a Any -d /tmp/merchant -b /home/merchant
The prototype file MERCHANT.Any.@prm is located in the current working directory.
To specify files through the Packager GUI
The New product dialog appears.
Product name: MERCHANT
Product version: 2.1.0.0
Product platform: Any
Template: standard.Any.@enu
The product MERCHANT is displayed and highlighted in the project pane. In the GUI work area, the current product properties are shown. The installation directory is preset with the value /opt/merchant. A standard component with the name component1 and a pre-install component are automatically created and displayed on the Components tab in the subproject pane.
The current prototype file is saved.
|
Copyright © 2014 CA Technologies.
All rights reserved.
|
|