How do reuse my custom actions in different installers?
We use install builder for our various products.
I use the <actionDefinition> to create some of my own actions.
I would like those custom actions to be available to all of my install builder instances.
How would I do this?
I see a way to share components using the <include> directive. How could I do this for the custom actions?
Hi @JohnRocha,
Since you have several functions you can create a single component, for example:
<component name="functions">
...
<functionDefinitionList>
<actionDefinition name"action1">
...
</actionDefinition>
<actionDefinition name"action2">
...
</actionDefinition>
</functionDefinitionList>
...
<component>
You can then include the functions component as follows:
<project>
...
<componentList>
<include file="functions.xml" />
</componentList>
...
</project>
Best regards,
Michiel
Hi @JohnRocha,
You can add an <include> tag inside any list, so also inside the <functionDefinitionList>. You can find more information about it here:
If you plan to use more custom actions I recommend using a component that contains all the actions, and include it as a "library" component inside all your installers.
Best regards,
Michiel
Hello @michieldhont_ ,
Thank you for the suggestion.
How does placing the custom actions in a component work?
Looking at the documentation, I see that
How would I create component that provides a <functionDefinitionList>?
I understand that I could crate separate files for each <actionDefintion> and then pull those into the <functionDefinitionList> but that really doesn't scale well since we have several functions that we want to re-use.
Hi @JohnRocha,
Since you have several functions you can create a single component, for example:
<component name="functions">
...
<functionDefinitionList>
<actionDefinition name"action1">
...
</actionDefinition>
<actionDefinition name"action2">
...
</actionDefinition>
</functionDefinitionList>
...
<component>
You can then include the functions component as follows:
<project>
...
<componentList>
<include file="functions.xml" />
</componentList>
...
</project>
Best regards,
Michiel