Packaging Custom Code as a Plug-in
InstallAnywhere 2020
To make custom code available as a plug-in action in InstallAnywhere, you must first package it properly.
To package a custom code as a plug-in:
|
1.
|
Package the custom code and all of its resources in a JAR (just like for regular custom code). |
|
2.
|
Create a properties file called customCode.properties. This properties file needs to contain all of the information that InstallAnywhere needs to integrate the plug-in with the Advanced Designer. Place the properties file in the JAR with no stored path information (at the root level of the JAR). |
|
3.
|
Include the following properties in the properties file: |
|
•
|
plugin.main.class=<classname>—This property defines the class that implements the proper member of the InstallAnywhere API for a custom code action, panel, or console (such as a class that implements com.zerog.ia.api.pub.CustomCodeAction). |
|
•
|
plugin.name=<plug-in name>—This property identifies the name that InstallAnywhere uses for the plug-in on the Plug-Ins tab of the Advanced Designer's Choose an Action dialog box. |
|
•
|
plugin.type=<action | panel | console>—This property identifies when the plug-in can be used and which icon to use to represent it in the Advanced Designer. |
Optionally include one or more of the following properties:
|
•
|
property.<propertname>=<propertydefault>—This property tells the plug-in to populate the action's customizer with a property named <propertyname> and set to the default value of <propertydefault>. |
|
•
|
plugin.icon.path=<relative path to .png or .jpg file in JAR>—This property sets a custom 32x32 icon for the custom code plug-in of the Advanced Designer. |
|
•
|
plugin.available=<preinstall | install | postinstall | preuninstall | postuninstall>—This property identifies a comma-separated value list that defines the sequences in which the plug-in should be available. |
The following is an example of a properties file for a plug-in:
plugin.main.class=com.zerog.ia.customcode.util.fileutils.ExtractToFile
plugin.name=Extract to File
plugin.type=action
plugin.icon.path=myicon.gif
plugin.available=preinstall,install,postinstall
property.ExtractToFile_Source=path/to/file/in.zip
property.ExtractToFile_Destination=$USER_INSTALL_DIR$$/$myfile.txt
|
4.
|
Additionally, plug-ins can offer help to InstallAnywhere users on how to properly use the plug-in. Help is displayed in HTML, and is launched by the user pressing a button on the plug-ins customizer. InstallAnywhere displays the Help button if a help file is provided in the plug-in. To include installer help for your plug-in: |
|
a.
|
Create a file called help.htm, and instructions to this file. |
|
b.
|
Package it in the plug-in JAR (without stored path information). |
|
5.
|
Place the properly packaged JAR (with the custom code, its resources, and the properties file) in IA_HOME/plugins. |
The next time that you launch InstallAnywhere, the plug-in will be visible in the InstallAnywhere Choose an Action dialog box.
Open topic with navigation