How to create functions in InstallBuilder?

Comments

1 comment

  • Avatar
    wojciechka

    Functions can be added in <functionDefinitionList> for project and component. They define an action list and optional list of arguments to show. For example:

    <project> ... <functionDefinitionList> <!-- Define the action --> <actionDefinition> <name>unattendedRunProgamWithProgress</name> <actionList> <showProgressDialog> <title>Please wait ...</title> <actionList> <runProgram progressText="Installing ${program}"> <program>${program}</program> <programArguments>--mode unattended ${programArguments}</programArguments> </runProgram> </actionList> </showProgressDialog> </actionList> <parameterList> <stringParameter name="program" value="" default=""/> <stringParameter name="programArguments" value="" default=""/> </parameterList> </actionDefinition> </functionDefinitionList> <initializationActionList> <!-- Use the new action --> <unattendedRunProgamWithProgress> <program>${yourProgram}</program> <programArguments>--prefix "${installdir}"</programArguments> </unattendedRunProgamWithProgress> </initializationActionList> ... </project>

    It is documented in more details in Creating Custom Actions section of installBuilder user guide.

Please sign in to leave a comment.