Using a Post-generation Script

Target Deployment Technology

In some cases, it can be necessary to complete the generation of the TDP in the target directory by adding an additional phase at the end of the generation.

To do this, the TDP editor runs a post-generation Perl script called postGen.pl, which can be launched automatically at the end of the TDP directory generation process.

To use the postGen script:

  1. In the TDP editor, right click on the Build Settings node and select Add child and Ascii File.
  2. Name the new node postGen.pl.
  3. Write a perl function performing the actions that you want to perform after the TDP directory is written by the TDP Editor.

Example

Here is a possible template for the postGen.pl script file:

sub postGen

{

$d=shift;

# the only parameter passed to this function is the path to the target directory

# here any action to be taken can be added

}

1;

The parameter $d contains <tdp_dir>/<tdp_name>, where <tdp_dir> is a chosen location for the TDP directory (by default, the targets subdirectory of the product installation directory), and <tdp_name> is the name of the current TDP directory

Related Topics

Creating a TDP